Skip to content

Removed default synchronizer #1740

Draft
jarekr-da wants to merge 11 commits into
wiktor/multisync-examplefrom
jarekr/sdk_synchronizers
Draft

Removed default synchronizer #1740
jarekr-da wants to merge 11 commits into
wiktor/multisync-examplefrom
jarekr/sdk_synchronizers

Conversation

@jarekr-da
Copy link
Copy Markdown
Contributor

@jarekr-da jarekr-da commented May 13, 2026

  1. No automatic selection of synchonizer in wallet sdk code - if synchronizer is not explicitly provided by caller - we rely on canon ledger choice of synchronizer. There is no extra logic of choosing synchonizer in wallet sdk
  2. All tests run against multi-sync setup
  3. Some tests code changed to explicitly set synchronizer

jarekr-da added 6 commits May 12, 2026 13:21
Signed-off-by: jarekr-da <jaroslaw.ratajski@digitalasset.com>
…licitly

- Remove SDKContext.defaultSynchronizerId / globalSynchronizerId and the
  associated startup API call (GET /v2/state/connected-synchronizers)
- LedgerClient.getSynchronizerId() now prefers the synchronizer aliased
  'global' over the arbitrary first entry (still used by wallet-gateway)
- internal.submit() and internal.prepare() omit synchronizerId when not
  given so canton routes by the contracts involved (ledger-api default)
- Callers that wrap ledger-API calls pass synchronizerId through as-is
  using conditional spread to satisfy exactOptionalPropertyTypes
- Amulet operations that embed synchronizerId in DAML choice args or
  disclosed contracts (traffic.buy/status, featuredApp.grant,
  preapproval.renew, external party allocation) throw a clear error when
  the caller does not supply it — canton cannot choose it for those

Signed-off-by: jarekr-da <jaroslaw.ratajski@digitalasset.com>
- Delete getSynchronizerId() from LedgerClient — auto-selecting a
  synchronizer is no longer the SDK's responsibility
- wallet-gateway callers now use network.synchronizerId / this.synchronizerId
  directly; throw with a clear message when not configured
- Internal party allocation uses conditional spread so synchronizerId is
  absent from the POST /v2/parties body when not set (exactOptionalPropertyTypes)

Signed-off-by: jarekr-da <jaroslaw.ratajski@digitalasset.com>
…y.external.create()

Signed-off-by: jarekr-da <jaroslaw.ratajski@digitalasset.com>
Signed-off-by: jarekr-da <jaroslaw.ratajski@digitalasset.com>
…) and sub-scripts

Signed-off-by: jarekr-da <jaroslaw.ratajski@digitalasset.com>
@jarekr-da jarekr-da changed the title All tests use multi-sync Removed default synchronizer Id May 18, 2026
@jarekr-da jarekr-da changed the title Removed default synchronizer Id Removed default synchronizer May 18, 2026
jarekr-da added 5 commits May 19, 2026 08:37
Signed-off-by: jarekr-da <jaroslaw.ratajski@digitalasset.com>
Signed-off-by: jarekr-da <jaroslaw.ratajski@digitalasset.com>
… internally

The SDK now decides everything with regard to synchronizers.
- Remove State.globalSynchronizerId() from the public API
- Add internal resolveGlobalSynchronizerId(ledgerProvider) helper used
  by SDK operations that need the global synchronizer (traffic, preapproval,
  featuredApp.grant, party.external.create/allocate, mergeDelegation)
- Remove findGlobalSynchronizer() from ExternalPartyNamespace (duplicate logic)
- Remove synchronizerId param from TrafficNamespace.status/buy,
  PreapprovalNamespace.renew, GrantFeaturedAppRightsOptions,
  and MergeDelegationNamespace.setup/approve/execute
- Drop getGlobalSynchronizerId() helper from example utils/index.ts
- Update all example scripts to stop passing synchronizerId to SDK calls
- 15-multi-sync/_setup.ts retains explicit synchronizer lookup (appropriate:
  it is test setup that needs both global + app IDs by alias)

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant