Commit Graph

14 Commits

Author SHA1 Message Date
Kris Nuttycombe 3845686a6e Modify `BundleType` to exclude the anchor & allow no bundle to be produced.
This adds a flag to `BundleType` that, when set, requires a dummy-only
bundle to be produced even if no spends or outputs are added to the
builder, and when unset results in standard padding.
2023-12-20 19:29:14 -07:00
Kris Nuttycombe 2e2c161d52 Add a public bundle construction function & use it in the builder. 2023-12-18 21:56:42 -07:00
Kris Nuttycombe 0a257d6f68 Add explicit control of padding to the Builder API. 2023-12-15 15:08:22 -07:00
Kris Nuttycombe 06cb76168e Rename `Builder::add_recipient` to `add_output`.
The term `recipient` is commonly used to refer to the address to which a
note is sent; however, a bundle may include multiple outputs to the same
recipient. This change is intended to clarify this usage.

Co-authored-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-12-14 15:56:42 -07:00
Daira Hopwood cb1733d6ad Change number of iterations for the compact-note-decryption benchmark
to 10240. This improves the accuracy by ensuring a more even distribution
of more expensive decryptions.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-10-18 19:27:56 +01:00
Jack Grigg 0b4d7bc9c6 Migrate note encryption to use prepared w-NAF APIs 2022-10-15 23:27:57 +00:00
Jack Grigg 6b5905880d Make note decryption benchmark reliable
The benchmark assumed that the first action in the bundle was for the
recipient it had added, but we've started shuffling recipients within
actions, and the builder pads to a minimum of two actions. This meant
that 50% of benchmark runs would fail to start, but would proceed fine
if they did start (as the bundle is cached for the entire test).

We now add two recipients, to cancel out the effect of the padding and
shuffle.
2022-05-06 21:22:51 +00:00
Jack Grigg 4574d4793a Migrate to 2021 edition 2022-04-28 17:23:30 +00:00
therealyingtong a0424984c6 Add explicit scoping for viewing keys and addresses
Co-authored-by: Jack Grigg <jack@electriccoin.co>
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2022-03-30 20:49:37 +08:00
Jack Grigg 17ad25ee35 Merge branch 'non-consensus-changes-on-branchid-c4cd541e' into merge-non-consensus-changes 2022-02-15 22:46:47 +00:00
Kris Nuttycombe 5d5e289197 Remove default_diversifier and default_address methods. 2022-02-15 14:39:32 -07:00
therealyingtong 5b26c7d67a Pass rng to create_proof API.
As of halo2#444, all APIs now take `R: RngCore` arguments instead of
internally depending on `rand::rngs::OsRng`.
2022-01-05 21:30:45 +08:00
Jack Grigg 8c15cc25be Benchmark batch trial decryption 2021-08-12 01:36:38 +01:00
Jack Grigg cad3c8a1b8 Add benchmark for note decryption 2021-08-06 01:03:03 +01:00