feat(CCHAIN-740): Implement validator proof protocol per ADR-006#1450
feat(CCHAIN-740): Implement validator proof protocol per ADR-006#1450ancazamfir wants to merge 15 commits intocirclefin:mainfrom
Conversation
| /// signature verification without needing to look up the public key from the | ||
| /// validator set. | ||
| #[derive_where(Clone, Debug, PartialEq, Eq)] | ||
| pub struct ValidatorProof<Ctx: Context> { |
There was a problem hiding this comment.
Just familiarizing myself with the ADR and this implementation: Do we need to version this data type? Seems to go through the wire unversioned.
There was a problem hiding this comment.
Currently I use the same approach as for sync and consensus, using protocol names that have version in their names. Haven't added it to defaults yet. But if two nodes use different versions, streams will not be established.
Currently hardcoded with:
pub const PROTOCOL_NAME: StreamProtocol = StreamProtocol::new("/malachitebft-validator-proof/v1")
|
For testing I used the example/channel app, init and started nodes wiht testnet_manager.bash script. With these settings the validator set rotates every 10 heights and 3 validators are selected from the validators crates. Testing uses the metrics to determine node classification, for this PR the
...
Moniker Type Cons Prop Live Expl Peers InPeers OutPeers Conns InConns OutConns
-----------------------------------------------------------------------------------------------------------------------------
app-1 validator 11 11 11 0 11 7 4 15 11 4
app-2 validator 10 8 11 0 11 7 4 15 11 4
app-3 validator 6 11 7 0 11 7 4 15 11 4
-----------------------------------------------------------------------------------------------------------------------------
app-0 persistent 11 11 11 0 11 7 4 15 11 4
app-4 persistent 10 7 8 0 11 7 4 15 11 4
-----------------------------------------------------------------------------------------------------------------------------
app-10 full_node 4 4 4 0 5 0 5 5 0 5
app-11 full_node 4 4 4 0 5 0 5 5 0 5
app-5 full_node 4 4 4 0 5 0 5 5 0 5
app-6 full_node 4 4 4 0 5 0 5 5 0 5
app-7 full_node 4 4 4 0 5 0 5 5 0 5
app-8 full_node 4 4 4 0 5 0 5 5 0 5
app-9 full_node 4 4 4 0 5 0 5 5 0 5 |
Implementation of #1436
Uses libp2p-stream protocol to satisfy the protocol spec and as proposed by @romac