Crate dusk_cdf

Crate dusk_cdf 

Source
Expand description

§Dusk PLONK debugger

To run:

cargo run --bin pdb -- ./assets/test.cdf

§Example

First we build the binaries

cargo build --release

Then we generate a CDF file from the existing circuit

CDF_OUTPUT=target/naive.cdf cargo run --release --manifest-path example-plonk-circuit/Cargo.toml

And finally we run the debugger application with the generated file

cargo run --release --bin dusk-pdb -- target/naive.cdf

The binary format for CDF is a dense linear encoding.

A circuit is a compositions of items that are either Witness or Constraint.

A Witness is a constraint system allocated value that is represented by its identifier and Scalar value.

A Constraint is a Polynomial expression represented as a gate of the circuit that will allow computation in the constraint system. It will evaluate to a bool that is the representation of the result of the gate.

A circuit description format file will contain a preamble with all its witnesses. Provided this, its witness index will reflect its line on the file, facilitating indexing.

Structs§

Breakpoint
Breakpoint definition
CircuitDescription
A circuit description file
Config
Configuration parameters for encoding and decoding
Constraint
Decoded constraint from a CDF file
DecoderContext
Decoding context of a CDF file
EncodableConstraint
Constraint representation that can be encoded into a CDF file
EncodableSource
Source file tripler that can be encoded into a CDF file
EncodableWitness
Witness that can be encoded into a CDF file
Encoder
An encoder for CDF format
EncoderContextFileProvider
Default encoding provider with a filesystem backend
Polynomial
PLONK polynomial expression representation with its selectors and witnesses.
Preamble
Metadata information of the CDF file
Scalar
Scalar field representation with up to 256 bits.
Selectors
Polynomial selectors
WiredWitnesses
Polynomial witnesses allocated to a constraint system
Witness
Witness decoded from a CDF file
ZkDebugger
ZKP Debugger with CDF backend

Enums§

State
State describind a mutation of the zk debugger

Traits§

BaseConfig
Base configuration schema
DecodableElement
Element that can be decoded from a CDF file
Element
Describe a CDF element
EncodableElement
Element that can be encoded into a CDF file
EncoderContextProvider
Encoding provider that will convert paths into file contents