mirror of
https://github.com/logos-storage/logos-storage-nim.git
synced 2026-01-17 04:43:08 +00:00
wip wire in prover and circom config
This commit is contained in:
parent
bf8e27317a
commit
29d4ff5556
@ -39,6 +39,7 @@ import ./contracts/clock
|
||||
import ./contracts/deployment
|
||||
import ./utils/addrutils
|
||||
import ./namespaces
|
||||
import ./codextypes
|
||||
import ./logutils
|
||||
|
||||
logScope:
|
||||
@ -131,6 +132,7 @@ proc bootstrapInteractions(
|
||||
let sales = Sales.new(market, clock, repo, proofFailures)
|
||||
client = some ClientInteractions.new(clock, purchasing)
|
||||
host = some HostInteractions.new(clock, sales)
|
||||
|
||||
if config.validator:
|
||||
let validation = Validation.new(clock, market, config.validatorMaxSlots)
|
||||
validator = some ValidatorInteractions.new(clock, validation)
|
||||
@ -264,12 +266,21 @@ proc new*(
|
||||
store = NetworkStore.new(engine, repoStore)
|
||||
erasure = Erasure.new(store, leoEncoderProvider, leoDecoderProvider)
|
||||
prover = if config.persistence:
|
||||
circomBackend = CircomCompat.init(config.circomR1cs, config.circomWasm, config.circomZkey)
|
||||
some Prover.new(store, circomBackend)
|
||||
let
|
||||
zkey = if config.circomNoZkey: "" else: config.circomZkey
|
||||
some Prover.new(
|
||||
store,
|
||||
CircomCompat.init(config.circomR1cs, config.circomWasm, zkey))
|
||||
else:
|
||||
none Prover
|
||||
|
||||
codexNode = CodexNodeRef.new(switch, store, engine, erasure, prover, discovery)
|
||||
codexNode = CodexNodeRef.new(
|
||||
switch = switch,
|
||||
store = store,
|
||||
engine = engine,
|
||||
erasure = erasure,
|
||||
prover = prover,
|
||||
discovery = discovery)
|
||||
|
||||
restServer = RestServerRef.new(
|
||||
codexNode.initRestApi(config, repoStore),
|
||||
|
||||
@ -33,14 +33,15 @@ import pkg/ethers
|
||||
import pkg/questionable
|
||||
import pkg/questionable/results
|
||||
|
||||
import ./codextypes
|
||||
import ./discovery
|
||||
import ./logutils
|
||||
import ./stores
|
||||
import ./units
|
||||
import ./utils
|
||||
|
||||
export units
|
||||
export net
|
||||
export units, net, codextypes
|
||||
|
||||
export
|
||||
DefaultQuotaBytes,
|
||||
DefaultBlockTtl,
|
||||
@ -229,21 +230,33 @@ type
|
||||
circomR1cs* {.
|
||||
desc: "The r1cs file for the storage circuit"
|
||||
defaultValue: defaultDataDir() / "circuits" / "proof_main.r1cs"
|
||||
name: "circuit-r1cs"
|
||||
name: "circom-r1cs"
|
||||
.}: string
|
||||
|
||||
circomWasm* {.
|
||||
desc: "The wasm file for the storage circuit"
|
||||
defaultValue: defaultDataDir() / "circuits" / "proof_main.wasm"
|
||||
name: "circuit-wasm"
|
||||
name: "circom-wasm"
|
||||
.}: string
|
||||
|
||||
circomZkey* {.
|
||||
desc: "The zkey file for the storage circuit"
|
||||
defaultValue: defaultDataDir() / "circuits" / "proof_main.zkey"
|
||||
name: "circuit-zkey"
|
||||
name: "circom-zkey"
|
||||
.}: string
|
||||
|
||||
circomNoZkey* {.
|
||||
desc: "Ignore the zkey file - use only for testing!"
|
||||
defaultValue: false
|
||||
name: "circom-no-zkey"
|
||||
.}: bool
|
||||
|
||||
numProofSamples* {.
|
||||
desc: "Number of samples to prove"
|
||||
defaultValue: DefaultSamplesNum
|
||||
defaultValueDesc: $DefaultSamplesNum
|
||||
name: "proof-samples" }: int
|
||||
|
||||
ethProvider* {.
|
||||
desc: "The URL of the JSON-RPC API of the Ethereum node"
|
||||
defaultValue: "ws://localhost:8545"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user