From 109a73f6724e83d88e821f3a6ffa63c3491bf6de Mon Sep 17 00:00:00 2001 From: Andrey Kuprianov <59489470+andrey-kuprianov@users.noreply.github.com> Date: Fri, 25 Sep 2020 09:22:14 +0200 Subject: [PATCH] describe valset sorting according to v0.34 requirements (#169) --- spec/core/data_structures.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/spec/core/data_structures.md b/spec/core/data_structures.md index ee7b4af83..1bb10f0c7 100644 --- a/spec/core/data_structures.md +++ b/spec/core/data_structures.md @@ -374,7 +374,8 @@ block.ValidatorsHash == MerkleRoot(state.Validators) MerkleRoot of the current validator set that is committing the block. This can be used to validate the `LastCommit` included in the next block. -Note the validators are sorted by their voting power before computing the MerkleRoot. +Note that before computing the MerkleRoot the validators are sorted +first by voting power (descending), then by address (ascending). ### NextValidatorsHash @@ -385,7 +386,9 @@ block.NextValidatorsHash == MerkleRoot(state.NextValidators) MerkleRoot of the next validator set that will be the validator set that commits the next block. This is included so that the current validator set gets a chance to sign the next validator sets Merkle root. -Note the validators are sorted by their voting power before computing the MerkleRoot. +Note that before computing the MerkleRoot the validators are sorted +first by voting power (descending), then by address (ascending). + ### ConsensusHash