Skip to content

v8.2.1: Dart v1.0.1 update (#2035)

Pre-release
Pre-release

Choose a tag to compare

@polymesh-circleci polymesh-circleci released this 25 Nov 20:43
f304ddc
Update of the Confidential Assets DART integration to the v1.0.1
release: dependencies pinned to the `dart-v1.0.1` tags, worker protocol
bumped to 1.0.1 with rebuilt modules, domain-separated proof contexts
for batched and instant-settlement submission, and new account-state
update events. This PR should be merged only into releases based on
v8.2.0+.

## changelog

### new features

- New `AccountStateUpdated` and `FeeAccountStateUpdated` events, emitted
on every account / fee-account curve-tree leaf insert. Each carries the
leaf index, the new commitment, and an `update_action` enum describing
the triggering operation (`AccountAssetRegistration`, `AssetMinting`,
sender/receiver affirmations, counter update, claims, reverts, fee
payments; state-consuming variants embed their nullifier, registration
variants carry none), giving indexers a complete append-only leaf record
without decoding proofs.
- Proof submission is now domain-separated per entry point. The batched
context bytes `b"polymesh-dart-batched"` and the instant-settlement
context bytes `b"polymesh-dart-instant-settlement"` are defined in
`polymesh-dart` (`BATCHED_PROOFS_CTX` / `INSTANT_SETTLEMENT_CTX`) and
shared by the pallet, the runtime and the client-side prover.

### modified external API

- `ConfidentialAssets::submit_batched_proofs`: batched proofs (including
nested instant-settlement proofs) are now verified with the
`BATCHED_PROOFS_CTX` context bytes instead of no context; clients must
build these proofs with the same context.
- `ConfidentialAssets::execute_instant_settlement`: the settlement proof
and all leg affirmations are now verified with the
`INSTANT_SETTLEMENT_CTX` context bytes; clients must build them with the
same context.
- Relayer batch binding is unchanged (context derived from the
fee-payment nullifier); direct non-batch extrinsics
(`create_settlement`, affirmations, minting, registrations) keep the
existing context-free transcripts.
- The DART v1 verifier/prover API now derives the burned nullifier from
the proof's `update_action` (`update_action().nullifier()`); proof wire
formats are unchanged.

### modified events

- `AccountStateLeafInserted` / `FeeAccountStateLeafInserted` are
deprecated in favor of the new `AccountStateUpdated` /
`FeeAccountStateUpdated` events; they are still emitted unchanged for
existing integrations.

### other

- DART stack dependencies (`polymesh-dart`, `curve-trees`, `crypto`,
`arkworks-algebra`) pinned to the immutable `dart-v1.0.1` tags in both
the node and integration workspaces; the `polymesh-dart` tag includes
the account-state update actions, the shared context constants, and
device-side registration randomness.
- Worker protocol `polymesh-worker-protocol-dart-v1` bumped to 1.0.1
(native, PolkaVM, WASM and testing modules rebuilt; configs drop the
uncompressed `module_version 1` entries, leaving PolkaVM v2 + WASM v2 +
Native v1; the v0 `0.1.0` config drops its `module_version 1` entries
too).
- Node and runtime version bumped to 8.2.1 (`spec_version` 8_002_010).
- Benchmarks and confidential-assets weights regenerated for the new
event emissions.
- `docs/spec/18-confidential-assets.md` updated: role-gating triggers,
proof-context binding, new events, worker 1.0.1 module layout, and the
migration-removal note.
- Worker tooling fixes: `check-release-config` validates the 3-module
config format, `SaveContext` loads the 1.0.1 module, worker module tests
updated.
- Integration tests updated to build proofs with the context matching
their submission route.

### data migration

- On upgrade, cached DART parameters are regenerated for the new 1.0.1
protocol version, so runtime (fallback) verification loads parameters
matching the deployed protocol modules.