Repository navigation
fix: read active contracts through eventFormat - #177
Conversation
There was a problem hiding this comment.
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
filtersByPartyandverboseintoeventFormatfor active-contracts requests in the registry client. - Apply the same
eventFormatrequest shape inscripts/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
Summary
No related issue.
Canton 3.6 disables the top-level
filterandverboseon 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
seed.mjssend both insideeventFormat.Test plan
Automated tests
registry/, runnpm run lint,npm run typecheck:testandnpm test;ledger.ts, the two updated tests fail.Manual verification
Breaking changes
None.
Checklist
Screenshots
None.