feat: multi sync example#1622
Open
Viktor-Kalashnykov-da wants to merge 24 commits into
Open
Conversation
jarekr-da
reviewed
Apr 17, 2026
jarekr-da
reviewed
Apr 17, 2026
jarekr-da
reviewed
Apr 17, 2026
jarekr-da
reviewed
Apr 21, 2026
jarekr-da
reviewed
Apr 21, 2026
jarekr-da
reviewed
Apr 21, 2026
jarekr-da
reviewed
Apr 21, 2026
jarekr-da
reviewed
Apr 21, 2026
jarekr-da
reviewed
Apr 21, 2026
jarekr-da
reviewed
Apr 21, 2026
jarekr-da
reviewed
Apr 21, 2026
jarekr-da
reviewed
Apr 21, 2026
jarekr-da
reviewed
Apr 21, 2026
jarekr-da
reviewed
Apr 21, 2026
jarekr-da
reviewed
Apr 21, 2026
jarekr-da
requested changes
Apr 21, 2026
jarekr-da
reviewed
Apr 22, 2026
jarekr-da
force-pushed
the
wiktor/multisync-example
branch
from
July 9, 2026 10:43
585d9b4 to
56f38fe
Compare
Rebase the wiktor/multisync-example branch onto origin/main. The branch's tangled history (79 commits including 12 main-merges) is collapsed into this net change set applied on top of current main; the original commits remain on origin/wiktor/multisync-example and in a local backup tag. Includes the multi-sync DvP example (run-17), the core-test-token-v1 registry package and splice-test-token-v1 DAR, and wallet-sdk multi-sync support. Non-trivial conflict resolutions: - ledger/dar namespace: origin/main independently introduced DarNamespace in dar/index.ts (with dar.test.ts). Folded the branch's extra vet() method into it and removed the now-redundant dar/client.ts duplicate. - examples/package.json: main's existing run-15/run-16 no-validator-url examples are preserved unchanged; the new multi-sync example is added as run-17 (scripts/17-multi-sync). Signed-off-by: jarekr-da <jaroslaw.ratajski@digitalasset.com>
Signed-off-by: jarekr-da <jaroslaw.ratajski@digitalasset.com>
Signed-off-by: jarekr-da <jaroslaw.ratajski@digitalasset.com>
Signed-off-by: jarekr-da <jaroslaw.ratajski@digitalasset.com>
…EADME.md Co-authored-by: Simon Meier <simon@digitalasset.com> Signed-off-by: jarekr-da <jaroslaw.ratajski@digitalasset.com>
Signed-off-by: jarekr-da <jaroslaw.ratajski@digitalasset.com>
Signed-off-by: jarekr-da <jaroslaw.ratajski@digitalasset.com>
…EADME.md Co-authored-by: Simon Meier <simon@digitalasset.com> Signed-off-by: jarekr-da <jaroslaw.ratajski@digitalasset.com>
Signed-off-by: jarekr-da <jaroslaw.ratajski@digitalasset.com>
Signed-off-by: jarekr-da <jaroslaw.ratajski@digitalasset.com>
Signed-off-by: jarekr-da <jaroslaw.ratajski@digitalasset.com>
Signed-off-by: jarekr-da <jaroslaw.ratajski@digitalasset.com>
Signed-off-by: jarekr-da <jaroslaw.ratajski@digitalasset.com>
Signed-off-by: jarekr-da <jaroslaw.ratajski@digitalasset.com>
Signed-off-by: jarekr-da <jaroslaw.ratajski@digitalasset.com>
Signed-off-by: jarekr-da <jaroslaw.ratajski@digitalasset.com>
Signed-off-by: jarekr-da <jaroslaw.ratajski@digitalasset.com>
Signed-off-by: jarekr-da <jaroslaw.ratajski@digitalasset.com>
Signed-off-by: jarekr-da <jaroslaw.ratajski@digitalasset.com>
Signed-off-by: jarekr-da <jaroslaw.ratajski@digitalasset.com>
Signed-off-by: jarekr-da <jaroslaw.ratajski@digitalasset.com>
Signed-off-by: jarekr-da <jaroslaw.ratajski@digitalasset.com>
jarekr-da
force-pushed
the
wiktor/multisync-example
branch
from
July 14, 2026 07:33
ce24575 to
936a150
Compare
Signed-off-by: jarekr-da <jaroslaw.ratajski@digitalasset.com>
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.
Multi-Synchronizer DvP Example - On ledger API - Part 1
Showcases automatic reassignment of Token from private synchronizer to global one, used on a realistic trade scenario with use of a custom Token.
New test:
https://github.com/canton-network/wallet/pull/1622/changes#diff-37db720ea457076fe6d04f6938d19c44e5dde3d7e1a5815953ff6b83199a1052
Design principles:
!!! We remove handling of synchronizers inside wallet-sdk.
Client code should be responsible of selecting
synchronizerIdin multi-sync scenarios.If not provided - synchronizer choice is left for canton participant logic.
Existing tests are updated (refactor(wallet-sdk): remove default synchronizer auto-selection #1740).
We try to show "realistic scenario" - we use multiple parties (Alice, Bob, TokenAdmin, TradingApp) we also
distribute dars to selected synchronizers (private dars to private). This contributes to relative complexity of the test code
source:
https://docs.google.com/presentation/d/1q6LpHi-wC_MO_mzf7wp5D-15j4lNeKjCMW5xmBggaTY
Example works with Token Standard V1
We have experimented with token standard V2 -> but as V2 is not yet merged to splice use of V2 means even more code
All tests run on multi-sync
This is a first PR in a series
Showcases only on-ledger part - and ensures code works.
There are 2 follow up PRs (wip)
off ledger api for tokens standard Implementation feat: multi sync example test token token standard api implementation #1782(code extracted and merged here)
Technical limitations:
In this PR we introduce separate tests for multi-sync (otherwise regular tests are flaky on multi-sync) - that split will be removed in a separate PR (above)
New example script:
docs/wallet-integration-guide/examples/scripts/15-multi-sync-trade.ts
Notes
we experimented with automatic reassignment of contracts - and it basically worked BUT.
It worked as long as
Bobis owner ofTokenRulescontract which seems unrealistic.We introduced TokenAdmin as additional party that is issuer of
Tokenonapp-synchronizer(private one).But this in fact forces us to use explicit reassignment.
But since the settlement actually happens on global - TestToken related models must be also on global synchronizer