-
Notifications
You must be signed in to change notification settings - Fork 72
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
IF: Update fork-choice rule for fork database #2125
Comments
heifner
added a commit
that referenced
this issue
Feb 13, 2024
heifner
added a commit
that referenced
this issue
Feb 13, 2024
heifner
added a commit
that referenced
this issue
Feb 13, 2024
heifner
added a commit
that referenced
this issue
Feb 14, 2024
heifner
added a commit
that referenced
this issue
Feb 14, 2024
heifner
added a commit
that referenced
this issue
Feb 14, 2024
heifner
added a commit
that referenced
this issue
Feb 14, 2024
… instead. Move current_core to block_state.
This was referenced Feb 17, 2024
heifner
added a commit
that referenced
this issue
Feb 26, 2024
heifner
added a commit
that referenced
this issue
Mar 7, 2024
heifner
added a commit
that referenced
this issue
Mar 7, 2024
heifner
added a commit
that referenced
this issue
Mar 8, 2024
heifner
added a commit
that referenced
this issue
Mar 8, 2024
heifner
added a commit
that referenced
this issue
Mar 8, 2024
heifner
added a commit
that referenced
this issue
Mar 8, 2024
heifner
added a commit
that referenced
this issue
Mar 8, 2024
heifner
added a commit
that referenced
this issue
Mar 8, 2024
…claim). Fixed qc choice logic to use parent
heifner
added a commit
that referenced
this issue
Mar 9, 2024
heifner
added a commit
that referenced
this issue
Mar 9, 2024
heifner
added a commit
that referenced
this issue
Mar 9, 2024
heifner
added a commit
that referenced
this issue
Mar 9, 2024
heifner
added a commit
that referenced
this issue
Mar 9, 2024
heifner
added a commit
that referenced
this issue
Mar 9, 2024
heifner
added a commit
that referenced
this issue
Mar 9, 2024
heifner
added a commit
that referenced
this issue
Mar 9, 2024
heifner
added a commit
that referenced
this issue
Mar 10, 2024
heifner
added a commit
that referenced
this issue
Mar 11, 2024
heifner
added a commit
that referenced
this issue
Mar 11, 2024
IF: Consider voting immediately if final on strong qc is validated
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Depends on #2244.
Update index for picking the best branch (rename
by_lib_block_num
toby_best_branch
) to order based on the computed fields derived from data inblock_state
.This issue assumes the following structures exist:
And that there is a member function
next_metadata
in the block header state core with the following function signature:The idea is to keep a cache of a
qc_claim
calledmost_recent_ancestor_with_qc
within eachblock_state
in the fork database which makes a QC claim on its most recent ancestor that has a valid QC. And in addition to keep a cache of thenext_core_metadata
that is derived from thecore
of thatblock_state
by callingcore.next_metadata(most_recent_ancestor_with_qc)
. Any timemost_recent_ancestor_with_qc
is mutated for ablock_state
, the correspondingnext_core_metadata
should also be recomputed.If a new QC (weak of strong) is achieved on a
block_state
, Leap must not only update themost_recent_ancestor_with_qc
of thatblock_state
but it must also traverse to the descendant blocks to determine whether their correspondingmost_recent_ancestor_with_qc
s should also be updated. If ablock_state
has a betterqc_claim
(as determined byoperator<
) then itsmost_recent_ancestor_with_qc
should not be updated nor should those of any of its descendant blocks.An index should be maintained in the new fork database to allow the best head to be quickly selected.
Computed fields for index (in order):
next_core_metadata.last_final_block_num
next_core_metadata.latest_qc_claim_block_num
Between blocks, the best head (as determined by the index) can be checked to determine if a fork switch is necessary.
The text was updated successfully, but these errors were encountered: