Skip to content

feat: reject EIP-7825 over-limit transactions early#192

Draft
yizhang0901 wants to merge 1 commit intomainfrom
yi/eip-7825-reject-over-cap-tx-local-const
Draft

feat: reject EIP-7825 over-limit transactions early#192
yizhang0901 wants to merge 1 commit intomainfrom
yi/eip-7825-reject-over-cap-tx-local-const

Conversation

@yizhang0901
Copy link
Copy Markdown
Contributor

Reject any tx submitted to Protect RPC with gasLimit > 2^24 (16,777,216) at the RPC layer, before forwarding to the relay. Returns a JSON-RPC -32602 error referencing EIP-7825 so the caller knows to lower the gas limit. Behavior unchanged for txs within cap.

The cap value is defined locally rather than imported from go-ethereum's params.MaxTxGas because the pinned go-ethereum version (v1.15.2) predates EIP-7825. A comment marks the constant for replacement next time go-ethereum is bumped to >= v1.16.5.

Reject any tx submitted to Protect RPC with gasLimit > 2^24
(16,777,216) at the RPC layer, before forwarding to the relay.
Returns a JSON-RPC -32602 error referencing EIP-7825 so the caller
knows to lower the gas limit. Behavior unchanged for txs within cap.

The cap value is defined locally rather than imported from
go-ethereum's params.MaxTxGas because the pinned go-ethereum version
(v1.15.2) predates EIP-7825. A comment marks the constant for
replacement next time go-ethereum is bumped to >= v1.16.5.

Closes #138
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.

1 participant