-
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?
chore(gossipsub): add DEFAULT_MAX_TRANSMIT_SIZE const #5906
Conversation
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.
Hi Diego, thanks for this! Left some comments
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
do we need it to be pub
?
@@ -5,6 +5,8 @@ | |||
- Improve `max_messages_per_rpc` consistency by ensuring RPC control messages also adhere to the existing limits. | |||
See [PR 5826](https://github.com/libp2p/rust-libp2p/pull/5826) | |||
|
|||
- Create `DEFAULT_MAX_TRANSMIT_SIZE` and use it in the code and docs. The main motivation is to fix the incorrect value mentioned in the docs and prevent it from happening again. See [PR 5906](https://github.com/libp2p/rust-libp2p/pull/5906) |
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
entry
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.
There's a failure as well https://github.com/libp2p/rust-libp2p/actions/runs/13655713410/job/38174302038
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
same as above, do we need this to be pub
?
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.
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 comment
The reason will be displayed to describe this comment to others. Learn more.
and doesn't pub(crate)
work?
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.
That's what I had when it failed 1e72f14
This pull request has merge conflicts. Could you please resolve them @diegomrsantos? 🙏 |
Description
Create
DEFAULT_MAX_TRANSMIT_SIZE
and use it in the code and docs. The main motivation is to fix the incorrect value mentioned in the docs and prevent it from happening again.Notes & open questions
No
Change checklist