-
Notifications
You must be signed in to change notification settings - Fork 941
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
gossipsub: remove fast_message_id_fn
#4138
Labels
difficulty:moderate
getting-started
Issues that can be tackled if you don't know the internals of libp2p very well
help wanted
Comments
mxinden
added
difficulty:moderate
help wanted
getting-started
Issues that can be tackled if you don't know the internals of libp2p very well
labels
Jul 3, 2023
Hi @mxinden 👋 |
Great thank you. Feel free to open a draft pull request in case you want early feedback @StemCll. |
Sure, I need to get into the implementation first |
4 tasks
xgreenx
added a commit
to FuelLabs/fuel-core
that referenced
this issue
Dec 22, 2023
#1298 ### Documentation: Removed `upgrade::read_length_prefixed` and `upgrade::write_length_prefixed`: https://github.com/libp2p/rust-libp2p/pull/4787/files Remove `FastMessageId`: libp2p/rust-libp2p#4138 Remove `TokioDnsConfig`: libp2p/rust-libp2p@95890b5 Implement `InboundConnectionUpgrade`/`OutboundConnectionUpgrade`: libp2p/rust-libp2p#4307 --------- Co-authored-by: Brandon Vrooman <brandon.vrooman@gmail.com> Co-authored-by: Hannes Karppila <hannes.karppila@gmail.com> Co-authored-by: xgreenx <xgreenx9999@gmail.com>
goldenpath1109
added a commit
to goldenpath1109/fuel-core
that referenced
this issue
Sep 7, 2024
FuelLabs/fuel-core#1298 ### Documentation: Removed `upgrade::read_length_prefixed` and `upgrade::write_length_prefixed`: https://github.com/libp2p/rust-libp2p/pull/4787/files Remove `FastMessageId`: libp2p/rust-libp2p#4138 Remove `TokioDnsConfig`: libp2p/rust-libp2p@95890b5 Implement `InboundConnectionUpgrade`/`OutboundConnectionUpgrade`: libp2p/rust-libp2p#4307 --------- Co-authored-by: Brandon Vrooman <brandon.vrooman@gmail.com> Co-authored-by: Hannes Karppila <hannes.karppila@gmail.com> Co-authored-by: xgreenx <xgreenx9999@gmail.com>
crypto523
added a commit
to crypto523/fuel-core
that referenced
this issue
Oct 7, 2024
FuelLabs/fuel-core#1298 ### Documentation: Removed `upgrade::read_length_prefixed` and `upgrade::write_length_prefixed`: https://github.com/libp2p/rust-libp2p/pull/4787/files Remove `FastMessageId`: libp2p/rust-libp2p#4138 Remove `TokioDnsConfig`: libp2p/rust-libp2p@95890b5 Implement `InboundConnectionUpgrade`/`OutboundConnectionUpgrade`: libp2p/rust-libp2p#4307 --------- Co-authored-by: Brandon Vrooman <brandon.vrooman@gmail.com> Co-authored-by: Hannes Karppila <hannes.karppila@gmail.com> Co-authored-by: xgreenx <xgreenx9999@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
difficulty:moderate
getting-started
Issues that can be tackled if you don't know the internals of libp2p very well
help wanted
Description
Today
libp2p-gossipsub
provides thefast_message_id_fn
mechanism:rust-libp2p/protocols/gossipsub/src/config.rs
Lines 653 to 667 in 1eedcb5
Past motivation for the mechanism is the following . Ethereum compresses GossipSub messages. To avoid decompression just to find out that a message is a duplicate, introduce an additional message id method that can be applied pre-decompression.
Though the motivator itself, i.e. to avoid de-compression is no longer relevant. To quote @AgeManning:
One might think that removing the
fast_message_id_fn
mechanism makeslibp2p-gossipsub
prone to DOS attacks where the attacker tries to exhaust the CPU through forcing lots of decompression. Though even with the mechanism, an attacker can send slightly altered messages, thus forcing the local machine to do the decompression work.Next to the above no longer relevant optimization, the mechanism adds significant amount of complexity.
rust-libp2p/protocols/gossipsub/src/behaviour.rs
Lines 326 to 327 in 1eedcb5
handle_received_message
.rust-libp2p/protocols/gossipsub/src/behaviour.rs
Lines 1743 to 1874 in 1eedcb5
Motivation
Simplify
libp2p-gossipsub
.@AgeManning extracted from our past discussion. Please comment in case I am missing something.
Current Implementation
Are you planning to do it yourself in a pull request?
No, but I am happy to mentor someone.
The text was updated successfully, but these errors were encountered: