misc renames

This commit is contained in:
Dmitriy Ryajov 2024-02-12 13:19:32 -06:00 committed by Eric
parent e21da286d9
commit 0afc7b2462
No known key found for this signature in database
6 changed files with 9 additions and 13 deletions

View File

@ -91,7 +91,7 @@ proc getSample*[T, H](
proc getProofInput*[T, H](
self: DataSampler[T, H],
entropy: ProofChallenge,
nSamples: Natural): Future[?!ProofInput[H]] {.async.} =
nSamples: Natural): Future[?!ProofInputs[H]] {.async.} =
## Generate proofs as input to the proving circuit.
##
@ -124,7 +124,7 @@ proc getProofInput*[T, H](
(await self.getSample(cellIdx, slotTreeCid, slotRoot)).valueOr:
return failure("Failed to get sample")
success ProofInput[H](
success ProofInputs[H](
entropy: entropy,
datasetRoot: datasetRoot,
slotProof: slotProof.path,

View File

@ -17,7 +17,7 @@ type
datasetRoot*: H
entropy*: H
ProofInput*[H] = object
ProofInputs*[H] = object
entropy*: H
datasetRoot*: H
slotIndex*: Natural

View File

@ -12,10 +12,6 @@ import pkg/questionable/results
import pkg/libp2p/multihash
import pkg/stew/byteutils
import pkg/constantine/math/arithmetic
import pkg/constantine/math/io/io_bigints
import pkg/constantine/math/io/io_fields
import ../merkletree
func spongeDigest*(

View File

@ -31,7 +31,7 @@ suite "Test Circom Compat Backend - control inputs":
var
circom: CircomCompat
verifyingKeyPtr: ptr CircomKey
proofInput: ProofInput[Poseidon2Hash]
proofInput: ProofInputs[Poseidon2Hash]
publicInputs: CircomInputs
setup:
@ -47,7 +47,7 @@ suite "Test Circom Compat Backend - control inputs":
verifyingKeyPtr = circom.getVerifyingKey().tryGet
teardown:
publicInputs.releaseNimInputs() # this is allocated by nim
publicInputs.releaseCircomInputs() # this is allocated by nim
verifyingKeyPtr.addr.releaseKey() # this comes from the rust FFI
circom.release() # this comes from the rust FFI
@ -85,7 +85,7 @@ suite "Test Circom Compat Backend":
verifiable: Manifest
circom: CircomCompat
verifyingKeyPtr: ptr CircomKey
proofInput: ProofInput[Poseidon2Hash]
proofInput: ProofInputs[Poseidon2Hash]
publicInputs: CircomInputs
challenge: array[32, byte]
builder: Poseidon2Builder
@ -118,7 +118,7 @@ suite "Test Circom Compat Backend":
publicInputs = proofInput.toPublicInputs.toCircomInputs
teardown:
publicInputs.releaseNimInputs() # this is allocated by nim
publicInputs.releaseCircomInputs() # this is allocated by nim
verifyingKeyPtr.addr.releaseKey() # this comes from the rust FFI
circom.release() # this comes from the rust FFI

View File

@ -31,7 +31,7 @@ suite "Test Sampler - control samples":
var
inputData: string
inputJson: JsonNode
proofInput: ProofInput[Poseidon2Hash]
proofInput: ProofInputs[Poseidon2Hash]
setup:
inputData = readFile("tests/circuits/fixtures/input.json")

View File

@ -34,7 +34,7 @@ asyncchecksuite "Test proof sampler utils":
var
inputData: string
inputJson: JsonNode
proofInput: ProofInput[Poseidon2Hash]
proofInput: ProofInputs[Poseidon2Hash]
setup:
inputData = readFile("tests/circuits/fixtures/input.json")