Closed raychu86 closed 3 months ago
@ghostant-1017 Could you take a look at this PR as well regarding the fix for https://github.com/AleoHQ/snarkOS/issues/3226
Merging this PR into PR #3232
@ghostant-1017 Could you take a look at this PR as well regarding the fix for #3226
Yes, of course! It's my pleasure.
Motivation
This PR builds on https://github.com/AleoHQ/snarkOS/pull/3232 and adds an additional
is_linked
check.The solution in the original PR checks that every block meets availability threshold, however this is not correct. In the case of committing multiple blocks from a single subdag, the sub-subdags do not need to undergo these availability threshold checks. This means the original block sync would come to a halt in this edge case.
The fix in this PR is to add on an additional
is_linked
lookback.is_linked
checks on the blocks we skipped in step 2.is_linked
checks pass, then we attempt to add the entire list of contiguous blocks to the ledger.