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

EIP-7702 Skip CodeDelegation processing for invalid recid #8212

Conversation

siladu
Copy link
Contributor

@siladu siladu commented Jan 31, 2025

Fixes these Hive tests:
#8200 (comment)

@siladu siladu changed the title EIP-7702 Throw for invalid recid before trying to recover signature EIP-7702 Skip CodeDelegation precompute for invalid recid Jan 31, 2025
Signed-off-by: Simon Dudley <[email protected]>
@siladu siladu marked this pull request as draft January 31, 2025 10:49
@siladu
Copy link
Contributor Author

siladu commented Jan 31, 2025

Still 6 failed hive tests again...we avoided one issue, but there are other places where we try to compute the invalid code delegation

@siladu
Copy link
Contributor Author

siladu commented Jan 31, 2025

To run the failing hive tests...

On this branch, run ./gradlew distDocker

Create besu-local.yaml:

- client: besu
  nametag: besu-local
  build_args:
    baseimage: hyperledger/besu
    tag: 25.1-develop-88f66a6
./hive --sim "ethereum/eest/consume-engine" --client "besu" --client-file="./besu-local.yaml" --sim.buildarg fixtures=https://github.com/ethereum/execution-spec-tests/releases/download/pectra-devnet-5%40v1.3.1/fixtures_pectra-devnet-5.tar.gz --client.checktimelimit=60s --sim.parallelism=4 -sim.limit tests/prague/eip7702 --sim.loglevel 5

Should take ~18 mins to run, but you can limit further...these are the actual failing tests:


tests/prague/eip7702_set_code_tx/test_set_code_txs.py::test_valid_tx_invalid_auth_signature[fork_Prague-blockchain_test_engine-v=2**8-1,r=s=2**256-1]
tests/prague/eip7702_set_code_tx/test_set_code_txs.py::test_valid_tx_invalid_auth_signature[fork_Prague-blockchain_test_engine-v=2**8-1]
tests/prague/eip7702_set_code_tx/test_set_code_txs.py::test_valid_tx_invalid_auth_signature[fork_Prague-blockchain_test_engine-v=27]
tests/prague/eip7702_set_code_tx/test_set_code_txs.py::test_valid_tx_invalid_auth_signature[fork_Prague-blockchain_test_engine-v=28]
tests/prague/eip7702_set_code_tx/test_set_code_txs.py::test_valid_tx_invalid_auth_signature[fork_Prague-blockchain_test_engine-v=35]
tests/prague/eip7702_set_code_tx/test_set_code_txs.py::test_valid_tx_invalid_auth_signature[fork_Prague-blockchain_test_engine-v=36]

Signed-off-by: Daniel Lehrner <[email protected]>
@daniellehrner
Copy link
Contributor

Hive is passing for 7702:

Jan 31 15:14:24.700 INF simulation ethereum/eest/consume-engine finished suites=1 tests=473 failed=0

@daniellehrner daniellehrner marked this pull request as ready for review January 31, 2025 14:49
Copy link
Contributor

@matkt matkt left a comment

Choose a reason for hiding this comment

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

LGTM

@siladu siladu changed the title EIP-7702 Skip CodeDelegation precompute for invalid recid EIP-7702 Skip CodeDelegation processing for invalid recid Feb 3, 2025
@siladu siladu enabled auto-merge (squash) February 3, 2025 04:19
@siladu siladu merged commit 47a5efc into hyperledger:main Feb 3, 2025
43 checks passed
@siladu siladu deleted the fix-invalid-recid-inner-code-delegation-signature branch February 3, 2025 05:00
pullurib pushed a commit to pullurib/besu that referenced this pull request Feb 6, 2025
…r#8212)

In CodeDelegation.authorizer(), return empty to skip code delegation processing if recId outside native lib's bounds

---------

Signed-off-by: Simon Dudley <[email protected]>
Signed-off-by: Daniel Lehrner <[email protected]>
Co-authored-by: Daniel Lehrner <[email protected]>
Co-authored-by: Karim Taam <[email protected]>
Signed-off-by: Bhanu Pulluri <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants