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(evidence): send evidence only once #683

Merged
merged 1 commit into from
Sep 14, 2023
Merged

Conversation

lklimek
Copy link
Collaborator

@lklimek lklimek commented Sep 14, 2023

Issue being fixed or feature implemented

Right now, evidence is sent to all peers, which is not necessary and can generate huge load during chain halt.

Reproduction scenario:

  1. Stop majority of chain nodes (except one)
  2. Remove WAL from stopped nodes
  3. Break the code so that the chain will be halted
  4. Start stopped nodes

As a result, these nodes will generate huge amount of evidence messages, which will be sent to all peers repeatedly. On big enough network, this will cause significant load.

What was done?

We no longer repeatedly send evidence to all connected peers.

Instead:

  1. When a peer connects, we send all evidence from the pool to it.
  2. When new evidence arrives, we broadcast it to all peers.

How Has This Been Tested?

TODO

Breaking Changes

None

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

Right now, evidence is sent to all peers, which is not necessary
and can generate huge load during chain halt.

Reproduction scenario:

1. Stop majority of chain nodes (except one)
2. Remove WAL from stopped nodes
3. Break the code so that the chain will be halted
4. Start stopped nodes

As a result, these nodes will generate huge amount of evidence
messages, which will be sent to all peers repeatedly.
On big enough network, this will cause significant load.
@lklimek lklimek merged commit 0551f7a into v0.13-dev Sep 14, 2023
15 checks passed
@lklimek lklimek deleted the fix-evidence-broadcast branch September 14, 2023 10:53
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.

2 participants