Skip to content

fix: read active contracts through eventFormat - #177

Merged
lmcorbalan merged 1 commit into
mainfrom
fix/registry-event-format
Nov 6, 2026
Merged

lmcorbalan merged 1 commit into
mainfrom
fix/registry-event-format

Conversation

@fernandomg

Copy link
Copy Markdown
Member

Summary

No related issue.

Canton 3.6 disables the top-level filter and verbose on active-contracts reads, deprecated since 3.4, so on a 3.6 participant every registry answer is a 500. Found bumping canton-dappbooster to Canton 3.6, which needs a v0.3.1 tag with this to repin.

Changes

  • the registry and seed.mjs send both inside eventFormat.

Test plan

Automated tests

  1. In registry/, run npm run lint, npm run typecheck:test and npm test;
  2. Expect all to pass; against the old ledger.ts, the two updated tests fail.

Manual verification

  1. canton-dappbooster's token example, run against this registry on Canton 3.6, passed its 29-step walk.

Breaking changes

None.

Checklist

  • Self-reviewed my own diff
  • Tests added or updated
  • Docs updated (if applicable)
  • No unrelated changes bundled in

Screenshots

None.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

Copilot was unable to complete this review at the selected tier due to model policy or plan restrictions.

🟢 Approval recommended

The update cleanly migrates active-contracts request fields into the new eventFormat structure across client code, seeding script, and unit tests to maintain Canton 3.6 compatibility, with only a minor suggested assertion improvement noted.

No open issues 🎉

What changed in this PR

This pull request updates Ledger API /v2/state/active-contracts reads to remain compatible with Canton 3.6 by moving deprecated top-level request fields (filter, verbose) under eventFormat, preventing 500 responses on newer participants.

Changes:

  • Move filtersByParty and verbose into eventFormat for active-contracts requests in the registry client.
  • Apply the same eventFormat request shape in scripts/seed.mjs.
  • Update unit tests to reflect the new request body structure (no top-level filter / verbose).

Review note (nit): One test asserts that filter/verbose are no longer top-level, but does not explicitly assert that verbose is included under eventFormat, which would better prevent regressions.

File Summary
scripts/​seed.mjs Updates active-contracts requests to send query fields under eventFormat for Canton 3.6 compatibility.
registry/​test/​ledger.test.ts Updates assertions to validate the new request shape (no top-level filter/verbose) and eventFormat usage.
registry/​src/​ledger.ts Adjusts active-contracts request construction in HttpLedgerClient to use eventFormat (including filters/verbosity) instead of deprecated top-level fields.

Review effort: Balanced

@fernandomg fernandomg moved this from Backlog to In review in Canton - dAppBooster (#390) Nov 5, 2026
@fernandomg
fernandomg requested a review from lmcorbalan November 5, 2026 17:21

@lmcorbalan lmcorbalan left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lmcorbalan
lmcorbalan merged commit 5133fde into main Nov 6, 2026
6 checks passed
@lmcorbalan
lmcorbalan deleted the fix/registry-event-format branch November 6, 2026 12:45
@github-project-automation github-project-automation Bot moved this from In review to Done in Canton - dAppBooster (#390) Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants