-
Notifications
You must be signed in to change notification settings - Fork 376
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
consensus: change gossip routines sleep and signaling setup #3007
Comments
In summary, we need a way to signal to the gossip data routines that new block parts are, or might be, available to be sent. This is a limitation of the current design, where consensus logic and reactor "communicate" via shared memory. A possibility that we have discussed is to leverage the existing synchronous signal |
For votes, there is also a synchronous event produced by the consensus logic: |
Maybe is cheaper to KISS, run it in a loop, and just reduce sleep, especially when a peer is behind in |
We only sleep when we don't find a vote to send to the peer. We sleep because we retrieve votes from the consensus logic via shared memory. The option we have been discussing is to explicitly signalize the reactor when there are new stuff (e.g., votes) available in the shared state to be sent. While we find votes suitable to be sent, we skip the sleeps in the loops. |
This can be in conjunction with #3211. |
Feature Request
Summary
Currently every gossip routine attempts to gossip a vote or block part. If it has no more block parts to gossip, it sleeps (by default 100ms). This has three issues:
Proposal
Make each gossip thread use a channel that "wakes it up".
For block part gossip:
For vote gossip:
Otherwise keep the current structure for a loop that is "awake".
The text was updated successfully, but these errors were encountered: