Ensure Non-Validators and Validators Bootstrap Before Indexing and Verifying Blocks - #573
Ensure Non-Validators and Validators Bootstrap Before Indexing and Verifying Blocks#573samliok wants to merge 4 commits into
Conversation
6be0d9c to
23d9c67
Compare
9c76fa7 to
9501164
Compare
9501164 to
a1bb893
Compare
9d1886a to
b4bfaba
Compare
b4bfaba to
4b6b2f5
Compare
a1a3fb9 to
b507b64
Compare
|
Looks like this test demonstrates we have a liveness problem in case we miss the first broadcast we send via |
|
In the issue #530 I wrote:
The below test demonstrates that that's not what we do: |
| return nil | ||
| } | ||
|
|
||
| n.Logger.Info("Bootstrapped, received a threshold of sealing block info for an epoch", zap.Stringer("Info", qr.Block.SealingBlockInfo())) |
There was a problem hiding this comment.
We should only consider ourselves as bootstrapped when we have replicated and committed all blocks from the last block in the ledger to the last known tip.
There was a problem hiding this comment.
i think we can consider ourselves bootstrapped once we have validated the hash chain of sealing blocks, then we can start as normal syncing all the blocks in between
There was a problem hiding this comment.
as to your test, i made a few non-validator tests to ensure we do the backwards hash validation first
TestNonValidator_BootstrapIgnoresSealingBlockOffChain && TestNonValidator_BootstrapWalksHashChain
b04bddb to
c2d3997
Compare
Addresses #530 but for non-validator and validators.
Nodes will first need to complete bootstrapping before being able to index/verify blocks.