Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TransactionCoder.encodeFatContractInstance should only accept normalized values #20163

Open
paulbrauner-da opened this issue Oct 23, 2024 · 0 comments
Assignees
Labels

Comments

@paulbrauner-da
Copy link
Contributor

encodeFatContractInstance currently accepts non-normalized values and doesn't check that they are normalized. For instance, it will accept trailing Nones, type annotation, or unsorted maps.

The IDE ledger stores non-normalized (enriched) transactions and then happily translates them using this method in order to produce disclosures. This leads to malformed disclosures as disclosures are expected to be in normal form in 3.x.

We need to at the very least document that this method only accepts normalized values and at best enforce it. We also need to fix the IDE ledger, and potentially other clients that break the precondition. The IDE ledger issue is tracked in #20162.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant