Integrate GRANDPA voter in service - #46
Merged
Merged
Conversation
- Add sc-consensus-grandpa and sp-consensus-grandpa to node deps - Build GRANDPA block import in new_partial and use it as the inner block import of PowBlockImport, with the same instance registered as justification import for the PoW import queue - Carry (grandpa_block_import, grandpa_link, telemetry) through the PartialComponents `other` field for use by new_full
- Add sc-consensus-grandpa-rpc and sc-rpc deps - Register GRANDPA notification protocol on the network - Expose GRANDPA RPC (grandpa_*) via FullDeps / GrandpaDeps
motoZ-crypto
marked this pull request as ready for review
April 21, 2026 15:49
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
Integrates the GRANDPA finality gadget into the node service layer. Block import is reordered so that GRANDPA wraps the PoW
block import, the GRANDPA notification protocol is registered on the network, and the GRANDPA voter task / RPC API are wired up. Voter participation is gated by Substrate's built-in
--validatorflag (reflected viaconfig.role.is_authority()).Changes
node/src/service.rsrpc.rsGrandpaDeps<B>.FullDeps/create_fullto register thegrandpa_*RPC methods.Cargo.toml/node/Cargo.tomlsc-consensus-grandpa-rpcandsc-rpc.Closes #18