-
Notifications
You must be signed in to change notification settings - Fork 1k
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
chore(gossipsub): add DEFAULT_MAX_TRANSMIT_SIZE const #5906
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -136,3 +136,5 @@ pub type Rpc = self::types::Rpc; | |
|
||
pub type IdentTopic = Topic<self::topic::IdentityHash>; | ||
pub type Sha256Topic = Topic<self::topic::Sha256Hash>; | ||
|
||
pub use crate::protocol::DEFAULT_MAX_TRANSMIT_SIZE; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do we need it to be |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,6 +61,8 @@ pub(crate) const FLOODSUB_PROTOCOL: ProtocolId = ProtocolId { | |
kind: PeerKind::Floodsub, | ||
}; | ||
|
||
pub const DEFAULT_MAX_TRANSMIT_SIZE: usize = 65536; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same as above, do we need this to be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There's a failure otherwise https://github.com/libp2p/rust-libp2p/actions/runs/13655153154/job/38172407946 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. and doesn't There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's what I had when it failed 1e72f14 |
||
|
||
/// Implementation of [`InboundUpgrade`] and [`OutboundUpgrade`] for the Gossipsub protocol. | ||
#[derive(Debug, Clone)] | ||
pub struct ProtocolConfig { | ||
|
@@ -75,7 +77,7 @@ pub struct ProtocolConfig { | |
impl Default for ProtocolConfig { | ||
fn default() -> Self { | ||
Self { | ||
max_transmit_size: 65536, | ||
max_transmit_size: DEFAULT_MAX_TRANSMIT_SIZE, | ||
validation_mode: ValidationMode::Strict, | ||
protocol_ids: vec![ | ||
GOSSIPSUB_1_2_0_PROTOCOL, | ||
|
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.
this is more like a chore, we don't need to add a
CHANGELOG.md
entryThere 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.
There's a failure as well https://github.com/libp2p/rust-libp2p/actions/runs/13655713410/job/38174302038