Skip to content

Conversation

@gabrocheleau
Copy link
Contributor

This fixes issue #4057, where validateNoLeadingZeroes rejects [0] (single zero byte) because in strict RLP encoding, 0 should be an empty array []. However, for EIP-7702 authorization lists, chainId=0 (wildcard) and yParity=0 are valid values that may be encoded as 0x00.

  • Added a new function validateNoLeadingZeroesAllowZero() in packages/util/src/bytes.ts that allows a single 0x00 byte but still rejects leading zeroes in multi-byte values
  • Updated verifyAuthorizationList() in packages/tx/src/capabilities/eip7702.ts to use the new lenient validation for chainId and yParity, while keeping strict validation for r, s, and nonce
  • Added tests to verify 0x00 is now accepted for chainId and yParity

@codecov
Copy link

codecov bot commented Nov 28, 2025

Codecov Report

❌ Patch coverage is 81.25000% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.53%. Comparing base (0430b7e) to head (1a3855c).

Additional details and impacted files

Impacted file tree graph

Flag Coverage Δ
block 88.44% <ø> (ø)
blockchain 88.85% <ø> (ø)
common 93.38% <ø> (ø)
evm 62.01% <100.00%> (ø)
mpt 89.78% <ø> (-0.34%) ⬇️
statemanager 78.10% <ø> (ø)
static 91.35% <ø> (ø)
tx 88.02% <100.00%> (+0.01%) ⬆️
util 84.87% <79.31%> (-0.08%) ⬇️
vm 65.08% <ø> (ø)

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link

github-actions bot commented Nov 28, 2025

📦 Bundle Size Analysis

Package Size (gzip) Δ
binarytree 30.1 KB ⚪ ±0%
block 45.4 KB ⚪ ±0%
blockchain 52.4 KB ⚪ ±0%
client 181.7 KB ⚪ ±0%
common 44.9 KB ⚪ ±0%
devp2p 76.4 KB ⚪ ±0%
e2store 30.3 KB ⚪ ±0%
ethash 8.4 KB ⚪ ±0%
evm 201.4 KB 🔴 +0.0 KB (+0.01%)
genesis 519.5 KB ⚪ ±0%
mpt 55.1 KB ⚪ ±0%
rlp 7.2 KB ⚪ ±0%
statemanager 57.2 KB ⚪ ±0%
testdata 60.2 KB ⚪ ±0%
tx 87.2 KB 🔴 +0.2 KB (+0.23%)
util 62.5 KB 🔴 +0.7 KB (+1.12%)
vm 61.3 KB ⚪ ±0%
wallet 14.0 KB ⚪ ±0%

Generated by bundle-size workflow

@gabrocheleau gabrocheleau marked this pull request as ready for review November 29, 2025 13:33
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.

2 participants