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
Use splitmap for utxo #2592
Use splitmap for utxo #2592
Conversation
1691f71
to
165a152
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.
Every thing looks good. The set algebra function function (◁) where the value on the right is a SpitMap is use so many times. We should make a version ins SpitMap, and then use
(set Split.◁ splitmap) this maintains continuity with the spec and the older code.
eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Generator/Core.hs
Show resolved
Hide resolved
254688d
to
e75a132
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.
LGTM! I think it would be nice to make the special case domain restriction function like @TimSheard suggests.
ca58dfd
to
4b0f331
Compare
* Add missing instances for `KeyMap` and `SplitMap` * Add missing functions for `SplitMap` * Remove all `SplitMap` related stuff from set algebra * Add `NoThunks` instance * Identify and fix one normalization bug in KeyMap and another in SplitMap: * Add various annotations to tests for helping to identify causes of failure * Fix `Show` instance for `SplitMap` * Remove `InstanceSigs` in order to get rid of compilation warning * Add `Traversable` for `SplitMap` and slight optimization for `UTxO` generator * Implement specialized `extractKeysSet` and utilize it in the rules * Add comments that match the spec to a now different looking implementation * Switch `scriptsNeeded` to use list comprehensions for clarity * Tap into list fusion for `SplitMap` list conversions * Add `◁` for `SplitMap` * Improve performance of `balance` function and add some benchmarks for it
4b0f331
to
a5eea8d
Compare
This PR switches UTxO to
SplitMap
, which is in itself is based on a nested data structureIntMap
and customKeyMap
that is indexed by 32byte keys.