package octez-smart-rollup-node-lib
Protocol specific refutation helper functions.
val generate_proof :
Node_context.rw ->
Octez_smart_rollup.Game.t ->
Tezos_layer2_store.Context.pvmstate ->
string Tezos_base.TzPervasives.tzresult Lwt.t
generate_proof node_ctxt (game) start_state
generates a serialized proof for the current game
for the execution step starting with start_state
.
val make_dissection :
(module PARTIAL) ->
Node_context.rw ->
start_state:Fuel.Accounted.t Pvm_plugin_sig.eval_state option ->
start_chunk:Octez_smart_rollup.Game.dissection_chunk ->
our_stop_chunk:Octez_smart_rollup.Game.dissection_chunk ->
default_number_of_sections:int ->
commitment_period_tick_offset:Z.t ->
last_level:int32 ->
Octez_smart_rollup.Game.dissection_chunk Tezos_base.TzPervasives.trace
Tezos_base.TzPervasives.tzresult
Lwt.t
make_dissection plugin node_ctxt ~start_state ~start_chunk
~our_stop_chunk ~default_number_of_sections ~commitment_period_tick_offset
~last_level
computes a dissection from between start_chunk
and our_stop_chunk
at level last_level
. commitment_period_tick_offset
is the tick offset of the commitment period for the conflict/dissection. This dissection has default_number_of_sections
if there are enough ticks.
val timeout_reached :
_ Node_context.t ->
self:Tezos_crypto.Signature.public_key_hash ->
opponent:Tezos_crypto.Signature.public_key_hash ->
bool Tezos_base.TzPervasives.tzresult Lwt.t
timeout_reached node_ctxt ~self ~opponent
returns true
if the timeout is reached against opponent in head of the L1 chain.
val get_conflicts :
Tezos_client_base.Client_context.full ->
Octez_smart_rollup.Address.t ->
Tezos_crypto.Signature.public_key_hash ->
Octez_smart_rollup.Game.conflict list Tezos_base.TzPervasives.tzresult Lwt.t
get_conflicts cctxt rollup signer
returns the conflicts for commitments staked on by signer
.
val get_ongoing_games :
Tezos_client_base.Client_context.full ->
Octez_smart_rollup.Address.t ->
Tezos_crypto.Signature.public_key_hash ->
(Octez_smart_rollup.Game.t
* Tezos_crypto.Signature.public_key_hash
* Tezos_crypto.Signature.public_key_hash)
list
Tezos_base.TzPervasives.tzresult
Lwt.t
get_ongoing_games cctxt rollup signer
returns the games that signer
is currently playing.