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

Remove beta tag from gossipsub 1.2 #6344

Merged
merged 3 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions beacon_node/lighthouse_network/gossipsub/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
## 0.5 Sigma Prime fork
- Remove the beta tag from the v1.2 upgrade.
See [PR 6344](https://github.com/sigp/lighthouse/pull/6344)

- Implement IDONTWANT messages as per [spec](https://github.com/libp2p/specs/pull/548).
See [PR 5422](https://github.com/sigp/lighthouse/pull/5422)
Expand Down
2 changes: 1 addition & 1 deletion beacon_node/lighthouse_network/gossipsub/src/behaviour.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2716,7 +2716,7 @@ where
};

// Only gossipsub 1.2 peers support IDONTWANT.
if peer.kind != PeerKind::Gossipsubv1_2_beta {
if peer.kind != PeerKind::Gossipsubv1_2 {
continue;
}

Expand Down
6 changes: 3 additions & 3 deletions beacon_node/lighthouse_network/gossipsub/src/protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ use void::Void;

pub(crate) const SIGNING_PREFIX: &[u8] = b"libp2p-pubsub:";

pub(crate) const GOSSIPSUB_1_2_0_BETA_PROTOCOL: ProtocolId = ProtocolId {
pub(crate) const GOSSIPSUB_1_2_0_PROTOCOL: ProtocolId = ProtocolId {
protocol: StreamProtocol::new("/meshsub/1.2.0"),
kind: PeerKind::Gossipsubv1_2_beta,
kind: PeerKind::Gossipsubv1_2,
};
pub(crate) const GOSSIPSUB_1_1_0_PROTOCOL: ProtocolId = ProtocolId {
protocol: StreamProtocol::new("/meshsub/1.1.0"),
Expand Down Expand Up @@ -74,7 +74,7 @@ impl Default for ProtocolConfig {
max_transmit_size: 65536,
validation_mode: ValidationMode::Strict,
protocol_ids: vec![
GOSSIPSUB_1_2_0_BETA_PROTOCOL,
GOSSIPSUB_1_2_0_PROTOCOL,
GOSSIPSUB_1_1_0_PROTOCOL,
GOSSIPSUB_1_0_0_PROTOCOL,
],
Expand Down
6 changes: 3 additions & 3 deletions beacon_node/lighthouse_network/gossipsub/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ pub(crate) struct PeerConnections {
#[allow(non_camel_case_types)]
pub enum PeerKind {
/// A gossipsub 1.2 peer.
Gossipsubv1_2_beta,
Gossipsubv1_2,
/// A gossipsub 1.1 peer.
Gossipsubv1_1,
/// A gossipsub 1.0 peer.
Expand All @@ -148,7 +148,7 @@ impl PeerKind {
pub(crate) fn is_gossipsub(&self) -> bool {
matches!(
self,
Self::Gossipsubv1_2_beta | Self::Gossipsubv1_1 | Self::Gossipsub
Self::Gossipsubv1_2 | Self::Gossipsubv1_1 | Self::Gossipsub
)
}
}
Expand Down Expand Up @@ -623,7 +623,7 @@ impl PeerKind {
Self::Floodsub => "Floodsub",
Self::Gossipsub => "Gossipsub v1.0",
Self::Gossipsubv1_1 => "Gossipsub v1.1",
Self::Gossipsubv1_2_beta => "Gossipsub v1.2-beta",
Self::Gossipsubv1_2 => "Gossipsub v1.2",
}
}
}
Expand Down
Loading