Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing/Adding Prover to make it compatible with Go node #36

Merged
merged 25 commits into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,16 @@ beacon-api-client = { git = "https://github.com/ralexstokes/ethereum-consensus.g
ssz_rs = "0.9"

# crypto
group = "0.12"
group = "0.13"
num-bigint = { version = "0.4", features = ["rand"] }
pasta_curves = "0.4.1"
ff = "0.12"
pasta_curves = "0.5.1"
ff = "0.13"
sha2 = { version = "0.9", features = ["compress"] }
uint = "0.9.1"
ark-std = { version = "0.4.0", features = ["print-trace"] }

# misc
itertools = "0.11.0"
itertools = "0.12.0"
serde = { version = "1.0.130", features = ["derive"] }
serde_json = "1.0.78"
log = "0.4.14"
Expand Down
23 changes: 23 additions & 0 deletions contracts/snark-verifiers/committee_update_aggregated.sol

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lightclient-circuits/config/committee_update_18.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@
262133
]
]
}
}
31 changes: 31 additions & 0 deletions lightclient-circuits/config/committee_update_mainnet.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"params": {
"k": 18,
"num_advice_per_phase": [
12
],
"num_fixed": 1,
"num_lookup_advice_per_phase": [
1,
0,
0
],
"lookup_bits": 8,
"num_instance_columns": 1
},
"break_points": [
[
262134,
262132,
262134,
262132,
262133,
262132,
262132,
262133,
262132,
262134,
262133
]
]
}
22 changes: 11 additions & 11 deletions lightclient-circuits/config/committee_update_verifier_25.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"params": {
"degree": 25,
"num_advice": 1,
"num_lookup_advice": 1,
"num_fixed": 1,
"lookup_bits": 8
},
"break_points": [
[]
]
}
"params": {
"degree": 25,
"num_advice": 1,
"num_lookup_advice": 1,
"num_fixed": 1,
"lookup_bits": 8
},
"break_points": [
[]
]
}
12 changes: 12 additions & 0 deletions lightclient-circuits/config/committee_update_verifier_mainnet.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"params": {
"degree": 25,
"num_advice": 1,
"num_lookup_advice": 1,
"num_fixed": 1,
"lookup_bits": 8
},
"break_points": [
[]
]
}
25 changes: 25 additions & 0 deletions lightclient-circuits/config/sync_step_mainnet.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"params": {
"k": 22,
"num_advice_per_phase": [
6
],
"num_fixed": 1,
"num_lookup_advice_per_phase": [
1,
0,
0
],
"lookup_bits": 8,
"num_instance_columns": 1
},
"break_points": [
[
4194292,
4194294,
4194292,
4194293,
4194293
]
]
}
3 changes: 2 additions & 1 deletion lightclient-circuits/src/util/circuit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,5 +294,6 @@ where
C: Circuit<Fr>,
P: AsRef<Path>,
{
read_pk::<C>(fname.as_ref(), c.params()).expect("proving key should exist")
read_pk::<C>(fname.as_ref(), c.params())
.expect(format!("proving key: {:?} should exist", fname.as_ref().to_str()).as_str())
}
13 changes: 6 additions & 7 deletions prover/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,13 @@ path = "src/main.rs"
# cli
clap = { version = "4.2", features = ["derive"] }
strum = { version = "=0.25", features = ["derive"] }
cli-batteries = "=0.4"
cli-batteries = "0.5"
eyre = "0.6"
anstyle = "=1.0.0"
axum = "0.6"
anstyle = "1.0.0"
axum = { version = "0.7", features = ["tracing", "tower-log"] }
tokio = { version = "1.32", features = ["macros"] }

jsonrpc-v2 = { version = "0.12", default-features = false, features = ["easy-errors", "macros", "bytes-v10"] }

http = "0.2"
jsonrpc-v2 = { version = "0.13", default-features = false, features = ["easy-errors", "macros", "bytes-v10", "hyper-integration"] }

# halo2
halo2curves.workspace = true
Expand Down Expand Up @@ -53,9 +51,10 @@ reqwest = "0.11.22"
beacon-api-client.workspace = true
ethereum-consensus-types.workspace = true
futures = "0.3.29"
ssz_rs.workspace = true

[build-dependencies]
cli-batteries = "=0.4"
cli-batteries = "=0.5"

[features]
default = ["halo2_solidity_verifier"]
Expand Down
1 change: 1 addition & 0 deletions prover/src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ pub enum OperationCmd {
}

#[derive(Clone, Debug, PartialEq, EnumString, Serialize, Deserialize)]
#[serde(rename_all = "lowercase")]
pub enum Spec {
#[strum(serialize = "minimal")]
Minimal,
Expand Down
2 changes: 1 addition & 1 deletion prover/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ async fn app(options: Cli) -> eyre::Result<()> {
args::Spec::Testnet => spec_app::<eth_types::Testnet>(op.proof, &options.args)
.await
.unwrap(),
args::Spec::Mainnet => spec_app::<eth_types::Testnet>(op.proof, &options.args)
args::Spec::Mainnet => spec_app::<eth_types::Mainnet>(op.proof, &options.args)
.await
.unwrap(),
},
Expand Down
Loading
Loading