You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unicity ID mint transaction is missing network id #71
Closing comment — issue #71 / PR #72 test verification
Tested on top of:origin/issue-71 @ d9c12e2 ("#71 Update CertificationStatus equals and hashcode method" — current tip), merged into bdd-phase-0 of state-transition-sdk-java. The full hermetic + live test suite that was already in place for #68 was re-run against this combined source state.
Test environments verified:
Hermetic (in-process ForgivingTestAggregatorClient) — full BDD suite, ~25s
Live, 2-shard bft — aggregator-go's bft-sharding compose (haproxy-bft-shard0 on localhost:3001, haproxy-bft-shard1 on localhost:3002), trust-base networkId=3, ~2m
end-to-end, 4-way parallel
Result:0 failures in both environments. Total 423 tests across the combined suite.
3. Wire-level NetworkId guard (0, ≥65536 rejected at decode)
Mode: hermetic
Pinned by: unicity-id-wire-mutation.feature (2 scen — adversarial decode of arity-7 with networkId mutated to 0 / 65536)
4. TokenId derivation rewired to TokenId.fromSalt(networkId, unicityId.toTokenSalt())
Mode: hermetic
Pinned by: unicity-id-mint-canonicalization.feature — tokenId round-trip preservation + two-build determinism (same logical inputs → byte-identical CBOR + same tokenId) +
cross-networkId malleability (same UnicityId on different networkIds → different TokenIds)
5. MintNetworkMatchesTrustBaseRule wired into CertifiedUnicityIdMintTransactionVerificationRule as the first check (FAIL-first short-circuit)
Mode: live
Pinned by: unicity-id-network-consistency.feature (2 live scen) — positive control + swapped-networkId trust base ⇒ rule surfaces FAIL by name
6. Issuer-pinning branch (issuerPublicKey != null → reconstructs expected EncodedPredicate and matches against genesis lock-script)
Mode: live
Pinned by: unicity-id-issuer-pinning.feature (2 live scen) — true issuer key → OK; unrelated issuer key → FAIL with IsLockScriptValidVerificationRule in the result tree
7. CertificationStatus refactored from enum to final class with explicit equals/hashCode
Mode: hermetic + live
Pinned by: SUCCESS reference equality still holds across full suite (10 .name() call sites migrated to .getValue())
Live network-rule scenarios — all PASSED end-to-end
✅ NetworkId consistency in Token.verify (#116) — Positive control
✅ NetworkId consistency in Token.verify (#116) — Mint rejected against swapped-networkId trust base
✅ NetworkId consistency in Token.verify (#116) — Transferred token rejected against swapped trust base
✅ UnicitySealNetworkMatchesTrustBaseRule isolation (#116) — Mint rule passes OK while Seal rule fails
✅ Signature verification rule name format (#115 bug-2 regression guard) — no trailing }
✅ Mint re-spend tolerance (T6 under #115) — second mint at same stateId is never finalised
✅ UnicityIdToken network consistency (#71) — Positive control
✅ UnicityIdToken network consistency (#71) — Swapped-networkId trust base rejected
✅ UnicityIdToken issuer-pinning (#71) — True issuer key OK
✅ UnicityIdToken issuer-pinning (#71) — Unrelated issuer key surfaces IsLockScriptValidVerificationRule FAIL
Coverage scope vs. cross-SDK brief
Mirrors the JS SDK test work for state-transition-sdk-js#115/#116/#122 (sdk-js PRs #119 + #123). Required-item completion: 26 of 28.
The 2 not done:
unicity-id-predicate-verifier (5 JS scen) — no Java equivalent. Java has no UnicityIdPredicate class; nametag addressing reduces to a SignaturePredicate on the nametag
token's targetPredicate (AddressingSteps.resolveRecipientPredicate), which is already covered by the existing addressing / mixed-addressing scenarios.
deferred-coverage placeholder — cosmetic CI-slot warm-up; no Java need.
Two extras added beyond the brief:
Issuer-pinning live coverage (exercises the second branch of CertifiedUnicityIdMintTransactionVerificationRule.verify that the brief's network-consistency feature skips via issuerPublicKey=null)
Cross-networkId malleability scenario in unicity-id-mint-canonicalization (the symmetric assertion that P1's token-id-derivation pins for the regular mint path)
Verdict
The functional intent of PR #72 is delivered and verified end-to-end — both hermetic and live tests confirm the new networkId slot round-trips through the envelope, the new MintNetworkMatchesTrustBaseRule fires on mismatch with the expected rule name, the decoder rejects out-of-range networkIds, the IsLockScriptValidVerificationRule branches behave
correctly, and the CertificationStatus refactor doesn't regress SUCCESS reference equality across the suite. No regressions in the broader #68 work.
Activity
#71 Update CertificationStatus equals and hashcode method
b3y0urs3lf commentedon Jun 18, 2026
Closing comment — issue #71 / PR #72 test verification
Tested on top of:
origin/issue-71@d9c12e2("#71 Update CertificationStatus equals and hashcode method" — current tip), merged intobdd-phase-0ofstate-transition-sdk-java. The full hermetic + live test suite that was already in place for #68 was re-run against this combined source state.Test environments verified:
ForgivingTestAggregatorClient) — full BDD suite, ~25slocalhost:3001, haproxy-bft-shard1 onlocalhost:3002), trust-base networkId=3, ~2mend-to-end, 4-way parallel
Result: 0 failures in both environments. Total 423 tests across the combined suite.
Live run env vars:
SHARD_ID_LENGTH=1
SHARD_ROUTING_MODE=msb
SHARD_2_URL=http://localhost:3001
SHARD_3_URL=http://localhost:3002
TRUST_BASE_PATH=trust-base.json
Source changes in PR #72 — coverage map
1.
UnicityIdMintTransaction.create(networkId, lockScript, recipient, unicityId, tokenType, targetPredicate)—networkIdadded as first argunicity-id-mint-transaction-envelope.featureround-trip pins networkId; 3 call sites migrated (FieldRoundtripSteps,CommonTestFlow,NametagRegistry)2. CBOR envelope arity 6 → 7, slot layout
[version, networkId, lockScript, recipient, unicityId, tokenType, targetPredicate]unicity-id-slot-pinning.feature(6 scen, asymmetric per-slot fillers — encoder/decoder slot-swap regressions are observable);cbor-envelope-tagswrong-tag +wrong-version rows bumped 6 → 7
3. Wire-level NetworkId guard (0, ≥65536 rejected at decode)
unicity-id-wire-mutation.feature(2 scen — adversarial decode of arity-7 with networkId mutated to 0 / 65536)4.
TokenIdderivation rewired toTokenId.fromSalt(networkId, unicityId.toTokenSalt())unicity-id-mint-canonicalization.feature— tokenId round-trip preservation + two-build determinism (same logical inputs → byte-identical CBOR + same tokenId) +cross-networkId malleability (same UnicityId on different networkIds → different TokenIds)
5.
MintNetworkMatchesTrustBaseRulewired intoCertifiedUnicityIdMintTransactionVerificationRuleas the first check (FAIL-first short-circuit)unicity-id-network-consistency.feature(2 live scen) — positive control + swapped-networkId trust base ⇒ rule surfaces FAIL by name6. Issuer-pinning branch (
issuerPublicKey != null→ reconstructs expectedEncodedPredicateand matches against genesis lock-script)unicity-id-issuer-pinning.feature(2 live scen) — true issuer key → OK; unrelated issuer key → FAIL withIsLockScriptValidVerificationRulein the result tree7.
CertificationStatusrefactored from enum to final class with explicitequals/hashCodeSUCCESSreference equality still holds across full suite (10.name()call sites migrated to.getValue())Live network-rule scenarios — all PASSED end-to-end
✅ NetworkId consistency in Token.verify (#116) — Positive control
✅ NetworkId consistency in Token.verify (#116) — Mint rejected against swapped-networkId trust base
✅ NetworkId consistency in Token.verify (#116) — Transferred token rejected against swapped trust base
✅ UnicitySealNetworkMatchesTrustBaseRule isolation (#116) — Mint rule passes OK while Seal rule fails
✅ Signature verification rule name format (#115 bug-2 regression guard) — no trailing }
✅ Mint re-spend tolerance (T6 under #115) — second mint at same stateId is never finalised
✅ UnicityIdToken network consistency (#71) — Positive control
✅ UnicityIdToken network consistency (#71) — Swapped-networkId trust base rejected
✅ UnicityIdToken issuer-pinning (#71) — True issuer key OK
✅ UnicityIdToken issuer-pinning (#71) — Unrelated issuer key surfaces IsLockScriptValidVerificationRule FAIL
Coverage scope vs. cross-SDK brief
Mirrors the JS SDK test work for
state-transition-sdk-js#115/#116/#122(sdk-js PRs #119 + #123). Required-item completion: 26 of 28.The 2 not done:
unicity-id-predicate-verifier(5 JS scen) — no Java equivalent. Java has noUnicityIdPredicateclass; nametag addressing reduces to aSignaturePredicateon the nametagtoken's
targetPredicate(AddressingSteps.resolveRecipientPredicate), which is already covered by the existing addressing / mixed-addressing scenarios.deferred-coverageplaceholder — cosmetic CI-slot warm-up; no Java need.Two extras added beyond the brief:
CertifiedUnicityIdMintTransactionVerificationRule.verifythat the brief's network-consistency feature skips viaissuerPublicKey=null)unicity-id-mint-canonicalization(the symmetric assertion that P1'stoken-id-derivationpins for the regular mint path)Verdict
The functional intent of PR #72 is delivered and verified end-to-end — both hermetic and live tests confirm the new
networkIdslot round-trips through the envelope, the newMintNetworkMatchesTrustBaseRulefires on mismatch with the expected rule name, the decoder rejects out-of-range networkIds, theIsLockScriptValidVerificationRulebranches behavecorrectly, and the
CertificationStatusrefactor doesn't regressSUCCESSreference equality across the suite. No regressions in the broader #68 work.Merge pull request #72 from unicitynetwork/issue-71