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

ledger: Check MaxAcctLookback in tracker. #5300

Merged
merged 1 commit into from
Apr 13, 2023

Conversation

winder
Copy link
Contributor

@winder winder commented Apr 12, 2023

Summary

If MaxAcctLookback is set to a large number, the tracker fails during replay. The failure is an arbitrary "this doesn't seem quite right" sort of check. This change adds consideration for the MaxAcctLookback variable to allow a longer replay range.

Another side effect of this change is that you can now fetch blocks from further than 1000 rounds ago. This has been requested many times.

Test Plan

Configured a node with "MaxAcctLookback": 2048 to reproduce the replay error. After updating the condition the replay error has gone away.

@winder winder marked this pull request as ready for review April 12, 2023 20:20
@winder winder requested a review from cce April 12, 2023 20:20
Copy link
Contributor

@algorandskiy algorandskiy left a comment

Choose a reason for hiding this comment

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

The condition looks good to me. Large MaxAcctLookback increase memory footprint a lot (like few GBs for 320 and full blocks). We also did not check performance impact - I suggest to run fast catchup on mainnet for 100K rounds and time it for MaxAcctLookback=4 (default) vs MaxAcctLookback=1000 to have better understanding of the behavior when we recommend someone to bump the value.

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.

3 participants