feat(app): auto-enable GnosisBlockHotfix for gnosis/chiado from the lock fork version#557
Open
emlautarom1-agent[bot] wants to merge 4 commits into
Open
feat(app): auto-enable GnosisBlockHotfix for gnosis/chiado from the lock fork version#557emlautarom1-agent[bot] wants to merge 4 commits into
emlautarom1-agent[bot] wants to merge 4 commits into
Conversation
emlautarom1-agent
Bot
force-pushed
the
worktree-gnosis-blockhotfix-530
branch
from
July 21, 2026 11:44
47ffb4e to
0f57dfc
Compare
emlautarom1
marked this pull request as ready for review
July 21, 2026 11:53
emlautarom1
approved these changes
Jul 21, 2026
emlautarom1
left a comment
Collaborator
There was a problem hiding this comment.
Manually checked, mostly config plumbing. LGTM.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a correctness gap in pluto run by resolving the FeatureSet only after the cluster lock is loaded, then auto-enabling GnosisBlockHotfix for gnosis/chiado based on the lock’s genesis fork version (unless explicitly disabled). This aligns runtime behavior with the existing feature documentation and Charon’s behavior, preventing gnosis/chiado nodes from signing proposals over the wrong block hash.
Changes:
- Change the
runCLI → app bridge to forward apluto_featureset::Configinstead of a pre-resolvedArc<FeatureSet>. - Resolve the
FeatureSetinsideApp::runonce the lock (and fork version) is available, and apply gnosis/chiado auto-enable logic there. - Add app-level unit tests covering gnosis/chiado auto-enable, explicit disable, other networks, and unknown fork versions.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| crates/cli/src/commands/run.rs | Forward featureset::Config through AppConfig and adjust tests to assert behavior via resolved FeatureSet. |
| crates/app/tests/simnet.rs | Update simnet test wiring to use pluto_featureset::Config::default() in AppConfig. |
| crates/app/src/node/mod.rs | Resolve FeatureSet post-lock-load and auto-enable GnosisBlockHotfix for gnosis/chiado; add unit tests for the resolver. |
| crates/app/src/node/config.rs | Replace feature_set: Arc<FeatureSet> with feature: pluto_featureset::Config in AppConfig. |
| crates/app/Cargo.toml | Move pluto-eth2util to normal deps so app code can derive network from fork version. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ock fork version Derive the network from the cluster lock's genesis fork version and force-enable GnosisBlockHotfix for gnosis/chiado unless the operator explicitly disabled it (Charon app/app.go:151/197-203: featureset.Init + ForkVersionToNetwork + EnableGnosisBlockHotfixIfNotDisabled). Without this, gnosis/chiado clusters would sign proposals over the wrong block hash. AppConfig now carries pluto_featureset::Config instead of a resolved Arc<FeatureSet>, since the auto-enable needs &mut FeatureSet plus the Config and the network is only known after lock load. The FeatureSet is resolved inside App::run via the new resolve_feature_set helper (which also validates the minimum status, the analog of featureset.Init) and then wrapped in Arc. The CLI bridge (build_feature_config) parses the flags and forwards the Config through. Closes #530
emlautarom1
force-pushed
the
worktree-gnosis-blockhotfix-530
branch
from
July 23, 2026 22:49
0f57dfc to
3a9f782
Compare
varex83
approved these changes
Jul 27, 2026
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.
Closes #530
Summary
Gnosis/Chiado clusters must sign block proposals over a chain-specific SSZ block hash; the
GnosisBlockHotfixfeature switches Pluto to that behavior. Charon force-enables it automatically whenever the cluster's network is gnosis or chiado — unless the operator explicitly disabled it — deriving the network from the cluster lock's genesis fork version. Pluto's feature doc already promised this, butpluto runnever performed it, so a gnosis/chiado cluster would sign over the wrong block hash.This is a follow-up to #536 (which introduced the
runcommand and the core-node app wiring). It edits those structures rather than adding parallel ones:AppConfignow carries apluto_featureset::Configinstead of a pre-resolvedArc<FeatureSet>, and theFeatureSetis resolved insideApp::runonce the lock is loaded and the network is known. The CLI bridge just parses the feature flags into that config and forwards it.The pieces this builds on already existed:
fork_version_to_networkandFeatureSet::enable_gnosis_block_hotfix_if_not_disabled. What was missing was the wiring that connects the lock's fork version to the feature-set resolution.Differences from Charon
Charon validates the minimum feature-set status up front and applies the gnosis/chiado auto-enable later; Pluto does both together when it resolves the feature set after lock load (the auto-enable needs the network, which is only known once the lock's fork version is available). The only observable effect is timing: a value that parses as a status but is not a valid minimum status (
enable,disable,sentinel) is rejected after the lock loads rather than before it. Genuinely unknown status strings (e.g.foo) still fail fast at CLI parse time, and either way the node never starts.