The gossipsub spec is lacking in details e.g. the current window
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 1.8k
- Forks
- 320
- Avg merge
- 11d 15h
- Merged PRs (30d)
- 1
Description
One should be able to read the spec and implement it in a way that will be interoperable with other implementations, without having to read other implementations. It seems that that is not the case. For instance, the spec doesn't specify what the constants should be, although I previously gleaned them from the Go impl:
// Overlay parameters
pub const TARGET_MESH_DEGREE: u32 = 6;
pub const LOW_WM_MESH_DEGREE: u32 = 4; // low water mark for mesh degree
pub const HIGH_WM_MESH_DEGREE: u32 = 12; // high water mark for mesh degree
pub const GOSSIP_HIST_LEN: u32 = 6; // length of gossip history
pub const MSG_HIST_LEN: u32 = 120; // length of total message history
pub const SEEN_MSGS_CACHE: u32 = 120;
Similarly I have also found details on mcache to be lacking, such as what the current history window should be like.
mcache: a message cache that contains the messages for the last few heartbeat ticks.
The message cache is a data structure that stores windows of message IDs and the corresponding messages. It supports the following operations:
mcache.put(m): adds a message to the current window and the cache. mcache.get(id): retrieves a message from the cache by its ID, if it is still present. mcache.window(): retrieves the message IDs for messages in the current history window. mcache.shift(): shifts the current window, discarding messages older than the history length of the cache.The seen cache is the flow control mechanism. It tracks the message IDs of seen messages for the last two minutes. It is separate from mcache for implementation reasons in Go (the seen cache is inherited from the pubsub framework), but they could be the same data structure. Note that the two minute cache interval is non-normative; a router could use a different value, chosen to approximate the propagation delay in the overlay with some healthy margin.
Is the current window the same thing as the seen cache?
How long is a heartbeat?
Contributor guide
No contributing guide indexed for this repository
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 with the gossipsub specification's heartbeat, mcache, and seen-cache sections, including the constants listed in the issue. Clarify the current window, cache history, and heartbeat duration so the specification is sufficient for interoperable implementations; done means those details and their normative status are explicit.
Written by the indexing model from the issue text.
Assessment
- Domain
- networking
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100