Expand description
Fragment-index gossip — distributed discovery of which Pouch holds which fragment.
§Purpose
When a Bill node runs PutFile and distributes RLNC fragments to remote
Pouch peers, it publishes a FragmentIndexAnnouncement on a dedicated
gossipsub topic. All nodes that receive the announcement update their
local RemoteFragmentIndex, so they know exactly which Pouch holds
each fragment of a chunk.
This enables targeted FetchChunk requests:
instead of broadcasting a crate::network::NetworkCommand::FetchChunkFragments
to every Pouch in the network, GetFile can send a
crate::network::NetworkCommand::FetchChunkFragments only to the peers
listed in RemoteFragmentIndex::pointers_for.
§Topic
billpouch/v1/{network_id}/index
Separate from the NodeInfo topic (billpouch/v1/{network_id}/nodes) so
that consumers can subscribe selectively.
Structs§
- Fragment
Index Announcement - Gossip announcement published after a
PutFiledistributes fragments. - Fragment
Pointer - A gossipped pointer: which
peer_id(Pouch) holdsfragment_id. - Remote
Fragment Index - In-memory index accumulated from received
FragmentIndexAnnouncements.