Skip to content

Accept credential offers by package name - #6

Merged
hubagaspar91 merged 3 commits into
mainfrom
fix/credential-accept-by-package-name
Oct 21, 2026
Merged

hubagaspar91 merged 3 commits into
mainfrom
fix/credential-accept-by-package-name

Conversation

@scolear

@scolear scolear commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

What

This PR picks up the canton-lib fix from DLC-link/canton-lib#65 and cuts bitsafe-token 0.3.0.

  • credentials::accept_credential_offer exercises the UserService by the package-name template id.
  • AcceptCredentialOfferParams loses its user_service_template_id field. Both credentials examples drop that field.
  • The five canton-lib pins move to tag = "v0.12.0". The README pin moves with them.
  • The crate version, the CHANGELOG.md section and the README install tag move to 0.3.0.

Why

G20Group ran the beth_credentials example on mainnet, and the accept failed with INVALID_PRESCRIBED_SYNCHRONIZER_ID. The example passed the UserService created-event template id into the accept call, as the old API asked. That id pins the utility-credential-app-v0 version that the UserService was created with. In their case, that version is 0.1.0. bitsafe-validator-1 vets only 0.2.2 and later. The package-name form resolves to a version that every host vets.

Lockfile

Each lockfile change has one of these causes:

  • canton-lib 0.12.0. The five canton-lib crates move to 0.12.0. canton-lib 0.12.0 moves zip to 9.0.5 and enables only its deflate feature. So the lockfile drops about twenty zip dependencies that DARs do not use.
  • RustSec advisories. The lockfile moves rustls to 0.23.46, rustls-webpki to 0.103.16 and webpki-root-certs to 1.0.10. Without these moves, cargo deny check advisories fails. main fails the same way today.

The CHANGELOG.md Security section names each advisory that these moves close.

Key decisions

  • 0.3.0, not 0.2.1. A caller must drop a field from AcceptCredentialOfferParams. A project that also depends on a canton-lib crate must pin v0.12.0. Both changes can break a build, so the minor version moves.
  • The release and the advisory bumps stay in this PR. PR chore(deps): pin canton-lib 0.11.0 #5 cut 0.2.0 the same way. The advisory bumps touch only the lockfile and keep CI green.

How tested

  • cargo fmt -- --check and cargo clippy --all-targets --all-features -- -D warnings are clean.
  • cargo build --examples compiles both credentials examples against canton-lib 0.12.0.
  • cargo test: 114 passed, 8 ignored. The ignored tests need a live ledger.
  • cargo deny check advisories passes.
  • CI runs the localnet suite on this PR.

After the merge

Push the v0.3.0 tag on the merge commit and create the GitHub release. If the merge happens after 2026-10-21, update the date in CHANGELOG.md first.

🤖 Generated with Claude Code

canton-lib's accept_credential_offer now resolves the UserService
template by package name, so the accept no longer pins the package
version the UserService was created with. G20Group's accept failed
on mainnet for that reason.

The dependency points at the canton-lib fix commit until 0.12.0 is
tagged. The credentials examples drop the removed
user_service_template_id field.
@scolear

scolear commented Oct 19, 2026

Copy link
Copy Markdown
Member Author

Two unrelated CI failures. Cargo Deny reports seven advisories published after the last green run on main (RUSTSEC-2026-0346 to 0349 and 0367 to 0369, the last three for zip 2.4.2 via canton-lib's token crate); main fails the same way today. The localnet suite failed on a Docker Hub pull limit, "toomanyrequests: Data limit exceeded", before it ran anything; a re-run later should pass.

cargo deny fails on rustls 0.23.45 (RUSTSEC-2026-0346 to 0349) and
zip 2.4.2 (RUSTSEC-2026-0367 to 0369). rustls moves to 0.23.46 in the
lockfile. zip moves to 9.0.5 through the canton-lib fix commit, which
now carries that bump.
canton-lib 0.12.0 holds the package-name accept fix, so the five
canton-lib pins move from the PR head rev to the v0.12.0 tag. The
tag enables only the deflate feature of zip, so the lockfile drops
the zip dependencies that DARs do not use.

The lockfile moves rustls-webpki to 0.103.16 and webpki-root-certs
to 1.0.10. RUSTSEC-2026-0382 and RUSTSEC-2026-0383 fail cargo deny
on the older versions, and main fails the same way.

AcceptCredentialOfferParams loses a public field, and users must pin
canton-lib v0.12.0, so the release is 0.3.0. The CHANGELOG names the
advisory IDs and drops the wrong advisory dates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hubagaspar91
hubagaspar91 marked this pull request as ready for review October 21, 2026 09:21
@hubagaspar91
hubagaspar91 merged commit 128bfce into main Oct 21, 2026
12 of 14 checks passed
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.

3 participants