-
Notifications
You must be signed in to change notification settings - Fork 20
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(storage) : add transient storage for cancun #292
Conversation
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.
your approach is correct! however this PR is incomplete, please request for review at least after passing the CI or it would be inefficient for requesting changes to fix the CI, on the other hand, feel free to request for review if you want to identify if you are in the right direction ( the answer is yes for the current PR! )
- CI is not passed
- need to merge the transient storage with storage in the token parser in codegen ( add a new field to Storage for identify if the passed struct is transient or not )
- missing handlers in the host function registry https://github.com/zink-lang/zink/blob/main/codegen/src/wasm/host.rs
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.
Sorry for the late! Everything looks good now! Please fix the CI 🙏
In case you don't know how to process tests locally
# test all tests
cargo tt
# build all examples
cargo be
# test all examples
cargo te
# run clippy to all packages
cargo cc
@clearloop i'm missing something with the exports |
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.
we don't need HostFunc::TransientOp
since it is actually HostFunc::Evm
now ^ ^
yeah true but the inability of the example to not find the transient macro is suprising |
@clearloop i think i need help here |
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.
Just import-export issues ))
error[E0433]: failed to resolve: could not find `transient_storage` in `zink`
--> examples/transient_storage.rs:10:1
|
10 | #[zink::transient_storage(i32)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| could not find `transient_storage` in `zink`
| help: a trait with a similar name exists: `TransientStorage`
|
= note: this error originates in the attribute macro `zink::transient_storage` (in Nightly builds, run with -Z macro-backtrace for more info)
this is not pointing to the proc-macro but the path zink::transient_storage::TransientStorage
in your quote
haha
Co-authored-by: clearloop <[email protected]>
Co-authored-by: clearloop <[email protected]>
@clearloop transient storage is not present yet in revm cachedb |
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.
@clearloop transient storage is not present yet in revm cachedb
Oh I saw it, because it is temp storage, in this case, we just need a set_get call to verify our implementation
Co-authored-by: clearloop <[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.
You mapped the wrong opcodes for transient storage, please don't trust AI's outputs for the opcodes, comparing them with evm.codes please
Co-authored-by: clearloop <[email protected]>
Co-authored-by: clearloop <[email protected]>
@clearloop done |
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.
LGTM! Bounty transaction: https://polygonscan.com/tx/0x53ba55954ef3f1410f61af86885231eef428cd140bab80ad384bacf2ae305541
Resolves #260
0x30bE4D758d86cfb1Ae74Ae698f2CF4BA7dC8d693
Changes