Repository navigation
Sync staging with upstream main (#101 merged) - #13
Merged
Merged
Conversation
…ged by the entry of their own epoch, release pins, cache and file store, GetTrustBase fetch loop, X-SDK-Version header (API-breaking, 4.0.0) Signed trust-base entries (tag 39000) and bundles (tag 39015). Entries and seals use the BFT Core quorum with unequal votes: stake-weighted members, threshold floor(2W/3)+1 of the total weight W. Seals are verified against the entry of their own epoch; release pins for mainnet and testnet2; trust-base cache with a file store; GetTrustBase fetch loop and HTTP source; X-SDK-Version header. API-breaking (release version 4.0.0): RootTrustBase and VerificationPolicy removed, NetworkId.TESTNET removed, TESTNET2 added, beginOperation(PartitionViewPolicy). Unchanged: the token format, the proof and certificate wire formats and existing tokens. A seal with more than 256 signatures is refused at decode, and CBOR text must be valid UTF-8. See the PR description.
The non-inclusion corpus is re-vendored byte for byte from ristik/aggregator-go risto/ni-corpus-utb-authority (generator commit 7350e8f): cases unchanged, authorities are one-entry trust base v2 bundles named by trustBaseBundle, authority/*.json gone; the source lock and the pinned manifest hash follow. TrustBaseTestUtils.fromLegacyJson and src/test/resources/trust-base.json are removed: the consolidation and signature-recovery fixtures build their genesis entry directly, TokenE2ETest and AggregatorStack open the bundle the aggregator under test serves (GET /api/v1/trustbases, the local-network setup), and the JS interop script uses the 4.0.0 JS API with that bundle.
The docker stack is the TypeScript SDK's integration stack (src/test/resources/integration: compose file, aggregator Dockerfile, stack.env and build-images.sh): both images are built from pinned commits of the ristik forks, the root runs with the signed trust base history and the aggregator serves its bundle; AggregatorStack opens that bundle as a local session and checks its genesis against the one the stack wrote. The only trust-base.json left in the stack is the node-side input of the bft-core binaries. Non-inclusion and uc-consolidation corpora are re-vendored byte for byte from ristik/aggregator-go risto/ni-corpus-utb-authority (locks and pins updated): authorities are one-entry bundles on the local network (3), and the corpus support code opens bundles. The split-vector README records the 4.0.0 check.
…hority f072f4a (merged up with main: the bft-core pin of unicitynetwork#16); locks and pins updated
…(NOT_YET_AVAILABLE too), a successor is validated first, non-inclusion and consolidation keep the typed missing-entry cause, release pins at the merged unicity-ids ef00ff25 - TrustBaseUpdater: a source that answers a snapshot-carrying request with HISTORY_MISMATCH or NOT_YET_AVAILABLE (what aggregator-go answers for an end above its tip) is asked again from the tip without the snapshot. - TrustBaseEntry.verifySuccessor and TrustBaseHistory.append validate the entry's structure first, as Go's VerifySuccessor does. - NoTrustBaseEntryException: the typed missing-entry signal is the cause of a non-inclusion rejection and of a consolidation failure for certificate evidence. - Release pins: manifest source commit ef00ff25 (bundles unchanged, byte for byte). - Tests: the updater against the real server's answer, one test per successor rule (structure, network, epoch), the typed cause on the real testnet2 vector and in the consolidation corpus.
…e snapshot Dropping the snapshot after HISTORY_MISMATCH / NOT_YET_AVAILABLE no longer forgets that a higher end was announced: a not-yet-available answer without a snapshot whose end is below the next epoch counts as current only when no end at or above it was announced; otherwise it is transient and asked again in the next round. Reset where the snapshot is reset because an entry was refused or the target moved on.
…valid UTF-8 refused, BOM twin members count), generated by Go at bft-go-base dbf94198
…d missing-entry cause A consolidation checks three seals; the evidence seal already carried the typed NoTrustBaseEntryException as the cause. The other two now do too: - ProofConsolidator.authenticateDirect: a direct-target master seal of an epoch the history does not hold fails UNAUTHENTICATED with the typed cause. - PartitionViewAuthenticator: AUTHENTICATION with the typed cause; the consolidation's view path passes it on as the direct cause, as at the other two checks (the message is unchanged). Final seal failures (bad quorum, wrong network) carry no typed cause. Tests: an epoch-2 re-signed direct target (ProofConsolidator and TokenProofClient) with an epoch-1 history, control with epoch 2 appended; an epoch-2 partition view with an epoch-1 history, control with epoch 2 appended; below quorum and an alien key carry no typed cause.
Unicity Trust Base v2: weighted BFT quorum (unequal votes), seals judged by the entry of their own epoch, release pins, cache and file store, GetTrustBase fetch loop, X-SDK-Version header (API-breaking, 4.0.0)
The staging UTB v2 implementation was the pre-review form of unicitynetwork#101; take the reviewed upstream tree unchanged. This drops the legacy single-record JSON trust-base fixtures (src/test/resources/trust-base.json and shared/non-inclusion/v2/authority/*.json) and moves the release-pin manifest source to the merged unicity-ids commit ef00ff25.
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.
Merges unicitynetwork/state-transition-sdk-java main at
e5eb4517(the unicitynetwork#101 merge, approved by MastaP) into staging.Following
utb-upstream-sync-map, Java row: staging was created at9fe6bf8ffrom the pre-review form of the same UTB v2 work and has no separate PoS code, so the merge result is the upstream tree unchanged (git diff upstream/mainis empty).What changes on staging:
NoTrustBaseEntryExceptioncause on every seal path;src/test/resources/trust-base.json,shared/non-inclusion/v2/authority/*.json), as are theirfromLegacyJsontest helpers;ef00ff25.The version stays 4.0.0, as upstream. CI runs on this PR.