feat(net): Update Fork Filter At Runtime - #18
Closed
refcell wants to merge 1 commit into
Closed
Conversation
Co-Authored-By: Claude <noreply@anthropic.com>
Author
|
Superseded by the automated reth-prepare-release flow. paradigmxyz#26794 is now squashed into the |
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 a
set_fork_filtermethod to theNetworkSyncUpdatertrait andNetworkHandle, letting a running node replace its activeForkFilterwithout a restart. The network manager routes the newSetForkFilterhandle message through the session manager, which swaps in the new filter and re-derives the advertisedForkIdso future handshakes announce the updated fork identity. This lets a node adopt a fork schedule that changes at runtime (e.g. an L1-signalled upgrade) and stay aligned with the rules it now enforces instead of advertising a stale fork id and getting partitioned. The trait method defaults to a no-op so updaters that do not track a fork filter are unaffected.CI note
The failing
clippy,docs, anddenychecks are pre-existing on the base branch and unrelated to this change. This PR modifies only 4 source files and adds no dependencies; those files are clippy- and docs-clean. The clippy failures are nightly-toolchain churn in untouched files (needless_range_loopintest_utils/testnet.rs,needless_boolintransactions/fetcher.rs), anddenyreports pre-existing dependency advisories.