libp2p / libp2p/rust-libp2p

Message ordering is not maintained in Gossipsub

Open
#4,424 1 comment 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.