3 releases

new 0.0.1-alpha2 Feb 18, 2025
0.0.1-alpha.1 Feb 7, 2025

#1187 in Network programming

Download history 237/week @ 2025-02-04 22/week @ 2025-02-11

259 downloads per month
Used in 2 crates (via kitsune2)

Apache-2.0

765KB
17K SLoC

Kitsune2 Gossip

Project Crate API Docs Discord

The gossip protocol for the Kitsune2 project.

The gossip message flows are described in the following diagram:

---
title: Gossip Protocol
---
stateDiagram-v2
    [*] --> init: Initiator sends agent ids, arc set and bookmark
    init --> accept: Acceptor sends init fields + missing agents, new op ids, new bookmark, and a snapshot
    
    accept --> no_diff: Initiator snapshot matches, send missing agents, new ops, new bookmark
    accept --> disc_sectors_diff: Initiator sends disc diff + missing agents, new ops, new bookmark
    accept --> ring_sector_details_diff: Initiator sends ring diff + missing agents, new ops, new bookmark
    accept --> terminate: Must stop
    
    no_diff --> agents: Acceptor send agents
    disc_sectors_diff --> agents: Acceptor cannot compare, so sends only agents
    ring_sector_details_diff --> agents: Acceptor cannot compare, so sends only agents 
    
    disc_sectors_diff --> terminate: Must stop
    ring_sector_details_diff --> terminate: Must stop
    
    disc_sectors_diff --> disc_sector_details_diff: Acceptor sends disc diff
    disc_sector_details_diff --> disc_sector_details_diff_response: Initiator sends disc diff + hashes
    disc_sector_details_diff_response --> hashes: Acceptor sends hashes
    
    disc_sectors_diff --> terminate: Must stop
    disc_sector_details_diff --> terminate: Must stop
    disc_sector_details_diff_response --> terminate: Must stop
    
    ring_sector_details_diff --> ring_sector_details_diff_response: Acceptor sends ring diff + hashes
    ring_sector_details_diff_response --> hashes: Initiator sends hashes
    
    ring_sector_details_diff --> terminate: Must stop
    ring_sector_details_diff_response --> terminate: Must stop
    
    hashes --> [*]
    agents --> [*]
    terminate --> [*]

License

License: Apache-2.0

Copyright (C) 2024 - 2025, Holochain Foundation

This program is free software: you can redistribute it and/or modify it under the terms of the license provided in the LICENSE file (Apache 2.0). This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Dependencies

~8–16MB
~217K SLoC