-
Notifications
You must be signed in to change notification settings - Fork 12
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
feat(batching): Data result store #357
Conversation
f3244ae
to
f0caf14
Compare
1bcac7a
to
796c5f8
Compare
b9f9bce
to
a263130
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe not part of this PR, but how does a solver go from DR_ID
to result to batch? In terms of lookups that seems difficult right now.
10ad9f2
to
a9bc161
Compare
827dec5
to
91b5452
Compare
// block_height is the height at which the data request was tallied. | ||
uint64 block_height = 4; | ||
// exit_code is the exit code of the tally wasm binary execution. | ||
uint32 exit_code = 5; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oopa, I realize seda-wasm-vm
actually returns an i32
from the rust side and an int
on the go side. But tbh we should change this to a u8
/uint8
I think. No reason to have so many options for an exit code imo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it should be uint8
, but protobuf doesn't have that type :/
seda-wasm-vm should be fixed to return a u8
from the rust side and uint8
from the go side, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we can make an issue for that, or maybe I'll just do it in the logging pr.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh... wasmer returns an i32
as an exit code I see...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see in the wasi codebase where it could be negative but I asked a question to the wasi
team. Let's see what they say and maybe we should be keeping it as an i32
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! I am just casting it to uint8 on the module side for now. Franklin mentioned that process::exit
can only use 8 bits.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm waiting on a response here wasmerio/wasmer#5131 for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, we discussed this, instead on the tally VM we should take this exit code from WASM and put that exit code in the string and reserve a number for WASMER exit codes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
link to the issue: sedaprotocol/seda-wasm-vm#30
…gration to module chore: Improve data result hasher and identify TODOs
4b0f3e2
to
f04a1c2
Compare
Explanation of Changes
This PR migrates the data result store from the Core Contract to the batching module. Once the tally module's end blocker completes a tally of a given data request, it will construct and store the data result keyed by its hash. This means that the tally end blocker will no longer send data result data to the contract. Instead, it will simply notify the contract of the tally completion of a given data request by sending its data request ID.
Task list beyond this PR
DataResult
type and its hash, which is also its ID, for the protocolCloses #355