You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Neighbor messages are sent to all connected peers but they are not re-propagated on reception. A message should be sent whenever the values of the message change and at least every 5 minutes. The sender should take the recipient's state into account and avoid sending messages to peers that are using different voter sets or are in a different round. Messages received from a future voter set or round can be dropped and ignored.
Our current flow is as follows:
We send neighbor messages every 5 minutes (5 minute init delay) to all connected peers. - This complies with the spec regarding the 5 minutes rule, but we do not check which of our peers are actually in the same set and round as us. Also the 5 minute initial delay can be skipped. A more suitable approach would be to check if we are the head of the chain and then actually send scheduled messages.
Every time we receive a neighbor message we send one back to the sending peer - I am not sure why this was done as it does not comply to the spec in any way.
Desirable flow:
We send neighbor messages in the following scenarios:
When we finalize a block.
For light client, full node and authoring node not a part of the voter set this will happen when commit message.
For authoring node that is a part of the voter set this will happen when we finalize a block via the Atemp-to-Finalize
When we switch a setId.
For light client, full node and authoring node not a part of the voter set this will happen when we handle authority changes from incoming blocks.
For authoring node that is a part of babe producers this will happen when we handle authority changes from produced and incoming blocks.
When we switch a round.
For light client, full node and authoring node not a part of the voter set this will happen on commit message when it has a different roundId from ours.
For authoring node that is a part of the voter set this will happen when we play a new grandpa round.
The text was updated successfully, but these errors were encountered:
As per spec:
Our current flow is as follows:
Desirable flow:
We send neighbor messages in the following scenarios:
Atemp-to-Finalize
The text was updated successfully, but these errors were encountered: