package tezos-protocol-alpha
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=7062cd57addd452852598a2214ade393130efa087b99068d53713bdf912b3680
sha512=08e4091144a03ce3c107fb91a66501bd8b65ca3278917c455a2eaac6df3e108ade63f6ab8340a4bb152d60f404326e464d0ec95d26cafe8e82f870465d24a5fc
doc/tezos-protocol-alpha.raw/Tezos_raw_protocol_alpha/Sc_rollup_inbox_repr/V1/index.html
Module Sc_rollup_inbox_repr.V1
Source
A history_proof
is a Skip_list.cell
that stores multiple hashes. Skip_list.content history_proof
gives the hash of this cell, while Skip_list.back_pointers history_proof
is an array of hashes of earlier history_proof
s in the inbox.
On the one hand, we think of this type as representing the whole Merkle structure of an inbox at a given level---it is the part of t
above that can actually be used to prove things (it cannot be forged by a malicious node because it much match the hash stored by the L1).
On the other hand, we think of this type as representing a single proof-step back through the history of the inbox; given a hash that appears at some point later in the inbox this type proves that that hash points to this particular combination of a witness and further back-pointers.
In terms of size, this type is a small set of hashes; one for the current witness and `O(log2(ix))` in the back-pointers, where ix
is the index of the cell in the skip list. That is, ix
is the number of non-empty levels between now and the origination level of the rollup.
The type of the inbox for a smart-contract rollup as stored by the protocol in the context. Values that inhabit this type only act as fingerprint for inboxes and contain:
level
: the inbox level ;old_levels_messages
: a witness of the inbox history.
inbox_level inbox
returns the maximum level of message insertion in inbox
or its initial level.
A History.t
is basically a lookup table of history_proof
s. We need this if we want to produce inbox proofs because it allows us to dereference the 'pointer' hashes in any of the history_proof
s. This deref
function is passed to Skip_list.back_path
or Skip_list.search
to allow these functions to construct valid paths back through the skip list.
val pp_history_proof :
Tezos_protocol_environment_alpha.Format.formatter ->
history_proof ->
unit
old_levels_messages inbox
returns the latest skip list cell of the inbox history that is not up to change (i.e. not the current witness).
current_witness inbox
returns the current witness of the inbox, i.e. the merkelized payload hash.