aboutsummaryrefslogtreecommitdiffstats
path: root/docs/store.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/store.md')
-rw-r--r--docs/store.md8
1 files changed, 6 insertions, 2 deletions
diff --git a/docs/store.md b/docs/store.md
index dad1485..e23a6a0 100644
--- a/docs/store.md
+++ b/docs/store.md
@@ -87,6 +87,7 @@ A fold says, of its events:
* **what an event builds on**, read from its bytes; bytes that aren't one of its events
are none, and are refused;
+* **how large an event may be**, which the document judges a change by (On Automerge);
* **whether an event is taken where its history reads as a given state**: judging. A
root is taken only as its own store's, never by judging;
* **the state a checkpoint and the events after it read as**, built by adding the events
@@ -106,6 +107,8 @@ In Rust, roughly:
```rust
pub trait Fold {
type State: Clone;
+ /// The most bytes an event may have: larger ones are none.
+ const LARGEST: usize;
/// What the event builds on; `None` where its bytes are none of this fold's events.
fn dependencies(event: &[u8]) -> Option<Vec<Id>>;
/// Whether the event is taken where its history reads as `at`.
@@ -226,8 +229,8 @@ nothing else of a strict policy: the document holds no values but events.
A change of a swarm holding a store writes nothing but:
-* **events**: at `_continuum/events/<ID>` the bytes whose ID it is, at a key held
- nowhere at the change's history;
+* **events**: at `_continuum/events/<ID>` the bytes whose ID it is, no more than its fold
+ allows, at a key held nowhere at the change's history;
* **its node's own protocol data**: its entry, its acks, a remake's record and proposal,
and, as a remake's coordinator, its decision or its abort; or, an epoch's first
change, epochs, the swarm's ID, the policy and the checkpoint.
@@ -407,6 +410,7 @@ crafted changes. *Sim*: a simulation. *Bench*: measured, not judged.
| 29 | Flooding: events, writers, history, remakes | Slow, or out of memory; not wrong | bench |
| 30 | A member decides compactions, grinding their IDs until the new epoch's ID is lower than the honest one's | Nodes on the honest epoch rejoin the lower, once a generation; no event is lost: slow, not wrong | sim |
| 31 | A made-up epoch whose snapshot holds a checkpoint before the node's document's, the root say | Not followed: a node follows an epoch only where the snapshot's checkpoint is its document's, one it builds from it, or one its operator pins | sim |
+| 32 | An event larger than the fold allows, put by a change | Refused: the change, by its own bytes; the store takes it nowhere | unit |
## Tests