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

Fix sandwich attack on honest reorgs #12418

Merged
merged 5 commits into from
May 22, 2023
Merged

Conversation

potuz
Copy link
Contributor

@potuz potuz commented May 17, 2023

@potuz potuz requested a review from a team as a code owner May 17, 2023 18:55
@terencechain terencechain marked this pull request as draft May 17, 2023 19:17
@potuz potuz marked this pull request as ready for review May 21, 2023 23:49
@potuz potuz added Ready For Review A pull request ready for code review Forkchoice labels May 21, 2023
terencechain
terencechain previously approved these changes May 21, 2023
@prylabs-bulldozer prylabs-bulldozer bot merged commit e0e7c71 into develop May 22, 2023
@prylabs-bulldozer prylabs-bulldozer bot deleted the reorg-sandwitch branch May 22, 2023 17:23
@@ -82,6 +82,11 @@ func (f *ForkChoice) ShouldOverrideFCU() (override bool) {
if head.weight*100 > f.store.committeeWeight*params.BeaconConfig().ReorgWeightThreshold {
return
}

// Only orphan a block if the parent LMD vote is strong
if parent.weight*100 < f.store.committeeWeight*params.BeaconConfig().ReorgParentWeightThreshold {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is there a panic ?

james-prysm pushed a commit that referenced this pull request May 23, 2023
* Fix sandwich attack on honest reorgs

* fix test

---------

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Forkchoice Ready For Review A pull request ready for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants