Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
204 commits
Select commit Hold shift + click to select a range
7f8a848
Circleci project setup (#1)
PaulLaux Mar 30, 2022
1328c62
issuer keys implementation (#5)
daniben31 Jun 14, 2022
e6b7762
Added NoteType to Notes (#2)
PaulLaux Jun 14, 2022
088abc6
ZSA note encryption in Orchard crate (#3)
naure Jul 20, 2022
1420f84
Zsa builder (#4)
PaulLaux Sep 19, 2022
0b2988a
Issuance (#12)
PaulLaux Sep 29, 2022
9b43497
E2E tests for issuance (#20)
alexeykoren Oct 20, 2022
985d0d2
disabled split notes (#22)
PaulLaux Oct 20, 2022
f3ebe7a
Review fixes (#23)
PaulLaux Oct 26, 2022
355b569
Review fixes2 (#24)
PaulLaux Oct 27, 2022
9405f80
verify_issue_bundle() cleanup (#25)
PaulLaux Oct 28, 2022
d8f3563
ZSA burn functionality (#35)
alexeykoren Dec 7, 2022
5a50fb8
Create dummy spend in empty builder by default (#36)
alexeykoren Dec 18, 2022
efbfc19
AssetID test vectors (#34)
alexeykoren Dec 20, 2022
babf1da
CI-Badge (#37)
PaulLaux Dec 21, 2022
4681cc2
Use different random nullifiers in dummy notes (#39)
alexeykoren Dec 23, 2022
cec48d7
V3 encryption (#38)
PaulLaux Jan 31, 2023
4e47677
Minimal API changes for Issuance in Client (#43)
alexeykoren Feb 9, 2023
cbf0a3a
Circuit: Split_flag handling (#42)
ConstanceBeguier Feb 14, 2023
43d5e77
AssetBase spec update (#44)
PaulLaux Mar 2, 2023
527e29a
Upgrade pprof version with a limited inferno version (#48)
ConstanceBeguier Mar 20, 2023
f0b7948
Making changes to the asset base derivation from the asset identifier…
vivek-arte Apr 18, 2023
563b4e5
Circuit: Update value_commit_orchard to take into account asset (#50)
ConstanceBeguier Apr 21, 2023
7d3b6df
Constant-time note commitment for ZEC and ZSA (#54)
ConstanceBeguier Apr 25, 2023
ea0fd59
Add tracking for supply info inside verify_issue_bundle (#55)
dmidem May 4, 2023
9a35108
Add getter method for Bundle.burn field (#58)
dmidem May 10, 2023
4e1c616
Merge branch 'main' into zsa1
ConstanceBeguier May 12, 2023
c77d96c
Merge branch main into zsa1 (#59)
ConstanceBeguier May 16, 2023
aeb9934
Circuit: Update note_commit to take into account asset (#56)
ConstanceBeguier May 23, 2023
b4f6281
Circuit: Use nf_old_pub to evaluate new note commitment (with rho_new…
ConstanceBeguier May 25, 2023
95fcf88
Circuit: Check pk_d_old = derived_pk_d_old only when split_flag = 0 (…
ConstanceBeguier May 29, 2023
8e71fff
Protect bundle burn from adding assets with zero amount (#60)
dmidem May 29, 2023
bedc732
Circuit: Add tests for orchard circuit (#63)
ConstanceBeguier Jun 1, 2023
32eee6e
Do not create split notes with native asset (#65)
ConstanceBeguier Jun 6, 2023
02fa582
Global padding for bundle (#67)
ConstanceBeguier Jun 6, 2023
9965a6d
Add serialization of finalize flag (#68)
ConstanceBeguier Jun 6, 2023
7ad2bac
Fix IssueBundle and IssueAction structures (#70)
ConstanceBeguier Jun 12, 2023
950b806
Updates to TXID Digest and Authorizing Data Commitment (#66)
vivek-arte Jun 13, 2023
8bc18f7
Merge branch main into zsa1
ConstanceBeguier Jun 13, 2023
5b003f8
Merge branch main into zsa1 (#72)
ConstanceBeguier Jun 13, 2023
f49be89
Update code to refer to the upgraded version of librustzcash and refl…
dmidem Jun 19, 2023
aa1d895
Fix issuance key derivation (#74)
ConstanceBeguier Jun 20, 2023
daf6269
Preventing Asset Base from being the identity point on the Pallas cur…
vivek-arte Jun 21, 2023
477f949
Update random nullifier for split notes and circuit (#76)
ConstanceBeguier Jun 23, 2023
d4ff716
Merge branch 'zsa1' into upgrade_librustzcash_for_orchard_v05_new
dmidem Jun 23, 2023
21d7273
Use tag instead of branch for zcash_note_encryption (librustzcash) re…
dmidem Jun 23, 2023
62d4ae7
Change tag name for zcash_note_encryption in root Cargo.toml
dmidem Jun 23, 2023
1a00c4a
Upgrade orchard to v0.5 and integrate corresponding librustzcash upgr…
dmidem Jun 23, 2023
ff2ac96
Circuit: Add constraints (#77)
ConstanceBeguier Jun 29, 2023
081513b
Circuit: Fix balance violation (#78)
ConstanceBeguier Jul 24, 2023
139ecca
Circuit: Add enable_zsa flag (#79)
ConstanceBeguier Aug 31, 2023
7937e5b
Enhance and cleanup ivk-to-bytes-visibility-downgrade branch (#81)
dmidem Oct 4, 2023
8b0560d
Circuit: optimized short range check on 4 and 5 bits (#86)
ConstanceBeguier Oct 16, 2023
2810365
Circuit: remove mutiplexer chip (#90)
ConstanceBeguier Oct 17, 2023
a680f41
Circuit: optimize ZEC/ZSA hash computations in note commitment (#87)
ConstanceBeguier Oct 18, 2023
7b943e1
Adopt Orchard ZSA for Zebra (introduce zcash_note_encryption_zsa alia…
dmidem Nov 1, 2023
f38d6b9
Rename `sk_iss` to `isk`, the `IssuanceKey` struct to `IssuanceAuthor…
vivek-arte Nov 7, 2023
0ee75f5
Circuit: move mux functionality into CondSwap chip (#94)
ConstanceBeguier Dec 18, 2023
344b647
Update zcash_note_encryption dependency reference (#95)
dmidem Dec 22, 2023
1a1f3e7
Changing the Issuance Authorization Signature to the BIP 340 Schnorr …
vivek-arte Jan 31, 2024
c9a8f49
Merge branch 'zcash-0.8.0' into zsa1-with-zcash-0.8.0
dmidem Apr 15, 2024
f3d9459
Fix compilation errors after the merge (there're still several compli…
dmidem Apr 24, 2024
0f56f52
Fix compilation errors in tests
dmidem Apr 25, 2024
149827d
Fix cargo doc issues
dmidem Apr 25, 2024
c8c84aa
Fix Builder::bundle function to pass unit tests from tests folder cor…
dmidem Apr 29, 2024
ac371f0
Fix several comments, rename some flag constants
dmidem Apr 30, 2024
7969b9e
Fix flag names after renaming
dmidem Apr 30, 2024
47f7aae
Disable rustfmt for one line in keys.rs module to prevent removing do…
dmidem Apr 30, 2024
bb9e03b
Fix typo in constant name
dmidem Apr 30, 2024
dd956b8
Fix comments, rename DEFAULT_WITH(OUT)_ZSA to DEVAULT_VANILLA(ZSA)
dmidem May 1, 2024
123b609
1) Use Option instead of usize::MAX in builder::partition_by_asset fu…
dmidem May 2, 2024
ee89541
Refactor build function to remove `Copy + Into<i64>` constraints
dmidem May 7, 2024
73218b0
Remove extra comment
dmidem May 7, 2024
50c6310
Fix comments, indroduce and use MatadataIdx type in the builder
dmidem May 9, 2024
78c8efc
Update to upstream (zcash/main v0.8.0) (#103)
dmidem May 9, 2024
39b479e
OrchardZSA backward compatability 0.8.0 (#104)
dmidem Jul 16, 2024
6e6112c
Synchronize Orchard with updates from zcash_note_encryption for zcash…
dmidem Jul 31, 2024
07b3697
Update ShieldedOutput implementation to return reference from enc_cip…
dmidem Aug 14, 2024
3ba9e5b
Remove redundancy in vanilla/zsa circuits
ConstanceBeguier Sep 19, 2024
e2fb49d
Updating test vectors (#114)
vivek-arte Oct 8, 2024
dd69425
Remove ZSA dummy notes
ConstanceBeguier Oct 10, 2024
410037d
Changing the type of the asset description from String to Vec<u8> (#113)
vivek-arte Oct 14, 2024
a7c02d2
Provide compatibility with librustzcash/zcash_client_backend: derive …
dmidem Oct 15, 2024
25020f8
Exclude non-native assets from value_balance (#120)
alexeykoren Nov 13, 2024
8a2a8de
Simplify Unproven struct
ConstanceBeguier Nov 28, 2024
adc6995
Update SIGHASH according to OrchardDomain
ConstanceBeguier Dec 9, 2024
97cf5a3
Add Clone trait to auth-related structures (#125)
alexeykoren Dec 12, 2024
8b89888
Unify unique AssetBase concept in IssueAction
ConstanceBeguier Dec 16, 2024
fe15076
Add a reference note for each first issuance
ConstanceBeguier Dec 17, 2024
9eb97f0
Simplify bundle build function return type (#129)
ConstanceBeguier Dec 20, 2024
3d2515b
Fix some links and typo (#127)
ConstanceBeguier Dec 25, 2024
0d2f439
Install libfontconfig1-dev to fix CI build on updated Ubuntu runner (…
dmidem Jan 6, 2025
69f92a3
Update AssetSuply and SupplyInfo (new) (#133)
dmidem Jan 8, 2025
3dbdbc5
Update to orchard_auth_digest computation (#134)
vivek-arte Jan 18, 2025
70daf8b
[book] Update book with ZSA changes
ConstanceBeguier Jan 23, 2025
40e7e10
Update derivation of the rho value in Issue Notes
ConstanceBeguier Jan 23, 2025
01e85a5
Add NULLIFIER_L constant
ConstanceBeguier Jan 28, 2025
a95364c
Refactor AssetSupply to AssetRecords and update issuance verification…
dmidem Feb 4, 2025
b62f72a
Fix cargo clippy warnings in PR #138 (#140)
dmidem Feb 6, 2025
b8d4543
Merge PCZT into zsa1
ConstanceBeguier Mar 11, 2025
e88e261
Extend Orchard protocol flavor derives (#144)
dmidem Mar 17, 2025
aeec27d
Add ZSA feature into PCZT
ConstanceBeguier Mar 13, 2025
123a2f4
Merge branch 'zsa1' into merge_pczt
ConstanceBeguier Apr 7, 2025
190a50c
Move burn to ActionGroup in OrchardZSA (#145)
alexeykoren Apr 17, 2025
831ca10
change asset_desc to asset_desc_hash (#156)
PaulLaux Apr 17, 2025
75c55b2
resolved conflicts and updated orchard_digest for zsa
PaulLaux Apr 17, 2025
6d557af
Merge branch 'zsa1' into merge_pczt_b and update hashes
PaulLaux Apr 17, 2025
5c09d33
Merge pczt (#157)
PaulLaux Apr 17, 2025
c7d57b1
Reduced Circle CI and github CI runtime (#158)
PaulLaux Apr 19, 2025
37101f4
Lock Sinsemilla version (#160)
ConstanceBeguier Apr 22, 2025
57f39bf
Merge branch 'main' into merge_main_fcb14def
ConstanceBeguier Apr 24, 2025
d56c5d5
Fix tests comparing orchard_digest against a fixed value
ConstanceBeguier Apr 24, 2025
cb539d4
Update test_vectors with last version of zcash-test-vector
ConstanceBeguier Apr 24, 2025
5f080b4
Fix clippy errors
ConstanceBeguier Apr 24, 2025
8388060
Replace ZIP32_ORCHARD_PERSONALIZATION_FOR_ISSUANCE const by ZIP32_ORC…
ConstanceBeguier Apr 24, 2025
572ba6b
Expose (Extracted)NoteCommitment in public API
ConstanceBeguier Apr 24, 2025
502c410
Disable default-features for k256
ConstanceBeguier Apr 29, 2025
8509081
Update Rust version in README
ConstanceBeguier May 1, 2025
cf31792
Merge main fcb14def into zsa1 (#152)
PaulLaux May 1, 2025
0a61d36
Update with new version of Sinsemilla (#159)
ConstanceBeguier May 1, 2025
f2411a0
Use fixed size array for asset_id (#162)
PaulLaux May 6, 2025
9a25bd1
Simplify compute_asset_desc_hash function (#161)
ConstanceBeguier May 6, 2025
7e4f28c
Use the last version of zcash_note_encryption (#165)
ConstanceBeguier May 22, 2025
6616893
Fix CI breakage by pinning proptest 1.2.0 and locking font-kit/half v…
dmidem Jul 1, 2025
cbcdb71
Pczt without domain (#168)
alexeykoren Jul 1, 2025
fdd69e2
Update zcash_note_encryption crate (#171)
ConstanceBeguier Jul 8, 2025
1746a4b
Remove circuit flag when it is possible (#173)
ConstanceBeguier Jul 15, 2025
9f44f55
Fix fake_compact_action visibility (#174)
ConstanceBeguier Jul 15, 2025
f7bcf01
Update circuit implementation (#167)
ConstanceBeguier Jul 23, 2025
c1f3dcc
Upgrate proptest dependency to 1.4.0 to be compatible with Zebra (#175)
dmidem Jul 23, 2025
806878c
Adopt proptest version range (>=1.0,<1.7) and roll back Cargo.lock (#…
dmidem Jul 28, 2025
fab774d
Simplify Orchard Flavor (#176)
ConstanceBeguier Jul 28, 2025
58b710b
Simplify ZSA implementation (#178)
ConstanceBeguier Jul 31, 2025
0982ff6
Remove native_asset_base prop_compose function (#180)
ConstanceBeguier Aug 5, 2025
826dc03
Add rho derivation check in verify_issue_bundle (#183)
ConstanceBeguier Aug 26, 2025
76d9b7e
Updating the encoding of the Issuance Authorization keys and signatur…
vivek-arte Sep 1, 2025
8784d39
Refactor IssueAuthSigScheme trait (#184)
ConstanceBeguier Sep 1, 2025
cc68804
Add versioned signatures (#181)
ConstanceBeguier Sep 8, 2025
0e496fe
Merge branch 'main' into merge_main_9d89b50
ConstanceBeguier Sep 8, 2025
532b0d2
Merge main (until commit 9d89b50) into zsa1 (#186)
PaulLaux Sep 8, 2025
b4517e3
Reduce diff with upstream (#187)
ConstanceBeguier Sep 8, 2025
d18f0d5
Update zcash_note_encryption (9f7e93) (#190)
ConstanceBeguier Sep 11, 2025
962564b
Fix issuance_digest, issuance_auth_digest and orchard_digest (#189)
ConstanceBeguier Sep 12, 2025
78b6f76
Updates to property testing (#191)
vivek-arte Sep 22, 2025
cf6d3b6
Create OrchardSighashVersion and IssueSighashVersion enum (#192)
ConstanceBeguier Sep 23, 2025
abd6ecc
Add spend_auth_sigs_auth_digest into orchard_auth_digest (#193)
ConstanceBeguier Oct 1, 2025
fc73b8e
Shuffle actions in a Bundle (#194)
ConstanceBeguier Oct 21, 2025
a7de16f
Fix split note in PCZT (#195)
ConstanceBeguier Oct 28, 2025
2083efe
Remove PCZT v2 (#196)
ConstanceBeguier Oct 29, 2025
a02fdf1
Remove dev-only numeric-extension patterns mistakenly committed to .g…
dmidem Nov 3, 2025
7a44ba5
PR471 review: CI: disable LTO in release tests; add apt update to Ubu…
dmidem Dec 23, 2025
f83d652
PR471 review: various fixes (2) (#208)
dmidem Jan 6, 2026
313544d
PR471 review: add IssuanceFlags to handle ZIP 230 issuance flags byte…
dmidem Jan 6, 2026
0589642
PR471 review: fix arb_asset_base generation (#211)
dmidem Jan 6, 2026
bb84ff2
PR471 review: implement ShieldedOutput for pczt::Action (#212)
dmidem Jan 6, 2026
accdd2f
PR471 review: pass asset as an argument into action proptest generato…
dmidem Jan 6, 2026
b5518f1
PR471 review: various fixes (1) (#207)
dmidem Jan 6, 2026
6c3de5d
PR471 review: remove expiry_height (#203)
ConstanceBeguier Jan 6, 2026
4f03573
PR471 review: update circuit files (#204)
ConstanceBeguier Jan 6, 2026
e48d478
PR471 review: use num_actions into build_bundle (#202)
ConstanceBeguier Jan 6, 2026
27e6824
Revert Value and ValueSum API changes per review feedback (#217)
dmidem Jan 8, 2026
f0cf7ea
PR471 review: various comments (#206)
ConstanceBeguier Jan 8, 2026
9f16cee
Fix tests for no-default-features (#218)
ConstanceBeguier Jan 8, 2026
f85cc40
PR471 review: gate ZSA issuance behind zsa-issuance feature (#214)
dmidem Jan 9, 2026
0e9729a
PR471 review: switch ZSA issuance Schnorr support to secp256k1 (#215)
dmidem Jan 12, 2026
2e6091a
Pin blake2b_simd to version 1.0.1 (#221)
ConstanceBeguier Jan 12, 2026
b0f857b
PR471 review: reduce zsa-issuance feature usage (#222)
ConstanceBeguier Jan 12, 2026
7259000
PR471 review: export issuance empty-hash helpers (#220)
dmidem Jan 13, 2026
00e76f9
PR471 review: make ValueSum::from_raw public (#224)
ConstanceBeguier Jan 13, 2026
382f319
PR471 review: Add AssetId enum (#223)
ConstanceBeguier Jan 13, 2026
7aafdc0
PR471 review: fix rho value for the issuance note (#225)
ConstanceBeguier Jan 14, 2026
b10dd2b
PR471: Make rho optional in Note (#226)
ConstanceBeguier Jan 15, 2026
e893aac
PR471 review: Improve documentation for hash regression tests (#227)
ConstanceBeguier Jan 15, 2026
dc861af
PR471 review: various comments (#228)
ConstanceBeguier Jan 16, 2026
c346973
PR471 review: Fix issuance key derivation to use dedicated ZIP-32 con…
ConstanceBeguier Jan 19, 2026
f011c7e
PR471 review: Remove clone on MaybeSigned enum (r2602563105) (#230)
ConstanceBeguier Jan 19, 2026
57c33af
PR471 review: Replace (Orchard/Issue)SighashVersioning with (Orchard/…
ConstanceBeguier Jan 19, 2026
404239a
Pin blake2b_simd to version 1.0.1 (#221)
ConstanceBeguier Jan 12, 2026
917f283
PR471 review: CI: disable LTO in release tests; add apt update to Ubu…
dmidem Dec 23, 2025
778607e
Fix CI (#233)
PaulLaux Jan 20, 2026
d8caa76
PR471 review: Rename native to zatoshi (#235)
ConstanceBeguier Jan 20, 2026
589312c
PR471 review: Validate Orchard note plaintext lead byte (#236)
ConstanceBeguier Jan 22, 2026
a80b5fa
PR471 review: Address Str4d’s feedback from Jan 20, 2026 meeting (#237)
ConstanceBeguier Jan 22, 2026
bda4fe0
PR471 review: updated comment for `VerifyingKey` x2
PaulLaux Jan 29, 2026
5da1dbc
PR471: updated book
PaulLaux Jan 29, 2026
61ab648
PR471 review: removed `zsa_issuance` from default in Cargo.toml
PaulLaux Jan 29, 2026
fcd1a0b
PR471 review: Re-export ReferenceKeys from issuance module (r2542447228)
PaulLaux Jan 29, 2026
49f5939
PR471 Review: Added MAX_BURN_VALUE
PaulLaux Feb 2, 2026
1d93e5f
PR471 Review: Removed redundent clippy directives.
PaulLaux Feb 2, 2026
9d2960c
PR471 review: updated visiability for create_split_note() to pub(crate)
PaulLaux Feb 3, 2026
ec35bcc
PR471 review: Fixed link to ZIP 226 / Note structure and Commitment
PaulLaux Feb 4, 2026
fec254a
PR471 Review: Removed redundant review hint.
PaulLaux Feb 4, 2026
5f8eb12
PR471 Review: Removed split_flag parameter from SpendInfo::new
PaulLaux Feb 5, 2026
44687bc
PR471 Review: added a `shielding_bundle::<OrchardZSA>(BundleType::DEF…
PaulLaux Feb 5, 2026
d2238a9
PR471 Reviw: Fix backward compatibility when building Bundle (#239)
ConstanceBeguier Feb 11, 2026
b90d40f
Removed the ability to create dummy notes for non-zatoshi assets
PaulLaux Feb 11, 2026
6fbb8ce
PR471 Review: removed circle ci config file
PaulLaux Feb 11, 2026
ff934f9
PR471 Review: Pined unicode-indent to 1.0.22 to be compatible with ru…
PaulLaux Feb 11, 2026
d1fface
Merge branch 'zsa1' into zcash_pr471_review
PaulLaux Feb 11, 2026
2bfc249
PR471 Review: Pined unicode-indent to 1.0.22 to be compatible with ru…
PaulLaux Feb 11, 2026
fea169d
Address review comments from zcash PR #471 (#216)
PaulLaux Feb 11, 2026
3ec9f6f
Update the test vectors based on the changes made in `zcash-test-vect…
vivek-arte Feb 17, 2026
7ec34c9
Refactor issue/burn validation for Zebra asset state integration (#199)
dmidem Feb 18, 2026
c76a09b
Add a missing covarage for issuance and improve tests (#241)
PaulLaux Feb 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Run tests
run: cargo test --verbose
env:
# Disable LTO in CI to avoid very slow/hanging release test builds on macOS (rustc/LLVM).
CARGO_PROFILE_RELEASE_LTO: "off"
run: cargo test --verbose --release
- name: Verify working directory is clean
run: git diff --exit-code

Expand All @@ -28,7 +31,7 @@ jobs:
id: toolchain
- run: rustup override set ${{steps.toolchain.outputs.name}}
- if: matrix.os == 'ubuntu-latest'
run: sudo apt-get -y install libfontconfig1-dev
run: sudo apt-get update && sudo apt-get -y install libfontconfig1-dev
- name: Remove lockfile to build with latest dependencies
run: rm Cargo.lock
- name: Build crate
Expand Down Expand Up @@ -76,6 +79,11 @@ jobs:
- name: Add target
working-directory: ./ci-build
run: rustup target add ${{ matrix.target }}
- name: Pin deps to versions compatible with rustc 1.70
working-directory: ./ci-build
run: |
cargo update -p unicode-ident --precise 1.0.12
cargo update -p syn --precise 2.0.114
- name: Build no_std for target
working-directory: ./ci-build
run: cargo build --verbose --target ${{ matrix.target }}
Expand Down Expand Up @@ -122,7 +130,7 @@ jobs:
- uses: actions/checkout@v4
- run: cargo fetch
# Requires #![deny(rustdoc::broken_intra_doc_links)] in crates.
- run: sudo apt-get -y install libfontconfig1-dev
- run: sudo apt-get update && sudo apt-get -y install libfontconfig1-dev
- name: Check intra-doc links
run: cargo doc --all-features --document-private-items

Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/lints-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ jobs:
- name: Add target
working-directory: ./ci-build
run: rustup target add ${{ matrix.target }}
- name: Pin deps to versions compatible with rustc 1.70
working-directory: ./ci-build
run: |
cargo update -p unicode-ident --precise 1.0.12
cargo update -p syn --precise 2.0.114
- name: Clippy no_std for target
working-directory: ./ci-build
run: cargo clippy --verbose --target ${{ matrix.target }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/target
**/*.rs.bk
.vscode
.idea
action-circuit-layout.png
53 changes: 30 additions & 23 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 9 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@ rustdoc-args = ["--cfg", "docsrs", "--html-in-header", "katex-header.html"]
[dependencies]
aes = "0.8"
bitvec = { version = "1", default-features = false }
blake2b_simd = { version = "1", default-features = false }
blake2b_simd = { version = "=1.0.1", default-features = false }
ff = { version = "0.13", default-features = false }
fpe = { version = "0.6", default-features = false, features = ["alloc"] }
group = "0.13"
hex = { version = "0.4", default-features = false, features = ["alloc"] }
secp256k1 = { version = "0.29", default-features = false, features = ["alloc", "rand"], optional = true }
lazy_static = "1"
memuse = { version = "0.2.2", default-features = false }
pasta_curves = "0.5"
Expand All @@ -49,7 +50,7 @@ zip32 = { version = "0.2.0", default-features = false }
visibility = "0.1.1"

# Circuit
halo2_gadgets = { version = "0.3", optional = true, default-features = false }
halo2_gadgets = { version = "0.4", optional = true, default-features = false }
halo2_proofs = { version = "0.3", optional = true, default-features = false, features = ["batch", "floor-planner-v1-legacy-pdqsort"] }

# Boilerplate
Expand All @@ -67,7 +68,7 @@ plotters = { version = "0.3.0", optional = true }

[dev-dependencies]
criterion = "0.4" # 0.5 depends on clap 4 which has MSRV 1.70
halo2_gadgets = { version = "0.3", features = ["test-dependencies"] }
halo2_gadgets = { version = "0.4", features = ["test-dependencies"] }
hex = "0.4"
proptest = ">=1.0.0, <1.7.0"
zcash_note_encryption = { version = "0.4", features = ["pre-zip-212"] }
Expand All @@ -89,6 +90,8 @@ unstable-frost = []
multicore = ["halo2_proofs?/multicore"]
dev-graph = ["halo2_proofs?/dev-graph", "image", "plotters"]
test-dependencies = ["proptest", "rand/std"]
zsa-issuance = ["dep:secp256k1"]
temporary-zebra = []

[[bench]]
name = "note_decryption"
Expand All @@ -109,5 +112,7 @@ debug = true
debug = true

[patch.crates-io]
halo2_gadgets = { git = "https://github.com/zcash/halo2", rev = "2308caf68c48c02468b66cfc452dad54e355e32f" }
sinsemilla = { git = "https://github.com/zcash/sinsemilla", rev = "aabb707e862bc3d7b803c77d14e5a771bcee3e8c" }
zcash_note_encryption = { git = "https://github.com/zcash/zcash_note_encryption", rev = "9f7e93d42cef839d02b9d75918117941d453f8cb" }
halo2_proofs = { git = "https://github.com/zcash/halo2", rev = "2308caf68c48c02468b66cfc452dad54e355e32f" }
zcash_spec = { git = "https://github.com/QED-it/zcash_spec", rev = "d5e84264d2ad0646b587a837f4e2424ca64d3a05" }
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# orchard [![Crates.io](https://img.shields.io/crates/v/orchard.svg)](https://crates.io/crates/orchard) #

Requires Rust 1.66+.
Requires Rust 1.70+.

## Documentation

Expand Down
61 changes: 43 additions & 18 deletions benches/circuit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,46 @@ use criterion::{BenchmarkId, Criterion};
use pprof::criterion::{Output, PProfProfiler};

use orchard::{
builder::{Builder, BundleType},
builder::Builder,
circuit::{ProvingKey, VerifyingKey},
flavor::{OrchardVanilla, OrchardZSA},
keys::{FullViewingKey, Scope, SpendingKey},
note::AssetBase,
value::NoteValue,
Anchor, Bundle,
};
use rand::rngs::OsRng;

fn criterion_benchmark(c: &mut Criterion) {
mod utils;

use utils::OrchardFlavorBench;

fn criterion_benchmark<FL: OrchardFlavorBench>(c: &mut Criterion) {
let rng = OsRng;

let sk = SpendingKey::from_bytes([7; 32]).unwrap();
let recipient = FullViewingKey::from(&sk).address_at(0u32, Scope::External);

let vk = VerifyingKey::build();
let pk = ProvingKey::build();
let vk = VerifyingKey::build::<FL>();
let pk = ProvingKey::build::<FL>();

let create_bundle = |num_recipients| {
let mut builder = Builder::new(BundleType::DEFAULT, Anchor::from_bytes([0; 32]).unwrap());
let mut builder = Builder::new(
FL::DEFAULT_BUNDLE_TYPE,
Anchor::from_bytes([0; 32]).unwrap(),
);
for _ in 0..num_recipients {
builder
.add_output(None, recipient, NoteValue::from_raw(10), [0; 512])
.add_output(
None,
recipient,
NoteValue::from_raw(10),
AssetBase::zatoshi(),
[0; 512],
)
.unwrap();
}
let bundle: Bundle<_, i64> = builder.build(rng).unwrap().unwrap().0;
let bundle: Bundle<_, i64, FL> = builder.build(rng).unwrap().unwrap().0;

let instances: Vec<_> = bundle
.actions()
Expand All @@ -45,23 +60,23 @@ fn criterion_benchmark(c: &mut Criterion) {
let recipients_range = 1..=4;

{
let mut group = c.benchmark_group("proving");
let mut group = FL::benchmark_group(c, "proving");
group.sample_size(10);
for num_recipients in recipients_range.clone() {
let (bundle, instances) = create_bundle(num_recipients);
group.bench_function(BenchmarkId::new("bundle", num_recipients), |b| {
b.iter(|| {
bundle
.authorization()
.create_proof(&pk, &instances, rng)
.create_proof::<FL>(&pk, &instances, rng)
.unwrap()
});
});
}
}

{
let mut group = c.benchmark_group("verifying");
let mut group = FL::benchmark_group(c, "verifying");
for num_recipients in recipients_range {
let (bundle, instances) = create_bundle(num_recipients);
let bundle = bundle
Expand All @@ -78,15 +93,25 @@ fn criterion_benchmark(c: &mut Criterion) {
}

#[cfg(unix)]
criterion_group! {
name = benches;
config = Criterion::default().with_profiler(PProfProfiler::new(100, Output::Flamegraph(None)));
targets = criterion_benchmark
fn create_config() -> Criterion {
Criterion::default().with_profiler(PProfProfiler::new(100, Output::Flamegraph(None)))
}

#[cfg(windows)]
fn create_config() -> Criterion {
Criterion::default()
}

criterion_group! {
name = benches;
config = Criterion::default();
targets = criterion_benchmark
name = benches_vanilla;
config = create_config();
targets = criterion_benchmark::<OrchardVanilla>
}
criterion_main!(benches);

criterion_group! {
name = benches_zsa;
config = create_config();
targets = criterion_benchmark::<OrchardZSA>
}

criterion_main!(benches_vanilla, benches_zsa);
Loading
Loading