aboutsummaryrefslogtreecommitdiffstats
path: root/src/swarm/peer.rs
Commit message (Collapse)AuthorAgeFilesLines
* add state filetv13 days1-0/+1
| | | | | This allows storing the swarm ID and additionally discovered seeds, which prevents a formerly genesis node to start a new document.
* cache headstv13 days1-4/+4
| | | | To reduce the number of write locks, heads are now cached.
* add chunked download and use it during rejointv13 days1-0/+3
|
* add throughput statstv14 days1-0/+5
|
* add swarm statstv14 days1-0/+2
|
* add traffic countertv14 days1-0/+4
| | | | | | | | | | This introduces a new wrapper that counts messages and payload bytes per peer, split by kind (hello, helloReply, sync, ping, pong), each sent, received and refused. The traffic counter goes around the firewall, which means messages dropped outbound are still counted as sent, and messages dropped inbound don't count as received.
* assess swarm stabilitytv14 days1-10/+21
|
* record RTT from keepalive messagestv14 days1-6/+14
|
* pull missing changestv14 days1-0/+1
| | | | | | Nodes push changes to their neighbours but don't relay them directly. In a partial mesh, nodes can learn about missing changes via keepalive messages and can pull them from their neighbours.
* find reachable neighbourstv14 days1-0/+2
|
* sync with neighbourstv14 days1-3/+38
|
* add member registrytv14 days1-0/+1
|
* use nonce in handshaketv14 days1-2/+14
| | | | | To prevent stale hello replies to cause joins and thus stale sessions, each run gets a random ID, which used as nonce in the handshake.
* consolidate backoff codetv14 days1-29/+15
|
* no heal during catch-uptv2026-10-231-1/+6
|
* peers that just became ready get syncstv2026-10-231-0/+9
| | | | | | When keepalive says ready and we didn't have taht on record before, the peer is queued for sync. Hello and hello reply don't do this because the handshake already queues a sync.
* both sides may open sync after resettv2026-10-231-21/+18
| | | | | | | | | | Ready nodes will leave the first message to the pear that isn't ready. Hello and hello reply now carry ready, so readiness is known from the very first contact, before any sync. Together with the sync messages and keepalives, reports_ready is always current. After epoch switch, pings go to everyone except ready members already on the new epoch, these learn from the lagging peer's opening.
* perform handshake in one round triptv2026-10-231-62/+52
|
* drop pre-membership sync messagestv2026-10-231-23/+4
| | | | | The handshake resets the session anyway, and the sender's reply timeout resends what still matters.
* bump number of heads in keepalive messagestv2026-10-231-0/+1
| | | | | Instead of arbitrarily limiting the number to 16, allow filling keepalive messages as long as they don't cause mycelium to chunk it.
* probe sync source during catch-uptv2026-10-231-1/+7
| | | | This allows changing sources without the fixed 30 s stall duration.
* enrich keepalive contenttv2026-10-231-26/+39
| | | | | | | Add ready and syncs_with_you flags as well as actual heads, so the peer - ready: same meaning as in the sync message - syncs_with_you: sender counts recipient as member and in same epoch - heads: allows to tell who's behind or if both sides have changes
* record the cause that started a sync sessiontv2026-10-231-5/+5
|
* merge sync_reset_at and epoch_unannounced into openingtv2026-10-231-3/+2
|
* introduce sync sessiontv2026-10-231-1/+1
| | | | SyncSession holds all fields that get reset by reset_sync()
* merge membership and authenticate into standingtv2026-10-231-14/+10
|
* pick pair leader by hash instead of key ordertv2026-10-231-1/+1
|
* ping only from one sidetv2026-10-231-1/+2
|
* don't resend sync messages to up-to-date peerstv2026-10-221-6/+15
| | | | | | | | | | | When an sync messages arrives and automerge has nothing to say about it, then no reply is generated. With c9279e4 it was assumed that every sync message gets an answer, so missing replies caused unnecessary resends. Now a reply is only awaited if the peer's last reported heads differ from ours. If the peer's heads become equal through a third peer without replying, the waiting will also abort if a ping or pong showss the same heads digest on both sides.
* introduce pre-shared swarm keytv2026-10-221-0/+85
|
* rename cluster to swarm everywhere!tv2026-10-211-33/+30
|
* resend sync messages that haven't been repliedtv2026-10-211-2/+10
|
* rename compaction to remaketv2026-10-211-1/+1
|
* reorganize all the modulestv2026-10-211-0/+675