Skip to content

Feature/eip 8282#12092

Merged
Marchhill merged 24 commits into
glamsterdam-devnet-6from
feature/eip-8282
Jun 24, 2026
Merged

Feature/eip 8282#12092
Marchhill merged 24 commits into
glamsterdam-devnet-6from
feature/eip-8282

Conversation

@Marchhill

Copy link
Copy Markdown
Contributor

Fixes Closes Resolves #

Please choose one of the keywords above to refer to the issue this PR solves followed by the issue number (e.g. Fixes #000). If no issue number, remove the line. Also, remove everything marked optional that is not applicable. Remove this note after reading.

Changes

  • List the changes

Types of changes

What types of changes does your code introduce?

  • Bugfix (a non-breaking change that fixes an issue)
  • New feature (a non-breaking change that adds functionality)
  • Breaking change (a change that causes existing functionality not to work as expected)
  • Optimization
  • Refactoring
  • Documentation update
  • Build-related changes
  • Other: Description

Testing

Requires testing

  • Yes
  • No

If yes, did you write tests?

  • Yes
  • No

Notes on testing

Optional. Remove if not applicable.

Documentation

Requires documentation update

  • Yes
  • No

If yes, link the PR to the docs update or the issue with the details labeled docs. Remove if not applicable.

Requires explanation in Release Notes

  • Yes
  • No

If yes, fill in the details here. Remove if not applicable.

Remarks

Optional. Remove if not applicable.

Marchhill and others added 5 commits June 22, 2026 13:58
glamsterdam-devnet-6 adds two builder-request predeploys that are
system-called at the end of every block, after the EIP-7002 withdrawal
and EIP-7251 consolidation requests:
- builder deposit (type 0x03) at 0x0000884d2A...008282
- builder exit  (type 0x04) at 0x000014574A...008282

Their per-block system calls read storage that must appear in the
EIP-7928 block access list, so without them every Amsterdam block's BAL
hash mismatches. Mirrors the existing 7002/7251 request handling:
IsEip8282Enabled wired through the spec + chainspec, ExecutionRequestType
BuilderDeposit/BuilderExit, two SystemCall reads in the requests
processor (flat-encoded in request-type order so the requests hash is
correct), and both predeploys registered as BAL system contracts.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions github-actions Bot added the eip label Jun 22, 2026
@claude

claude Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Claude finished @Marchhill's task in 6m 6s —— View job


EIP-8282 PR Review

Tasks:

  • Gather context and read changed files
  • Review diff against base branch
  • Analyze correctness, edge cases, and potential regressions
  • Check security implications
  • Check performance (hot-path considerations)
  • Verify adherence to repo rules
  • Post inline comments for specific issues
  • Finalize review summary

Summary

The PR adds EIP-8282 builder execution requests (builder deposit + builder exit) following the same system-call pattern as EIP-7002 and EIP-7251. The scaffolding (spec flag, chain spec plumbing, fork assignment, BAL validation, error messages) is correct and well-structured. However, there is one critical omission and several medium/low issues:


Critical

GetFlatDecodedRequests throws on builder request typesExecutionRequestExtensions.GetFlatDecodedRequests (in ExecutionRequestExtensions.cs, not in this diff) has default: throw new ArgumentOutOfRangeException(...) in its switch over ExecutionRequestType. The new BuilderDepositRequest = 3 and BuilderExitRequest = 4 values are not handled. This method is called in production by Nethermind.Stateless.Executor/IO/NewPayloadRequest.cs:66:

= ExecutionRequestExtensions.GetFlatDecodedRequests(block.ExecutionRequests);

Once Amsterdam activates and a block contains builder requests, the stateless executor path will throw. Fix: add explicit case entries, or change default: throw to default: break (EIP-7685 says clients MUST accept unknown request types). Also, MaxRequestsCount = 3 in the same file should be updated to 5, and the test assertion Has.Count.EqualTo(MaxRequestsCount) in ExecutionRequestExtensionsTests.cs will fail once builder requests are exercised.

Fix this →


High

No tests for EIP-8282 code pathsExecutionProcessorTests.cs sets up mock accounts only for eip7002Account and eip7251Account. The _spec.BuilderRequestsEnabled returns false by default (NSubstitute default for bool), so the new builder request processing block is never exercised in tests. There should be tests verifying:

  • Builder requests are correctly read and appended in type order when BuilderRequestsEnabled = true
  • The BuilderDepositsContractEmpty / BuilderExitsContractEmpty errors are raised when the predeploy has no code
  • RequestsHash includes builder request contributions

Fix this →


Medium

Contract addresses not configurable via spec (see inline comment) — EIP-7002 and EIP-7251 store their predeploy addresses in IReleaseSpec (Eip7002ContractAddress, Eip7251ContractAddress) with defaults set in 00_Olympic.cs and override support in ChainSpecParamsJson. EIP-8282 bypasses this and hard-codes addresses from constants, making it impossible to configure different addresses for devnets or test networks through chain spec JSON.


Low

  • Comment style (see inline on ExecutionRequest.cs:14) — // eip-8282 should be // EIP-8282, or omit the comment (the enum member names are self-documenting). BuilderExitRequest = 4 is also missing a trailing comma.
  • ArrayPoolListRef initial capacity (see inline on ExecutionRequestsProcessor.cs:77) — requests = new(3) on line 85 (not in diff) should be new(5).

WithdrawalRequest = 1,
ConsolidationRequest = 2
ConsolidationRequest = 2,
BuilderDepositRequest = 3, // eip-8282

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Medium — Inline comments on enum members add noise here; the type names are already self-documenting. If the EIP reference is useful, prefer XML doc on the enum member or at minimum use // EIP-8282 (uppercase) for consistency with how EIP references appear elsewhere in the codebase. Also note BuilderExitRequest = 4 is missing a trailing comma (style inconsistency with the other members).

// withdrawal/consolidation requests so the flat encoding stays in request-type order.
if (spec.BuilderRequestsEnabled)
{
ReadRequests(block, state, Eip8282Constants.BuilderDepositRequestPredeployAddress, ref requests, _builderDepositTransaction,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Medium — EIP-7002 and EIP-7251 read their contract addresses through spec.Eip7002ContractAddress / spec.Eip7251ContractAddress, which are set from constants by default in 00_Olympic.cs but can be overridden per-chain via chain spec JSON (Eip7002ContractAddress field in ChainSpecParamsJson). EIP-8282 hard-codes the address from constants here and doesn't add a spec property, breaking that pattern. If any devnet or test network ever needs a different predeploy address, there's no way to configure it. Consider adding Eip8282BuilderDepositContractAddress and Eip8282BuilderExitContractAddress properties to IReleaseSpec / ChainSpecParamsJson, following the existing pattern.

_withdrawalTransaction.Hash = _withdrawalTransaction.CalculateHash();
_consolidationTransaction.Hash = _consolidationTransaction.CalculateHash();
_builderDepositTransaction.Hash = _builderDepositTransaction.CalculateHash();
_builderExitTransaction.Hash = _builderExitTransaction.CalculateHash();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LowArrayPoolListRef<byte[]> requests = new(3) on line 85 (not in diff) now has an incorrect initial capacity. With EIP-8282, there are 5 possible request-type buckets (deposits, withdrawals, consolidations, builder deposits, builder exits). The buffer will auto-resize if needed, so this is not a correctness issue, but it causes an extra allocation on Amsterdam blocks.

Marchhill and others added 6 commits June 22, 2026 16:14
Sending a positive balance to an empty SELFDESTRUCT beneficiary charges
ACCOUNT_WRITE (8000) regular gas in addition to the NEW_ACCOUNT state gas,
per EELS amsterdam selfdestruct. Nethermind charged only the state gas.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions github-actions Bot added the evm label Jun 23, 2026
@github-actions github-actions Bot removed the evm label Jun 23, 2026
Base automatically changed from feature/glamsterdam-existing-eip-updates to glamsterdam-devnet-6 June 24, 2026 13:20
@Marchhill Marchhill merged commit d1ffa5d into glamsterdam-devnet-6 Jun 24, 2026
279 of 519 checks passed
@Marchhill Marchhill deleted the feature/eip-8282 branch June 24, 2026 13:20
@Marchhill Marchhill restored the feature/eip-8282 branch June 24, 2026 13:22
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.

1 participant