-
Notifications
You must be signed in to change notification settings - Fork 291
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
[HOTFIX] fix leader crosslink issue to not include old cross link in the propo… #4629
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GheisMohammadi
requested review from
Frozen,
sophoah,
adsorptionenthalpy and
ONECasey
February 12, 2024 04:32
Just to add on, afaik, crosslink are today only used to calculate the reward to be distributed every 64 blocks, hence discarding those old pending crosslink should be safe and shouldn't affect the protocol |
sophoah
approved these changes
Feb 12, 2024
ONECasey
approved these changes
Feb 12, 2024
sophoah
approved these changes
Feb 12, 2024
Frozen
approved these changes
Feb 12, 2024
sophoah
approved these changes
Feb 13, 2024
ONECasey
added a commit
that referenced
this pull request
Feb 21, 2024
* fix allowed txs to be able to handle multiple txs for same from address (#4624) * [HOTFIX] fix leader crosslink issue to not include old cross link in the propo… (#4629) * fix leader crosslink issue to not include old cross link in the proposing block * set higher epoch threshold for pending crosslinks to be added to proposing block * delete old pending cross links * delete when proposing * delete when proposing * delete when proposing * delete when proposing * minor logic change for the log * minor logic change for the log * minor logic change for the log * minor logic change for the log --------- Co-authored-by: Diego Nava <diego.nava77@hotmail.com> * Fix for possible panic. (#4627) * Fix, removed duplicated check. --------- Co-authored-by: Gheis Mohammadi <Gheis.Mohammadi@gmail.com> Co-authored-by: Diego Nava <diego.nava77@hotmail.com> Co-authored-by: Konstantin <355847+Frozen@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue
The leader is adding pending crosslinks without verifying them. This could break the consensus if other validators don't have the old shard state needed to verify crosslinks. This PR addresses that issue by ignoring very old crosslinks and not adding them to proposing blocks.
The old pending crosslink will also be deleted. Deletion will happen when the node start, and anytime invalid crosslink are seen during the leader proposal process