Navigation Menu

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

Bounce attack resistance #1465

Merged
merged 8 commits into from Nov 7, 2019
Merged

Bounce attack resistance #1465

merged 8 commits into from Nov 7, 2019

Conversation

djrtwo
Copy link
Contributor

@djrtwo djrtwo commented Nov 5, 2019

Only allow updates to the latest justified for fork choice if within the first SAFE_SLOTS_TO_UPDATE_JUSTIFIED slots of an epoch or if the new justified does not conflict with the previous. If a new justified is learned about but doesn't satisfy these constraints, queue it up for consideration at next epoch boundary.

This addresses the bouncing attack discussed here.

Testing justification and finalization in the fork choice is painful and needs to be reconsidered

specs/core/0_fork-choice.md Outdated Show resolved Hide resolved
specs/core/0_fork-choice.md Outdated Show resolved Hide resolved
specs/core/0_fork-choice.md Outdated Show resolved Hide resolved

current_slot = get_current_slot(store)
# Not a new epoch, return
if not (current_slot > previous_slot and current_slot % SLOTS_PER_EPOCH == 0):
Copy link
Collaborator

Choose a reason for hiding this comment

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

ditto

specs/core/0_fork-choice.md Outdated Show resolved Hide resolved
@djrtwo djrtwo changed the title [WIP] Bounce attack resistance Bounce attack resistance Nov 7, 2019
Copy link
Collaborator

@protolambda protolambda left a comment

Choose a reason for hiding this comment

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

Looking good, just a few minor things left to look at.

specs/core/0_fork-choice.md Outdated Show resolved Hide resolved
specs/core/0_fork-choice.md Show resolved Hide resolved
specs/core/0_fork-choice.md Outdated Show resolved Hide resolved
specs/core/0_fork-choice.md Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants