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

Invalid block rejection for EIP-7702 due to auth.v must be 0 or 1 #2990

Closed
tersec opened this issue Jan 10, 2025 · 1 comment · Fixed by #2999
Closed

Invalid block rejection for EIP-7702 due to auth.v must be 0 or 1 #2990

tersec opened this issue Jan 10, 2025 · 1 comment · Fixed by #2999

Comments

@tersec
Copy link
Contributor

tersec commented Jan 10, 2025

for auth in tx.authorizationList:
if auth.v > 1'u64:
return err("invalid tx: auth.v must be 0 or 1")
if auth.s > SECP256K1halfN:
return err("invalid tx: auth.s must be <= SECP256K1N/2")

On mekong:

Dec-23 16:00:18.001[]                 info: Synced - slot: 345601 - head: 0x0aef…6dfe - exec-block: valid(318511 0x7ed9…) - finalized: 0x3f98…0ca4:10798 - peers: 110
Dec-23 16:00:30.000[]                 info: Synced - slot: 345602 - head: 0x4391…f0b7 - exec-block: valid(318512 0x1ece…) - finalized: 0x3f98…0ca4:10798 - peers: 111
Dec-23 16:00:42.000[]                 info: Synced - slot: 345603 - head: 0xc828…9303 - exec-block: valid(318513 0x374b…) - finalized: 0x3f98…0ca4:10798 - peers: 102
Dec-23 16:00:54.000[]                 info: Synced - slot: 345604 - head: 0x130e…9b17 - exec-block: valid(318514 0xe229…) - finalized: 0x3f98…0ca4:10798 - peers: 103
Dec-23 16:00:57.585[rest]             warn: Req req-u7gs getStateRoot failed reason=No state found for id '345538'
Dec-23 16:01:05.999[]                 info: Synced - slot: 345605 - head: (slot -1) 0x130e…9b17 - exec-block: valid(318514 0xe229…) - finalized: 0x3f98…0ca4:10798 - peers: 102
Dec-23 16:01:12.632[execution]        warn: Execution client is syncing oldState=SYNCED, newState=SYNCING
Dec-23 16:01:12.634[network]         error: Error receiving block slot=345606, peer=16Uiu2HAmJvFCntD7Vuq4dXZcwiSLwDwsPNpayiZe97UoAj9eErD2, code=BLOCK_ERROR_EXECUTION_ERROR, execStatus=INVALID, errorMessage=Error processing tx with index 100:invalid tx: auth.v must be 0 or 1
Error: BLOCK_ERROR_EXECUTION_ERROR
    at verifyBlockExecutionPayload (file:///usr/app/packages/beacon-node/src/chain/blocks/verifyBlocksExecutionPayloads.ts:335:25)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at verifyBlocksExecutionPayload (file:///usr/app/packages/beacon-node/src/chain/blocks/verifyBlocksExecutionPayloads.ts:159:28)
    at async Promise.all (index 0)
    at BeaconChain.verifyBlocksInEpoch (file:///usr/app/packages/beacon-node/src/chain/blocks/verifyBlock.ts:99:9)
    at BeaconChain.processBlocks (file:///usr/app/packages/beacon-node/src/chain/blocks/index.ts:74:7)
    at JobItemQueue.runJob (file:///usr/app/packages/beacon-node/src/util/queue/itemQueue.ts:102:22)

Because https://dora.mekong.ethpandaops.io/slot/345606 has a transaction with index 100, type 4 (EIP-7702), which has auth.v outside 0 or 1.

But https://eips.ethereum.org/EIPS/eip-7702#set-code-transaction only requires

assert auth.chain_id < 2**256
assert auth.nonce < 2**64
assert len(auth.address) == 20
assert auth.y_parity < 2**8
assert auth.r < 2**256
assert auth.s < 2**256
@etan-status
Copy link
Contributor

Well, the error is correct, y_parity / v are only valid in 0 .. 1, but any errors in authorization have to be handled by simply skipping the authorization. as in, it costs gas, but does not result in a failed tx.

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants