-
-
Notifications
You must be signed in to change notification settings - Fork 71
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
Automatically reduce 0 and empty multiassets #372
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## chang #372 +/- ##
==========================================
+ Coverage 85.23% 85.33% +0.09%
==========================================
Files 32 32
Lines 4153 4194 +41
Branches 1040 1055 +15
==========================================
+ Hits 3540 3579 +39
- Misses 428 429 +1
- Partials 185 186 +1 ☔ View full report in Codecov by Sentry. |
This PR does also not yet cover the possibility of creating a 0 value by hand (i.e. accidentally by adding stuff together) |
@cffls Can you maybe help with that last bit?
|
a120906
to
623bdfe
Compare
User can potentially provide signing keys that are not required by the finalized transaction. For example, if a transaction include a minting script and signing key for the script, but the minted value is 0, the signature of the minting script isn't required. This commit will auto detect such cases and skip the signing of this key.
Great, thank you @cffls |
Looks good to me! Please feel free to merge. |
I noticed that the new ledger rules now disallow empty dicts and 0 values in multiassets. It would be good to anyways prevent this by design - this also always makes transactions cheaper. Here is an implementation proposal. I also tried to verify the non-emptiness strictness with an integration test but it seems to fail. We may want to remove it.