package octez-protocol-017-PtNairob-libs
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=55ea1fb8bb3273a7fc270ca8f650d45c56449665619482aad9bc12f3ea736b7e
sha512=fec850fc2d17d7490bbabd5147d62aad13b3aaed8774270f8a38ab419670ed03e0fd30cf8642a97984eca5c2446726fe590ad99c015f7ec50919dc7652f25053
doc/octez-protocol-017-PtNairob-libs.test-helpers/Tezos_017_PtNairob_test_helpers/Dummy_zk_rollup/index.html
Module Tezos_017_PtNairob_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