package tezos-protocol-015-PtLimaPt

  1. Overview
  2. Docs
Tezos/Protocol: economic-protocol definition

Install

Dune Dependency

Authors

Maintainers

Sources

tezos-17.3.tar.gz
sha256=7062cd57addd452852598a2214ade393130efa087b99068d53713bdf912b3680
sha512=08e4091144a03ce3c107fb91a66501bd8b65ca3278917c455a2eaac6df3e108ade63f6ab8340a4bb152d60f404326e464d0ec95d26cafe8e82f870465d24a5fc

doc/tezos-protocol-015-PtLimaPt.raw/Tezos_raw_protocol_015_PtLimaPt/Sc_rollup_arith/index.html

Module Tezos_raw_protocol_015_PtLimaPt.Sc_rollup_arithSource

This module provides a temporary toy rollup to be used as a demo.

This rollup is a stack machine equipped with addition.

It processes postfix arithmetic expressions written as sequence of (space separated) int and + using the following rules:

  • a number x is interpreted as pushing x on the stack ;
  • a variable a is interpreted as storing the topmost element of the stack in the storage under the name "a" ;
  • a variable out is interpreted as adding a message to the outbox containing a single transaction batch with the topmost element of the stack as payload, the zero contract as destination, and a default entrypoint ;
  • a symbol + pops two integers x and y and pushes x + y on the stack ;

If a message is not syntactically correct or does not evaluate correctly, the machine stops its evaluation and waits for the next message.

The machine has a boot sector which is a mere string used a prefix for each message.

The module implements the Sc_rollup_PVM_sig.SÎ interface to be used in the smart contract rollup infrastructure.

The machine exposes extra operations to be used in the rollup node.

Sourcemodule type S = sig ... end
Sourceval reference_initial_state_hash : Sc_rollup_repr.State_hash.t

This is the state hash of reference that both the prover of the node and the verifier of the protocol Protocol_implementation have to agree on (if they do, it means they are using the same tree structure).

Sourcemodule type P = sig ... end
Sourcemodule Make (Context : P) : S with type context = Context.Tree.t and type state = Context.tree and type proof = Context.proof
OCaml

Innovation. Community. Security.