-
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
feat(gossipsub): implement message sizes per topic. #5868
base: master
Are you sure you want to change the base?
feat(gossipsub): implement message sizes per topic. #5868
Conversation
… warnings from clippy, check and fmt. Modifies test cases to use TopicMeshConfig::default() in place of explicit default values
@AgeManning I opened this PR in regards to #5745. It still needs some work to ensure consistency and correctness, although, I want to get it in front of the appropriate parties to ensure the PR is in the right direction in regards to the objective. |
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.
Thanks for the PR. I did leave a comment but i wonder if we should in a way assign the size to the topic after the behavior is constructed (eg assigning it to TopicHash
or via Behaviour::subscribe
or through some means) vs providing it in the config, which i believe the former is meant to be intended, though I could be wrong.
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 looks good imo.
Do we need to clone the config everytime we read it?
Also, I think it would be nice to maintain backwards compatibility. i.e, if users are already using mesh_n()
then it works as before, I think it would be nice to add additional config, like mesh_n_topic() which changes just that topic, all others revert to the default or if mesh_n
() etc was set.
Nice work.
You're right. I will look into removing the unnecessary cloning and the backwards compatibility makes sense. I will try to get this wrapped up this weekend between tomorrow and Sat. |
…ables and max transmit size.
This pull request has merge conflicts. Could you please resolve them @elijahhampton? 🙏 |
…into feat(5745)-implement-message-sizes-per-topic
…ing TransformFailed variant and fixes warnings from cargo fmt
…//github.com/elijahhampton/rust-libp2p into feat(5745)-implement-message-sizes-per-topic
…//github.com/elijahhampton/rust-libp2p into feat(5745)-implement-message-sizes-per-topic
Is this ready for a final review? |
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.
Nice! Just left a few tiny comments.
@jxs - I've looked over this, and it seems good to me, but because we touch some sensitive areas, probably worth another set of eyes.
This pull request has merge conflicts. Could you please resolve them @elijahhampton? 🙏 |
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, and thanks for this!
Left some comments
…s CHANGELOG entry in libp2p. Derives Debug for TopicMeshConfig, adds MessageTooLarge variant to PublishError enum, preserves function order and adds comments in behaviour.rs, removes config from ProtocolConfig.
…into feat(5745)-implement-message-sizes-per-topic
Description
Fixes: #5745
Notes & open questions
Change checklist