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

Don't ban nodes for block created in early catchup #13538

Merged

Conversation

georgeee
Copy link
Member

@georgeee georgeee commented Jul 6, 2023

Problem: when a node is in early catchup and creates a block, it might be considered worse than root and the node to be banned for gossiping it.

This is especially easy to reproduce in a network with a few large-stake BPs, but may happen in network like mainnet too, with a lower probability.

Discussion of the problem: https://www.notion.so/minaprotocol/Banning-of-recently-bootstrapped-block-producer-dd98f2268c9e4a6eb4cbd7730d3a2865

Solution: if parent of the transition is in root history, do not ban.

Additionally, if we've seen gossip with the parent of transition and its ancestor was in root history, do not ban. This one is implemented heuristically via an LRU cache.

Explain how you tested your changes:

  • Tested on a private cluster

Checklist:

  • Dependency versions are unchanged
    • Notify Velocity team if dependencies must change in CI
  • Modified the current draft of release notes with details on what is completed or incomplete within this project
  • Document code purpose, how to use it
    • Mention expected invariants, implicit constraints
  • Tests were added for the new behavior
    • Document test purpose, significance of failures
    • Test names should reflect their purpose
  • All tests pass (CI will check this if you didn't)
  • Serialized types are in stable-versioned modules
  • Does this close issues? None

@georgeee georgeee requested a review from a team as a code owner July 6, 2023 16:04
@georgeee georgeee force-pushed the georgeee/dont-ban-nodes-on-block-creation-in-early-catchup branch from 5405816 to 57fdad7 Compare July 10, 2023 21:17
@georgeee
Copy link
Member Author

!ci-build-me

@georgeee georgeee force-pushed the georgeee/dont-ban-nodes-on-block-creation-in-early-catchup branch from 57fdad7 to de6f367 Compare July 11, 2023 16:54
@georgeee
Copy link
Member Author

!ci-build-me

Problem: when a node is in early catchup and creates a block, it might
be considered worse than root and the node to be banned for gossiping
it.

Solution: if parent of the transition is in root history, do not ban.

Additionally, if we've seen gossip with the parent of transition and
its ancestor was in root history, do not ban. This one is implemented
heuristically via an LRU cache.
@georgeee georgeee force-pushed the georgeee/dont-ban-nodes-on-block-creation-in-early-catchup branch from de6f367 to ddc5bec Compare July 12, 2023 17:21
@georgeee
Copy link
Member Author

!ci-build-me

@deepthiskumar
Copy link
Member

!approved-for-mainnet

@georgeee georgeee merged commit 03846a3 into berkeley Jul 12, 2023
@georgeee georgeee deleted the georgeee/dont-ban-nodes-on-block-creation-in-early-catchup branch July 12, 2023 22:31
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.

3 participants