package octez-smart-rollup-node-lib
val process_head :
Node_context.rw ->
predecessor:Layer1.header ->
Layer1.header ->
(Octez_smart_rollup.Inbox.Hash.t
* Octez_smart_rollup.Inbox.t
* Octez_smart_rollup.Merkelized_payload_hashes_hash.t
* string list)
Tezos_base.TzPervasives.tzresult
Lwt.t
process_head node_ctxt ~predecessor head
changes the state of the inbox on disk to react to the operations contained in the block head
(where predecessor
is the predecessor of head
in the L1 chain). It returns a tuple (inbox_hash, inbox, payload_hash, messages)
where inbox
is the new inbox and inbox_hash
its hash, payload_hash
is the hash of the merkelized payload for this inbox and messages
are the serialized messages present in the block (with the internal messages added by the protocol).
val same_as_layer_1 :
_ Node_context.t ->
Tezos_base.TzPervasives.Block_hash.t ->
Octez_smart_rollup.Inbox.t ->
unit Tezos_base.TzPervasives.tzresult Lwt.t
same_as_layer_1 node_ctxt block node_inbox
ensures that the rollup node agrees with the L1 node that inbox for block
is node_inbox
.
val serialize_external_message :
string ->
string Tezos_base.TzPervasives.tzresult
Serialize an external messages to the protocol representation. NOTE: so far, in all available protocols, this adds a tag '\001'
at the beginning.
val init :
predecessor_timestamp:Tezos_base.Time.Protocol.t ->
predecessor:Tezos_base.TzPervasives.Block_hash.t ->
level:int32 ->
Octez_smart_rollup.Inbox.t
Returns the initial global inbox where level
is the first level of the protocol with smart rollups.