You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[CBR-226] Improve naming
[CBR-226] Improve infra, eval 3:1 event stream
[CBR-226] Avoid confusing median output
[CBR-226] Split x-axis
Splitting the x-axis allows us to plot all data without cramming stuff into a
small corner and end up with mostly empty space.
[CBR-226] Minor technical gnuplot fix
[CBR-226] Remove gnuplot glitch
[CBR-226] Minor cleanup
[CBR-226] Improve infra, test more scenarios
[CBR-226] Don't render each step, render more time
[CBR-226] Try to get to the ideal value for change
In the original version, the larger the UTxO, the more likely that we might be
able to get close the minimum end of the range, which is also when we stopped,
rather than closer and closer to the ideal value. Conversely, if the UTxO
contains only large outputs, then once we reached the minimum, we might end up
discarding a large number of outputs (as they would all exceed the upper end of
the range), potentially walking across the entire UTxO before giving up and
using the fallback. This resolves both of these problems.
[CBR-226] Fix memory leaks in simulator
[CBR-226] Basic profiling and minor perf fixes
This was primarily a sanity check to see if the input selection wasn't doing
anything crazy, performance-wise. Somewhat tentative result is that it's not;
all the time is spent on the periphery (computing histograms, writing to disk,
etc.). Made a few minor performance improvements along the way.
This also disables some tests that weren't adding value. All in all this
improves the running time of the simulator by about 12x.
[CBR-226] Remove quadratic complexity in renderer
We can now generate significantly longer time spans because the time it takes
to render the simulations is now linear in the number of cycles, rather than
quadratic. This wasn't the case before because we were writing the time series
data at every single step -- but that's pointless because each next file just
has one more data point than the previous. Instead we can just write it once at
the end and instruct gnuplot to only plot some of them. Moreover, we also only
selectively include data points in the time series (based on the sampling
rate). Before 10,000 cycles took 2 mins, and 20,000 cycles took 5 minutes; we
can now generate 30,000 cycles in 30 seconds, and it goes up linearly (except
for the largest-first, which needs to sort each step; but I've limited those to
500 cycles, which already illustrates nicely what happens).
[CBR-226] Reduce number of frames
[CBR-226] Sample at end of slots, UTxO balance
This changes the code to sample only at the end of each slot; we were
attempting to do that already but not in a very good way; now this is more
explicit, and we actually do less work. 10,000 cycles now renders in 4 seconds.
This also adds an additional graph of the UTxO balance, superimposed on the
UTxO size.
[CBR-226] Sample only at end of slot, fix gnuplot
In the previous commit we were only _rendering_ at the end of slots, but still
sampling at every step. Now we really only sample at the end of slots, and only
for those slots we want to render, for a somewhat less accurate but much faster
simulation.
This also fixes the gnuplot output (we weren't dealing correctly with singleton
ranges).
[CBR-226] Refactor: split Policy.hs into submodules
[CBR-226] Abstract away from UTxO representation
This allows us to pick a different representation for the largest-first policy,
increasing its efficiency. This is important if we want to be able to simulate
its effects over a large number of cycles.
[CBR-226] Use SortedUTxO for largest-first policy
We can now run this over longer periods in reasonable time (about the same
efficiency as the random policy).
[CBR-226] Improve how we split the x-axis
[CBR-226] Introduce composable policies
This means we can now evaluate what happens with largest first, then random.
[CBR-226] Introduce largest-first fallback
This required some refactoring of how the random policy is defined.
[CBR-226] Introduce composite SlotNr
This paves the way for splitting up statistics for different policies (not yet
done). However, it seems the changes to teh random policy changed it in a way
that I didn't anticipate, it seems to be growing more rapidly than it used to.
[CBR-226] Reset overall statistics on new policy
[CBR-240] Rework InputSelectionPolicy
This commit separates more strictly the toplevel InputSelectionPolicy
with the underlying implementation, which doesn't take anything but a
list of outputs.
This allows new-policies-writers to be guided by the types, in the sense
that they should solely focus on picking inputs & generating change
addresses, but nothing else. All the fee handling is done automatically
outside the policy, as part of 'runPolicyT'.
[CBR-2401 Implement first sketch of ReceiverPaysFee
[CBR-240] Initial implementation of SenderPaysFee
The idea behind this commit is that in case we need to cover the fees
but we don't have enough stake to do so, we forge a new output using the
treasury address and we rerun the input policy on the constrained Utxo
and the only, new, singleton output. We iterate up until we either not
fail or we succeed.
[CBR-240] Extend epsilon to be parametric on the total output
[CBR-240] Use approximated formula based on tx size
This commit extends the evaluator by adapting some of the work
Matt Noonan did on the fee estimation by transaction size.
[CBR-240] Port input selection to real types
This commit ports the input selection policies and types defined in the
test code, to use real Cardano types.
[CBR-240] Scaffolding test infrastructure
This commit pave the way for running tests and properties targeting the
coin selection policy.
[CBR-240] Expose largestFirst as a policy for testing.
[CBR-240] Initial sketch of an improved Utxo generator
Rebase everything.
[CBR-240] Refactor Spec.CoinSelection to be more DRY
This commit partially refactors the Spec.CoinSelection module to be more
dry, introducing workhorses-combinators to pay a single output or a batch
of them.
[CBR-240] Simplify tests to run only in the Gen monad
This commit scraps the monadic nature of the CoinSelection specs
and runs everything using plain 'Property', 'forAll' and the 'Gen'
monad as the baseline.
[CBR-240] Assert that ReceiverPaysFee amend the outputs
This commit introduces an extra check for payments that has
'ReceiverPaysFee' as an expense regulation. We check that the final
outputs have been amended and they haven't been left intact.
[CBR-240] Generate unique change addresses in tests
This commit allows the generators to generate unique change outputs.
[CBR-240] Check if the sender payed the fee.
Add new checks to assess if the sender payed the fee, and add better
rendering if a test fails.
[CBR-226] Make coin selection abstract
The vast majority of all the coin selection evaluation infrastructure is now
entirely polymorphic on some kind of coin selection domain. This means that the
coin selection algorithms we evaluate can be the exact same as the ones that we
will run in the end.
[CBR-240] Port Alfredo's code to the generic dom
The coin selection simulation and the "real" coin selection algorithm are now
one and the same. In the simulation we instantiate it to the DSL, and in
Alfredo's unit tests we run tests on it using the real Cardano types.
[CBR-240] Deal with grouping
Co-authored-by: Alfredo Di Napoli <[email protected]>
0 commit comments