Model ledger types and persistence in TLA+ - #64957
Conversation
…tnesses Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The documented TLC identifier is not a valid version, preventing reliable reproduction of the reported results.
Review effort: Balanced
Findings: None
What changed in this PR
Adds a bounded TLA+ model of ledger validation, persistence, replay, concurrency, and maintenance semantics.
Changes:
- Models raw ledgers and six built-in ledger types with safety invariants.
- Adds bounded TLC configurations and documented results.
- Adds JavaScript conformance witnesses using production reducers and validation.
| File | Description |
|---|---|
specs/ledger/LedgerProtocol.tla |
Defines the protocol model and invariants. |
specs/ledger/README.md |
Documents scope, results, and reproduction steps. |
specs/ledger/raw.cfg |
Configures raw-ledger checking. |
specs/ledger/log.cfg |
Configures log checking. |
specs/ledger/set.cfg |
Configures set checking. |
specs/ledger/map.cfg |
Configures map checking. |
specs/ledger/table.cfg |
Configures table checking. |
specs/ledger/counter.cfg |
Configures counter checking. |
specs/ledger/notes.cfg |
Configures notes checking. |
actions/setup/js/ledger_protocol_model.test.cjs |
Adds concrete implementation witnesses. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
|
@copilot PR #64957 still needs follow-up before a maintainer can investigate quickly. Please address the review feedback on the invalid TLC version in
|
… traces Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Updated |
|
🎉 This pull request is included in a new release. Release: |
The ledger protocol spans untrusted requests, validated artifacts, Git-backed persistence, and disposable projections. This PR adds a bounded TLA+ model for the raw ledger and all six built-in types, with results linked to concrete conformance tests.
log,set,map,table,counter, andnotes. TLC configurations check each type’s reachable states against safety invariants, including:The TLC results establish safety within the configured bounds, not an unbounded proof of the implementation.