feat(app): wire priority + infosync into the node - #574
Open
varex83agent wants to merge 1 commit into
Open
Conversation
Mount the priority protocol behaviour and construct the infosync component in the node's P2P wiring, and trigger a cluster-wide priority exchange on the last slot of each epoch. The priority component rides the existing QBFT consensus and shares the node-wide P2P context; infosync advertises this node's supported versions, protocols, and proposal types. This is the participation half of #402 part B ("A"): it makes pluto take part in the per-epoch priority/QBFT info_sync round so mixed clusters with Charon reach quorum. Consuming the decided result (routing the duty path through ConsensusController and registering the protocol-switch subscriber) is a functional no-op while QBFTv2 is the only consensus protocol and is left as a TODO(#402 part B). Verified on a 2-charon + 2-pluto kurtosis cluster: all four nodes reach identical info_sync results, and Charon's "protocols not supported: [charon/priority/2.0.0]" and priority "consensus timeout" warnings stop. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.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.
What
Wires the
priorityprotocol behaviour andinfosynccomponent into the running node, and triggers a cluster-wide priority exchange on the last slot of each epoch.Previously both crates were implemented and tested but never mounted (
crates/app/src/node/mod.rscarried aTODO(#402 part B)), so a pluto node neither advertisedcharon/priority/2.0.0nor proposed into the info_sync QBFT round. In a mixed cluster this made Charon peers logprotocols not supported: [charon/priority/2.0.0]andPriority protocol consensus: consensus timeoutevery epoch.Scope — participation only ("A")
This is the participation half of #402 part B:
CoreBehaviourgains apriorityfield, constructed viapluto_priority::new_componenton the sharedp2p_contextand riding the existingArc<qbft::Consensus>(priority uses raw QBFT, matching Charon'swirePrioritise).infosync::Componentis built withversion::SUPPORTED, the concatenatedprotocols()of consensus/parsigex/peerinfo/priority, and[Builder?]+Fullproposal types.Slot::last_in_epoch()(6s exchange timeout,min_required= cluster threshold — both matching Charon).Deferred (
TODO(#402 part B)): consuming the decided result — routing the duty path throughConsensusControllerand registering the protocol-switch subscriber (set_current_consensus_for_protocol). That is a functional no-op while QBFTv2 is the only consensus protocol, so it is intentionally left out. This PR does not wireproposals()into the fetcher, because Charon does not either (itsProposals()/Protocols()accessors are dead code; full-vs-blinded is decided by--builder-api).Verification
cargo +nightly fmt --all --check,cargo clippy --workspace --all-targets --all-features -- -D warnings,cargo test --workspace --all-featuresall pass.protocol: qbft=4000, parsigex=3996, peerinfo=3992, priority=3988), proving pluto'scalculateResultis deterministic-equivalent to Charon's. Charon'sprotocols not supportedandconsensus timeoutwarnings stop; regular duties are unaffected.🤖 Generated with Claude Code