fix(rpc): add block timestamp validation in eth_simulateV1#21397
Merged
fix(rpc): add block timestamp validation in eth_simulateV1#21397
Conversation
b04e66b to
ef9c665
Compare
4f9826c to
5c4e391
Compare
ef9c665 to
5d38d8d
Compare
Base automatically changed from
fix/eth-simulate-block-number-validation
to
main
January 26, 2026 13:56
Rjected
approved these changes
Jan 26, 2026
Validates that block timestamps are strictly increasing when overridden in eth_simulateV1 calls. Returns error code -38021 (BlockTimestampInvalid) if a timestamp is less than or equal to the previous block timestamp. This aligns with the geth implementation and the execution-apis spec. Fixes failing Hive rpc-compat tests for eth_simulateV1. Amp-Thread-ID: https://ampcode.com/threads/T-019bf01b-ec5c-775e-9997-98c5dd7248ac Co-authored-by: Amp <amp@ampcode.com>
5d38d8d to
5878acf
Compare
rakita
pushed a commit
that referenced
this pull request
Jan 26, 2026
Co-authored-by: Amp <amp@ampcode.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds block timestamp validation for
eth_simulateV1to ensure timestamps are strictly increasing when overridden.Changes
EthSimulateError::BlockTimestampInvalidto includegotandparentfields for detailed error messagessimulate_v1to check timestamp ordering-38021with message matching geth format:"block timestamps must be in order: X <= Y"Motivation
Fixes failing Hive
rpc-compattest:ethSimulate-block-timestamp-order-38021.ioThe execution-apis spec requires that block timestamps in
eth_simulateV1must be strictly increasing. This aligns reth with geth's behavior.Dependencies
Builds on #21396 (block number validation).
Test
The fix can be verified by running the Hive rpc-compat tests for eth_simulateV1.