Skip to content

chore(sales): log error when datasets size is different then expected #1155

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions codex/sales/states/downloading.nim
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,15 @@ method run*(
return some State(SaleErrored(error: err, reprocessSlot: false))

trace "Download complete"
without keyId =? reservation.key, error:
error "Couldn't get reservation key", id = $reservation.id, error = error.msg

if updatedReservation =? await reservations.get(keyId, Reservation):
if updatedReservation.size != 0:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not fail the contract tho, if this is whats going on. We should either return that extra capacity back, or just ignore it, since the user is allegedly already paying for it.

error "After downloading the data there is unused capacity in Reservation"
else:
error "Couldn't get updated reservation"

return some State(SaleInitialProving())
except CancelledError as e:
trace "SaleDownloading.run was cancelled", error = e.msgDetail
Expand Down
Loading