Topdown Enhancement: Add quorum cert in "prepare" and "deliver" #1068
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.
Follow up from #1066, this PR adding the quorum certificate into the
prepare
anddeliver
abci.In
prepare
, it will first check if a quorum is formed. Previous only the parent block height and hash is returned from the vote tally, now the block height, block hash and side effects commitment is returned in a struct:TopdownVote
together with theQuorumCertificate
. The quorum certificate is the aggregated signatures of voted validator.Do note that only the bitmap of the voted validators are returned, the validators are sorted by power and then byte order of their public key.
The
process
method will then check if in cache to see if the the current node will create the same topdown vote that matches with theTopdownVote
received. If they are the same, it means the local proposal is the same as that in the validator quorum, it will create aTopdownProposalWIthQuorum
. Else, it means the local node has data that is not the same as that of the validators quorum. The validator will give up the chance to include a topdown proposal and let other node do it.For
deliver
, it will just extract the topdown messages and validator changes and commit them, just like before. Just without the RPC queries.process
to validate the quorum signatures, Topdown Enhancement: Process vote quorum #1070A limitation with existing approach is still ECDSA based signature aggregation algorithm, it will not scale with more validators. A
todo
is added in the code base to look intoSchnorr
scheme.