-
Notifications
You must be signed in to change notification settings - Fork 129
Need to upgrade FC module to handle very long branch or non finalized branch #3002
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
Comments
Copied from discord discussion: basically, the first step that is needed is to keep track of the latest arrived fcu in forkedchain .. there are two cases: in particular, there's no "long async queue" involved here. the other critical change needed to FC is to remove all writes to baseTxFrame essentially, such as here:
that head update, it should not be written to the base txframe but rather to the txframe of the block being selected has head - same for finalized etc, they should always go into the same frame as the block that gets selected so that when we write the base to disk, we don't accidentally write a head hash that is not yet on disk this "lastestFinalizedNumber" is suffcient to implement the correct "base update" logic after importBlock, ie block arrives, we check against latest known finalized number, and if the finalized number is far in the future, we can update the base (with some lag - ie the base "target" becomes roundDown32(min(max(head-distance, lastFinalizedNumber)) where head is the latest block we imported, lastestFinalizedNumber is the current finality point according to the CL (ie it can be both higher and lower than head depending on whether we're in sync or not)
|
Regarding handling of block bodies/headers in non-final branches, after the above changes have been done, the steps are:
Likely, we will keep the dag outline - |
We have separate issue open for this #2888 |
A preparation for #3002 This is a piece of break up from bigger FC module fix. Easier for reviewer. Basically this is a fix based on this paragraph: > that head update, it should not be written to the base txframe but rather to the txframe of the block being selected has head - same for finalized etc, they should always go into the same frame as the block that gets selected so that when we write the base to disk, we don't accidentally write a head hash that is not yet on disk
A preparation for #3002 This is a piece of break up from bigger FC module fix. Easier for reviewer. Basically this is a fix based on this paragraph: > that head update, it should not be written to the base txframe but rather to the txframe of the block being selected has head - same for finalized etc, they should always go into the same frame as the block that gets selected so that when we write the base to disk, we don't accidentally write a head hash that is not yet on disk
This is the second piece of preparation for #3002
This is the second piece of preparation for #3002
This is the second piece of preparation for #3002
* FC header cache get its own column family This is the second piece of preparation for #3002 * Decouple temporary header storage from CoreDb * synchronizerKvt
This feature is needed for #2995
The text was updated successfully, but these errors were encountered: