Repository navigation
UTB parity 8/8: approved release pins, real-seal tests, offline-to-new-epoch tests - #8
Merged
Merged
Conversation
…s, generated manifest), real-seal tests for mainnet and testnet2, offline-wallet-to-new-epoch tests
Owner
Author
|
java#8 (PR8/8) at 87b63c9: APPROVE, for the owner's list. Checked
Notes (not blocking)
Open item for the owner: unicity-ids#11 is still open (head 513dc4fc, the commit the manifest records). Nothing publishes from the fork, but the upstream PR must wait for it, and every SDK's table must be regenerated if its files change. |
This was referenced Nov 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of the Java UTB parity stack (owner §51, plan PR 8, the last of the stack). Stacked on #6 (file adapter), #5 (session), #4 (fetch loop) and dev3's #1-#3, #7. Mirrors JS
release-pins/,scripts/release-pins/generate.mjs,ReleasePins.generated.ts,tests/unit/api/RealSealsTest.tsand Rustrelease-pins/,release_pins.rs,tests/{release_pins,utb_real_seals}.rs. Nothing here touches unicitynetwork/*. No public release before this lands, and this PR must not merge to anything that is published before unicity-ids#11 does.Release pins
src/main/resources/release-pins/{manifest.json, unicity-trustbase.mainnet.cbor, unicity-trustbase.testnet2.cbor}are byte-identical to the JS and Rust SDKs' files (manifest sha2567bbaad4fb41bc5e6d169a1c17d9834e792bd9cdceaf521faa8a25791d2dbe2c1; bundles9d01b871…bd52mainnet,5b0a4fb7…f08atestnet2). Provenance: Unicity Trust Base version 2: GetTrustBase tags; mainnet and testnet2 genesis as one-entry bundles unicitynetwork/unicity-ids#11, source commit513dc4fcf01ee802a97d59a5bc4e50ba64786d45, still open when this was written. If its files change, regenerate (below) and this PR changes with them; the table below changes with them.0b6f8143e19e2a585be3534e8f1062f36c3b9621e506158f10abfbc9a56f4e4c4b49eb2bb0729051b89a48668fd6ef1fda284aad2e10b7d5f23aad4b5faef37fReleasePins.ROWS(was empty in UTB parity 6/8: release pins, trust base store (read + compare-and-swap), memory store and the cache session #5) reads the manifest and bundles from the library's resources. The rows are not trusted until a session verifies the row it uses (digest, the full chain from the pinned genesis, both identities); a failure is the fatalReleasePinInvalidException, never rescued by a cache. Nothing is fetched. A future pin has to extend the previous checkpoint, and a longer compatible cache survives a release bump (both already covered in UTB parity 6/8: release pins, trust base store (read + compare-and-swap), memory store and the cache session #5).ReleasePinsTestregenerates the manifest from the bundles in canonical form (sorted keys, 2 spaces, trailing newline) and fails on any difference;UTB_RELEASE_PINS_UPDATE=1 ./gradlew test --tests '*ReleasePinsTest'rewrites the file. This is the "CI regenerates without diff" check.UnknownNetworkException); the old testnet is not a public pin.Real seals and the offline wallet
src/test/resources/vectors/real-seals/is byte-identical to sdk-rust's (9e92ae2): per network the one-entry bundle and the answer of the public gateway (no key) toget_non_inclusion_proof.v1for a random state id, fetched 2026-11-05.RealSealsTest: both seals verify through the V2 bundles (epoch 1, networks 4 and 1) with the answering shard pinned; controls: testnet2's seal under mainnet's bundle isAUTHORITY_REJECTED; with 0 or 1 of the 4 signatures damaged it still verifies, with 2, 3 or 4 damaged the quorum (3 of 4) is not met. These show existing seals authenticate under the V2 genesis; they are not evidence of a live epoch-2 handoff (nothing on those networks signs V2 entries yet).OfflineWalletFutureEpochTest(synthetic signed epochs, MockWebServer): an epoch-1 token verifies with no request; an epoch-2 token is the typedNO_TRUST_BASE_ENTRY;verifyWithUpdateoverHttpTrustBaseSourceissues exactly oneGET /api/v1/trustbases?from=2(with the customX-SDK-Version), then both tokens verify with no further request. A second test does the same through aTrustBaseSession(refreshsaves), then a restarted session over the same store verifies the new epoch with no network.Checks (real JDK 11, Temurin 11.0.33)
./gradlew test-> 886 tests, 0 failed, 4 skipped.animalsnifferMain(Android API 31) and checkstyle clean for the main code. No new dependency (Jackson, already used, reads the manifest).