forked from libp2p/rust-libp2p
-
Notifications
You must be signed in to change notification settings - Fork 7
Correct peer penalty for publishing messages already in the network #573
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
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When a relay server has no more connection with a reserved client, it would remove the reservation and the drop the circuits without any information passed to the server. It will be useful to for a server to track all its reservations and to know when they're removed (without keeping track of the connections themselves). This PR aims to notify the server when a reservation closes, with the emission of the following event ``` /// A reservation has been closed. ReservationClosed { src_peer_id: PeerId }, ``` Pull-Request: libp2p#5869.
There is a special `Idle connection timeout` section in the ping tutorial which says that we should include connection timeout settings, but the settings are not included. I have checked previous versions and they had it so it was either lost by mistake, or the section is not relevant anymore. This is a very minor PR to update the docs. Pull-Request: libp2p#5893.
May close libp2p#4017. Pull-Request: libp2p#5785.
Deprecate support_draft_version field from QUIC protocol. resolves libp2p#3395 Pull-Request: libp2p#5786.
This PR handles the `DialError::WrongPeerID` event in `identify` protocol. Scenario: Consider a network with two nodes, N1 and N2, where N2 periodically initiates a connection/substream to N1. Now, if N1 is shut down and a new node, N3, starts up on the same transport address but with a different keypair, the identify protocol in N2 will continue to associate the old (PeerId, Multiaddr) pair in its cache. However, since N1 no longer exists and N3 has a different identity, this cached entry is now invalid. This PR ensures that the protocol properly detects and handles such situations, preventing stale peer information from causing connectivity issues. Pull-Request: libp2p#5890.
Introduce `libp2p-peer-store` for a peer store implementation. Related: libp2p#4103 Pull-Request: libp2p#5724.
This PR ensures that the node respects `IDONTWANT` messages that have already been received, when handling `IWANT`. Pull-Request: libp2p#5901.
messages weren't forwarded to floodsub peers Pull-Request: libp2p#5908.
Add edition to workspace Cargo.toml and Inherits workspace edition. Additionally, inherits rust-version in `libp2p-upnp` and `libp2p-websocket-websys`. Pull-Request: libp2p#5896.
The `InsufficientPeers` error was unclear about whether it meant no peers were connected at all or no peers were subscribed to the topic. Rename it to `NoPeersSubscribedToTopic` to make it clear that this error occurs when trying to publish to a topic that has no subscribed peers. Fixes libp2p#5907 Pull-Request: libp2p#5912.
This PR tries to fix [RUSTSEC-2025-0009](https://rustsec.org/advisories/RUSTSEC-2025-0009.html) in `libp2p-tls` and `libp2p-websocket` by bumping `rcgen`. Note: Upgrading `rcgen` in `libp2p-webrtc` is non-trival, so it's not included in this PR. Pull-Request: libp2p#5917.
pawanjay176
approved these changes
Mar 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch!
publish broadcasted to all floodsub peers regardless of their topics Pull-Request: libp2p#5904.
Fixes libp2p#5383 Pull-Request: libp2p#5922.
Fixes libp2p#5372 Pull-Request: libp2p#5902.
…ition-publish-iwant
…ibp2p into race-condition-publish-iwant
6b6f3da
to
ab936ed
Compare
Resolved upstream |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
There is a possible race condition that can happen that results in us inadvertently penalizing a peer.
This PR removes the promise for a message when we publish it.