Skip to content

Commit c36d69d

Browse files
authored
Merge pull request #32 from eigerco/chore/vendor-deps
chore: use forked crates instead of local patching
2 parents 3011e45 + 5160681 commit c36d69d

File tree

18 files changed

+17
-862
lines changed

18 files changed

+17
-862
lines changed

.github/actions/setup-patched-deps/action.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

.github/actions/setup-rust-build/action.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Setup Rust Build
2-
description: Install protoc, setup patched deps, install Rust toolchain, and configure cache
2+
description: Install protoc, install Rust toolchain, and configure cache
33

44
inputs:
55
toolchain:
@@ -18,8 +18,6 @@ runs:
1818
steps:
1919
- name: Install protoc
2020
uses: ./.github/actions/setup-protoc
21-
- name: Setup patched dependencies
22-
uses: ./.github/actions/setup-patched-deps
2321
- name: Install toolchain
2422
uses: dtolnay/rust-toolchain@f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561 # branch=master
2523
id: toolchain

.github/workflows/ci.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,6 @@ jobs:
105105
steps:
106106
- name: Checkout
107107
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # tag: v6.0.1
108-
- name: Setup patched dependencies
109-
uses: ./.github/actions/setup-patched-deps
110108
- name: Check licenses
111109
uses: EmbarkStudios/cargo-deny-action@76cd80eb775d7bbbd2d80292136d74d39e1b4918 # tag: v2.0.14
112110
with:

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ Thumbs.db
1414
# Nix
1515
result
1616
result-*
17-
.patched-sapling-crypto
18-
.patched-orchard
19-
.patched-halo2-gadgets
2017

2118
# Environment files
2219
.env

Cargo.lock

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ zeroize = "1.8"
9494
zip32 = "0.2.1"
9595

9696
[patch.crates-io]
97-
halo2_gadgets = { path = "./.patched-halo2-gadgets" }
98-
orchard = { path = "./.patched-orchard" }
99-
sapling-crypto = { path = "./.patched-sapling-crypto" }
97+
halo2_gadgets = { git = "https://github.com/eigerco/halo2" }
98+
orchard = { git = "https://github.com/eigerco/orchard" }
99+
sapling-crypto = { git = "https://github.com/eigerco/sapling-crypto" }
100100

101101
[workspace.lints.rust]
102102
missing_docs = { level = "warn", priority = -1 }

docs/src/getting-started/index.md

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This section covers setting up the repository, building `zair`, and running a qu
66

77
### With Nix (recommended)
88

9-
The repo includes a Nix flake that provides all dependencies (Rust, `protoc`, patched crates):
9+
The repo includes a Nix flake that provides all dependencies (Rust, `protoc`):
1010

1111
```bash
1212
nix develop
@@ -20,25 +20,7 @@ cargo build --release
2020
- Rust 1.91+ (2024 edition)
2121
- Protobuf (`protoc`) for lightwalletd gRPC bindings
2222

23-
#### Patching dependencies
24-
25-
The airdrop circuits require patched versions of upstream Zcash crates. After cloning, run:
26-
27-
```bash
28-
git clone --branch v0.11.0 --single-branch https://github.com/zcash/orchard.git .patched-orchard
29-
git -C .patched-orchard apply "../nix/airdrop-orchard-nullifier.patch"
30-
31-
git clone --branch v0.5.0 --single-branch https://github.com/zcash/sapling-crypto.git .patched-sapling-crypto
32-
git -C .patched-sapling-crypto apply "../nix/airdrop-sapling-nullifier.patch"
33-
34-
curl -sL https://static.crates.io/crates/halo2_gadgets/halo2_gadgets-0.3.1.crate | tar xz
35-
mv halo2_gadgets-0.3.1 .patched-halo2-gadgets
36-
patch -p1 -d .patched-halo2-gadgets < nix/airdrop-halo2-gadgets-sha256.patch
37-
```
38-
39-
The patches mainly expose private internals needed by the airdrop circuits.
40-
41-
Then build:
23+
Build with:
4224

4325
```bash
4426
cargo build --release

flake.lock

Lines changed: 0 additions & 54 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,6 @@
77
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
88
rust-overlay.url = "github:oxalica/rust-overlay";
99
treefmt-nix.url = "github:numtide/treefmt-nix";
10-
11-
# Pin to specific versions matching Cargo.toml
12-
sapling-crypto = {
13-
url = "github:zcash/sapling-crypto/v0.5.0";
14-
flake = false;
15-
};
16-
17-
orchard = {
18-
url = "github:zcash/orchard/v0.11.0";
19-
flake = false;
20-
};
21-
22-
halo2 = {
23-
# Commit used by crates.io `halo2_gadgets` 0.3.1 (`path_in_vcs = halo2_gadgets`).
24-
url = "github:zcash/halo2/3bb6f5ccbcdc3d285babcea09925a741a4452281";
25-
flake = false;
26-
};
2710
};
2811

2912
outputs =
@@ -40,7 +23,6 @@
4023
];
4124

4225
imports = [
43-
./nix/pkgs
4426
./nix/lib.nix
4527
./nix/devshell.nix
4628
./nix/formatting.nix

0 commit comments

Comments
 (0)