feat: Canton MCMS proposal analyzer#1031
Conversation
🦋 Changeset detectedLatest commit: 1802611 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
👋 JohnChangUK, thanks for creating this pull request! To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team. Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks! |
There was a problem hiding this comment.
Pull request overview
This PR adds Canton chain-family support to the experimental proposal analyzer/UPF conversion pipeline, enabling decoding and rendering of Canton MCMS transactions (including nested Daml record args) into reviewer-friendly Markdown/YAML outputs.
Changes:
- Add a Canton analyzer (
AnalyzeCantonTransaction(s)) and wire it into the family dispatch paths (report builder + UPF conversion). - Improve rendering of nested Canton/Daml record arguments by converting decoded
map[string]anyinto structured fields with deterministic ordering. - Add end-to-end tests and a real Canton proposal fixture to validate decode + render output.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| experimental/analyzer/utils.go | Adds map[string]any handling for Canton decoded args via mapToStructField. |
| experimental/analyzer/canton_analyzer.go | Implements Canton transaction decoding into DecodedCall. |
| experimental/analyzer/canton_analyzer_test.go | Adds unit + pipeline tests for Canton decode/render behavior. |
| experimental/analyzer/report_builder.go | Dispatches Canton transactions to the new analyzer. |
| experimental/analyzer/renderer_markdown.go | Improves compact previews for StructField (now shows {key: value} hint / {} when empty). |
| experimental/analyzer/renderer_markdown_test.go | Updates tests for the new struct compact preview behavior. |
| experimental/analyzer/upf/upf.go | Adds Canton support in UPF batch decode + single-transaction analysis. |
| experimental/analyzer/upf/upf_test.go | Adds an end-to-end UPF conversion test using a real Canton proposal fixture. |
| experimental/analyzer/upf/upf_canton_test.go | Adds a focused test ensuring UPF batch decode yields decoded Canton calls. |
| experimental/analyzer/testdata/canton_test_proposal.json | Adds a real Canton timelock proposal fixture for tests. |
| .changeset/canton-proposal-analyzer.md | Declares a minor release for the new analyzer feature. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
cd856e1 to
f916c88
Compare
f916c88 to
08de7f5
Compare
08de7f5 to
349cd91
Compare
349cd91 to
7204d84
Compare
7204d84 to
8d963c2
Compare
8d963c2 to
5cbf05b
Compare
5cbf05b to
79ff513
Compare
|




Desc
Canton MCMS proposal analyzer
Todos
When MCMS get's new release, change go mod to point to that release: smartcontractkit/mcms#779