nim-dagger/codex/slots/types.nim
Giuliano Mega fbce240e3d
Fixes prover behavior with singleton proof trees (#859)
* add logs and test

* add Merkle proof checks

* factor out Circom input normalization, fix proof input serialization

* add test and update existing ones

* update circuit assets

* add back trace message

* switch contracts to fix branch

* update codex-contracts-eth to latest

* do not expose prove with prenormalized inputs
2024-07-18 13:25:06 +00:00

29 lines
885 B
Nim

## Nim-Codex
## Copyright (c) 2024 Status Research & Development GmbH
## Licensed under either of
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
## * MIT license ([LICENSE-MIT](LICENSE-MIT))
## at your option.
## This file may not be copied, modified, or distributed except according to
## those terms.
type
Sample*[H] = object
cellData*: seq[H]
merklePaths*: seq[H]
PublicInputs*[H] = object
slotIndex*: int
datasetRoot*: H
entropy*: H
ProofInputs*[H] = object
entropy*: H
datasetRoot*: H
slotIndex*: Natural
slotRoot*: H
nCellsPerSlot*: Natural
nSlotsPerDataSet*: Natural
slotProof*: seq[H] # inclusion proof that shows that the slot root (leaf) is part of the dataset (root)
samples*: seq[Sample[H]] # inclusion proofs which show that the selected cells (leafs) are part of the slot (roots)