Skip to content

fix(rpc): fix eth_config impl#18744

Merged
mattsse merged 3 commits intoparadigmxyz:mainfrom
nethoxa:fix-eth-config
Sep 28, 2025
Merged

fix(rpc): fix eth_config impl#18744
mattsse merged 3 commits intoparadigmxyz:mainfrom
nethoxa:fix-eth-config

Conversation

@nethoxa
Copy link
Contributor

@nethoxa nethoxa commented Sep 26, 2025

There are two changes here:

  • Name of the P256 precompile was wrong, it must be P256VERIFY according to other clients (nethermind is wrong too, writing a PR in a moment)
  • There was a misunderstanding when handling the case where next is null (and what the last config means). In the EIP it is poorly explained, but in short, it is not the "previous" config, but rather the "final" config scheduled. That means, if we have configs [1, 2, 3, 4] and we are at 2, last = 4 and next = 3, not last = 1 as it is the case with reth (the others do it correctly)
  • Moreover, it does not handle the case from the EIPs that say:

"next" and "last" will be null if the client is not configured to support a future fork.

  • Sorted the fork_timestamps before checking for the current timestamp (should not be a perf drainer as the array is very small), just in case they are unordered and we claim to be on the wrong fork

The unwrap on line 138 is safe as, by the check on line 111 we ensure there is at least one element, and with the else on line 133 we ensure we return early if that is the case, so that we only continue execution if there are more than 1 element (so that next = last = current + 1 if there are 2, and next = current + 1 and last is the last/final configured fork.

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

lgtm, turns out we can use the existing .name function here which has the correct name already

@github-project-automation github-project-automation bot moved this from Backlog to In Progress in Reth Tracker Sep 27, 2025
@mattsse mattsse merged commit abae566 into paradigmxyz:main Sep 28, 2025
41 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Reth Tracker Sep 28, 2025
shekhirin pushed a commit that referenced this pull request Sep 30, 2025
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
theochap pushed a commit to theochap/reth that referenced this pull request Oct 13, 2025
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
Vui-Chee added a commit to okx/reth that referenced this pull request Nov 3, 2025
* dev: (166 commits)
  chore: bump 1.8.3 (paradigmxyz#19379)
  chore: bump alloy-evm 0.21.3
  chore: bump alloy 1.0.37 (paradigmxyz#18795)
  chore: bump version to 1.8.2 (paradigmxyz#18792)
  fix(rpc/engine): check osaka in getBlobsV1 (paradigmxyz#18669)
  fix: remove cancun check (paradigmxyz#18787)
  fix(rpc): fix eth_config impl (paradigmxyz#18744)
  feat: make more EVM and RPC conversions fallible (paradigmxyz#18685)
  chore: bump rust to edition 2024 (paradigmxyz#18692)
  chore: release 1.8.1 (paradigmxyz#18646)
  fix: Revert "chore: disable fee charge in env" (paradigmxyz#18645)
  chore(deps): bump CodSpeedHQ/action from 3 to 4 (paradigmxyz#18333)
  chore: update voc.config.to text to v1.8.0 (paradigmxyz#18644)
  chore: update version to 1.8.0 in Cargo.toml (paradigmxyz#18638)
  fix: check request gas limit before (paradigmxyz#18639)
  chore(observability): add tokio runtime with custom thread naming (paradigmxyz#18635)
  docs: update dashboard table and rpc urls (paradigmxyz#18637)
  feat: add osaka+bpo timestamps (paradigmxyz#18627)
  chore: disable fee charge in env (paradigmxyz#18634)
  chore: bump inspectors 0.30 (paradigmxyz#18633)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants