Skip to content

core, internal/ethapi: fix incorrect max-initcode RPC error mapping#3687

Open
allformless wants to merge 2 commits into
bnb-chain:developfrom
allformless:fix/max-initcode-a61e5ccb1
Open

core, internal/ethapi: fix incorrect max-initcode RPC error mapping#3687
allformless wants to merge 2 commits into
bnb-chain:developfrom
allformless:fix/max-initcode-a61e5ccb1

Conversation

@allformless
Copy link
Copy Markdown
Collaborator

Description

core, internal/ethapi: fix incorrect max-initcode RPC error mapping

Rationale

upstream commit: ethereum/go-ethereum@a61e5ccb1

Example

add an example CLI or API response...

Changes

Notable changes:

  • add each change in a bullet point here
  • ...

gzliudan and others added 2 commits May 12, 2026 15:37
…#34067)

Problem:

The max-initcode sentinel moved from core to vm, but RPC pre-check
mapping still depended on core.ErrMaxInitCodeSizeExceeded. This mismatch
could surface inconsistent error mapping when oversized initcode is
submitted through JSON-RPC.

Solution:

- Remove core.ErrMaxInitCodeSizeExceeded from the core pre-check error
set.
- Map max-initcode validation errors in RPC from
vm.ErrMaxInitCodeSizeExceeded.
- Keep the RPC error code mapping unchanged (-38025).

Impact:

- Restores consistent max-initcode error mapping after the sentinel
move.
- Preserves existing JSON-RPC client expectations for error code -38025.
- No consensus, state, or protocol behavior changes.
@allformless allformless force-pushed the fix/max-initcode-a61e5ccb1 branch from 49987a1 to 769f3f9 Compare May 12, 2026 09:24
@allformless allformless added this to the v1.7.4 milestone May 13, 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