Refactors transaction environment sampling to be more extensible; extends it with the ability to create lots of fee outputs.
Replaces the recursive Value logic for input/output buffers with a new custom FlatValue type which uses flat arrays and should be much cleaner.
Writes new faster/correct samplers for the FlatValue type which can call into libsimplicity to do things like computing valid ges (without doing a pubkey multiplication) and computing valid gejs (which previously was just impossible)
Rewrites the sampling traits to support multiple distributions; runs the benchmarks with different distributions to find the best/worst ones rather than repeatedly benchmarking with adhoc data.
For the transaction environment jets, which include all the transaction intropection jets, this makes minimal changes. A future PR should do something similar for the transaction environment, running multiple benchmarks across multiple distributions. But because these jets are implemented as lookups into a compute-once-per-tx transaction environment structure, I expect their cost to be very low and low-variance, so I did not do this work.
This significantly improves and cleans up the benchmarks. This branch was used to generate the data for https://github.com/BlockstreamResearch/simplicity/pull/247.
The main changes are:
Value
logic for input/output buffers with a new customFlatValue
type which uses flat arrays and should be much cleaner.FlatValue
type which can call into libsimplicity to do things like computing valid ges (without doing a pubkey multiplication) and computing valid gejs (which previously was just impossible)For the transaction environment jets, which include all the transaction intropection jets, this makes minimal changes. A future PR should do something similar for the transaction environment, running multiple benchmarks across multiple distributions. But because these jets are implemented as lookups into a compute-once-per-tx transaction environment structure, I expect their cost to be very low and low-variance, so I did not do this work.