Skip to content

v0.8.0: Canton 3.7, Splice 0.10.0 bindings, Daml SDK 3.7.1 🚀

Choose a tag to compare

@github-actions github-actions released this 07 Nov 14:26
· 3 commits to main since this release
Immutable release. Only release title and notes can be modified.
366abcb

🚀 Canton .NET SDK: 0.8.0

TL;DR: Canton 3.7: the clients target Canton 3.7.1 and support Canton 3.7 only. External-party onboarding accepts protocol version 37's v31 topology transactions. Canton 3.6 users stay on 0.7.x. 0.8.0 is a breaking release that opens the Canton 3.7 line on Canton 3.7.1 ✅, ships the Splice.* bindings for Splice 0.10.0 ✅ and moves to Daml SDK 3.7.1 ✅. Read the upgrade notes below before bumping.

💥 Upgrading from 0.7.1

⚠️ Bump every package to 0.8.0 together, install the new Daml SDK with dpm install 3.7.1, then regenerate your bindings. Delete the generated directory once so files from before the upgrade are cleared. Anything compiled against an earlier package must be rebuilt, or it throws MissingMethodException.

  • 🌐 Canton 3.7 only. The vendored gRPC protos and JSON Ledger API spec move to Canton 3.7.1, and running the clients against an older participant is untested and unsupported. If your participant runs Canton 3.6, stay on 0.7.x.
  • 🗑️ GetPreferredPackageVersion is gone from both raw tiers, because Canton 3.7 deletes the RPC and its route. Call GetPreferredPackages instead. The experimental REST IInteractiveSubmissionApi is gone too.
  • 🧩 Interfaces gained members. ICantonLedgerClient gains GetEventsByContractIdAsync<TInterface, TView> and the raw REST IStateServiceApi gains ConvertRecordTimeToOffset. A type that implements either outside the SDK must add them.
  • 📸 Snapshot reads take a timeout and an unreadable-rows policy. QueryActiveAsync<TInterface, TView> and the SnapshotAsync/SnapshotActiveAsync extensions gain timeout and unreadableRows before the CancellationToken, and return an ActiveSnapshot<TRow>. A call that passes the token by position must name it: cancellationToken: token.
  • 🏷️ OneOrThrow, OneOrThrowAsync and ThrowIfError take no operation name. Delete the string argument: the outcome now carries the template and choice that produced it.
  • 🔤 Two DamlErrorCategory members take Canton's names: MaliciousOrFaultyBehaviour is now SecurityAlert and AuthorizationChecksFailed is now InsufficientPermission. The numeric values are unchanged, and there is no alias.
  • 🧬 The generated TryCreateAsync takes workflowId, commandId and timeout before configure. A call that passes configure by position must name it (configure: ...).
  • 🧪 Test doubles changed shape. RecordedSubmission.Commands, Reassignment and Execution gain a trailing Timeout member, CompletionStreamEvent.Checkpoint gains SynchronizerTimes, and WithSubmissionOutcome, WithThrowingCallFailure and CompletionEvents.Checkpoint changed signature. Update positional constructions and deconstructions, then rebuild your test assemblies.
  • 🆔 Conformance packages have new identities. The corpus in Daml.Codegen.Testing.Conformance is rebuilt on Daml SDK 3.7.1 with new package names and ids, and IConformanceProbe carries the real package id and name of its DAR. Take ids from the generated types, never from literals.

Coming from before 0.7.1? See the [0.7.1] and [0.7.0] sections of the CHANGELOG first.

✨ Highlights

  • 🌐 The Canton 3.7 Ledger API on both raw tiers: ConvertRecordTimeToOffset, ReassignmentCosts, IncludeIncompleteReassignments on active-contract requests, the validation package overrides on UnassignCommand, and ProtocolVersion on external-party topology requests.
  • 🧺 CommandBatch: submit several typed commands as one atomic transaction and read each command's typed result back.
    var batch = new CommandBatch();
    var ended = batch.Add(Connection.ChoiceDisconnect, connectionId, new Connection.Disconnect(actor));
    var link = batch.AddCreate(new InviteLink(...));
    var results = (await client.TrySubmitBatchAsync(batch, actor)).OneOrThrow();
    ContractId<InviteLink> created = results.Get(link);
  • 🛟 RecoverAsync: resolves a write that failed with CommitState.Unknown into committed, rejected or lost, by reading the completion stream.
  • 🧱 New package Canton.Ledger.AspNetCore: AddCantonLedgerProblemDetails() answers a failed ledger command as RFC 9457 ProblemDetails (409 for contention, 202 for a command that committed), and ProducesLedgerProblems() declares those responses in your OpenAPI document.
  • 🪙 Splice Token Standard, typed end to end: Splice.Api.Token.Registry.Client is a typed client for registries' off-ledger API, and CreatedEventBlob.Decode reads a disclosed contract's signatories, observers and typed payload before you use it.
  • 🏗️ Richer generated code: keyed templates get Try<Choice>ByKeyAsync, every archivable template and interface implements IArchivable<TSelf>, and a module's top-level literal values become public const fields.

🐛 Fixed

  • 🔐 External-party onboarding decodes the v31 topology transactions a protocol version 37 synchronizer returns, as well as v30, instead of refusing them.
  • 🔀 A snapshot that holds a contract with a reassignment in flight returns that contract once instead of throwing.
  • 🛑 Generating a second DAR into an output directory another package already fills now stops with a clear error instead of deleting the first package's bindings.

The full list is in the CHANGELOG.

📦 What's in the release

All 17 SDK packages ship on the single 0.8.0 version line, including the newly published Canton.Ledger.AspNetCore, with the dpm codegen-cs component at oci://ghcr.io/peacefulstudio/dpm-codegen-cs:0.8.0. The Splice.* bindings are generated from Splice 0.10.0 and the Daml.Finance.* bindings from Daml Finance 2.10.0, each versioned after its DAR.

🔗 Links