package octez-protocol-019-PtParisB-libs
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=ddfb5076eeb0b32ac21c1eed44e8fc86a6743ef18ab23fff02d36e365bb73d61
sha512=d22a827df5146e0aa274df48bc2150b098177ff7e5eab52c6109e867eb0a1f0ec63e6bfbb0e3645a6c2112de3877c91a17df32ccbff301891ce4ba630c997a65
doc/octez-protocol-019-PtParisB-libs.test-helpers/Tezos_019_PtParisB_test_helpers/Dummy_zk_rollup/index.html
Module Tezos_019_PtParisB_test_helpers.Dummy_zk_rollup
Source
Dummy ZK Rollup for testing the ZKRU integration in the protocol. The library Plompiler is used to build the circuits (in a module V as verifier) and the corresponding functions to produce the inputs for the circuits (in a module P as prover).
The state of this rollup is a boolean value, which will be represented with a scalar value of zero
for false
and one
for true
.
This RU has only one operation, with op_code
0. In addition to the common header (see Zk_rollup_operation_repr
), this operation has as payload one scalar representing a boolean value.
The transition function f
for this rollup is:
f : operation -> state -> state
f (Op b) s = if b = s then not s else s
That is, the state bool is flipped only if the operation's payload is equal to the current state.
The operation can be used publicly or in a private batch. The circuits that describe the RU are:
"op"
: for a single public operation."batch-"[N]
: for a batch ofN
private operations.N
is determined by thebatch_size
parameter to theOperator
functor."fee"
: the trivial fees circuit, since this RU has no concept of fees.
NB: the "op" circuit does not add any constraints over the operation's exit_validity
other than it being in {0, 1}
. This means that the dummy rollup can be used to test deposits/withdrawals, but the rollup will not perform any monetary bookkeeping.
Helper types and modules
Empty types to represent bounds
Modules to manipulate bounded integers, both as OCaml values and in circuit representation.
Types used for the Dummy Rollup circuits. This module is split into:
Plompiler circuits for the dummy rollup