Skip to content

Conversation

@azure-pipelines
Copy link
Contributor

tell-slack: canton

@atriantafyllos-da atriantafyllos-da self-assigned this Oct 10, 2025
paulbrauner-da and others added 3 commits October 10, 2025 11:57
This PR promotes upgrade error messages from dev errors to full-fledged
errors understood and reported by Canton.

Upgrade errors are classified into 3 categories:
- ValidationFailed: already exists in 3.3, returned when the metadata of
a contract changed
- TranslationFailed: raised for any error that can happen during the
type-checking/translation of a contract: failed to look up some
identifier, type mismatch, value too deeply nested, non-suffixed
contract id encountered, unexpected label in record value, unordered
GenMap.
- AuthenticationFailed: the computed hash doesn't match the contract ID

I also introduce a new toplevel error: ContractHashingError. I put it at
toplevel for consistency with DisclosedContractKeyHashingError and also
because I suspect it might occur outside of upgrades in the future. For
this error to be raised, something needs to go really wrong: like a user
providing a disclosure whose key contains a contract ID. I could
probably have been a crash but I have a hard time convincing myself that
it won't happen in some scenarios so I made it an error.

(cherry picked from commit 310a3e5)
We have adapted the engine-side check to package imports (a.k.a. "Carl's
check") with logic similar to
#21740

---------

Co-authored-by: Remy <[email protected]>

(cherry picked from commit 71bf1cb)
@atriantafyllos-da
Copy link
Contributor

/azp run

@azure-pipelines
Copy link
Contributor Author

Azure Pipelines successfully started running 1 pipeline(s).

@atriantafyllos-da atriantafyllos-da enabled auto-merge (squash) October 10, 2025 12:54
@atriantafyllos-da
Copy link
Contributor

subsumed by #22083

auto-merge was automatically disabled October 13, 2025 12:17

Pull request was closed

@atriantafyllos-da atriantafyllos-da deleted the main-canton-update-20251009.17126.v6d38818f branch October 13, 2025 12:17
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