Skip to content

Commit

Permalink
chore: remove dev-deploy and refactor deploy.rs (#1338)
Browse files Browse the repository at this point in the history
* refactor sc deployer code for reuse, fix errs in logic for deploying mock and non-mock

* remove unnecessary generic type hint

* move deployer.rs to utils/ to avoid circular dep

* remove dev-deploy

* try not to override since we use nix in ci

* another attempt to pacify nix

* use global env var for srs size in ci

* try expanding out

* update ark-srs to 0.3.0

* update ark-srs to 0.3.1

* update demo-native ci
  • Loading branch information
alxiong authored Apr 19, 2024
1 parent d09dd6c commit 935e80a
Show file tree
Hide file tree
Showing 18 changed files with 428 additions and 410 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/contracts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,9 @@ jobs:
if: ${{ github.event_name == 'pull_request' }}
run: |
export FOUNDRY_PROFILE=quick
export AZTEC_SRS_PATH="$PWD/data/aztec20/kzg10-aztec20-srs-65544.bin"
./scripts/download_srs_aztec.sh
nix develop --accept-flake-config -c forge test -vvv
- name: Run tests (full version for main)
if: ${{ github.event_name != 'pull_request' }}
run: |
export AZTEC_SRS_PATH="$PWD/data/aztec20/kzg10-aztec20-srs-65544.bin"
./scripts/download_srs_aztec.sh
nix develop --accept-flake-config -c forge test -vvv
2 changes: 0 additions & 2 deletions .github/workflows/test-demo-native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,5 @@ jobs:
- name: Test Demo
run: |
export PATH="$PWD/target/release:$PATH"
export AZTEC_SRS_PATH="$PWD/data/aztec20/kzg10-aztec20-srs-65544.bin"
./scripts/download_srs_aztec.sh
scripts/demo-native --tui=false &
timeout -v 600 scripts/smoke-test-demo
2 changes: 0 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ jobs:
run: |
export RUSTFLAGS="$RUSTFLAGS --cfg hotshot_example"
export PATH="$PWD/target/release:$PATH"
export AZTEC_SRS_PATH="$PWD/data/aztec20/kzg10-aztec20-srs-65544.bin"
./scripts/download_srs_aztec.sh
cargo build --locked --bin diff-test --release
cargo test --locked --release --workspace --all-features --no-run
cargo test --locked --release --workspace --all-features --verbose -- --test-threads 1 --nocapture
Expand Down
85 changes: 80 additions & 5 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ ark-ed-on-bn254 = "0.4"
ark-ff = "0.4"
ark-poly = "0.4"
ark-serialize = "0.4"
ark-srs = "0.2.0"
ark-srs = "0.3.1"
async-compatibility-layer = { git = "https://github.com/EspressoSystems/async-compatibility-layer", tag = "1.4.1", features = [
"logging-utils",
] }
Expand Down
33 changes: 0 additions & 33 deletions contracts/test/LightClientTest.s.sol

This file was deleted.

2 changes: 0 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,6 @@
# with rustup installations.
export CARGO_HOME=$HOME/.cargo-nix
export PATH="$PWD/$CARGO_TARGET_DIR/release:$PATH"
export AZTEC_SRS_PATH="$PWD/data/aztec20/kzg10-aztec20-srs-1048584.bin"
./scripts/download_srs_aztec.sh
'' + self.checks.${system}.pre-commit-check.shellHook;
RUST_SRC_PATH = "${stableToolchain}/lib/rustlib/src/rust/library";
FOUNDRY_SOLC = "${solc}/bin/solc";
Expand Down
2 changes: 0 additions & 2 deletions hotshot-state-prover/src/bin/state-prover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@ struct Args {
pub stake_table_capacity: usize,
}

//

#[derive(Clone, Debug, Snafu)]
pub struct ParseDurationError {
reason: String,
Expand Down
14 changes: 7 additions & 7 deletions hotshot-state-prover/src/circuit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ mod tests {
.map(|b| if b { F::from(1u64) } else { F::from(0u64) })
.collect::<Vec<_>>();
// good path
let (circuit, public_inputs) = build::<_, _, _, _, _>(
let (circuit, public_inputs) = build(
&entries,
&bit_vec,
&bit_masked_sigs,
Expand All @@ -461,7 +461,7 @@ mod tests {
.check_circuit_satisfiability(public_inputs.as_ref())
.is_ok());

let (circuit, public_inputs) = build::<_, _, _, _, _>(
let (circuit, public_inputs) = build(
&entries,
&bit_vec,
&bit_masked_sigs,
Expand All @@ -476,7 +476,7 @@ mod tests {

// bad path: feeding non-bit vector
let bit_vec = [F::from(2u64); 10];
let (circuit, public_inputs) = build::<_, _, _, _, _>(
let (circuit, public_inputs) = build(
&entries,
&bit_vec,
&bit_masked_sigs,
Expand Down Expand Up @@ -510,7 +510,7 @@ mod tests {
.into_iter()
.map(|b| if b { F::from(1u64) } else { F::from(0u64) })
.collect::<Vec<_>>();
let (bad_circuit, public_inputs) = build::<_, _, _, _, _>(
let (bad_circuit, public_inputs) = build(
&entries,
&bad_bit_vec,
&bad_bit_masked_sigs,
Expand All @@ -534,7 +534,7 @@ mod tests {
})
.collect::<Result<Vec<_>, PrimitivesError>>()
.unwrap();
let (bad_circuit, public_inputs) = build::<_, _, _, _, _>(
let (bad_circuit, public_inputs) = build(
&entries,
&bit_vec,
&sig_for_bad_state,
Expand All @@ -559,7 +559,7 @@ mod tests {
})
.collect::<Result<Vec<_>, PrimitivesError>>()
.unwrap();
let (bad_circuit, public_inputs) = build::<_, _, _, _, _>(
let (bad_circuit, public_inputs) = build(
&entries,
&bit_vec,
&wrong_sigs,
Expand All @@ -573,7 +573,7 @@ mod tests {
.is_err());

// bad path: overflowing stake table size
assert!(build::<_, _, _, _, _>(
assert!(build(
&entries,
&bit_vec,
&bit_masked_sigs,
Expand Down
Loading

0 comments on commit 935e80a

Please sign in to comment.