Skip to content

Commit

Permalink
fix: ci tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rpalakkal committed Apr 16, 2024
1 parent 39ed32f commit dae8623
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 24 deletions.
23 changes: 14 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ jobs:
runs-on: ubuntu-latest-64core-256ram
steps:
- uses: actions/checkout@v3
- name: Configure Git for submodules
run: |
git config --global url."https://github.com/".insteadOf "[email protected]:"
- name: Build rust client
run: |
cargo build --verbose
Expand All @@ -19,9 +22,11 @@ jobs:
mkdir params
for k in {5..21}
do
wget "https://axiom-crypto.s3.amazonaws.com/challenge_0078/kzg_bn254_${k}.srs"
wget "https://axiom-crypto.s3.amazonaws.com/challenge_0085/kzg_bn254_${k}.srs"
done
mv *.srs params/
mkdir circuit/params
cp params/*.srs circuit/params/
- name: Test rust client
run: |
export PROVIDER_URI=${{ secrets.PROVIDER_URI_SEPOLIA }}
Expand All @@ -30,11 +35,11 @@ jobs:
run: |
export PROVIDER_URI=${{ secrets.PROVIDER_URI_SEPOLIA }}
mkdir data
cargo run --example keccak -- --input sdk/data/keccak_input.json -k 15 -c sdk/data/keccak_config.json keygen
cargo run --example keccak -- --input sdk/data/keccak_input.json -k 15 -c sdk/data/keccak_config.json run
cargo run --example rlc -- --input sdk/data/rlc_input.json -k 15 -c sdk/data/rlc_config.json keygen
cargo run --example rlc -- --input sdk/data/rlc_input.json -k 15 -c sdk/data/rlc_config.json run
cargo run --example account_age -- --input sdk/data/account_age_input.json -k 15 keygen
cargo run --example account_age -- --input sdk/data/account_age_input.json -k 15 run
cargo run --example quickstart -- --input sdk/data/quickstart_input.json -k 15 keygen
cargo run --example quickstart -- --input sdk/data/quickstart_input.json -k 15 run
cargo run --example keccak -- --input sdk/data/keccak_input.json --config sdk/data/keccak_config.json --aggregate --auto-config-aggregation keygen
cargo run --example keccak -- --input sdk/data/keccak_input.json --config sdk/data/keccak_config.json --aggregate run
cargo run --example rlc -- -c sdk/data/rlc_config.json keygen
cargo run --example rlc -- --input sdk/data/rlc_input.json run
cargo run --example account_age -- -k 15 keygen
cargo run --example account_age -- --input sdk/data/account_age_input.json run
cargo run --example quickstart -- -k 15 keygen
cargo run --example quickstart -- --input sdk/data/quickstart_input.json run
6 changes: 3 additions & 3 deletions circuit/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ license = "MIT"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
axiom-codec = { git = "ssh://git@github.com/axiom-crypto/axiom-eth-working.git", branch = "develop" }
axiom-query = { git = "ssh://git@github.com/axiom-crypto/axiom-eth-working.git", branch = "develop" }
axiom-components = { git = "ssh://git@github.com/axiom-crypto/axiom-eth-working.git", branch = "develop" }
axiom-codec = { git = "https://github.com/axiom-crypto/axiom-eth.git", branch = "develop" }
axiom-query = { git = "https://github.com/axiom-crypto/axiom-eth.git", branch = "develop" }
axiom-components = { git = "https://github.com/axiom-crypto/axiom-eth.git", branch = "develop" }
ethers = { version = "2.0", features = ["optimism"] }
anyhow = "1.0.75"
tokio = "1.34.0"
Expand Down
12 changes: 6 additions & 6 deletions sdk/data/keccak_config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"k": 15,
"k": 17,
"num_advice_per_phase": [
5,
0
Expand All @@ -11,12 +11,12 @@
],
"lookup_bits": 14,
"num_rlc_columns": 0,
"keccak_rows_per_round": 50,
"keccak_rows_per_round": 20,
"agg_params": {
"degree": 16,
"num_advice": 11,
"num_lookup_advice": 1,
"degree": 20,
"num_advice": 13,
"num_lookup_advice": 2,
"num_fixed": 1,
"lookup_bits": 15
"lookup_bits": 19
}
}
9 changes: 5 additions & 4 deletions sdk/examples/account_age.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use std::fmt::Debug;
use axiom_sdk::{
axiom::{AxiomAPI, AxiomComputeFn, AxiomComputeInput, AxiomResult},
axiom_compute_prover_server,
cmd::run_cli,
ethers::types::Address,
halo2_base::{
gates::{GateInstructions, RangeInstructions},
Expand Down Expand Up @@ -48,8 +49,8 @@ impl AxiomComputeFn for AccountAgeInput {
}
}

axiom_compute_prover_server!(AccountAgeInput);
// axiom_compute_prover_server!(AccountAgeInput);

// fn main() {
// run_cli::<AccountAgeInput>();
// }
fn main() {
run_cli::<AccountAgeInput>();
}
16 changes: 15 additions & 1 deletion sdk/src/cmd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,17 @@ pub fn run_cli_on_scaffold<
if cli.degree.is_none() && cli.config.is_none() {
panic!("The `degree` argument is required for the selected command.");
}
if cli.degree.is_some() && cli.config.is_some() {
warn!("The `degree` argument is ignored when a `config` file is provided.");
}
}
_ => {
if cli.degree.is_some() {
warn!("The `degree` argument is not used for the selected command.");
}
if cli.config.is_some() {
warn!("The `config` argument is not used for the selected command.");
}
}
}
let input: Option<A::InputValue> = cli.input_path.map(|input_path| {
Expand Down Expand Up @@ -127,8 +133,16 @@ pub fn run_cli_on_scaffold<
AxiomCircuitParams::Base(base_params)
}
} else {
let degree = if cli.command == SnarkCmd::Run {
// The k will be read from the pinning file instead
12
} else {
cli.degree
.expect("The `degree` argument is required for the selected command.")
as usize
};
AxiomCircuitParams::Base(BaseCircuitParams {
k: cli.degree.unwrap() as usize,
k: degree,
num_advice_per_phase: vec![4],
num_fixed: 1,
num_lookup_advice_per_phase: vec![1],
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/cmd/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pub use clap::Parser;
use clap::Subcommand;
use serde::{Deserialize, Serialize};

#[derive(Clone, Copy, Debug, Subcommand)]
#[derive(Clone, Copy, Debug, Subcommand, PartialEq)]
/// Circuit CLI commands
pub enum SnarkCmd {
/// Run the mock prover
Expand Down

0 comments on commit dae8623

Please sign in to comment.