package tezos-protocol-015-PtLimaPt
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=ad9e08819871c75ba6f4530b125f7d157799398e4d77a1e6bfea9d91ff37ff55
sha512=c5dc4d40cc09bc6980fbbdb5c2e105bf4252cf9cfcb2b49660b0ebe4dc789f6709ec3b3bf2f87d81580d3eed9521eeb1c960f24d9b14eb0285aaba1f84d10a9b
doc/tezos-protocol-015-PtLimaPt.raw/Tezos_raw_protocol_015_PtLimaPt/Sc_rollup_arith/index.html
Module Tezos_raw_protocol_015_PtLimaPt.Sc_rollup_arith
Source
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 pushingx
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 integersx
andy
and pushesx + 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.
module Protocol_implementation :
S
with type context = Tezos_protocol_environment_015_PtLimaPt.Context.t
and type state = Tezos_protocol_environment_015_PtLimaPt.Context.tree
and type proof =
Tezos_protocol_environment_015_PtLimaPt.Context.Proof.tree
Tezos_protocol_environment_015_PtLimaPt.Context.Proof.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).
module Make
(Context : P) :
S
with type context = Context.Tree.t
and type state = Context.tree
and type proof = Context.proof