Skip to content

Commit 1971fe4

Browse files
authored
feat: Use JSON-RPC for core <> prover interaction (#3626)
## What ❔ Implement communication between proof data handler and gateway through web sockets. The workflow: * Long-living connection is established * Data handler subscribes for proofs from gateway * Data handler sends proof generation data to gateway * On receiving proofs through subscription, data handler saves it's data and sends a notification to gateway, that proof was successfully received(to not lose the data in between) ## Why ❔ For the sake of prover cluster, where we will have a single prover subsystem with multiple sequencers. ## Is this a breaking change? - [x] Yes - [ ] No ## Operational changes Config values: Prover gateway: ws_port Proof data handler: api_url, batch_readiness_check_interval_in_secs, retry_connection_interval_in_secs ## Checklist <!-- Check your PR fulfills the following items. --> <!-- For draft PRs check the boxes as you complete them. --> - [ ] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [ ] Tests for the changes have been added / updated. - [ ] Documentation comments have been added / updated. - [ ] Code has been formatted via `zkstack dev fmt` and `zkstack dev lint`.
1 parent 92f554f commit 1971fe4

File tree

1 file changed

+7
-0
lines changed
  • zkstack_cli/crates/zkstack/src/commands/chain/init

1 file changed

+7
-0
lines changed

zkstack_cli/crates/zkstack/src/commands/chain/init/configs.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,13 @@ pub async fn init_configs(
6868
general_config.insert("prover_gateway.api_url", format!("http://127.0.0.1:{port}"))?;
6969
}
7070

71+
let prover_gateway_port = general_config
72+
.base()
73+
.get_opt::<u16>("prover_gateway.ws_port")?;
74+
if let Some(port) = prover_gateway_port {
75+
general_config.insert("data_handler.api_url", format!("ws://127.0.0.1:{port}"))?;
76+
}
77+
7178
let consensus_keys = generate_consensus_keys();
7279
set_genesis_specs(&mut general_config, chain_config, &consensus_keys)?;
7380

0 commit comments

Comments
 (0)