package tezos-protocol-014-PtKathma

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

Install

Dune Dependency

Authors

Maintainers

Sources

tezos-16.1.tar.gz
sha256=43723d096307603703a1a89ed1b2eb202b365f5e7824b96b0cbf813b343a6cf7
sha512=b2a637f2e965000d3d49ad85277ca24d6cb07a1a7cf2bc69d296d8b03ad78c3eaa8e21e94b9162e62c2e11649cd03bc845b2a3dafe623b91065df69d47dc8e4f

doc/tezos-protocol-014-PtKathma.raw/Tezos_raw_protocol_014_PtKathma/Sc_rollup_arith/index.html

Module Tezos_raw_protocol_014_PtKathma.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_sem.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
Sourcemodule type P = sig ... end
Sourcemodule Make (Context : P) : S with type context = Context.Tree.t and type state = Context.tree
OCaml

Innovation. Community. Security.