aboutsummaryrefslogtreecommitdiffstats
path: root/src/document/ranges.rs
Commit message (Collapse)AuthorAgeFilesLines
* federation: a set keeps its names as it changes, in runs with their sumstv2 days1-132/+396
| | | | | | | | | | | | | | | | | | | | | A set built the names it gives to others anew for every message, and a range's fingerprint cost its names. Now ranges::Names holds names in order in runs of up to 512, each with what it adds up to, so a range's fingerprint costs its ends and a sum per run between; and a set keeps one, adding and taking out as its store takes and lets go, entries come and go, and what it holds beside goes. In tests the names kept are compared with those read anew. A node splits a range where a number of its own says (ranges::answer's salt, from the system's randomness in store::passing), so that nobody knows beforehand which ranges it compares. Who is a member, which is the fold's to say of the store's state, a set asks only where its store changed, and once for the events of one message (Set::offer_all): asked for every event offered, it was what made catching up slow. A set's store has no more than 1024 events wait.
* federation: passing a set of events ontv2 days1-3/+4
| | | | | | | | | | | | | | | | | What two nodes say to each other of their sets (store::passing), with nothing kept of a peer between messages: where a node stands, its store's checkpoint and heads and the fingerprint of all its names; ranges (document::ranges, whose messages serialize), where fingerprints differ; its heads, where they differ and the fingerprints don't; the names it lacks and would have; events and entries, no more than 1 MiB a message. What comes is offered to the store or put as an entry, and for what the store then waits on and doesn't hold (Store::lacks) the node asks in turn. Sets that wrote apart come to hold the same, over seeds; what a node refuses of its own reaches others through it. Used by nothing yet: no node carries a set.
* document: catching up by ranges of names and their fingerprintstv2 days1-0/+553
Two nodes that each hold a set of names find what the other holds and they don't (document::ranges): a range's fingerprint, the same and it is done, else its parts' fingerprints or its names where few. Names added up modulo 2^256 with their number, hashed; 16 parts a step; a message answered by reading it once, with nothing kept between messages; no more names in a message than asked. Used by nothing yet: the set of events catches up so, and merged state and the document ordered by clocks (docs/document.md).