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

Fix Devnet0 fixtures: BLS Fixes (Common/EVM), Empty System Address (VM) #3400

Merged
merged 13 commits into from
May 6, 2024

Conversation

jochem-brouwer
Copy link
Member

@jochem-brouwer jochem-brouwer commented May 4, 2024

  • Download the devnet0 fixtures https://github.com/ethereum/execution-spec-tests/files/15202215/fixtures_develop.tar.gz
  • Put this inside the ethereum-tests folder, for instance in the Devnet0 folder
  • Now run the Cancun -> Prague transition tests:
  • npm run test:blockchain -- --fork=CancunToPragueAtTime15k --dir=../Devnet0/blockchain_tests/
  • Also run the Prague tests:
  • npm run test:blockchain -- --fork=Prague --dir=../Devnet0/blockchain_tests/

Note: this PR is a placeholder for any bugfixes which might arise if we find those via the tests. It should pass: npm run test:blockchain -- --fork=Prague --dir=../Devnet0/

Bugs found and solved:

  • 6357645: correctly encode 7002 uint64 amounts
  • f427ca0: ensure system address is not created if it is empty (this messes up state roots once we perform the system call to the withdrawals address). TODO: this can be done cleaner, probably cleanup touched accounts (should be done after processing requests)
  • 28b703f: this fixes the BLS fixtures. On G1Add and G2Add the "subgroup check" does not have to be done (note: I have no idea what a subgroup is, but it passes the tests)

Copy link

codecov bot commented May 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.15%. Comparing base (61acbd3) to head (f427ca0).
Report is 22 commits behind head on master.

❗ Current head f427ca0 differs from pull request most recent head e17cee8. Consider uploading reports for the commit e17cee8 to get more accurate results

Additional details and impacted files

Impacted file tree graph

Flag Coverage Δ
blockchain 90.97% <ø> (?)
common 94.29% <ø> (?)
devp2p 81.85% <ø> (?)
trie 59.64% <ø> (?)
tx ?
util 81.45% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

@jochem-brouwer
Copy link
Member Author

jochem-brouwer commented May 4, 2024

Failing fixtures: (just as in 3388)

Errors thrown in file: lockchain_tests/prague/eip2537_bls_12_381_precompiles/bls12_g1add/valid.json test: tests/prague/eip2537_bls_12_381_precompiles/test_bls12_g1add.py::test_valid[fork_Prague-blockchain_test-bls_g1add_g1_wrong_order+g1-]:
	Error: invalid receiptTrie (vm hf=prague -> block number=1 hash=0x290b8e9874704c1ee1667b545396a56a7943a1dfbec3cc36fae9c3886cf57d78 hf=prague baseFeePerGas=7 txs=1 uncles=0)
	correct last header block
Errors thrown in file: lockchain_tests/prague/eip2537_bls_12_381_precompiles/bls12_g1add/valid.json test: tests/prague/eip2537_bls_12_381_precompiles/test_bls12_g1add.py::test_valid[fork_Prague-blockchain_test-not_in_subgroup_1-]:
	Error: invalid receiptTrie (vm hf=prague -> block number=1 hash=0x25dfa23823c5f6f75f08aa471c34959af8925b71745c412d77bd1db45423bdc8 hf=prague baseFeePerGas=7 txs=1 uncles=0)
	correct last header block
Errors thrown in file: lockchain_tests/prague/eip2537_bls_12_381_precompiles/bls12_g1add/valid.json test: tests/prague/eip2537_bls_12_381_precompiles/test_bls12_g1add.py::test_valid[fork_Prague-blockchain_test-not_in_subgroup_2-]:
	Error: invalid receiptTrie (vm hf=prague -> block number=1 hash=0xe89ea1075273053645c5e1156ba7dd03b2bfe1f05819e1acccee958149768ffd hf=prague baseFeePerGas=7 txs=1 uncles=0)
	correct last header block
Errors thrown in file: lockchain_tests/prague/eip2537_bls_12_381_precompiles/bls12_g2add/valid.json test: tests/prague/eip2537_bls_12_381_precompiles/test_bls12_g2add.py::test_valid[fork_Prague-blockchain_test-bls_g2add_g2_wrong_order+g2-]:
	Error: invalid receiptTrie (vm hf=prague -> block number=1 hash=0x5de38d4edb24243b05e2d90d204f27f02374abbb350d8ad6f5e3bcb2da8c6ec3 hf=prague baseFeePerGas=7 txs=1 uncles=0)
	correct last header block
Errors thrown in file: lockchain_tests/prague/eip2537_bls_12_381_precompiles/bls12_g2add/valid.json test: tests/prague/eip2537_bls_12_381_precompiles/test_bls12_g2add.py::test_valid[fork_Prague-blockchain_test-not_in_subgroup-]:
	Error: invalid receiptTrie (vm hf=prague -> block number=1 hash=0x9dce4a60e3e6f0d938b470a02f984a25cbcbffca08288a643f8f88b7bec3f127 hf=prague baseFeePerGas=7 txs=1 uncles=0)
	correct last header block

@jochem-brouwer jochem-brouwer changed the title Add support for Cancun -> Prague transition Fix Devnet0 fixtures May 4, 2024
@jochem-brouwer
Copy link
Member Author

All fixtures pass 🎉

Only need to fix the outdated BLS tests on EVM by updating them to: https://eips.ethereum.org/assets/eip-2537/test-vectors

Note: these test vectors also have "failing" cases which we are currently not covering (note: these test vectors likely are the same as we run on the fixtures)

image

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: one test has been moved into the new eip-2537-BLS.spec.ts. The other tests are covered by the test cases in the new test runner.

@jochem-brouwer jochem-brouwer marked this pull request as ready for review May 6, 2024 09:14
@g11tech g11tech merged commit 55eefe4 into master May 6, 2024
33 of 34 checks passed
@holgerd77 holgerd77 deleted the eip2935-test-runner-transition branch May 12, 2024 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants