-
Notifications
You must be signed in to change notification settings - Fork 211
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
Update seal calls #1025
Update seal calls #1025
Conversation
Signed-off-by: xermicus <[email protected]>
Signed-off-by: Cyrill Leutwiler <[email protected]>
Signed-off-by: Cyrill Leutwiler <[email protected]>
Signed-off-by: Cyrill Leutwiler <[email protected]>
Signed-off-by: Cyrill Leutwiler <[email protected]>
Signed-off-by: Cyrill Leutwiler <[email protected]>
Signed-off-by: Cyrill Leutwiler <[email protected]>
Signed-off-by: Cyrill Leutwiler <[email protected]>
Signed-off-by: Cyrill Leutwiler <[email protected]>
Signed-off-by: Cyrill Leutwiler <[email protected]>
Signed-off-by: Cyrill Leutwiler <[email protected]>
Signed-off-by: Cyrill Leutwiler <[email protected]>
Signed-off-by: Cyrill Leutwiler <[email protected]>
Signed-off-by: Cyrill Leutwiler <[email protected]>
Signed-off-by: Cyrill Leutwiler <[email protected]>
Signed-off-by: Cyrill Leutwiler <[email protected]>
Signed-off-by: Cyrill Leutwiler <[email protected]>
Signed-off-by: xermicus <[email protected]>
Signed-off-by: Cyrill Leutwiler <[email protected]>
Signed-off-by: Cyrill Leutwiler <[email protected]>
Signed-off-by: Cyrill Leutwiler <[email protected]>
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 really like your macros, we should reuse them in emit more generally.
Thanks! I considered this but it would be quite some work to change everything.I'd not be against it generally, but rather do it in a different PR (or as a sporadic effort when touching the code anyways, because it is easier to understand existing code after switching it to using these macros). |
Signed-off-by: Cyrill Leutwiler <[email protected]>
Signed-off-by: Cyrill Leutwiler <[email protected]>
Signed-off-by: Cyrill Leutwiler <[email protected]>
Signed-off-by: Cyrill Leutwiler <[email protected]>
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.
Please, fix the typo before merging.
Co-authored-by: Lucas Steuernagel <[email protected]> Signed-off-by: Cyrill Leutwiler <[email protected]>
Signed-off-by: Cyrill Leutwiler <[email protected]> Co-authored-by: Lucas Steuernagel <[email protected]> Signed-off-by: Cyrill Leutwiler <[email protected]>
This PR updates the
seal_
calls to reflect newer versions. Some of them useseal1
and some storage APIs temporarily__unstable__
now (will be changed as soon as they are released to some stable version).Individual calls updated:
seal_random
: Returns 4 more bytes (the block number) so the output buffer size had to be extendseal_instantiate
: Args changedseal_terminate
: Args changedseal_call
: Args (flags can be done later if needed)seal_set_storage
: Signature changed.key_len
will be needed for transparent hashing, once we fix the metadata generation. The newly introduced return type (the length of the pre-existing value, if any) is ignore for now since in solidity we don't use that.seal_clear_storage
: Same as above.seal_get_storage
: Arguments changedAdditionally I decided to introduce a few macros to get rid of some awkward and repeating patterns and make it easier to reason about the emitted code.