v1.18: blockstore: relax backwards chained merkle root check for upgrades (backport of #1163) #1196
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.
Problem
If a validator upgrades from a version that does not contain the
MerkleRootMetacolumn in blockstore in the middle of receiving shreds for a slot we cannot assume that theMerkleRootMetaexists.Specifically, if a coding shred is received from FEC set
Nbefore the upgrade, when the first shred from FEC setN+1is received post upgrade, we will perform the backwards chained merkle root check.This check assumes that both the erasure meta and merkle root meta exists for FEC set
N.Summary of Changes
Relax this check to
warnand succeed if theMerkleRootMetais missing for the previous FEC set.The corresponding forward check already handles this case correctly.
Note: the actual results of this check are not processed until the
chained_merkle_conflict_duplicate_proofsfeature is activated. This feature will only be activated several epochs after the cluster has upgraded ensuring that there are no missingMerkleRootMetasThis is an automatic backport of pull request #1163 done by Mergify.