Skip to content

Commit

Permalink
wip: remote batch prover
Browse files Browse the repository at this point in the history
  • Loading branch information
SantiagoPittella committed Feb 13, 2025
1 parent c65cee1 commit b72be50
Show file tree
Hide file tree
Showing 8 changed files with 200 additions and 32 deletions.
118 changes: 109 additions & 9 deletions Cargo.lock

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

9 changes: 5 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,19 @@ version = "0.8.0"
assert_matches = { version = "1.5" }
itertools = { version = "0.14" }
miden-air = { version = "0.12" }
miden-lib = { git = "https://github.com/0xPolygonMiden/miden-base", branch = "next" }
miden-lib = { git = "https://github.com/0xPolygonMiden/miden-base", branch = "santiagopittella-test-mutex" }
miden-node-block-producer = { path = "crates/block-producer", version = "0.8" }
miden-node-proto = { path = "crates/proto", version = "0.8" }
miden-node-rpc = { path = "crates/rpc", version = "0.8" }
miden-node-store = { path = "crates/store", version = "0.8" }
miden-node-test-macro = { path = "crates/test-macro" }
miden-node-utils = { path = "crates/utils", version = "0.8" }
miden-objects = { git = "https://github.com/0xPolygonMiden/miden-base", branch = "next" }
miden-objects = { git = "https://github.com/0xPolygonMiden/miden-base", branch = "santiagopittella-test-mutex" }
miden-processor = { version = "0.12" }
miden-stdlib = { version = "0.12", default-features = false }
miden-tx = { git = "https://github.com/0xPolygonMiden/miden-base", branch = "next" }
miden-tx-batch-prover = { git = "https://github.com/0xPolygonMiden/miden-base.git", branch = "next" }
miden-tx = { git = "https://github.com/0xPolygonMiden/miden-base", branch = "santiagopittella-test-mutex" }
miden-tx-batch-prover = { git = "https://github.com/0xPolygonMiden/miden-base.git", branch = "santiagopittella-test-mutex" }
miden-proving-service-client = { git = "https://github.com/0xPolygonMiden/miden-base.git", branch = "santiagopittella-test-mutex", features = ["batch-prover"]}
prost = { version = "0.13" }
rand = { version = "0.8" }
thiserror = { version = "2.0", default-features = false }
Expand Down
20 changes: 16 additions & 4 deletions bin/node/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ struct NormalizedRpcConfig {
struct NormalizedBlockProducerConfig {
endpoint: Url,
verify_tx_proofs: bool,
remote_batch_prover: Option<Url>,
}

impl Default for NormalizedRpcConfig {
Expand All @@ -44,9 +45,17 @@ impl Default for NormalizedRpcConfig {
impl Default for NormalizedBlockProducerConfig {
fn default() -> Self {
// Ensure we stay in sync with the original defaults.
let BlockProducerConfig { endpoint, store_url: _, verify_tx_proofs } =
BlockProducerConfig::default();
Self { endpoint, verify_tx_proofs }
let BlockProducerConfig {
endpoint,
store_url: _,
verify_tx_proofs,
remote_batch_prover,
} = BlockProducerConfig::default();
Self {
endpoint,
verify_tx_proofs,
remote_batch_prover,
}
}
}

Expand All @@ -58,6 +67,7 @@ impl NodeConfig {
endpoint: block_producer.endpoint,
store_url: store.endpoint.clone(),
verify_tx_proofs: block_producer.verify_tx_proofs,
remote_batch_prover: block_producer.remote_batch_prover,
};

let rpc = RpcConfig {
Expand Down Expand Up @@ -92,6 +102,7 @@ mod tests {
[block_producer]
endpoint = "http://127.0.0.1:8080"
verify_tx_proofs = true
remote_batch_prover = "http://127.0.0.1:8081"
[rpc]
endpoint = "http://127.0.0.1:8080"
Expand All @@ -111,7 +122,8 @@ mod tests {
NodeConfig {
block_producer: NormalizedBlockProducerConfig {
endpoint: Url::parse("http://127.0.0.1:8080").unwrap(),
verify_tx_proofs: true
verify_tx_proofs: true,
remote_batch_prover: Some(Url::parse("http://127.0.0.1:8081").unwrap()),
},
rpc: NormalizedRpcConfig {
endpoint: Url::parse("http://127.0.0.1:8080").unwrap(),
Expand Down
1 change: 1 addition & 0 deletions crates/block-producer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ miden-processor = { workspace = true }
miden-stdlib = { workspace = true }
miden-tx = { workspace = true }
miden-tx-batch-prover = { workspace = true }
miden-proving-service-client = { workspace = true, features = ["batch-prover"] }
rand = { version = "0.8" }
serde = { version = "1.0", features = ["derive"] }
thiserror = { workspace = true }
Expand Down
Loading

0 comments on commit b72be50

Please sign in to comment.