fix(base_layer/core): fixes incorrect validator node merkle root calculation #5005
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.
Description
feat: add list-validator-nodes command
fix: typo in error variant
feat: output validator Merkle root in BlockHeader Display impl
fix: correct validator node Merkle root calculation
fix: bug in internal epoch numbering
tests: new unit tests
Motivation and Context
The validator node MR calculation was invalid due to incorrect usage of the MMR API.
There was a subtraction underflow bug in insert_validator_node in lmdb_db
Registering on a new epoch should be valid for the next epoch
list-validator-nodes was added to make it easy to check the current validator node set
How Has This Been Tested?
Added some new unit tests that check the validator node registration MR