Skip to content
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

Test replay of EOS EVM mainnet with contract built using updated silkworm #617

Closed
Tracked by #208
arhag opened this issue Jul 6, 2023 · 1 comment
Closed
Tracked by #208
Assignees

Comments

@arhag
Copy link
Member

arhag commented Jul 6, 2023

Replay EOS mainnet using the new evm_runtime (the one built with latest silkworm version) and check if the contract state is the same as the one we currently have with version 0.5.0

@arhag arhag added this to EOS EVM Jul 6, 2023
@arhag arhag converted this from a draft issue Jul 6, 2023
@arhag arhag added the 👍 lgtm label Jul 6, 2023
@arhag arhag added this to the 0.6.0 milestone Jul 6, 2023
@elmato elmato moved this from Todo to In Progress in EOS EVM Jul 6, 2023
@BenjaminGormanPMP BenjaminGormanPMP moved this from In Progress to Done in EOS EVM Jul 18, 2023
@elmato
Copy link
Contributor

elmato commented Jul 19, 2023

Replayed mainnet from block 302534638 to 320583740
snapshot used: snapshot-2023-04-02-16-eos-v6-0302534637.bin

Same state hash for both contracts:

Old:
state hash 4d6f1525163cdfd3b4b80384df2b64248907ef9dc9cb3623de50eb10c7b1fa88
eosio.evm 9b65b25561e945cbdf23d205b1d6fd9e713b31411ca600c74d814879b15c09ed

New:
state hash 4d6f1525163cdfd3b4b80384df2b64248907ef9dc9cb3623de50eb10c7b1fa88
eosio.evm 10c38b04886e209b850d6b99188c6305ad1053b1546eb90774fe48a570b655a40

The only difference in the contract deployed with the one in the eos-evm PR was:

-    eosio::check(get_code() == token_account && quantity.symbol == token_symbol, "received unexpected token");
+    if(!(get_code() == token_account && quantity.symbol == token_symbol)) return;

To not raise an exception in case the contract receives a token different from EOS.

The snapshot tool to read the state of the contract
https://github.com/elmato/leap/tree/snapshot-reader/programs/snapshot-reader

The version of nodes to swap the wasm of the contract
https://github.com/elmato/leap/tree/v4.0.4-eosio-evm-hack

@elmato elmato closed this as completed Jul 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

2 participants