From 6f0032ef91601453b3083a7bfc909186559b3292 Mon Sep 17 00:00:00 2001 From: Jaremy Creechley Date: Mon, 20 May 2024 22:45:01 +0300 Subject: [PATCH] fix codex --- codex/codex.nim | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/codex/codex.nim b/codex/codex.nim index ddc934af..f868dcba 100644 --- a/codex/codex.nim +++ b/codex/codex.nim @@ -264,11 +264,14 @@ proc new*( interval = config.blockMaintenanceInterval, numberOfBlocksPerInterval = config.blockMaintenanceNumberOfBlocks) + taskpool = Taskpool.new(num_threads = countProcessors()) + peerStore = PeerCtxStore.new() pendingBlocks = PendingBlocksManager.new() blockDiscovery = DiscoveryEngine.new(repoStore, peerStore, network, discovery, pendingBlocks) engine = BlockExcEngine.new(repoStore, wallet, network, blockDiscovery, peerStore, pendingBlocks) store = NetworkStore.new(engine, repoStore) + prover = if config.prover: if not fileAccessible($config.circomR1cs, {AccessFlags.Read}) and endsWith($config.circomR1cs, ".r1cs"): @@ -294,13 +297,11 @@ proc new*( let params = CircomCompatParams.init($config.circomR1cs, $config.circomWasm, zkey) some Prover.new( - store, AsyncCircomCompat.init(params), + store, AsyncCircomCompat.init(params, taskpool), config.numProofSamples) else: none Prover - taskpool = Taskpool.new(num_threads = countProcessors()) - codexNode = CodexNodeRef.new( switch = switch, networkStore = store,