Normative · Part
Data model
7. The change event
Section titled “7. The change event”Every mutation to syncable state is represented as a change event. On the wire an event is a COSE_Sign1 message ([RFC 9052]) — the same container SOP/1 uses for object manifests and access records, so SOVM/1 carries one signature stack.
Event = COSE_Sign1( protected = { alg : ES256, content type : "sovm/ssp-event-v1", kid : site_id (16 bytes) }, unprotected = {}, MUST be empty payload = deterministic CBOR map (fields below), external_aad = mesh_id (16 raw bytes))The unprotected bucket MUST be empty: everything an event carries is covered by the signature, so there is nowhere for an unauthenticated field to hide.
The payload is a deterministic CBOR map with exactly these fields:
| Field | Type | Description |
|---|---|---|
table_schema |
text | Destination schema name. |
table_name |
text | Destination table name. |
row_key |
map | Primary-key column names to values. Non-empty, for both operations. |
operation |
text | "upsert" or "delete". "purge" is reserved and MUST NOT be emitted; see deletion. |
payload |
map or null | Column values. Null for tombstones. |
hlc_physical_ms |
unsigned | HLC physical component, milliseconds since the Unix epoch. |
hlc_logical |
unsigned | HLC logical counter, at most 2^64 − 1 (section 11). |
Every field is REQUIRED. Receivers MUST reject an event with a missing or extra payload field — a receiver cannot verify a signature over fields it had to invent, and an extra field it does not interpret is a field it is attesting to blindly.
row_key is the one field with no null form. Both operations address a row, and
every materialization rule is keyed on that address, so a null or empty key names
nothing any rule can act on; a receiver drops such an event rather than inventing a
meaning for it (held and dropped).
payload keeps its null form because a tombstone genuinely carries no columns.
Notes on what is deliberately absent:
- No
event_idmember. The identifier is derived from the message bytes (section 9), so transmitting it inside the message would be self-referential. Deriving it also removes an entire failure class: there is no transmitted identifier to mismatch against. - No
site_idin the payload. The authoring node travels once, in the protectedkidheader, where it is covered by the signature. Two locations for one fact is an invitation for them to disagree. - No encoding or version tags. The protected content type versions the whole
construction. A future change ships as
sovm/ssp-event-v2, and because the content type is inside the signed structure it cannot be swapped in flight. - No
tsmember and no operation synonyms. A timestamp member would duplicatehlc_physical_ms, and accepting"insert"/"update"as synonyms of"upsert"would widen the parser for no benefit; duplicated fields are a divergence hazard.
8. Canonical encoding
Section titled “8. Canonical encoding”Where this specification calls an encoding canonical, it means the Core Deterministic Encoding Requirements of CBOR ([RFC 8949] section 4.2.1): definite lengths, shortest-form integers, preferred float serialization, and bytewise lexicographic map-key ordering.
Deterministic encoding is REQUIRED wherever bytes are signed or hashed — event payloads, record payloads, and every structure named in the registry. Message envelopes that are neither signed nor hashed SHOULD use it too, but interoperability does not depend on that.
Value conventions layered on top, since CBOR has no native types for them:
| Logical type | Canonical representation |
|---|---|
| Timestamp | ISO-8601 text string, UTC, Z suffix |
| Decimal / arbitrary precision | Text string, to avoid binary64 rounding |
| Binary | Byte string |
NaN and the infinities MUST NOT appear, even though CBOR can encode them. A serializer MUST fail closed rather than emit them.
Persist before release. A producer MUST durably persist an event
before it is released to any peer, written to a mailbox, or applied locally.
It SHOULD re-transmit the exact encoded COSE_Sign1 bytes it persisted
thereafter, rather than re-encoding or re-signing.
The durability clause is the one correctness rests on. A producer that releases an event and loses it in a crash leaves its peers holding an event it does not, and self-echo suppression means no peer ever hands it back: the producer has fallen behind its own history. Re-transmitting the persisted bytes is only a SHOULD, because event identity does not depend on it. The identifier is derived from the signed input, which excludes the signature, so the same content re-signed under the same HLC is the same event, and a receiver absorbs it as a duplicate.
The rule has a companion, stated with the clock it constrains. Persisting an event’s bytes is not enough on its own: a producer whose clock does not survive the same crash re-issues an HLC it has already released, which is the one thing convergence does not tolerate. Section 11.2 states that half.
9. Event identity
Section titled “9. Event identity”event_id = lowercase hex BLAKE3 (32-byte output) of the event's Sig_structure, derived after the signature verified over itThe Sig_structure is [RFC 9052] section 4.4’s
["Signature1", protected, external_aad, payload]: the protected header and the
payload as received, and external_aad the receiver’s own mesh_id
(section 10). It is the exact input the signature
covers and the structure a receiver assembles to verify it, so SSP/1 adds no
pre-image of its own. This is the substrate’s
record identity applied to a change
event, and no second rule stands beside it.
event_id is derived, never transmitted. A receiver computes it from the
structure it verified, so there is nothing to compare against and therefore
nothing to mismatch. A receiver MUST NOT derive it from an event whose signature
has not verified: such an event has no event_id and never reaches the
idempotent insert.
event_id is one identifier under every signer. The signature does not
enter it. A change event signed by an
event-signing subkey re-signs to identical bytes
under deterministic nonces. One
signed by a secure element directly re-signs to a different 64-byte signature,
because the element generates its own nonce. Both re-signings verify over one
Sig_structure and derive one event_id, so where the key is held does not
decide what a receiver deduplicates.
event_id is an idempotency key, not a trust anchor. It deduplicates
re-deliveries and re-signings of one event, and nothing more. Authorship is
established by the signature, and a receiver MUST NOT treat a familiar event_id
as evidence of anything except holding that event already. A second valid
signature over an event already held is a duplicate. Different content under one
HLC is the evidence, which is the next section’s rule.
9.1. Never sign different content under a used HLC or generation
Section titled “9.1. Never sign different content under a used HLC or generation”A producer MUST NOT sign different content under an HLC it has already signed
under. Content is the signed input: the protected header and the payload.
Re-signing the same content under the same HLC is permitted. It is the same event,
with the same event_id, and a receiver absorbs it at the idempotent insert. This is
convergence’s rule that a node MUST NOT reuse an
HLC across distinct events, stated for the producer.
The same rule reaches chained records. A producer MUST NOT sign a different role
assignment, transport binding or sovm/ssp-eventkey-v1 record at a generation
it has already signed at, for that subject or node. Two records at one generation
with distinct identifiers are a chain fork,
which SOVM/1 treats as detectable evidence, never a silent
divergence. A record re-signed over an unchanged
signed input is a duplicate and raises nothing.
A crash between signing and persisting therefore needs no recovery rule of its own. A producer that finds the content in its journal may sign it again under the same HLC or generation. A producer that cannot establish what content it signed there MUST tick the HLC and sign a new event, or issue the next generation, rather than sign under the one it may already have used.
10. Event authentication
Section titled “10. Event authentication”Every event is signed by the authoring node, and a receiver MUST verify before apply.
Verification is COSE_Sign1 verification with:
- the public key resolved for the authoring
site_id— the protectedkid— which is that node’sIK_pubfrom the receiver’s trusted-peer keyring, or, where the node has issued an event-signing subkey, theevent_pubselected by section 10.3; external_aadset to the receiver’s own 16-bytemesh_id.
Four properties this construction is chosen for:
- The whole message is covered, protected headers included. The content type
and
kidcannot be altered in flight, and the empty unprotected bucket leaves no unauthenticated surface. mesh_idis bound without being transmitted. The verifier supplies its ownmesh_idas external AAD, so an event captured from one mesh fails verification in any other — including a mesh that happens to trust the same key.- Domain separation is structural. COSE’s
Signature1context string plus the content type make an event signature unconfusable with a vouch, a role record, a transport binding, or any raw-transcript signature in the pairing ceremony. - Event identity does not rest on signature determinism. Whether a change
event re-signs to identical bytes depends on where its key is held
(section 10.1), and nothing here assumes an answer.
Event identity is derived from the
Sig_structurethis verification runs over, which excludes the signature, so a re-signed event keeps its identifier whichever signer produced it.
Failure handling, each fail-closed and each surfaced:
- Unknown
kid— the sender is not in the keyring: drop the event and surface it. Unknown-sender events are not queued pending future trust. - Invalid signature under a known key: drop the event and surface it.
- Above a cutoff — the
kidresolves, the signature is valid, and the event’shlc_physical_msis above the row’s cutoff, itsretired_at_hlcor itsremoved_at_hlc: drop the event and surface it. What the cutoff means, and why a retained row answers nothing above it, is identity §20.4’s to state.
No case holds the sender’s group or stalls a watermark. That is deliberate:
events are attributed by kid, not by connection, so if verification failures
held the attributed site’s group, a forger could stall the victim’s stream by
sending garbage carrying the victim’s kid. A forgery must cost the forger, not the
node it impersonates.
10.1. Event-signing subkey
Section titled “10.1. Event-signing subkey”Per-event signing and root-identity signing have opposite duty cycles.
Transport §28 already states the
premise: IK_priv “may live in a secure element that signs rarely and
deliberately”. A change event is neither rare nor deliberate — a bulk import is
tens of thousands of signatures — and a secure element that can produce a few
signatures per second cannot carry that volume. Requiring it would make the
specification unimplementable on exactly the nodes whose custody it most wants in
hardware.
A node MAY therefore issue an event-signing subkey: a software ECDSA P-256 keypair, held outside the secure element, whose public part is bound to the node by a record the element itself signs. The subkey is a chained record and inherits the generation-only narrowing of the transport-binding chain unchanged: it narrows the substrate schema exactly as far as that chain does and no further, and widens nothing. The narrowing is restated at the end of this section, after the three fields that do depart from that precedent.
EventSigningKey = COSE_Sign1( protected = { alg : ES256, content type : "sovm/ssp-eventkey-v1", kid : site_id (16 bytes) }, payload = deterministic CBOR { event_pub : bstr 33, generation : unsigned, not_after : unsigned, prior_revoked_at : unsigned / null }, external_aad = mesh_id (16 raw bytes))| Field | Rule |
|---|---|
event_pub |
The subkey’s public part, SEC 1 compressed P-256, 33 bytes. An uncompressed or hybrid encoding MUST be rejected rather than converted (encoding canonicity). |
generation |
Unsigned, strictly increasing per site_id. A record supersedes all lower generations for that node, and a successor need only exceed its predecessor rather than carry exactly one more — substrate §11’s density rule is inapplicable on a chain with no predecessor member (see the generation-only narrowing below). |
not_after |
The HLC physical component after which the subkey is invalid for all purposes. A verifier MUST reject a record whose not_after is not strictly greater than the record’s own issuance time. |
prior_revoked_at |
null at generation 0. For generation N > 0 it is the HLC physical component after which the generation N−1 subkey is invalid for new events. It MUST NOT be greater than the N−1 record’s not_after. |
Issuance rules, each of which is a MUST:
- The record is signed by
IK, inside the element. It is a SOP/1 §5.4 hardware signature and carries that section’s verify-after-sign obligation at that section’s scope, which is not restated here. Signing it is a rare, deliberate operation, which is the property transport §28 relies on and this section reuses. - One hop, always terminating at the element. A subkey MUST NOT issue a successor
subkey, and a verifier MUST reject an
sovm/ssp-eventkey-v1record whose signature does not verify under theIK_pubof a currently trusted peer in the trusted-peer keyring, which a retired or removed row is not. There are no chains of delegation, only a chain of generations. A verification-only row still holds itsIK_pub, and this predicate is what refuses a record under it: that refusal is the freeze of identity §20.4, enforced at the one place a subkey record is admitted. - The subkey’s private part MUST NOT leave the node, MUST NOT be escrowed, and MUST
NOT be transmitted in any SOVM/1 message. Only
event_pubtravels. - The subkey is a software signer and is therefore bound by deterministic nonces. This is not advisory: a repeated nonce leaks the subkey outright from two signatures.
- Validity windows SHOULD be short. An implementation SHOULD set
not_afterno more than 90 days beyond issuance, and a mesh MAY require less by policy. The bound is what makes the exposure in limitations §40.7 bounded, so it is stated as a number rather than left to taste. - Records travel in the sync exchange’s
recordsmember, on the same path as transport bindings. They are self-verifying.
Three deliberate departures from the §28 precedent, each with its reason:
event_pubisbstr 33(P-256), wherechannel_pubisbstr 32(Ed25519). Transport §28’s asymmetry exists because the transport ecosystem carries Ed25519 and the channel key is bound by a signature rather than by its own custody. No such force acts here: the subkey signsCOSE_Sign1under the substrate profile, which has exactly one signature suite and it is ES256. Copying transport §28’s curve would add a second suite to the signing path for no reason. The channel-key precedent justifies the pattern, not the suite.not_afteris present, where transport §28 has no expiry. A stale channel key merely fails to connect. A stale event-signing key forges history, which is a failure that does not announce itself. Bounded validity is the failure-closed posture for that asymmetry.prior_revoked_atis present. Transport §28 needs no revocation cutoff because a binding is wholly superseded. An event-signing subkey is not: events it signed before revocation must keep passing validity checks, or every rotation would destroy the history signed under the previous generation. See section 10.3.
Like the transport-binding chain, this chain is generation-only: the payload above is
exhaustive and carries no predecessor member, so every record is a genesis record and a
record supersedes all lower generations. That is a narrowing
chained records §12 permits, stated
here on the instantiation’s own page as that section requires. As on
transport §28,
substrate §11’s density rule is thereby
inapplicable rather than weakened: it is stated relative to a record’s predecessor, and
there is none to compare against.
10.2. Scope boundary of the event-signing subkey
Section titled “10.2. Scope boundary of the event-signing subkey”This is the paragraph the rest of the mechanism rests on. It is exhaustive.
An event-signing subkey MAY sign change events —
sovm/ssp-event-v1 — and nothing else.
An event-signing subkey MUST NOT sign any of:
- an
sovm/ssp-eventkey-v1record (no successor subkeys, no delegation chains); - a transport binding,
sovm/ssp-binding-v1; - a role assignment,
sovm/ssp-role-v1; - an interest record,
sovm/ssp-interest-v1, or an interest bound,sovm/ssp-interest-bound-v1; - a vouch certificate,
sovm/ssp-vouch-v1; - a succession record,
sovm/ssp-succession-v1; - a removal record,
sovm/ssp-removal-v1; - a removal closure,
sovm/ssp-closure-v1; - a share grant,
sovm/ssp-share-grant-v1, or a share link record,sovm/ssp-share-link-v1; - a SOP/1 §5.7 membership authorization record;
- any pairing transcript signature or raw-label transcript signature.
A verifier MUST reject any record in that list whose signature verifies under an
event_pub rather than under the node’s IK_pub. The rejection is structural as well
as normative: each of these records carries its own protected content type, and COSE’s
Signature1 context plus the content type make the domains unconfusable
(section 10, property 3). The MUST is stated anyway, because
a property that holds by construction and is not written down is a property the next
revision can lose without noticing.
Everything that authorizes stays with IK_priv. Membership, roles, vouching and
transport identity are unreachable from a compromised subkey, so an extracted subkey
cannot escalate — it can only make false statements about its own node’s rows.
That is a bound on the key, and it becomes a bound on the adversary only where
IK_priv is out of reach of whatever compromised the subkey. Where
§19.1’s element holds it, it is: the scalar
never enters the address space the subkey sat in, and the confinement above is what
makes the exposure in
limitations §40.7
acceptable rather than merely acknowledged. Where custody is software it is not, and
this specification requires that case to exist rather than merely tolerating it:
identity §19.3 declines to ban a software root,
and identity §19.4’s vouch row
records one normatively for every vouched join. An adversary that reads a software
IK_priv out of the process it already holds signs every record in the MUST NOT list
above — by using the root, not by escalating the subkey. The list is exhaustive about
what the subkey reaches. It is not a statement about what an attacker reaches, and
it MUST NOT be cited as one.
10.3. Subkey validity and verification
Section titled “10.3. Subkey validity and verification”A change event’s signing key is selected by the event’s own HLC, against the subkey chain valid at that HLC. Selection is single-candidate and fail-closed.
A verifier presented with a change event MUST:
- Read
kidfrom the protected header. It is the authoringsite_id, unchanged from section 10. - Decode the
COSE_Sign1payload and read its HLC physical component. The payload is cleartext within the signed structure, so reading it before verification is safe: the signature covers those bytes, so an attacker who lies about the HLC selects the wrong generation and fails at step 4 rather than misleading the verifier. - Select the single generation G whose validity window covers that HLC, where the
window is
issued_at(G) ≤ hlc ≤ min( not_after(G), prior_revoked_at(G+1) if a generation-G+1 record is held, otherwise ∞ ). - Verify the
COSE_Sign1signature againstevent_pubof generation G, withexternal_aadset to the verifier’s ownmesh_id. - Fail closed if no generation’s window covers the HLC, if more than one does, or if the signature does not verify: drop the event and surface it, exactly as section 10’s two failure cases require.
A verifier MUST select exactly one candidate generation and MUST NOT iterate over generations trying each in turn. Iteration would let an attacker who controls the HLC brute-force past the selection logic, which is the only thing binding an event to a validity window at all.
Where a node has issued no sovm/ssp-eventkey-v1 record, change events are verified
against IK_pub from the keyring as section 10 describes,
unchanged. Subkey issuance is optional; verifying it is not.
Revocation cascades downward and not upward. Revoking a node at the
§22 level makes its keyring row verification-only, at
which point no further sovm/ssp-eventkey-v1 record for that node is admitted and
none it holds resolves a signer above the cutoff — the records are IK-signed, so the
whole subkey chain is bounded with the keyring entry. Node revocation therefore
reaches subkey revocation with no additional mechanism, and it fails closed. The converse does not hold: rotating or revoking an event-signing
subkey is routine and says nothing about the node’s IK-level trustworthiness.
The subkey mechanism needs no extension for either outcome of
identity §22, and the two mechanisms MUST NOT share
logic. That is a claim about this section, not about identity §22, which does
distinguish removal from retirement by who pins the cutoff.
Revocation retains the chain, bounded by the cutoff. Under both outcomes of
identity §22 the keyring row survives,
verification-only, with a cutoff: retired_at_hlc under retirement, removed_at_hlc
under removal. Because sovm/ssp-eventkey-v1
records are IK-signed, a retained row that resolved IK_pub alone would keep
history checkable only for nodes that never issued a subkey; resolving the kid of a
retired or removed node’s change event therefore includes running the selection above
over its subkey chain, under the retained ik_pub
(identity §20.4). For such a node the window of
step 3 is additionally bounded by the cutoff —
issued_at(G) ≤ hlc ≤ min( not_after(G), prior_revoked_at(G+1) if held, cutoff )
— so an event above the cutoff has no candidate generation and fails closed at step 5,
unchanged.
The chain a verifier resolves is the chain it held when the row became
verification-only, and no more: the freeze stated at identity §20.4, and
enforced by section 10.1’s admission predicate, refuses
every later sovm/ssp-eventkey-v1 record for that site_id, whatever its issuance
time. The retained read is safe because, and only because, of that freeze; the two are
one rule, and an implementation that has the read without the freeze is a forgery
hole. A peer that built the row from a
removal record, never having held the node’s
row, held no chain at that moment, and so resolves only events the node signed under
IK_pub itself. Revocation bounds the chain; it never extends it. Retention therefore
extends what is verifiable, never what is authorized.
On what a passing validity check means. An event whose HLC is at or below
prior_revoked_at passes validity checks. That is not the same claim as is
authentic, and this specification does not make the second one. A party who extracted
the subkey could have produced that event at any HLC inside the window. See
limitations §40.7,
which states the residual exposure rather than leaving a reader to infer it.
Forks. An sovm/ssp-eventkey-v1 record is subject to the same
generation-monotonicity rule as every other chained record: two records at one
(site_id, generation) with distinct identifiers are a fork and are treated as
detectable evidence, never a silent divergence.
Because these records are IK-signed, such a fork is evidence of IK-level compromise
or a node defect — a strictly more informative signal than a subkey-level fork would be.
Normal rotation produces exactly one IK-signed record per generation and cannot raise
a false alarm. A generation-N record re-signed after a crash is a duplicate, not a
fork, and section 9.1 applies unchanged: a producer that cannot establish
which record it signed at generation N issues generation N+1 rather than sign a
different one at N.
The forked generation signs nothing while the fork stands, and the chain’s other generations keep their windows. That posture is per generation, where a forked transport-binding chain resolves no binding at all, and the difference is intended: history signed under other generations must stay verifiable, and a compromised root minting later generations is answered by revoking the peer, which drops the whole chain.
11. Hybrid logical clock
Section titled “11. Hybrid logical clock”An HLC timestamp is the pair (hlc_physical_ms, hlc_logical), compared
lexicographically. When two events carry equal HLC pairs the tie is broken by
byte-wise comparison of the authoring site_id from the protected kid header,
and when they also share the site_id, by byte-wise comparison of the 32-byte
event_id. The comparison including both tiebreaks is
total: any two distinct events have a defined order, which is what makes the
merge in semantics deterministic.
The site_id tiebreak alone is total only over honest producers. Two events from
one site under one HLC with distinct event_ids carry different content, which
section 9.1 forbids, and a receiver cannot rule them out: a compromised
key produces them, and so does a defective producer. A re-signing does not, because
it derives the same event_id and is one event. Without the event_id tiebreak
such a pair compares equal, last-writer-wins keeps whichever arrived first, and two
receivers holding the same events disagree with nothing to say so. The event_id is
derived from the verified signed input, so every receiver reaches the same order
without being told it. A receiver surfaces such a pair as well as ordering it
(semantics section 13.5).
Each node maintains one local HLC, which it ticks to stamp a local event and
observes to merge a received one. Both operations are normative. With last the
stored local HLC and now the local wall clock in milliseconds:
tick — stamp a local event:
- if
now > last.physical_ms, the new HLC is(now, 0); - otherwise it is
succ(last).
observe — merge a received remote HLC. If remote.physical_ms > now + 60 000
(the observe bound), the HLC is not merged: last is left
as it was and the condition MUST be surfaced. Otherwise, with m the maximum of
last.physical_ms, remote.physical_ms and now, the new HLC depends on which
inputs share that maximum:
| Inputs holding the maximum | New HLC |
|---|---|
Both last and remote |
succ((m, max(last.logical, remote.logical))) |
last only |
succ(last) |
remote only |
succ(remote) |
now alone |
(now, 0) |
succ — the successor of a pair. hlc_logical is at most 2^64 − 1, the
largest unsigned integer canonical CBOR carries, and:
succ((p, l))is(p, l + 1)wherelis below 2^64 − 1;succ((p, 2^64 − 1))is(p + 1, 0).
In both operations the result is stored as the new local HLC. Together they guarantee that a causally later local event sorts after everything the node has already seen, without any coordination, except an event applied beyond the observe bound, which a local event may sort below until real time reaches it.
The carry is the whole of the rule at the counter’s ceiling. An implementation MUST NOT wrap the logical component, MUST NOT saturate it, and MUST NOT refuse a tick, or reject an event that passed the skew bound, because a successor has no logical component left. Wrapping moves the clock backwards and saturating hands one HLC out twice, which convergence tolerates in neither case. Refusing is worse, because the refusal falls on the wrong party. A peer that sends one in-bound event whose logical component sits at the ceiling, at a physical component near the observe bound, leaves the receiver’s clock with no successor at that millisecond. Under a refusal rule every honest event the receiver sees for the next minute is then rejected, the node cannot author, and the peer renews the stall each second with a fresh timestamp.
An honest node never reaches the ceiling, since that takes 2^64 stamps inside one millisecond. Only a value some peer chose can put the counter there. That value was merged, so it passed the observe bound, and a carry lifts the clock at most 1 ms past the furthest point a peer could already push it to. A stamp that lands that millisecond outside a peer’s bound is the transient, self-healing skew rejection section 11.1 already handles. The physical component then holds one millisecond that no wall clock read. Every rule that compares a physical component, which covers the skew bound, subkey validity and the revocation cutoff, already has to tolerate a peer pushing a node’s clock to the edge of the observe bound, and the carry moves that edge by one millisecond.
11.1. Clock skew bound
Section titled “11.1. Clock skew bound”Receivers MUST reject events and watermarks whose hlc_physical_ms exceeds the
receiver’s current wall clock by more than 300 000 ms (5 minutes).
Without this bound a node with a broken or hostile clock can stamp an event far in the future and win every subsequent last-writer-wins comparison indefinitely — a denial-of-replication attack that no amount of correct merge logic recovers from. The bound is one-sided: timestamps arbitrarily far in the past are accepted, since a stale clock only loses comparisons and cannot deny service to others.
Rejection is fail-closed and MUST be surfaced. An implementation MUST NOT clamp the offending timestamp and apply the event anyway.
A rejected event was not applied, so the receiver’s
applied watermark for that
(site_id, schema, table) MUST NOT advance to or past the rejected event’s HLC. The
rejection is also not terminal: a receiver MUST NOT retain the event and MUST NOT
record a standing verdict against it, and MUST apply the identical bytes when they
are re-offered after its own wall clock has advanced to within the bound. Because
the apply chokepoint runs this check
before the idempotent insert, a rejected event_id never enters the duplicate
index, which is what leaves the re-offer able to succeed.
That is what makes a transient skew self-healing rather than lossy. A receiver’s
clock advances monotonically, so an event stamped d ms beyond the bound becomes
acceptable after d ms of real time, and the sender
re-offers it because the watermark still stands
below it. Under the other reading — advance the watermark past the rejection — the
event is lost the first time an honest peer’s clock runs fast, and lost silently,
because the watermark tells the sender the receiver has it.
Advancing would in fact be worse than lossy. A rejected HLC is by construction above every honestly stamped HLC from that site: an honest stamp is at or below the receiver’s present, and a rejected one is more than five minutes beyond it. Since a watermark asserts that everything from that site for that table at or below its HLC has been applied, advancing past a single skewed event would acknowledge the site’s entire unapplied backlog in one step.
Pinning the watermark stalls nothing an attacker chooses. Signature verification precedes this check, so a skew-rejected event is authentically attributed to the site whose watermark it pins and the stall is self-inflicted. That is the reasoning of section 13.6’s signature row reaching the opposite conclusion: there the cost of not advancing would fall on the impersonated node, here it falls on the author.
Self-healing bounds the receiver, not the author. The tick
rule never lowers physical_ms, so a node whose clock
jumps beyond the bound stamps every subsequent event at or above the jumped-to value
and stays rejected by every receiver until real time reaches it — and it cannot
simply set its clock back, because lowering a stored HLC risks the reuse
convergence forbids.
A watermark carrying an out-of-bound hlc_physical_ms is rejected under the same
rule and is simply not recorded: the receiver’s view of that peer’s progress stays
where it was, which is what watermark
monotonicity requires anyway, and the peer
re-reports on a later cycle.
The 300 000 ms bound is the accept bound: it decides whether an event is applied.
A second, smaller bound decides whether the receiver’s clock follows it. An event
whose hlc_physical_ms exceeds the receiver’s wall clock by more than 60 000 ms,
the observe bound, and by no more than the accept bound is applied
(semantics section 12 steps 1 to 4) and
its HLC is not merged into the local clock: step 5 is skipped, and the receiver MUST
surface the condition. The receiver MUST NOT merge it, and MUST NOT clamp it to the
observe bound and merge that, since either moves the local clock toward a value its
own wall clock does not support. A watermark is never observed into the clock, so
the observe bound does not apply to one.
One bound would not do. The tick rule never lowers physical_ms, so a receiver that
merged everything within the accept bound would take on the offset of a node running
just under five minutes fast and stamp every later event at it, and so would every
node that then merged one of those events. A receiver whose wall clock sat a second
behind the fast node would then reject every event from all of them, for as long as
the fast node kept its offset: one misconfigured device would leave the whole mesh
one second from refusing itself. Under the observe bound such a node drags no peer
further than 60 000 ms, which leaves every merged stamp 240 000 ms inside every
honest receiver’s accept bound. A time-synchronised device sits within a second of
true time and an unsynchronised one drifts by seconds a day, so no honest node is
refused a merge.
What the skipped merge gives up is the ordering guarantee of section 11 for that one event: a local event stamped afterwards may sort below it until the receiver’s wall clock reaches it. The outcome does not change, because under per-column last-writer-wins the fast node’s write wins in either design: its stamp is the later one. The condition is surfaced on every such event until the fast node’s clock is fixed, which is the signal that it needs fixing.
11.2. Clock durability across restart
Section titled “11.2. Clock durability across restart”A node MUST durably persist an HLC high-water mark: a stored HLC pair no lower than every HLC it has used to stamp an event. The mark MUST reach durable storage before the event carrying that HLC is released, on the same ordering persist before release imposes on the event bytes themselves. An event released under an HLC the mark does not yet cover is an event the node cannot promise never to re-issue.
On restart a node MUST initialize its local HLC from the persisted mark and then
tick as section 11 already defines: the next
stamp is (now, 0) where now exceeds the mark’s physical component, and
succ(mark) otherwise. No new operation is
introduced — restart is the tick applied to a restored last. Initializing
last from the wall clock alone is not permitted, and the case that breaks it is
not an exotic one: a node that stamps several events in the final millisecond
before it stops, and restarts inside that same millisecond, re-issues logical 0
with a perfectly correct clock and no fault anywhere.
A node MAY persist a mark strictly ahead of the highest HLC it has stamped — a reservation — and stamp freely below it without a durable write per event, provided it MUST NOT stamp an HLC above the persisted mark and MUST extend the reservation durably before crossing it. The trade is a bounded forward jump after a crash, which no merge rule is sensitive to, against a synchronous durable write on every local mutation. The window is bounded from above by the observe bound: a reservation of 60 000 ms or more resumes the node at a physical component its peers apply and do not merge, so an implementation MUST keep the window below that bound with margin for the drift the bound also has to absorb. The accept bound is the wrong ceiling: a window below it and above the observe bound resumes the node into the condition its peers surface as a fast clock.
The mark MUST be integrity-protected, and a node MUST verify that protection
before it initializes a clock from the mark. This is the one piece of node-local
state whose lower values are the dangerous ones, and no other state on the node
contradicts it, so a mark stored as a bare pair trusts whoever can write that
storage to have been honest about it. The protecting key MUST NOT be recoverable
from the mark storage itself; where the platform provides a secure element, the
construction already available is a signature made by the root identity element
over the mark, since section 19.1
delegates all signing to that element and exposes no export operation. An
implementation MUST NOT attempt to derive protection material by extracting
IK_priv — that operation does not exist. The cost lands where the reservation
already put it, on the durable write rather than on every stamp.
A mark that fails verification MUST take the same path as a mark that is absent, and MUST be surfaced as a condition distinct from it: a missing mark is evidence of an interrupted write, a failing one of tampering or storage corruption, and an operator answers those differently.
Integrity protection bounds forgery, not rollback. A mark replaced by an earlier value the node itself wrote verifies correctly, and the node retains nothing above it to contradict the value with. Where the platform exposes rollback-resistant storage or a monotonic counter alongside the signer, an implementation MUST bind the mark to it, so that a replayed mark fails against a counter that only moves forward. Where it does not, what remains is the exposure the snapshot case below describes, reached by a narrower path.
Where the mark is lost, a node MAY reconstruct it as the highest HLC over the
events it authored in its own retained log, but only where it can establish that
no self-authored event has been evicted
— eviction removes exactly the evidence the reconstruction depends on, which is
why the mark is stored in its own right rather than derived on demand. Failing
that, the node MUST NOT stamp further events under that site_id and MUST
surface the condition rather than resume from the wall clock. Peers are not the
fallback: self-echo suppression
requires a receiver to drop events carrying its own kid, and
have_max_hlc is one value over
everything the sender holds rather than a per-site maximum, so nothing on the
wire returns a node its own floor.
Restoring node state from a snapshot taken before events were released rolls the
mark backwards, and no rule here detects it — the restored node reads a mark it
wrote itself and holds no record of what it did afterwards. Such a node MUST be
treated as a new site: re-keyed under a fresh root identity key, and therefore a
fresh site_id (host interface §1), rather
than resumed. Its predecessor’s rows survive and resolve by per-column
last-writer-wins like any other site’s.
Re-keying the successor is only half of that instruction: the predecessor
site_id MUST be revoked before the re-keyed
node joins. A restore rolls back the storage around an identity key, not the key
— section 19.1 puts IK_priv inside a
secure element precisely so that nothing outside it can — so a predecessor still
present in peer keyrings can go on stamping under the old site_id and re-open
the reuse the re-key was meant to close. The successor also inherits no
key_protection standing: a vouched join records software whatever the
predecessor held (section 19.4),
so a deployment that depends on hardware_attested MUST re-establish it by
direct pairing.
Limitations §40.6
records what that leaves exposed.