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
Previously, when a new peer connected, the GossipSub behaviour sent one RpcOut::Subscribe message per subscribed topic. This meant N separate protobuf frames were written to the wire for N topics.
This PR introduces ```RpcOut::SubscribeMany```, a batched variant that carries all subscriptions as a ```Vec<(TopicHash, bool, bool)>```, and updates ```on_connection_established``` to use it. The result is a single ```proto::RPC```with multiple SubOpts entries on the wire, which is both spec-compliant and more efficient.
The receiving side was already correct as ```handle_received_subscriptions``` already iterates a ```Vec<proto::SubOpts>```, so no changes are needed there and backward compatibility is fully preserved.
Fixes#6271
Pull-Request: #6385.
Copy file name to clipboardExpand all lines: protocols/gossipsub/CHANGELOG.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,6 @@
1
1
## 0.50.0
2
-
2
+
- Send all topic subscriptions in a single hello RPC when connecting to a new peer, aligning with the GossipSub spec and other implementations (Go, Nim, JS).
3
+
See [PR 6385](https://github.com/libp2p/rust-libp2p/pull/6385).
3
4
- Raise MSRV to 1.88.0.
4
5
See [PR 6273](https://github.com/libp2p/rust-libp2p/pull/6273).
0 commit comments