-
Notifications
You must be signed in to change notification settings - Fork 1.4k
rpc/jsonrpc: adhere to latest eth_config spec #17552
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
reminder to self: cherry-pick to release/3.2 after merge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the eth_config RPC endpoint implementation to comply with the latest specification. The changes address several edge cases and specification requirements around fork configuration and blob schedules.
Key changes:
- Uses current block time instead of wall clock time for fork determination
- Returns
blobSchedule: nullfor pre-Cancun forks instead of erroring - Handles genesis block edge case where activation time should be 0
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| rpc/jsonrpc/eth_system.go | Updated Config method to use block time, removed pre-Cancun error, handle genesis case, changed BlobSchedule to nullable |
| rpc/jsonrpc/eth_system_test.go | Added test cases for genesis and pre-Cancun scenarios, updated test structure to support head state |
| execution/chain/chain_config.go | Changed GetBlobConfig to return nil for pre-Cancun, added nil checks in dependent methods |
| rpc/jsonrpc/testdata/eth_config/*.json | Added test fixtures for new scenarios |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
closes https://github.com/erigontech/security/issues/54
fixes:
blobSchedule: nullfor forks which do not have it (prior to Cancun)