Skip to content

refactor!: flatten Bytecode#3375

Merged
DaniPopes merged 13 commits intobluealloy:mainfrom
DaniPopes:dani/new-bytecode
Feb 5, 2026
Merged

refactor!: flatten Bytecode#3375
DaniPopes merged 13 commits intobluealloy:mainfrom
DaniPopes:dani/new-bytecode

Conversation

@DaniPopes
Copy link
Copy Markdown
Collaborator

Bytecode is now a single struct, with a single enum BytecodeKind for legacy and eip7702

  • arced internally
  • 16 -> 8 bytes
  • removes the Arc in JumpTable since it's already present in Bytecode
  • makes analyze fn private

DaniPopes and others added 4 commits January 30, 2026 03:05
- Keep only constants and error types in eip7702.rs
- Remove legacy/analyzed.rs and legacy/raw.rs
- Move tests to bytecode.rs
- Keep BytecodeInner private, only expose BytecodeKind

Amp-Thread-ID: https://ampcode.com/threads/T-019c0c85-669b-7035-bdbd-497f1871af9f
Co-authored-by: Amp <amp@ampcode.com>
@DaniPopes DaniPopes requested a review from rakita January 30, 2026 03:13
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Jan 30, 2026

Merging this PR will improve performance by 6.68%

⚡ 5 improved benchmarks
✅ 168 untouched benchmarks

Performance Changes

Benchmark BASE HEAD Efficiency
CREATE_50 417.5 µs 404.9 µs +3.11%
transact_1000tx_commit_inner_every_40 2.3 ms 2.2 ms +3.97%
transact_commit_1000txs 2.9 ms 2.7 ms +5.85%
EXTCODEHASH_50 41 µs 39.4 µs +3.99%
EXTCODESIZE_50 40.4 µs 37.9 µs +6.68%

Comparing DaniPopes:dani/new-bytecode (20cf9da) with main (8bf5191)

Open in CodSpeed

Copy link
Copy Markdown
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

before we merge any of this I want tests on reth that this doesnt break encoding (again)

meaning that this encodes/decodes the bytecode exactly the same

@DaniPopes
Copy link
Copy Markdown
Collaborator Author

what is it used in?

@mattsse
Copy link
Copy Markdown
Collaborator

mattsse commented Jan 30, 2026

@DaniPopes
Copy link
Copy Markdown
Collaborator Author

shouldn't be affected

Copy link
Copy Markdown
Member

@rakita rakita left a comment

Choose a reason for hiding this comment

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

lgtm, left few nits

@DaniPopes DaniPopes requested a review from mattsse February 4, 2026 06:24
@rakita
Copy link
Copy Markdown
Member

rakita commented Feb 4, 2026

@mattsse this looks good, no new asserts were added and jumpdest size is same as the previous. iirc I have added few tests when the problem happened previously. I think this is okay to merge, but leave it to your discretion

@DaniPopes DaniPopes merged commit 540ec38 into bluealloy:main Feb 5, 2026
33 of 39 checks passed
@github-actions github-actions bot mentioned this pull request Feb 3, 2026
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 this pull request may close these issues.

3 participants