diff --git a/nomos-da/network/core/src/protocol.rs b/nomos-da/network/core/src/protocol.rs index 80e6386f..02f54e2a 100644 --- a/nomos-da/network/core/src/protocol.rs +++ b/nomos-da/network/core/src/protocol.rs @@ -1,3 +1,4 @@ use libp2p::StreamProtocol; -pub const PROTOCOL_NAME: StreamProtocol = StreamProtocol::new("/nomos/da/0.1.0"); +pub const REPLICATION_PROTOCOL: StreamProtocol = StreamProtocol::new("/nomos/da/0.1.0/replication"); +pub const DISPERSAL_PROTOCOL: StreamProtocol = StreamProtocol::new("/nomos/da/0.1.0/dispersal"); diff --git a/nomos-da/network/core/src/replication/handler.rs b/nomos-da/network/core/src/replication/handler.rs index 45fee199..9e3c5769 100644 --- a/nomos-da/network/core/src/replication/handler.rs +++ b/nomos-da/network/core/src/replication/handler.rs @@ -16,7 +16,7 @@ use tracing::error; // internal use nomos_da_messages::{pack_message, unpack_from_reader}; -use crate::protocol::PROTOCOL_NAME; +use crate::protocol::REPLICATION_PROTOCOL; pub type DaMessage = nomos_da_messages::replication::ReplicationReq; @@ -185,7 +185,7 @@ impl ConnectionHandler for ReplicationHandler { type OutboundOpenInfo = (); fn listen_protocol(&self) -> SubstreamProtocol { - SubstreamProtocol::new(ReadyUpgrade::new(PROTOCOL_NAME), ()) + SubstreamProtocol::new(ReadyUpgrade::new(REPLICATION_PROTOCOL), ()) } fn poll(