-
Notifications
You must be signed in to change notification settings - Fork 85
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
Fix fee catchup after restart #2160
Conversation
This test reproduces an issue discovered in staging, in which, after a staggered restart of all nodes, the network has forgotten the fee state for all accounts except those which actively produced blocks during the restart. Since the state is needed for undecided blocks, it cannot directly be obtained from persisted merklized state, which is only available for decided blocks.
79dc84c
to
ef41777
Compare
79d17b9
to
d56be55
Compare
…e HotShot state map
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reviewed the code which uses the new request_proposal
fn provided by Hotshot and it looks correct to me
During experimentation I changed the restart tests from starting up all nodes in parallel to one at a time. This broke the no-CDN tests because, in some cases, you need multiple nodes to restart before libp2p can become ready, but this blocks the initialization of the first restarted node. Switched it back to starting up in parallel and things are working again.
@bfish713 can you also look at the state map update during catchup? (This basically acts as a cache for successful catchup requests) |
Co-authored-by: Mathis <[email protected]>
This is a backport of #2160 to release-gambit. It is a separate PR because it is not a clean cherry-pick. I recommend reviewing the `main` PR first, and then you can just look at this one to convince yourself it's doing the same thing.
Took a look and that all looks fine to me |
The simplest, most robust change was to make the task a flat retry loop, instead of having a nested retry loop for the fetch itself, and to update the anchor view each iteration of the loop, so that the loop exits if we reach a decide and the anchor view becomes more recent than the view we are fetching.
* Enable frontier catchup from storage * Prevent recursive state reconstruction * Prefetch accounts used for paying fees during state reconstruction
This PR reproduces and will fix an issue discovered in staging, in which, after a staggered restart of all nodes, the network has forgotten the fee state for all accounts except those which actively produced blocks during the restart. Since the state is needed for undecided blocks, it cannot directly be obtained from persisted merklized state, which is only available for decided blocks.
This PR:
CatchupStorage
trait, distinct fromCatchupDataSource
. This allows us to get more information when querying storage, such as the leaf corresponding to fetched account state, which in turn ensures we are always able to cache fetched state in the HotShot view mapKey places to review