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

blockchain: check total difficulty only when having same justified block number #321

Merged

Conversation

minh-bq
Copy link
Collaborator

@minh-bq minh-bq commented Jul 25, 2023

In fork choice, we only need to compare the difficulty of forks when the justified block numbers are the same in those forks. Otherwise, we choose the fork with higher justified block number. This commit fixes a bug in current fork choice to make it follow the correct behavior.

…ock number

In fork choice, we only need to compare the difficulty of forks when the
justified block numbers are the same in those forks. Otherwise, we choose the
fork with higher justified block number. This commit fixes a bug in current fork
choice to make it follow the correct behavior.
@minh-bq minh-bq requested review from DNK90 and phuctd95 July 25, 2023 03:16
@minh-bq minh-bq merged commit 255470b into axieinfinity:feat/optimistic_fast_finality Jul 27, 2023
@minh-bq minh-bq deleted the fix/reorg-needed branch July 27, 2023 08:52
minh-bq added a commit to minh-bq/ronin that referenced this pull request Aug 29, 2023
…ock number (axieinfinity#321)

In fork choice, we only need to compare the difficulty of forks when the
justified block numbers are the same in those forks. Otherwise, we choose the
fork with higher justified block number. This commit fixes a bug in current fork
choice to make it follow the correct behavior.
minh-bq added a commit to minh-bq/ronin that referenced this pull request Sep 7, 2023
…ock number (axieinfinity#321)

In fork choice, we only need to compare the difficulty of forks when the
justified block numbers are the same in those forks. Otherwise, we choose the
fork with higher justified block number. This commit fixes a bug in current fork
choice to make it follow the correct behavior.
minh-bq added a commit that referenced this pull request Sep 7, 2023
…ock number (#321)

In fork choice, we only need to compare the difficulty of forks when the
justified block numbers are the same in those forks. Otherwise, we choose the
fork with higher justified block number. This commit fixes a bug in current fork
choice to make it follow the correct behavior.
andicrypt pushed a commit to andicrypt/ronin that referenced this pull request Nov 1, 2023
…ock number (axieinfinity#321)

In fork choice, we only need to compare the difficulty of forks when the
justified block numbers are the same in those forks. Otherwise, we choose the
fork with higher justified block number. This commit fixes a bug in current fork
choice to make it follow the correct behavior.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant