Repository navigation
UTB parity 4/4: verification by trust-base history (seals by epoch, weighted quorum, typed no-entry, 256-signature bound); V1 authority removed - #7
Conversation
…placed in the entry of their own epoch; weighted quorum; typed no-entry; 256-signature bound; V1 authority removed RootTrustBase (the V1 JSON authority) is removed with no compatibility mode. TrustBaseHistoryView (read-only face of a history) replaces it in every verifier and caller. SealVerificationSession: structure, network, the entry of the seal's epoch, round inside [start, next start), then the weighted quorum of that entry, memoized by entry id and the complete seal. A seal of an epoch the history lacks is the typed NoTrustBaseEntryResult (found through nested results); VerificationPolicy and the legacy quorum-only path are gone. UnicitySeal.MAX_WITNESSES=256 at decode, structure, session and rule. Test fixtures migrate to synthetic V2 histories.
|
java#7 at 067ef25: no blockers. APPROVE once CI is green.
The quorum is weighted with an unsigned compare. |
|
java#7 at 067ef25: changes requested, for red CI only. CI |
|
java#7 at 424b44d: APPROVE, for the owner's list. The delta is javadoc only: |
Owner §51, plan PR 4 (based on #3, parallel to dev2's #4/#5). Mirrors JS
SealVerificationSession/TrustBaseEntryResult/UnicitySealTrustBaseEntryRule/UnicityCertificateVerifierand Rustverify/seal.rs,tests/trust_base_seal_history.rs. Breaking, no compatibility mode (§30).RootTrustBase(JSON) is deleted.TrustBaseHistoryView(read-only face of a history, same name and members as dev2's PR6 interface plusgetGenesisPin();TrustBaseHistoryimplements it) replaces it inUnicityCertificateVerifier, the operation verifier,SealVerificationSession,NonInclusionVerifier,ProofConsolidator,TokenProofClient,StateTransitionClient, the transactions'verifymethods,InclusionProofUtils,VerificationContext.[start, next start)-> weighted quorum of that entry. Placement runs on every call, memo hits included; the memo key is the entry id plus the complete seal (witnesses included).NoTrustBaseEntryResult(epoch, held tip) for an epoch above the tip or an empty history;NoTrustBaseEntryResult.find(result)finds it in nested results (tested throughToken.verify). Wrong network, pre-genesis epoch, bad interval and bad quorum are final (UnicityCertificateFailure: newNO_TRUST_BASE_ENTRY,AFTER_EPOCH_END;UNSUPPORTED_AUTHORITYremoved). Consolidation maps them toUNAUTHENTICATEDwith the typed reason in the message (its outcome names are shared fixtures).SealVerificationSession.checkSealStructurestill rejects empty signer ids and empty signatures.UnicitySeal.MAX_WITNESSES): at decode (header count, before any element), in the structure check, in the session before the memo key, and first in the quorum rule.VerificationPolicyand the legacy quorum-only path are removed: a historical proof verifies against the entry of its epoch or not at all.beginOperation(pins); newbeginOperation(pins, sessionFactory)andSealQuorumRule(size the memo / in-flight bound or supply a quorum check; used by the busy-session tests).docs/api-reference.mdsnippets use a bundle + pinned genesis id (the session and release pins arrive with PRs 6-8).TrustBaseTestUtils,TestChain.Authority.trustBaseThrough/weightedTrustBase; the recorded corpora's V1 authority JSON is converted to a genesis entry); new: epoch placement/interval/exclusive end, memo hit with a growing history, weighted 5,1,1,1, unsigned epochs/rounds across 2^63, 256-signature seals (accept 256, refuse 257 at decode/structure/session/rule, all 256 members of a 256-member authority stop at 171), typed no-entry through nested token verification.Evidence:
./gradlew test checkstyleMain animalsnifferMainunder Temurin 11 green (800+ tests). Integration/e2e tests compile but still need the hermetic V2 stack (the JS unicitynetwork#16/unicitynetwork#23 equivalent) and a bundle; not run here.Not merged by me; owner list.