Skip to content

Restrict neighbor messages processing when sync#1597

Merged
kamilsa merged 3 commits intomasterfrom
fix/neighbor-messages-when-sync
May 9, 2023
Merged

Restrict neighbor messages processing when sync#1597
kamilsa merged 3 commits intomasterfrom
fix/neighbor-messages-when-sync

Conversation

@kamilsa
Copy link
Copy Markdown
Contributor

@kamilsa kamilsa commented May 5, 2023

Referenced issues

When KAGOME observes neighbor message we do the following:

  1. Update state of remote peer about their most recent round
  2. Send them our current state (our round number)
  3. If we identify that remote peer is far in the future by the finalized block, we send justification sync request.

2 and 3 is redundant if our node has never been synchronized (for example during fast sync).

Description of the Change

  • We only start sending our neighbor messages (with our state) and justification sync requests only when we synchronized at least once.
  • In addition to that we are fixing bufferization of stdout/stderr for Zombienet integration #1595 (not related to the main fix in PR)

Benefits

Less bandwidth

Possible Drawbacks

None

@kamilsa kamilsa requested review from iceseer and xDimon May 5, 2023 06:04
Signed-off-by: kamilsa <kamilsa16@gmail.com>
@kamilsa kamilsa force-pushed the fix/neighbor-messages-when-sync branch from f50f3aa to 9703d94 Compare May 5, 2023 06:08
Comment thread core/consensus/grandpa/impl/grandpa_impl.cpp Outdated
Comment thread core/consensus/grandpa/impl/grandpa_impl.hpp Outdated
Signed-off-by: kamilsa <kamilsa16@gmail.com>
Signed-off-by: kamilsa <kamilsa16@gmail.com>
@kamilsa kamilsa force-pushed the fix/neighbor-messages-when-sync branch from 4c676b8 to 03e1207 Compare May 9, 2023 09:36
@kamilsa kamilsa enabled auto-merge (squash) May 9, 2023 09:39
@kamilsa kamilsa merged commit 0b94751 into master May 9, 2023
@kamilsa kamilsa deleted the fix/neighbor-messages-when-sync branch May 9, 2023 10:50
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