-
Notifications
You must be signed in to change notification settings - Fork 156
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
Disallow decoding a 0-value MultiAsset #3241
Conversation
044102f
to
67451da
Compare
c0f0187
to
46ed98a
Compare
49f6d0c
to
243a45a
Compare
eras/shelley-ma/test-suite/test/Test/Cardano/Ledger/Mary/Value.hs
Outdated
Show resolved
Hide resolved
eras/shelley-ma/test-suite/test/Test/Cardano/Ledger/Mary/Value.hs
Outdated
Show resolved
Hide resolved
eras/shelley-ma/test-suite/test/Test/Cardano/Ledger/Mary/Value.hs
Outdated
Show resolved
Hide resolved
eras/shelley-ma/test-suite/test/Test/Cardano/Ledger/Mary/Value.hs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here are my fly by comments on the testing
eras/shelley-ma/test-suite/test/Test/Cardano/Ledger/Mary/Value.hs
Outdated
Show resolved
Hide resolved
eras/shelley-ma/test-suite/test/Test/Cardano/Ledger/Mary/Value.hs
Outdated
Show resolved
Hide resolved
eras/shelley-ma/test-suite/test/Test/Cardano/Ledger/Mary/Value.hs
Outdated
Show resolved
Hide resolved
libs/cardano-ledger-binary/testlib/Test/Cardano/Ledger/Binary/RoundTrip.hs
Outdated
Show resolved
Hide resolved
eras/shelley-ma/test-suite/test/Test/Cardano/Ledger/Mary/Value.hs
Outdated
Show resolved
Hide resolved
243a45a
to
53206d5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bunch of suggestions
eras/shelley-ma/test-suite/src/Test/Cardano/Ledger/ShelleyMA/Serialisation/Roundtrip.hs
Outdated
Show resolved
Hide resolved
eras/shelley-ma/test-suite/src/Test/Cardano/Ledger/ShelleyMA/Serialisation/Roundtrip.hs
Outdated
Show resolved
Hide resolved
eras/shelley-ma/test-suite/src/Test/Cardano/Ledger/ShelleyMA/Serialisation/Roundtrip.hs
Outdated
Show resolved
Hide resolved
eras/shelley-ma/test-suite/src/Test/Cardano/Ledger/ShelleyMA/Serialisation/Roundtrip.hs
Outdated
Show resolved
Hide resolved
eras/shelley-ma/test-suite/src/Test/Cardano/Ledger/ShelleyMA/Serialisation/Roundtrip.hs
Outdated
Show resolved
Hide resolved
0c34a5d
to
63c0794
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Beautiful
4c97be1
to
711f0a3
Compare
711f0a3
to
beee429
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is all good, however there is still a problem with OOM. We need to get to the bottom of it. It is too dangerous to merge a PR that has flaky tests like that. For all we know it could be the decoder that is doing something bad, although it is pretty unlikely.
eras/alonzo/test-suite/test/Test/Cardano/Ledger/Alonzo/Serialisation/Tripping.hs
Outdated
Show resolved
Hide resolved
eras/alonzo/test-suite/test/Test/Cardano/Ledger/Alonzo/Serialisation/Tripping.hs
Outdated
Show resolved
Hide resolved
eras/babbage/test-suite/test/Test/Cardano/Ledger/Babbage/Serialisation/Tripping.hs
Outdated
Show resolved
Hide resolved
eras/babbage/test-suite/test/Test/Cardano/Ledger/Babbage/Serialisation/Tripping.hs
Outdated
Show resolved
Hide resolved
eras/babbage/test-suite/test/Test/Cardano/Ledger/Babbage/Serialisation/Tripping.hs
Outdated
Show resolved
Hide resolved
eras/alonzo/test-suite/test/Test/Cardano/Ledger/Alonzo/Serialisation/Tripping.hs
Outdated
Show resolved
Hide resolved
c4e5dae
to
a3c299d
Compare
c7391f3
to
3085a65
Compare
3085a65
to
21551bb
Compare
21551bb
to
7442412
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Recent changes made generator from generating a lot to generating no multiassets for TxOuts at all. I do recommend trying out in ghci and see the affects of any changes to any generator you are doing. It is very easy to mess it up and cause poor generators to mask bugs in implementation
eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Serialisation/EraIndepGenerators.hs
Outdated
Show resolved
Hide resolved
eras/shelley-ma/test-suite/test/Test/Cardano/Ledger/ShelleyMA/Serialisation/Golden/Encoding.hs
Outdated
Show resolved
Hide resolved
eras/shelley-ma/test-suite/test/Test/Cardano/Ledger/ShelleyMA/Serialisation/Golden/Encoding.hs
Outdated
Show resolved
Hide resolved
eras/babbage/test-suite/src/Test/Cardano/Ledger/Babbage/Serialisation/Generators.hs
Outdated
Show resolved
Hide resolved
eras/alonzo/test-suite/src/Test/Cardano/Ledger/Alonzo/Serialisation/Generators.hs
Outdated
Show resolved
Hide resolved
a2c4c57
to
2eb43d4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One last change is needed otherwise this is great.
Awesome work @aniketd!
eras/shelley-ma/test-suite/src/Test/Cardano/Ledger/ShelleyMA/Serialisation/Generators.hs
Outdated
Show resolved
Hide resolved
…erialisation/Generators.hs Co-authored-by: Alexey Kuleshevich <alexey.kuleshevich@iohk.io>
yep, thanks again for all this work @aniketd ! it turned out to be much stickier than I would have guessed! 🙌 |
Description
Closes #3240
Checklist
fourmolu
(which can be run withscripts/fourmolize.sh