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

feat(consensus): push all ingress messages #2233

Merged
merged 1 commit into from
Oct 24, 2024
Merged

Conversation

kpop-dfinity
Copy link
Contributor

Currently, we push ingress messages only if the size of the message is below 1024 bytes (see link), meaning that for large enough ingress messages, a node first has to see an advert and then request to download the advertized ingress message from a peer, before it can include the message in a block, potentially adding a couple hundreds of milliseconds to the end-to-end ingress message latency.

The benefits are even bigger in the context of hashes-in-blocks feature, where we rely on existence of ingress messages in the pool when validating blocks received from peers - pushing ingress messages should increase the chances that all the ingress messages referenced by a "stripped block" are already in the ingress pool, so we don't have to fetch them from peers.

One downside of always pushing ingress messages could be a wasted bandwith, i.e. node might receive an ingress message from a peer and then immediately discard it because the bouncer function deemed the ingress message to be not needed (e.g. if the ingress message already expired, from the node point's of view), but this should not be a rather rare occurrence (we actively purge expired ingress messages).

@github-actions github-actions bot added the feat label Oct 24, 2024
@kpop-dfinity kpop-dfinity marked this pull request as ready for review October 24, 2024 10:27
@kpop-dfinity kpop-dfinity requested a review from a team as a code owner October 24, 2024 10:27
@kpop-dfinity kpop-dfinity added this pull request to the merge queue Oct 24, 2024
Merged via the queue into master with commit e3c408c Oct 24, 2024
29 checks passed
@kpop-dfinity kpop-dfinity deleted the kpop/push_ingresses branch October 24, 2024 18:48
nmattia pushed a commit that referenced this pull request Oct 25, 2024
Currently, we push ingress messages only if the size of the message is
below 1024 bytes (see
[link](https://sourcegraph.com/github.com/dfinity/ic/-/blob/rs/p2p/consensus_manager/src/sender.rs?L232-234)),
meaning that for large enough ingress messages, a node first has to see
an advert and then request to download the advertized ingress message
from a peer, before it can include the message in a block, potentially
adding a couple hundreds of milliseconds to the end-to-end ingress
message latency.

The benefits are even bigger in the context of hashes-in-blocks feature,
where we rely on existence of ingress messages in the pool when
validating blocks received from peers - pushing ingress messages should
increase the chances that all the ingress messages referenced by a
"stripped block" are already in the ingress pool, so we don't have to
fetch them from peers.

One downside of always pushing ingress messages could be a wasted
bandwith, i.e. node might receive an ingress message from a peer and
then immediately discard it because the [bouncer
function](https://sourcegraph.com/github.com/dfinity/ic/-/blob/rs/ingress_manager/src/bouncer.rs?L32-40)
deemed the ingress message to be not needed (e.g. if the ingress message
already expired, from the node point's of view), but this should not be
a rather rare occurrence (we actively purge expired ingress messages).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants