diff --git a/package.json b/package.json index b2ea3660ff9..8a147bfe37a 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "eslint-config-airbnb-base": "^15.0.0", "eslint-plugin-mocha": "^9.0.0", "ethereum-waffle": "^3.4.0", - "ethereumjs-util": "^7.1.4", + "ethereumjs-util": "7.1.4", "ethers": "^5.4.7", "ffjavascript": "^0.2.46", "fs": "^0.0.1-security", diff --git a/tools/ethereum-tests/GeneralStateTests/stExample/invalidTr.json b/tools/ethereum-tests/GeneralStateTests/stExample/invalidTr.json new file mode 100644 index 00000000000..ada57e1fc58 --- /dev/null +++ b/tools/ethereum-tests/GeneralStateTests/stExample/invalidTr.json @@ -0,0 +1,228 @@ +{ + "oldStateRoot": "0x0ea67e9a0d90525c8e52f671997479ef0b1a7639dcd159f305ff3b0ec8d5b8a5", + "newStateRoot": "0x4a17a5ae0d1445cd895aaa82d35c2598bc2f6a96767a473acd4c6044916f33c5", + "oldAccInputHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "newAccInputHash": "0x84496a5c460e7d07da277b20354bcdc96df5757f7bb27b99832c219c2d46fbe8", + "newLocalExitRoot": "0x0000000000000000000000000000000000000000000000000000000000000000", + "oldNumBatch": 0, + "newNumBatch": 1, + "chainID": 1000, + "batchL2Data": "0xe4800a8203e894095e7baea6a6c7c4c2dfeb977efac326af552d87830186a0808203e88080c58bde6c5238d2973b29ab651b67cd7a6f9139417f2656962b37a6865820ce0b00c53cc26ba3e0e9dcd369d1f6343b4e006549bd0cfe23380c5b058e446b82211c", + "globalExitRoot": "0x090bcaf734c4f06c93954a827b45a6e8c67b8e0fd1e0a35a1c5982d6961828f9", + "timestamp": "0x03e8", + "sequencerAddr": "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "batchHashData": "0x78b4789eeb88a31894e42994effecbc16ad9afa1ee24f3bbb5febb6257e7c124", + "contractsBytecode": { + "0x72529f4a50096fa8d9461582683126a2a5ceaf87634c8b2c3bd4e135181977c1": "0x600160010160005500" + }, + "db": { + "0x0ea67e9a0d90525c8e52f671997479ef0b1a7639dcd159f305ff3b0ec8d5b8a5": [ + "f62b51029b170e66", + "b34cb5990f8b3c07", + "0188ad64a0528367", + "171e1c2b5c2b1fd8", + "e7ba1a183efc2bff", + "0f10f4e638e3e7bc", + "b57eccf4c8fb6010", + "f25b28c63ada25af", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000" + ], + "0x171e1c2b5c2b1fd80188ad64a0528367b34cb5990f8b3c07f62b51029b170e66": [ + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "bee045da90c727cd", + "4d3178a0ca798ab9", + "f9199b43fb284028", + "8fd8578f1e8e06a0", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000" + ], + "0x8fd8578f1e8e06a0f9199b43fb2840284d3178a0ca798ab9bee045da90c727cd": [ + "c49d0fbd9f78bf46", + "3196d3e2abc3afb0", + "76c5e7e3af83f349", + "e7de04af17c00e54", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000" + ], + "0xe7de04af17c00e5476c5e7e3af83f3493196d3e2abc3afb0c49d0fbd9f78bf46": [ + "1ea45b281b40efe3", + "4059f408932e39cb", + "18b058bc1b3f221c", + "21354724361f509e", + "e05168c189d5a33e", + "18cef1acf968f329", + "7593acbe0d2bc7a3", + "ae0825de54dfe6ce", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000" + ], + "0x21354724361f509e18b058bc1b3f221c4059f408932e39cb1ea45b281b40efe3": [ + "708c2f9c65428551", + "4d3f8172a23c24a6", + "157f26fcf8607970", + "36439f7ed478b943", + "54364fe49cd259a1", + "89aec00ac9cf294b", + "505c89e323a42b51", + "f8bab960de6e29c9", + "0000000000000001", + "0000000000000000", + "0000000000000000", + "0000000000000000" + ], + "0xf8bab960de6e29c9505c89e323a42b5189aec00ac9cf294b54364fe49cd259a1": [ + "00000000a7640000", + "000000000de0b6b3", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000" + ], + "0xae0825de54dfe6ce7593acbe0d2bc7a318cef1acf968f329e05168c189d5a33e": [ + "7033708f92426751", + "15b33f47d2213630", + "25d913f2aaa99efc", + "581e30728b9fb0fa", + "ab17db14abfbfd5b", + "a28d334e21258210", + "fe26f86ad9220a23", + "2faed58ce6cb282f", + "0000000000000001", + "0000000000000000", + "0000000000000000", + "0000000000000000" + ], + "0x2faed58ce6cb282ffe26f86ad9220a23a28d334e21258210ab17db14abfbfd5b": [ + "0000000000000009", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000" + ], + "0xf25b28c63ada25afb57eccf4c8fb60100f10f4e638e3e7bce7ba1a183efc2bff": [ + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "96d469a32612a296", + "20e34624c961acf5", + "bb35908db4ad9262", + "9d8e25e68756f073", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000" + ], + "0x9d8e25e68756f073bb35908db4ad926220e34624c961acf596d469a32612a296": [ + "d746dd186cce6e4b", + "502f1085ef292ed0", + "59e46acef1c36f80", + "8cccb3bb0c80567b", + "6cb25b534127f86a", + "ce95be0d6f446b3a", + "5e990482c60eb78a", + "a694f23babc26932", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000" + ], + "0x8cccb3bb0c80567b59e46acef1c36f80502f1085ef292ed0d746dd186cce6e4b": [ + "3241f1affdae9770", + "1f02d07ac50b8806", + "3bc686834c0d074f", + "e23a251135aed0d3", + "54364fe49cd259a1", + "89aec00ac9cf294b", + "505c89e323a42b51", + "f8bab960de6e29c9", + "0000000000000001", + "0000000000000000", + "0000000000000000", + "0000000000000000" + ], + "0xa694f23babc269325e990482c60eb78ace95be0d6f446b3a6cb25b534127f86a": [ + "fb2b2aabe438f671", + "47a418e4f211fb3d", + "31b3a9d0f253b10a", + "b4a8760c636ad671", + "3417fdb40c84493d", + "4300c66e56214a42", + "fe51218e329c32d3", + "1bba69b0aa0fb8ab", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000" + ], + "0xb4a8760c636ad67131b3a9d0f253b10a47a418e4f211fb3dfb2b2aabe438f671": [ + "18494d072c78f239", + "58cc161446a33618", + "45a05ce65589af64", + "469fb6c5232e7791", + "cde3826d73bcc1a4", + "ea46a3518d7decf7", + "906b75ec76775832", + "421d75e2231a3c5d", + "0000000000000001", + "0000000000000000", + "0000000000000000", + "0000000000000000" + ], + "0x421d75e2231a3c5d906b75ec76775832ea46a3518d7decf7cde3826d73bcc1a4": [ + "00000000181977c1", + "000000003bd4e135", + "00000000634c8b2c", + "00000000a5ceaf87", + "00000000683126a2", + "00000000d9461582", + "0000000050096fa8", + "0000000072529f4a" + ], + "0x1bba69b0aa0fb8abfe51218e329c32d34300c66e56214a423417fdb40c84493d": [ + "0d60984075ba5414", + "2ca38b225f1b6569", + "02cb3096dde1d962", + "6a4e58163922a986", + "d074b8cee5dcf415", + "2346a1b4c0f390e8", + "47969c1f5a6a25b1", + "da62fdf84a21108e", + "0000000000000001", + "0000000000000000", + "0000000000000000", + "0000000000000000" + ], + "0xda62fdf84a21108e47969c1f5a6a25b12346a1b4c0f390e8d074b8cee5dcf415": [ + "0000000000000001", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000" + ] + } +} \ No newline at end of file diff --git a/tools/ethereum-tests/eth-tests-folder.sh b/tools/ethereum-tests/eth-tests-folder.sh index 898bf770057..73859fd0ffe 100755 --- a/tools/ethereum-tests/eth-tests-folder.sh +++ b/tools/ethereum-tests/eth-tests-folder.sh @@ -4,9 +4,15 @@ if [ -d "tests" ] then rm -rf tests git clone https://github.com/ethereum/tests.git + cd tests + git checkout 9e0a5e00981575de017013b635d54891f9e561ef + cd ../ fi else git clone https://github.com/ethereum/tests.git + cd tests + git checkout 9e0a5e00981575de017013b635d54891f9e561ef + cd ../ fi # gen tests diff --git a/tools/ethereum-tests/eth-tests.sh b/tools/ethereum-tests/eth-tests.sh index dc985f6e88d..56ab171b1e3 100755 --- a/tools/ethereum-tests/eth-tests.sh +++ b/tools/ethereum-tests/eth-tests.sh @@ -8,9 +8,15 @@ if [ -d "tests" ] rm -rf tests rm -r eth-inputs git clone https://github.com/ethereum/tests.git + cd tests + git checkout 9e0a5e00981575de017013b635d54891f9e561ef + cd ../ fi else git clone https://github.com/ethereum/tests.git + cd tests + git checkout 9e0a5e00981575de017013b635d54891f9e561ef + cd ../ fi clone_time=$(date +%s) echo -e "git clone time: $((clone_time - start_time))" >> times-eth.txt diff --git a/tools/ethereum-tests/no-exec.json b/tools/ethereum-tests/no-exec.json index 71d4dd270ab..32d2a89ae04 100644 --- a/tools/ethereum-tests/no-exec.json +++ b/tools/ethereum-tests/no-exec.json @@ -9373,6 +9373,42 @@ { "name": "stTransactionTest/Opcodes_TransactionInit_35.json", "description": "Bytecode starts with 0xEF (we support EIP-3541 in Berlin hardfork). Equivalent tests: zkevm-testvectors/tools-calldata/evm/generate-test-vectors/gen-op-create.json [id: from 4 to 7] & zkevm-testvectors/tools-calldata/evm/generate-test-vectors/gen-test-deploy.json [id: from 8 to 9]" + }, + { + "name": "stSystemOperationsTest/ABAcalls1", + "description": "tx gas > 30M" + }, + { + "name": "stSystemOperationsTest/ABAcalls2", + "description": "tx gas > 30M" + }, + { + "name": "stSpecialTest/JUMPDEST_Attack", + "description": "tx gas > 30M" + }, + { + "name": "stSpecialTest/JUMPDEST_AttackwithJump", + "description": "tx gas > 30M" + }, + { + "name": "stStaticCall/static_ABAcalls1_1", + "description": "tx gas > 30M" + }, + { + "name": "stStaticCall/static_ABAcalls2_1", + "description": "tx gas > 30M" + }, + { + "name": "stStaticCall/static_CallRecursiveBomb0", + "description": "tx gas > 30M" + }, + { + "name": "stStaticCall/static_CallRecursiveBombPreCall", + "description": "tx gas > 30M" + }, + { + "name": "stStaticCall/static_CallRecursiveBombPreCall2", + "description": "tx gas > 30M" } ] } \ No newline at end of file diff --git a/tools/ethereum-tests/setup-all.sh b/tools/ethereum-tests/setup-all.sh index 9f1e9a5eeb6..87458267304 100755 --- a/tools/ethereum-tests/setup-all.sh +++ b/tools/ethereum-tests/setup-all.sh @@ -3,6 +3,9 @@ if [ -d "tests" ] echo "ethereum/tests exist" else git clone https://github.com/ethereum/tests.git + cd tests + git checkout 9e0a5e00981575de017013b635d54891f9e561ef + cd ../ fi cd ../../../ diff --git a/tools/ethereum-tests/setup.sh b/tools/ethereum-tests/setup.sh index abc8d066fd0..cb8c484e34e 100755 --- a/tools/ethereum-tests/setup.sh +++ b/tools/ethereum-tests/setup.sh @@ -3,4 +3,7 @@ if [ -d "tests" ] echo "ethereum/tests exist" else git clone https://github.com/ethereum/tests.git + cd tests + git checkout 9e0a5e00981575de017013b635d54891f9e561ef + cd ../ fi \ No newline at end of file diff --git a/tools/ethereum-tests/update-tests-general.sh b/tools/ethereum-tests/update-tests-general.sh index 5bf1e89fc3e..670ab05e049 100755 --- a/tools/ethereum-tests/update-tests-general.sh +++ b/tools/ethereum-tests/update-tests-general.sh @@ -5,9 +5,15 @@ if [ -d "tests" ] rm -rf tests rm -r eth-inputs git clone https://github.com/ethereum/tests.git + cd tests + git checkout 9e0a5e00981575de017013b635d54891f9e561ef + cd ../ fi else git clone https://github.com/ethereum/tests.git + cd tests + git checkout 9e0a5e00981575de017013b635d54891f9e561ef + cd ../ fi dir=./GeneralStateTests for entry in "$dir"/*