Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix: download more block to recover old state proofs #4392

Merged
merged 1 commit into from
Aug 11, 2022

Conversation

id-ms
Copy link
Contributor

@id-ms id-ms commented Aug 11, 2022

Summary

A fast-catchuped node should be able to be part of state proofs creation. In order to do that, it must download all necessary blocks. Currently, if the state proof chain is lagging the node download lowestStateProofRound - stateproofInterval rounds back on fast catchup. This is not accurate since the balances comes from lowestStateProofRound - stateproofInterval - StateProofVotersLookback

Test Plan

Manual fast catchup test.

@id-ms id-ms force-pushed the fix-fast-catchup-blocks-bug branch from 9ae6279 to a9403da Compare August 11, 2022 10:51
@codecov
Copy link

codecov bot commented Aug 11, 2022

Codecov Report

Merging #4392 (a9403da) into master (42f449f) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #4392      +/-   ##
==========================================
+ Coverage   55.57%   55.59%   +0.01%     
==========================================
  Files         403      403              
  Lines       50805    50806       +1     
==========================================
+ Hits        28235    28244       +9     
+ Misses      20175    20165      -10     
- Partials     2395     2397       +2     
Impacted Files Coverage Δ
catchup/catchpointService.go 1.78% <100.00%> (+0.25%) ⬆️
ledger/blockqueue.go 85.63% <0.00%> (-2.88%) ⬇️
catchup/peerSelector.go 98.95% <0.00%> (-1.05%) ⬇️
data/abi/abi_type.go 87.67% <0.00%> (-0.95%) ⬇️
catchup/service.go 69.38% <0.00%> (-0.75%) ⬇️
network/wsNetwork.go 64.98% <0.00%> (+0.09%) ⬆️
ledger/acctupdates.go 70.52% <0.00%> (+0.60%) ⬆️
util/db/dbutil.go 50.30% <0.00%> (+1.21%) ⬆️
network/wsPeer.go 68.49% <0.00%> (+3.01%) ⬆️
cmd/algoh/blockWatcher.go 80.95% <0.00%> (+3.17%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

lowestStateProofRound = lowestStateProofRound.SubSaturate(basics.Round(proto.StateProofInterval))
lowestStateProofRound = lowestStateProofRound.SubSaturate(basics.Round(proto.StateProofVotersLookback))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree, we do need voters lookback

@algorandskiy algorandskiy merged commit e3ffb42 into algorand:master Aug 11, 2022
onetechnical pushed a commit to onetechnical/go-algorand that referenced this pull request Aug 15, 2022
…gorand#4392)

A fast-caught up node should be able to be part of state proofs creation and must download all necessary blocks.
Currently, if the state proof chain is lagging the node download lowestStateProofRound - stateproofInterval
rounds back on fast catchup. This is not accurate since the balances comes from
lowestStateProofRound - stateproofInterval - StateProofVotersLookback round.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants