package octez-protocol-alpha-libs

  1. Overview
  2. Docs
Octez protocol alpha libraries

Install

Dune Dependency

Authors

Maintainers

Sources

tezos-18.0.tar.gz
sha256=dbc3b675aee59c2c574e5d0a771193a2ecfca31e7a5bc5aed66598080596ce1c
sha512=b97ed762b9d24744305c358af0d20f394376b64bfdd758dd4a81775326caf445caa57c4f6445da3dd6468ff492de18e4c14af6f374dfcbb7e4d64b7b720e5e2a

doc/octez-protocol-alpha-libs.test-helpers/Tezos_alpha_test_helpers/Dummy_zk_rollup/index.html

Module Tezos_alpha_test_helpers.Dummy_zk_rollupSource

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 of N private operations. N is determined by the batch_size parameter to the Operator 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

Sourcetype balance
Sourcetype amount
Sourcetype fee
Sourcetype op_code
Sourcemodule Bound : sig ... end

Bounds required for the dummy rollup.

Sourcemodule Bounded : sig ... end

Modules to manipulate bounded integers, both as OCaml values and in circuit representation.

Sourcemodule Types : sig ... end

Types used for the Dummy Rollup circuits. This module is split into:

Sourcemodule V (L : Plompiler.LIB) : sig ... end

Plompiler circuits for the dummy rollup

Sourcemodule Operator (Params : sig ... end) : sig ... end

Basic rollup operator for generating Updates.

OCaml

Innovation. Community. Security.