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
Implement generational storage with SELFDESTRUCT
tests
#84
Conversation
Hm, getting an error that I'm missing a file? Can you double-check that it's pushed? Can see the issue here: https://github.com/aurora-is-near/aurora-engine/pull/84/checks?check_run_id=2572055068#step:6:1400 pub fn load() -> Self {
Self(solidity::ContractConstructor::compile_from_extended_json(
"etc/eth-contracts/artifacts/contracts/StateTest.sol/SelfDestructFactory.json",
))
} |
Looks like it's supposed to be generated by |
By the way @mfornet is Even if |
Noted. I'll look into it. Update: I know what is throwing the error. It has to do with storage management in the near-vm-runner. You can see the error being created when you evict storage that somehow was not accounted for: logic.rs#L2125. I can make the error not happen by increasing |
Got it now @birchmd |
… released in future transactions (#85)
* Base precompile code between connectors (#73) * Base precompile code between connectors * Handle errors and validate input * Use proper result * Document `aurora encode-address` usage. * Cache cargo artifacts between CI runs. (#92) * Address comments from audit. (#86) * Validate register length in `read_input_arr20()` * Only read register length in `Engine::get_code_size` * Add `read_input_borsh()` * Ensure `method.args.len() == args_decoded.len()` * Ensure register size is 8 in `read_u64` * Use constant to specify the register ID used in `read_input()` * Reduce size of `cargo cache` in CI. (#95) * Define a `Wei` newtype for balances. (#96) * Fix evm-bully builds after recent refactoring. (#100) * Refactor `Engine::get_state` to return a `Result`. (#99) * Ensure that `Cargo.lock` in the repo is valid. (#101) * Remove unneeded nightly feature. (#102) * Implement BC generational storage. * fix address input * remove note * put key on the end of the storage key * remove pub from methods * Dispatch precompiles on the full address. (#107) * Support state migration on upgrade. (#103) * Implement the ETH connector. (#59) * Move when to call `set_generation` * Fix arg Co-authored-by: Marcelo Fornet <mfornet94@gmail.com> Co-authored-by: Arto Bendiken <arto@aurora.dev> Co-authored-by: Michael Birch <michael@near.org> Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com> Co-authored-by: Evgeny Ukhanov <mrlsd@ya.ru>
SELFDESTRUCT
tests
@joshuajbouw @mfornet Please resolve the conflicts now after the merge of #87. |
Just merged |
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.
Generally fine, I still have to wait for the CI to go through its run, but my only complaint is that there is obviously quite a bit of feature creep going on here. Do be very careful with that going forward. Would be best to have each of those as separate PRs. Also, do thoroughly document all changes that had been made in the description.
Found a subtle bug in the way keys were created. Some tests are still failing (see CI), and is a regression introduced in PR #87, already checked on previous commit that it was working fine. I was looking into it, but still haven't figured out the issue.
At step 3 the transaction fails. |
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.
Great work team!
* Introduce precompiles for the ETH & ERC-20 connectors. (#51) * Implement generational storage with `SELFDESTRUCT` tests. (#84) * Remove the dependency on Lunarity. (#115) * Fix Clippy complaint with `+nightly`. (#117) * Simplify the `sdk::read_u64` return type. (#118) * Add an `is_used_proof` interface. (#120) * Add an `evm-bully=yes` build to CI. (#121) * Handle transaction gas limit properly. (#123) * Fix u128 JSON parsing & tests in the ETH connector. (#125) * Fix evm-bully builds. (#130) * Add JSON custom error types. (#131) * Don't burn NEP-141 on deposit. (#133) * Fix needless borrows. (#135) * Improve and refactor the ETH connector. (#136) * Add a macro for logging. (#142) Co-authored-by: Aleksey Kladov <aleksey@near.org> Co-authored-by: Arto Bendiken <arto@aurora.dev> Co-authored-by: Evgeny Ukhanov <evgeny@aurora.dev> Co-authored-by: Frank Braun <frank@aurora.dev> Co-authored-by: Joshua J. Bouw <joshua@aurora.dev> Co-authored-by: Kirill <kirill@aurora.dev> Co-authored-by: Marcelo Fornet <marcelo@aurora.dev> Co-authored-by: Michael Birch <michael@aurora.dev>
* Introduce precompiles for the ETH & ERC-20 connectors. (#51) * Implement generational storage with `SELFDESTRUCT` tests. (#84) * Fix u128 JSON parsing & tests in the ETH connector. (#125) * Add JSON custom error types. (#131) * Don't burn NEP-141 on deposit. (#133) * Fix needless borrows. (#135) * Improve and refactor the ETH connector. (#136) * Add a macro for logging. (#142) Co-authored-by: Aleksey Kladov <aleksey@near.org> Co-authored-by: Arto Bendiken <arto@aurora.dev> Co-authored-by: Evgeny Ukhanov <evgeny@aurora.dev> Co-authored-by: Frank Braun <frank@aurora.dev> Co-authored-by: Joshua J. Bouw <joshua@aurora.dev> Co-authored-by: Kirill <kirill@aurora.dev> Co-authored-by: Marcelo Fornet <marcelo@aurora.dev> Co-authored-by: Michael Birch <michael@aurora.dev>
Check state is removed after selfdestruct is called following this description:
https://gist.github.com/mfornet/a8ffcedfffd22612e34cf0b3c3f5c9e3
@joshuajbouw use this test, to check that reset state is working.
Also add a test (
test_self_destruct_with_submit
) where function that callselfdestruct
is called usingengine.submit
rather thanengine.call
and it fails with:This was found by chance. @birchmd @artob can you take a look at this.