Skip to content

Commit

Permalink
Auth nonce check - fix bounds for verification
Browse files Browse the repository at this point in the history
  • Loading branch information
mrLSD committed Jan 8, 2025
1 parent 39275fd commit 4a72375
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/executor/stack/executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -963,10 +963,12 @@ impl<'config, 'precompiles, S: StackState<'config>, P: PrecompileSet>
if !authority.is_valid {
continue;
}

// 2. Verify the `nonce` is less than `2**64 - 1`.
if U256::from(authority.nonce) >= U64_MAX - 1 {
if U256::from(authority.nonce) >= U64_MAX {
continue;
}

// 4. Add authority to accessed_addresses (as defined in EIP-2929)
warm_authority.push(authority.authority);
// 5. Verify the code of authority is either empty or already delegated.
Expand Down

0 comments on commit 4a72375

Please sign in to comment.