Message ordering is not maintained in Gossipsub
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 5.6k
- Forks
- 1.3k
- Avg merge
- 8h 47m
- Merged PRs (30d)
- 19
Description
Summary
Previous version of Gossipsub messages had some message sequence ordering. With newer latest 0.52.3 version, the ordering is always wrong.
Expected behaviour
Expecting the messages published for a topic to be in order or at least provide a sequence id to help the application order the messages.
Actual behaviour
Messages published in Gossipsub received always out of sequence.
Possible Solution
Instead of having random message Id it can have a sequence number to help application order it. Security risks due to linear message Ids can be avoided with other mechanisms.
Version
libp2p = { version = "^0.52.3", features = ["full"] }
I think there is some changes introduced that affects the ordering.
Would you like to work on fixing this bug?
Yes.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the ordering behavior with libp2p 0.52.3 and tracing how Gossipsub assigns message IDs and delivers messages. Compare the current behavior with the expected ordering or sequence-ID semantics, then define and test the chosen behavior, including its security implications.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100