Repository navigation
Conversation
…r MPF proofs, as the reference does (ADR-0024 M4) - mpf.js: a port of julc-state-api's Mpf and MapWitnesses.verify (the generic MapVerifier's on-chain checks): membership, absence, insert/update/delete roots, malformed steps fail; the MapClaims redeemer read by its record shapes exactly. - hostcheck.js: CallRules.checkMaps ported: the map verifier's redeemer at its reward pointer, one claim per map field, policy, owner (seed or target), field, proofs, the creation's empty root, both roots against the target and continuation datums (no pending reads or writes), no writes on a destroy. Map calls are no longer refused as notVerifiable. - hostcheck.test.js: all 333 verifier vectors decided as the reference decides them, the 31 map calls included; no exclusions. - joust-runtime test/mpf.test.js: differential against Aiken's merkle-patricia-forestry over random tries (membership, absence, roots after insert, update and delete), and claim forgeries. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s, and replays scenarios (ADR-0024 M4) - Shared verifiers anchored in the pinned build (check.js anchorsOf): a Gradle snapshot's julc-state-verifier entry (snapshotVerifiers), an npm build's runtime engine (validatorScript); the server's contract route hands them to the page; a host deployment naming other verifiers is refused. Sends and MerkleMap calls are enabled; their claims (and MPF proofs) are checked by verifyHostResult. - check.js pageCheck: the page's whole pre-sign check (verifyHostResult with the session clock, and verifyPrepared with the pinned verifiers for unkeyed calls), one function for the page and the Node tests. - @quorum: co-signers chosen among the page's identities; the caller and each co-signer approve the same checked body and sign it; witnesses combined. - Keyed calls (ADR-0016 M3): each operation's designated input (a free lovelace-only >= 5 ADA output) and record are persisted before the first request (page memory offline, IndexedDB on DevKit); each attempt is journaled before handoff; a ledger-refused attempt leaves the journal; mayHaveLanded with nothing handed out picks a new designation. - Scenarios (D10, playground/scenario.js): export (identities as labels, key hashes and created ids as symbols, ascending key lists kept ascending; no keys, mnemonics or transaction bytes), import with a warning naming contracts whose scripts differ, replay in a fresh offline session through the same checks, outcomes compared. - Identities show what sends left at their enterprise address. - memoryLedger.fund takes native assets (simulations that need tokens). - @params and @authorizedby stay disabled with the host's code (ADR-0023 is not implemented). - Tests: playground-m4.test.js (Token maps, Market sends, HostCouncil quorum, Registry keyed through pageCheck; D11; scenario data; a Chromium walkthrough of maps, quorum, keyed and an export -> import -> replay with the same outcomes); CI runs it in the playground step. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n untimed keyed action's window is bookkeeping) Offline.attacks ran the four range attacks on every transaction with both bounds, so a keyed attempt's bookkeeping window (TxRunner.untimedWindow / Compose), which no script reads, showed as four accepted attacks (Registry's change). As the JVM testkit gates them on a real range, they now follow what the scripts bind, read from the body with the request's slot config: - CTX: a redeemer carries the window as a Ctx (5 fields, validFrom and validTo at 3 and 4) or a Batch(validFrom, validTo), equal to the bounds in POSIX ms: all four. - LINK: else a keyed output (a 29-byte 0x4B token at a script address) whose datum's linkedAt (field 2) is the upper bound: upper removed, upper a slot later, lower removed. - NONE: otherwise, no range attack. OfflineTest: an untimed keyed change binds nothing; a Ctx and a Batch bind both bounds (another window binds nothing); a Link without Ctx binds the upper bound; the recorded transactions' gate is unchanged. playground-m4: Registry's change has no accepted attack. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… into feat/playground-m4 Conflicts: - main.js: one signing path for every call kind. M4's per-signer approvals (the caller, then each @quorum co-signer), the keyed attempt journal before handoff and the scenario replay's auto-approval, with M3's CIP-30 recheck and recorded handoff before the wallet sees the body, the lost-answer recovery (DevKit journal / offline reconcile, outcome unknown), and the review's before/after from the checks with the host's prediction folded apart. - gradle.js: M2 round 4's freshness and hardening, with M4's snapshotVerifiers (the shared verifiers from the snapshot's julc-state-verifier entry). - playground-m4.test.js opens the page through the one-time pairing link. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ed only on the caller's untimedWindow hint (#180 M4-D1) 927e804 gated the range attacks on a Ctx or a keyed link in the body, which hid real ones: a @ValidAfter/@ValidBefore method without Ctx reads tx.validRange directly (ContractReader, ValidatorGenerator), so its bounds were never attacked. Erring towards more warnings, never fewer: - Offline.attacks runs the four range attacks whenever both bounds are there, as before 927e804; the LINK/CTX classification is gone. - joust.attacks takes AttacksRequest(..., untimedWindow): true skips them. Only the caller can know the window is bookkeeping. - memoryLedger.submit(cbor, { untimedWindow }) passes it on; offline() and joust test never set it. - The playground session sets it from the pinned description: a keyed action or retire whose method takes no Ctx and has no @ValidAfter/@ValidBefore (such calls never link). - OfflineTest: both bounds are attacked without a Ctx; the hint skips them; a TTL alone is not attacked. - playground-m4: a Deadline contract (@ValidBefore with and without Ctx): each gets the four range attacks. With Ctx all are refused; without, the removed upper bound is refused and a window moved within the deadline shows as a warning. Registry's change gets no range attack and no accepted one. (session.js also carries the engineFiles field the next commit fills.) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ytes; scenario files over 1 MiB refused (#180 M4-S1, M4-S2) - An npm session records the hashes of the runtime engine files its fingerprint covers. The server takes the shared verifiers' scripts from its loaded engine only when that engine has these bytes; otherwise none, so the page refuses sends and maps. The comment now says so. - The page refuses a scenario file over 1 MiB before reading it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… and reconciliation, DevKit keyed windows, scenario roles and clock - operations.js (new): keyed operation records keyed by the verified chain (a DevKit's network, magic and genesis start time; never the build), committed before the first request. IndexedDB writes must commit on DevKit (errors stop the call); page memory offline. Expiries go to the protocol as safe JSON integers, older bigint records included. - Each attempt's checked hash and expiry are journaled before the body leaves the page: before a CIP-30 handoff, before signing. They are kept once handed out, across signing errors and reloads. - mayHaveLanded, and an existing record before a new designation, reconcile the recorded attempts with the chain (a new landed route: the ledger's inclusion, or Yaci Store's /txs): landed closes the operation; one that can still land waits; none that can land is ambiguous and waits for the user's acknowledgement (a pending keyed operations panel). - DevKit keyed windows (windowProblem): a start up to maxStartSlots ahead and an end at most start + ttl and now + the page's end limit, which keeps the stability bound. The session advertises keyedLimits and the page sends them as pageLimits. A cooldown starting inside the allowed future window is no longer fenced. - Scenarios: positions and map key/value roles kept; only quorum key lists (the arguments a @quorum names, and cosigners) are re-sorted, and map arguments go back to canonical key order by their schema. Exports carry the offline clock's origin and slot length; replay runs on it (sessions/new takes a clock for a new offline ledger). - Tests: operations (serialization, reconcile, chain keys, a store write that does not commit), a keyed second prepare after a retained attempt through JSON (pending, then prepared once released), windowProblem, scenario map roles and recanonical, verifier anchors per session engine bytes in one server, and a Chromium deadline scenario imported 30 days after its clock origin (2/2 the same outcomes). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Author reply: round r1 · head f245a36 Review round 1. The security reviewer approved, with P3s. The design reviewer and Codex asked for changes.
The branch also merges #179 round 4. Local results: playground, M4, fake-chain DevKit and ledger 111/111; state-client 670/670; DevKit e2e 6/6; Gradle 35/35; OfflineTest 4/4. |
…eyed records, recovered creations end the run, engine identity bound at load - Keyed operation records are kept by the server: DevKit in the chain's journal (beside the reservations, under the same lock, keyed by network, magic and genesis start time), offline in the session. So a reload, another tab or a restarted command on another port sees them, and DevKit no longer depends on IndexedDB: a write that does not commit fails the call (journal/storage) before anything is prepared or handed out. Each change is one atomic step (create, addAttempt, removeAttempt, ambiguous, remove): a replaced tab can only take back an attempt it added itself, never overwrite newer state. - A recovered creation (an existing record's attempt is on the chain) is the run's outcome: it is reported, and nothing new is designated or prepared (operations.js decide). - reconcile uses the chain tip observed with the lookups (the landed route returns it); an unknown tip keeps attempts pending, never ambiguous. - Verifier anchors: joust-runtime's loadEngine binds the hashes of the files it loaded (read before and after loading) to the engine instance (engineFilesOf). The server compares the session's fingerprinted engine with that identity, never with the files on disk now (an upgrade while running). - Tests: reconcile with the observed tip (Codex's 150/99/110/10 case pending), decide, records surviving a journal reopen, a stale tab's removeAttempt, a write that cannot commit, another genesis seeing none, the engine identity. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…feat/playground-m4 Conflicts: - devkit.js: M3's re-checked problemOf, with M4's keyed windowProblem in it; the session status carries M4's keyedLimits beside M3's fencedUntil. - main.js: M3's enterprise-address identities (with M4's labelled identities for replay; the separate enterprise-holdings line is gone, since the identity's address now is its enterprise address), fill and confirmedNotes in M4's approval and signing path, both session-start steps, the union of imports. The keyed operation records stay in the chain's journal beside M3's reservations, under the same lock and written before the call goes on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Author reply: round r2 · head 16d51cd Codex's round-2 findings. The design reviewer confirmed the range-attack fix (M4-D1) and approved; the security reviewer approved round 1.
The branch also merges #179 round 5: enterprise-address identities and the single rewind fence. Local results: playground, M4, fake-chain DevKit and ledger 118/118; state-client 670/670; joust-runtime 22/22; DevKit e2e 6/6; Gradle 45/45; PlaygroundTest 21/21. |
ADR-0024 M4: scenarios,
@Quorumco-signing, keyed calls, MerkleMap calls and sends in the playground. Stacked on #179 (M3); the base isfeat/playground-m3.What it adds
js/state-client/src/mpf.js,hostcheck.js):verifyHostResultports the reference checker's map-claim rules, MPF proofs included.fixtures/host/verifierare now decided exactly as the reference decides them. The 31 map vectors were refused wholesale in M1; now nothing is excluded.@Quorum:@Params, governors and@AuthorizedByare shown disabled with the host's code. ADR-0023 (docs(adr): ADR-0023 the dev host serves @Params contracts and @AuthorizedBy calls (proposed) #157) has no host implementation yet.julc-state-runtime-wasmOffline.java, a separate commit): the Wasm attack suite now runs range attacks only on the bounds a script binds.Batchredeemer carrying the body's window.linkedAt.changereported four "accepted" bound attacks. They were false positives: its validator reads no time, as the JVM testkit already assumes (Attacks.java,TxModel.hasRange). The rebuilt engine is used by the tests.Tests (local)
playground.test.js+playground-m4.test.js+playground-devkit.test.js+offline-ledger.test.js(Chromium)playground-devkit-e2e.test.js(local DevKit)playground-gradle.test.js:julc-state-runtime-wasmOfflineTest (new range-attack cases):julc-state-cliPlaygroundTestThe Chromium walkthrough covers maps (Token), quorum, keyed calls (Registry) and the scenario round trip. Each new call kind is also tested in Node through
pageCheck, the function the page runs.Points for review
verifyHostResult(the reference's KeyedRules). It skips the dApp'sverifyKeyed, which needs a designation journal of another shape. Unkeyed calls run both checks.@julclang/joust-runtime, so the engine files the fingerprint covers. If the two copies differ, the check refuses.mapClaims/encodingis checked by strict shape decoding. It refuses the same vectors under the same problem code, but the check id can differ from the reference's.wallet(key)land at the identity's enterprise address. The page shows that balance but does not spend it.memoryLedger.fund(address, lovelace, assets)now takes native assets, for tests and simulation.🤖 Generated with Claude Code