Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

47 changes: 43 additions & 4 deletions crates/ciris-kernel/ADOPTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -1809,10 +1809,11 @@ yours (see above) and you gather the Commits of a group.
- **`mls::branch_standing(&c, &law, &spec, &who, &room, &commit) -> Result<bool, Wait<Id>>`**: the Commit STANDS where every
row it cites (head, prev, further_prev) is held, every Commit it names stands, it states a head and a tree, and its tree
holds no leaf that is not a leaf at its roster head (`mls::members_for_commit` of the Commit, new in 0.6.12: `members_at`,
except that the vouches, their withdrawals and their supersession are the rows HELD in `c`, not only those in the
Commit's past; a vouch counts where it is live for the room at the Commit's own `asserted_at`, as `leaf_vouch_live`
reads it, and its member is seated at the head; a node key is never a leaf; `members_at` itself is unchanged for the
Add row): it realises every removal concluded in
except that the vouches are the rows HELD in `c`, not only those in the Commit's past, and (0.6.21, M11'') an END of
a vouch, its withdrawal or a later vouch of the same device that replaces it, binds a Commit only where the end is in
the Commit's causal past; a vouch counts where it is live for the room at the Commit's own `asserted_at`, as
`leaf_vouch_live` reads it, and its member is seated at the head; a node key is never a leaf; `members_at` itself is
unchanged for the Add row): it realises every removal concluded in
its head's past (a seat ended, a resignation, a revoked device, a lapsed or withdrawn vouch). **Derive a call key only
from a standing branch.** A standing Commit need not be a head. A row that is not a Commit does not stand.
- **`mls::commit_head(&c, &law, &spec, &who, &room, &commits) -> CommitHead<Id>`**: over the Commit ids you name, the standing
Expand All @@ -1826,6 +1827,44 @@ yours (see above) and you gather the Commits of a group.
- **`mls::commit_delta(&c, &law, &spec, &who, &room, &commit) -> Result<Delta, Wait<Id>>`**: `delta` from the Commit it extends
(`prev`; none is the empty group) to the Commit; a Commit that does not stand has one too; `Wait` on that Commit's own unheld names. A node holding a key under the
epoch of the earlier Commit refuses it while `removes` is not empty.
- **A vouch's end binds only the Commits it is in the past of (0.6.21, M11'', Constitution 2026-12-05).** The vouches are
read from the rows held (a Commit does not name vouches), but an END of a vouch, its `withdraws` or a later vouch of the
same device that replaces it, counts for a Commit only where that end is in the Commit's causal past. A Commit with the
end in its past stands only where its tree does not carry that leaf under that vouch (the removal rule extended to a
vouch's end; a device whose leaf is live under another vouch keeps it); a Commit without the end in its past is
untouched. A vouch's withdrawal is placed at the room's scope, one per room, and a committer names it under
`refs.also.cites`, so it is in the Commit's past; a Commit that names in `prev` a Commit with the withdrawal in its past
has it in its own. A vouch's withdrawal carries no `trusted_through`. A term's lapse (`valid_from`/`valid_until` against
the Commit's `asserted_at`) is read as before. Since 0.6.12 and before 0.6.21 the ends were read over the held set, so a
held withdrawal ended the vouch for every Commit carrying the leaf, past ones included, and the room's chain stopped
standing for that reader. `members_at` (the Add row) and `leaf_vouch_live` (the instant) are unchanged.
- **A last-resort KeyPackage (0.6.21, M12).** An `mls:key_package` row may state `last_resort` (literal true):
`CommitRow::key_package_last_resort() -> bool`, default false. Several standing Commits may cite it and
`key_package_spent_by` names none: it is never spent. A KeyPackage that states none is consume-once as before.
- **A joiner reads from its Welcome's Commit (0.6.21, M13).** A joiner holds no trees for the Commits before the one its
Welcome cites, so the full standing reading (every named Commit held and standing) never held for it.
`mls::commit_stands_alone(&c, &law, &spec, &who, &room, &commit) -> Result<bool, Wait<Id>>` reads ONE Commit against its
own tree, never `prev` or `further_prev`: held, a Commit, states `mls` and a tree, its `mls` is its head version's (a
well-formed one), its tree is a subset of `members_for_commit` (removals in the head's past, vouch ends in the Commit's past,
vouches in force), its cited KeyPackages state its suite; `Wait` on an unheld head or cited KeyPackage. `branch_standing`
is every named Commit standing AND this. **`mls::welcome_counts` now reads the cited Commit by it**, and additionally
needs the Commit to cite a KeyPackage row signed by the Welcome's `sub` (the joiner's device); the signer, the seated
joiner and the composite tree digest are as before. **The starts are derived**: the Commits cited by a held Welcome whose
`sub` is one of `me` and for which `welcome_counts` is true (a wait makes no start; there may be several).
`mls::branch_standing_from(&c, &law, &spec, &who, &room, me: &[Key], &commit)`, `commit_head_from(.., me, &commits)` and
`commit_delta_from(.., me, &commit)`: a Commit stands for the reader where it stands by the full reading, OR it is a
start, OR it stands alone and every Commit it names stands for the reader by this rule, so recursion stops at a start.
**`me` is a SET** (a node re-added under a new device key holds Welcomes to two of its keys; the starts are the union, and
joining per-key answers outside is not equivalent: a deciding Commit naming a branch that reaches start 1 and another that
reaches start 2 stands under the union, not under either key alone). Cost: one pass over the held rows for the candidate
Welcomes, once per call; no Welcome for `me`, exactly the plain reading. `commit_delta_from` differs from `commit_delta`
only for a start whose `prev` is not held: its delta is from its own tree (its stated leaves added, none removed).
A KeyPackage row is told by `CommitRow::is_key_package` (default false, like `is_commit`: the adopter presents it).
- **`mls::key_package_served(&c, &law, &spec, &who, &room, &commits, &package) -> bool`** (0.6.21, M12): whether a store
serves the KeyPackage. It is held and a KeyPackage (`CommitRow::is_key_package`, default false: the adopter
presents it); an ordinary one is served while unspent (`key_package_spent_by` empty); one stating `last_resort` is
served only while no other held KeyPackage with the same signer (the device) is unspent among `commits`. Unspent is
spent by no standing Commit among `commits`. **The store serves through this function and does not decide itself.**
- **`mls::key_package_spent_by(&c, &law, &spec, &who, &room, &commits, &package) -> BTreeSet<Id>`** and
`key_package_spent(..) -> bool`: a KeyPackage is spent by each standing Commit among `commits` that cites it
(consume-once); a fork whose branches cite one KeyPackage names both. A Commit not held, or waiting on a name (a cited
Expand Down
10 changes: 10 additions & 0 deletions crates/ciris-kernel/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog — ciris-kernel

## [0.6.21]

Pins Constitution `v1.0-rc23-pre14` (tag object 4bfa7f0, commit 4007c95, family_model sha256 b436228e, 194 families), moved from pre13: it carries the text of M11″ (CC 5.1, "The end of a vouch"), M12 (the KeyPackage paragraph) and M13 (the Welcome paragraph), and adds `holon:stake` (tables regenerated). Does NOT read the charter `suites` member. This is the roll's kernel, frozen with pre14.

- **Fixed: a vouch's end collapsed a room's Commits** (M11''; `mls::members_for_commit`, `models/causal_kernel/mls.py`, `check_commit.py` Part 7). Since 0.6.12 the ends of a vouch, its withdrawal and its replacement by a later vouch of the same device, were read over the held set, so a held end ended the vouch for every Commit carrying that device's leaf, past ones included, and the Commits that name them stopped standing. Now the vouches are read from the rows held and an end binds a Commit only where it is in the Commit's causal past: a Commit with the end in its past stands only where its tree does not carry that leaf under that vouch; one without it is untouched. The withdrawal is placed at the room's scope, one per room, and a committer names it under `refs.also.cites`; no `trusted_through` on it. A term's lapse is read as before. `members_at` and `leaf_vouch_live` are unchanged. Cases M11.1 to M11.7, fixture `mls_m11.json`, test `the_end_of_a_vouch`; the case "a held vouch withdrawn" of `mls_commit.json` now answers true.
- **Fixed: a joiner could never read its group's Commits as standing** (M13). `mls::commit_stands_alone` (a Commit read against its own tree, no ancestry; the full reading is the Commits it names standing AND this, the checks written once); `welcome_counts` reads the cited Commit by it and needs the Commit to cite a KeyPackage signed by the Welcome's `sub`; `branch_standing_from`, `commit_head_from` and `commit_delta_from` take `me: &[Key]` (a set) and read standing for the reader, its starts derived from the counting Welcomes for its keys. No Welcome for `me`: the plain readings. Cases M13.1 to M13.10, fixture `mls_m13.json`, test `the_joiner_reads_from_its_welcome`; the Welcome cases M2.12 now cite the joiner's KeyPackage.
- **Added: a last-resort KeyPackage** (M12). `CommitRow::key_package_last_resort` (default false): an `mls:key_package` stating `last_resort` (literal true) is never spent; `key_package_spent_by` names none of the Commits that cite it. `mls::key_package_served` and `CommitRow::is_key_package`: a last-resort KeyPackage is served only while no other KeyPackage of its device is unspent. Cases M12.1 to M12.5.
- **Fixed: the neutral vectors' roster versions all state `mls`** (asked by Verify). 0.6.20's `tests/vectors/` gave `mls` (`{"gen": 0, "suite": 77}`) to only the roster versions built by one emitter (seats 14 of 19; voices, persons and keyview none). Every `group:roster` version in `seats.json`, `voices.json`, `persons.json` and `keyview.json` now carries it (36 of 36); `tools/kernel_vectors.py` reads one `MLS_V0`. No answer changed.
- **Changed (internal): one check that a Commit states its `mls`.** M13's name check re-read `commit_mls` and failed closed on none, shadowing the M2 check (its plant went uncaught); it now takes the Commit's `mls` from its caller. No answer changed.

## [0.6.20]

Pins Constitution `v1.0-rc23-pre13` (tag object be5a2d4, commit 835509a, family_model sha256 d57f63dd, 193 families), moved from pre12. It carries M10 and M10.5/M10.6′ ("A key that has ended", CC 4.4.3.30), the corrected `mls:welcome` signer cell (`RosterMember`, not_subject), and wider placements for `holon:claim`, `key:*`, `mls:*` and ownership, with new blind cells for the MLS families. Does NOT read the charter `suites` member.
Expand Down
2 changes: 1 addition & 1 deletion crates/ciris-kernel/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ciris-kernel"
version = "0.6.20"
version = "0.6.21"
edition = "2021"
rust-version = "1.89"
description = "The CIRIS causal kernel as pure functions over an abstract row graph (no I/O, no clock, no crypto)"
Expand Down
2 changes: 1 addition & 1 deletion crates/ciris-kernel/VECTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ below that the schema cannot state is marked **(prose)**; a minter checks it and
```json
{
"form": "ciris-kernel-cases/1",
"constitution": "CIRISConstitution v1.0-rc23-pre13 835509a",
"constitution": "CIRISConstitution v1.0-rc23-pre14 4007c95",
"cases": [ ... ]
}
```
Expand Down
2 changes: 2 additions & 0 deletions crates/ciris-kernel/WIRE_MAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,8 @@ key of no roster counts as itself (`Persons::voice`).
|---|---|---|
| `mls:commit:v1` (authored) | `refs.head` (the roster head version it realises), `refs.prev`, `refs.further_prev`, `refs.also.cites` (each KeyPackage it spends); payload `mls = {gen: uint, suite: uint}` always, and for a call group's Commit `call` (`bstr .size 32`, the call id the host minted). Its `evidence_refs` holds exactly the tree-blob digest: at most one entry, and only under suite 61517 (admission refuses anything else), so non-empty names the tree (`CommitRow::commit_names_tree`). `call` is NOT a ref: it is in no `Row::names` and nothing waits on it; absent is the room's chat group. The 32-byte `group` member is removed: the group is derived from `["CEG-mls-group/3", room, gen]`, a call group from `["CEG-mls-call-group/3", room, call, gen]`. | `mls::CommitRow`: `commit_mls`, `commit_call`, `commit_names_tree`, `commit_prev`, `commit_further_prev`, `commit_cites`, `commit_leaves` |
| KeyPackage | payload `suite` (77 or 61517), required (M9): a Commit stands only where every KeyPackage it cites states a `suite` equal to the Commit's `mls.suite` | `CommitRow::key_package_suite` |
| KeyPackage `last_resort` | payload `last_resort`, literal true, optional (M12, 0.6.21): the KeyPackage is never spent; several standing Commits may cite it. Absent or any other value: consume-once | `CommitRow::key_package_last_resort` (default false) |
| the `withdraws` of an `mls:leaf_vouch` | placed at the room's scope, one per room (M11'', 0.6.21); a Commit names it under `refs.also.cites`, so it is in the Commit's causal past. It ends the vouch only for the Commits that have it in their past (a Commit that names, in `prev`, a Commit with it in its past has it in its own); no `trusted_through`. A later vouch of the same device that replaces the vouch ends it the same way | `LeafVouchRow::vouch_withdraws`; read by `mls::members_for_commit` |
| `mls:welcome` | the Commit it cites, the joiner's key, and the row's signer | `mls::WelcomeRow`: `is_welcome`, `welcome_commit`, `welcome_joiner` |

`suite` is 77 or 61517 (0xF04D) and nothing else.
Expand Down
6 changes: 4 additions & 2 deletions crates/ciris-kernel/src/audience_table.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// @generated by tools/family_placement.py from the Constitution's manifests/family_model.json
// (branch v1.0-rc23-pre13, commit 835509a21d1fed916596778384b462461477e51a, sha256 d57f63dd46130d1e7f06dca48f441b0c54b359ab13467c561b3c0bc0b977fad2). Do not edit: re-pin with that script.
// (branch v1.0-rc23-pre14, commit 4007c95d5ec9d81f7bc6dd34b170758a720ada93, sha256 b436228eba502f0191c87f09f8ed48d424c5b566ed83fe6093fa2e71c5a07233). Do not edit: re-pin with that script.

use super::{Blind, FamilyPlacement, Follows, Placement};

/// The family model's sha256, the pin of [`FAMILIES`].
pub const FAMILY_MODEL_SHA256: &str = "d57f63dd46130d1e7f06dca48f441b0c54b359ab13467c561b3c0bc0b977fad2";
pub const FAMILY_MODEL_SHA256: &str = "b436228eba502f0191c87f09f8ed48d424c5b566ed83fe6093fa2e71c5a07233";

/// The cohort scope a row states, with the placement it is (the table's `scopes`, CC 5.2), and `addressed`.
pub const SCOPES: &[(&str, Placement)] = &[
Expand Down Expand Up @@ -126,6 +126,7 @@ pub const FAMILIES: &[(&str, FamilyPlacement)] = &[
("hardware_custody:{platform}", FamilyPlacement::Allowed(&[Placement::SelfCollective, Placement::TargetedFamily, Placement::TargetedRoom, Placement::Commons])),
("health:liveness:{version}", FamilyPlacement::Allowed(&[Placement::SelfCollective, Placement::TargetedFamily, Placement::TargetedRoom, Placement::Commons])),
("holon:claim", FamilyPlacement::Allowed(&[Placement::SelfCollective, Placement::TargetedFamily, Placement::TargetedRoom, Placement::Commons])),
("holon:stake", FamilyPlacement::Allowed(&[Placement::SelfCollective, Placement::TargetedFamily, Placement::TargetedRoom, Placement::Commons])),
("identity:canonical_binding:{canonical_hash}", FamilyPlacement::Allowed(&[Placement::SelfCollective, Placement::TargetedFamily, Placement::TargetedRoom, Placement::Commons])),
("identity:occurrence", FamilyPlacement::Allowed(&[Placement::SelfCollective, Placement::TargetedFamily, Placement::TargetedRoom, Placement::Commons, Placement::Addressed])),
("identity:occurrence_revocation", FamilyPlacement::Allowed(&[Placement::SelfCollective, Placement::TargetedFamily, Placement::TargetedRoom, Placement::Commons, Placement::Addressed])),
Expand Down Expand Up @@ -324,6 +325,7 @@ pub const BLIND: &[(&str, Blind)] = &[
("hardware_custody:{platform}", Blind::Members(&["body.note"])),
("health:liveness:{version}", Blind::Members(&["body.note"])),
("holon:claim", Blind::Members(&["body.note"])),
("holon:stake", Blind::Members(&["body.note"])),
("identity:canonical_binding:{canonical_hash}", Blind::Members(&["body.note"])),
("identity:occurrence", Blind::Members(&["body.note"])),
("identity:occurrence_revocation", Blind::Members(&["body.note"])),
Expand Down
4 changes: 3 additions & 1 deletion crates/ciris-kernel/src/erasure_table.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @generated by tools/family_placement.py from the Constitution's manifests/family_model.json
// (branch v1.0-rc23-pre13, commit 835509a21d1fed916596778384b462461477e51a, sha256 d57f63dd46130d1e7f06dca48f441b0c54b359ab13467c561b3c0bc0b977fad2). Do not edit: re-pin with that script.
// (branch v1.0-rc23-pre14, commit 4007c95d5ec9d81f7bc6dd34b170758a720ada93, sha256 b436228eba502f0191c87f09f8ed48d424c5b566ed83fe6093fa2e71c5a07233). Do not edit: re-pin with that script.

use super::{Descent, Route};

Expand Down Expand Up @@ -112,6 +112,7 @@ pub const ERASURE_ROUTE: &[(&str, Route)] = &[
("hardware_custody:{platform}", Route::Purge),
("health:liveness:{version}", Route::Purge),
("holon:claim", Route::Undecided),
("holon:stake", Route::Undecided),
("identity:canonical_binding:{canonical_hash}", Route::Purge),
("identity:occurrence", Route::Purge),
("identity:occurrence_revocation", Route::Purge),
Expand Down Expand Up @@ -311,6 +312,7 @@ pub const DESCENDS_ON_WITHDRAWAL: &[(&str, Descent)] = &[
("hardware_custody:{platform}", Descent::Row),
("health:liveness:{version}", Descent::Row),
("holon:claim", Descent::Row),
("holon:stake", Descent::Row),
("identity:canonical_binding:{canonical_hash}", Descent::Row),
("identity:occurrence", Descent::Nothing),
("identity:occurrence_revocation", Descent::Nothing),
Expand Down
3 changes: 2 additions & 1 deletion crates/ciris-kernel/src/kept_table.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @generated by tools/family_placement.py from the Constitution's manifests/family_model.json
// (branch v1.0-rc23-pre13, commit 835509a21d1fed916596778384b462461477e51a, sha256 d57f63dd46130d1e7f06dca48f441b0c54b359ab13467c561b3c0bc0b977fad2). Do not edit: re-pin with that script.
// (branch v1.0-rc23-pre14, commit 4007c95d5ec9d81f7bc6dd34b170758a720ada93, sha256 b436228eba502f0191c87f09f8ed48d424c5b566ed83fe6093fa2e71c5a07233). Do not edit: re-pin with that script.

use super::WithdrawCell;

Expand Down Expand Up @@ -112,6 +112,7 @@ pub const KEPT: &[(&str, WithdrawCell)] = &[
("hardware_custody:{platform}", WithdrawCell::May),
("health:liveness:{version}", WithdrawCell::May),
("holon:claim", WithdrawCell::Barred),
("holon:stake", WithdrawCell::Barred),
("identity:canonical_binding:{canonical_hash}", WithdrawCell::May),
("identity:occurrence", WithdrawCell::May),
("identity:occurrence_revocation", WithdrawCell::Barred),
Expand Down
Loading
Loading