smart-byte: the cluster state machine, the state hash it commits at, and its vectors #130

Merged
dcharlot merged 4 commits from smart-byte-cluster-state into main 2026-10-01 07:48:14 -04:00

2026-10-01

Transaction Science
Merge main into smart-byte-cluster-state
All checks were successful
standards workspaces build + test / jouleclaw-rs (pull_request) Successful in 2m18s
standards workspaces build + test / aac-rs (pull_request) Successful in 1m17s
smart-byte conformance gate / Validate conformance JSON files (pull_request) Successful in 4s
smart-byte conformance gate / Second implementation reproduces every vector (pull_request) Successful in 4s
smart-byte conformance gate / Spec changes require vector-pack updates (pull_request) Successful in 3s
smart-byte conformance gate / VERSIONS.md and README.md must exist (pull_request) Successful in 3s
standards workspaces build + test / joule-code-rs (pull_request) Successful in 45s
standards workspaces build + test / joulecontract-rs (pull_request) Successful in 33s
standards workspaces build + test / map-rs (pull_request) Successful in 34s
joule-code conformance gate / Build + round-trip C1-C4 vectors (pull_request) Successful in 1m27s
standards workspaces build + test / mesh-rs (pull_request) Successful in 30s
jouleclaw public surface must stay documented / Public-surface audit (jouleclaw-rs) (pull_request) Successful in 57s
no-vanity-metrics / Scan committed Markdown for vanity metrics (pull_request) Successful in 3s
standards workspaces build + test / openpay (pull_request) Successful in 1m43s
standards workspaces build + test / eoc-rs (pull_request) Successful in 1m49s
standards workspaces build + test / jcp-rs (pull_request) Successful in 1m20s
standards workspaces build + test / proof-rs (pull_request) Successful in 1m12s
standards workspaces build + test / sandbox-rs (pull_request) Successful in 2m8s
standards workspaces build + test / smart-byte-rs (pull_request) Successful in 3m4s
standards workspaces build + test / arl-rs (pull_request) Successful in 5m10s
standards workspaces build + test / joule-ui-rs (pull_request) Successful in 14m41s
standards workspaces build + test / jouledesk-rs (pull_request) Successful in 3m35s
standards workspaces build + test / joulehook-rs (pull_request) Successful in 3m57s
standards workspaces build + test / sense-rs (pull_request) Successful in 9m51s
standards workspaces build + test / macOS energy backend (jcp-energy) (pull_request) Successful in 17m0s
# Conflicts:
#	smart-byte/conformance/v1/regeneration.md
2026-10-01 06:21:29 -04:00
Transaction Science
smart-byte conformance: the second implementation runs the state machine
Some checks failed
smart-byte conformance gate / Validate conformance JSON files (pull_request) Successful in 4s
smart-byte conformance gate / Second implementation reproduces every vector (pull_request) Successful in 4s
smart-byte conformance gate / Spec changes require vector-pack updates (pull_request) Successful in 3s
smart-byte conformance gate / VERSIONS.md and README.md must exist (pull_request) Successful in 3s
no-vanity-metrics / Scan committed Markdown for vanity metrics (pull_request) Successful in 3s
standards workspaces build + test / eoc-rs (pull_request) Successful in 1m47s
standards workspaces build + test / aac-rs (pull_request) Has been cancelled
standards workspaces build + test / joule-code-rs (pull_request) Has been cancelled
standards workspaces build + test / joule-ui-rs (pull_request) Has been cancelled
standards workspaces build + test / joulecontract-rs (pull_request) Has been cancelled
standards workspaces build + test / jouledesk-rs (pull_request) Has been cancelled
standards workspaces build + test / joulehook-rs (pull_request) Has been cancelled
standards workspaces build + test / map-rs (pull_request) Has been cancelled
standards workspaces build + test / mesh-rs (pull_request) Has been cancelled
standards workspaces build + test / openpay (pull_request) Has been cancelled
standards workspaces build + test / proof-rs (pull_request) Has been cancelled
standards workspaces build + test / sandbox-rs (pull_request) Has been cancelled
standards workspaces build + test / sense-rs (pull_request) Has been cancelled
standards workspaces build + test / smart-byte-rs (pull_request) Has been cancelled
standards workspaces build + test / macOS energy backend (jcp-energy) (pull_request) Has been cancelled
standards workspaces build + test / arl-rs (pull_request) Has been cancelled
standards workspaces build + test / jcp-rs (pull_request) Has been cancelled
standards workspaces build + test / jouleclaw-rs (pull_request) Has been cancelled
verify_v1.py now applies state vectors' frames as the cluster state spec
describes. It is written from the spec text, standard library only, and
reproduces all 106 vectors.

Falsified:
- 12 planted defects caught on their own vectors, with and without -O.
- 18 state-machine rule mutations, each caught by a state vector.

regeneration.md records the state machine; VERSIONS.md names its spec.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-01 06:19:03 -04:00
Transaction Science
smart-byte: the cluster state machine, and its conformance vectors
smart-byte-state (new):
- the state and its hash;
- inputs;
- the frame transition;
- checkpoint-and-log persistence. Checkpoints are written atomically, and
  replay refuses a gap or a wrong hash.
- a deterministic demo workload.

smart-byte-lockstep: the cluster runs these state machines in place of the
rolling hash that stood in for the state.

smart-byte-keri-witness: exposes a controller's state and resumes a replay
from it, so the cluster extends a log one event at a time.

The CLI's `cluster simulate` runs real mints and transfers through the
supermajority commit.

smart-byte-conformance: state_vectors.json, 12 vectors. Each is a genesis
state and frames of inputs, with every input's result and every frame's
state and state hash. The founding frame uses kel-001 to kel-003 and
env-001's mint. Planted defects in the state vectors are caught on their
own vectors.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-01 06:19:03 -04:00
Transaction Science
smart-byte spec: the cluster state, the frame transition, and the state hash
cluster_state.md is new. It fixes what treatise §9.4, §15 and §16 leave
open:
- The state: frame number, issuer registry, controllers' key states, and
  each byte's owner and history. Its canonical encoding is the checkpoint,
  and its BLAKE3 is the state hash a frame commits at.
- Inputs: key events, mints and transfers.
- A frame: identical inputs are one input; inputs apply by class, then by
  ascending digest; every check is named, with its error class.
- Key events apply first, so a rotation retires the old keys for everything
  in the frame it lands in.

Departures from the treatise:
- A byte's identity carries no mint frame. With the frame folded in
  (§15.2), a mint replayed in a later frame issues a second byte; §19.3
  concedes "a distinct (and possibly duplicate) byte".
- Issuers are AIDs and rotate through their key-event logs.
- Joule cost stays out of the hashed state: measured energy differs node
  by node.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-01 06:19:03 -04:00