Tezos_protocol_plugin_025_PsUshuai.Block_validationval init_block_validation_state :
Tezos_protocol_025_PsUshuai.Protocol.validation_state ->
block_validation_stateval check_double_baking_evidence :
Tezos_protocol_025_PsUshuai.Protocol.block_header ->
Tezos_protocol_025_PsUshuai.Protocol.block_header ->
(unit, Tezos_protocol_025_PsUshuai.Environment.Error_monad.error)
Stdlib.resultval check_block_operation :
block_validation_state ->
Tezos_protocol_025_PsUshuai.Protocol.Alpha_context.packed_operation ->
block_validation_state Tezos_base.TzPervasives.tzresult Lwt.ttype Tezos_protocol_025_PsUshuai.Environment.Error_monad.error += | Sc_rollup_refute_dal_proof_future_published_level of {published_level : Tezos_protocol_025_PsUshuai.Protocol.Alpha_context.Raw_level.t;level : Tezos_protocol_025_PsUshuai.Protocol.Alpha_context.Raw_level.t;}Raised/returned for a smart-rollup refutation whose DAL page proof targets a published_level greater than the level at which the operation is processed. Used by both block validation and the mempool plugin.
val find_future_dal_refute :
level:Tezos_protocol_025_PsUshuai.Protocol.Alpha_context.Raw_level.t ->
Tezos_protocol_025_PsUshuai.Protocol.Alpha_context.packed_operation ->
Tezos_protocol_025_PsUshuai.Protocol.Alpha_context.Raw_level.t optionfind_future_dal_refute ~level op returns Some published_level if op contains a Sc_rollup_refute whose Proof move carries a DAL page proof with published_level > level, and None otherwise. level is the level at which the operation is processed (the block's own level for block validation; head + 1 for the mempool).
type Tezos_protocol_025_PsUshuai.Environment.Error_monad.error += | Stake_amount_too_small of Tezos_protocol_025_PsUshuai.Protocol.Alpha_context.Tez.tRaised when an external staker's `stake` amount is too small to mint any staking pseudotoken at the delegate's current conversion rate (the down-rounded credit would be zero), which would transfer the tez into the delegate's frozen deposits with no pseudotoken minted in exchange. Exposed so that the operation-simulation RPC can reject such operations with the same error as block validation.
val stake_mints_no_pseudotoken :
Tezos_protocol_025_PsUshuai.Protocol.Alpha_context.t ->
staker:Tezos_protocol_025_PsUshuai.Protocol.Alpha_context.public_key_hash ->
amount:Tezos_protocol_025_PsUshuai.Protocol.Alpha_context.Tez.t ->
bool Tezos_protocol_025_PsUshuai.Environment.Error_monad.tzresult Lwt.tstake_mints_no_pseudotoken ctxt ~staker ~amount returns true when a `stake` of amount by staker would mint no staking pseudotoken given the current ctxt (external staker whose amount rounds down to zero pseudotokens). Returns false for cases that either mint a pseudotoken or are rejected by the protocol on their own (self-stake, no delegate, non-positive amount, uninitialized or fully-slashed pool).
delegate_stake_while_slashed_in_current_finalization_delay ctxt ~delegate returns true if delegate is a delegate that has been slashed during the last `unstake_finalization_delay + 1` cycles. This prevents a delegate to re-stake non finalizable tez from unstake requests that have been slashed.
val delegate_stake_while_slashed_in_current_finalization_delay :
Tezos_protocol_025_PsUshuai.Protocol.Alpha_context.t ->
delegate:Tezos_protocol_025_PsUshuai.Protocol.Alpha_context.public_key_hash ->
bool Tezos_protocol_025_PsUshuai.Environment.Error_monad.tzresult Lwt.tval check_execute_outbox_message :
Tezos_protocol_025_PsUshuai.Protocol.Alpha_context.t ->
rollup:Tezos_protocol_025_PsUshuai.Protocol.Alpha_context.Sc_rollup.t ->
output_proof:string ->
unit Tezos_protocol_025_PsUshuai.Environment.Error_monad.tzresult Lwt.tcheck_execute_outbox_message context ~rollup ~output_proof checks the validity of a given output_proof against the rollup. Returns an error if not the case.
type Tezos_protocol_025_PsUshuai.Environment.Error_monad.error += | Sc_rollup_inbox_proof_missing_index_proof of {head : Tezos_protocol_025_PsUshuai.Protocol.Alpha_context.Sc_rollup.Inbox_merkelized_payload_hashes.Hash.t;}| Sc_rollup_inbox_proof_relabelled_indices of {head : Tezos_protocol_025_PsUshuai.Protocol.Alpha_context.Sc_rollup.Inbox_merkelized_payload_hashes.Hash.t;}| Sc_rollup_inbox_proof_unreadable_cells of {head : Tezos_protocol_025_PsUshuai.Protocol.Alpha_context.Sc_rollup.Inbox_merkelized_payload_hashes.Hash.t;}Errors for a refutation Proof move whose inbox proof comes without the index proof of its head cell in the same batch, shows indices that index proof contradicts, or holds cells this node cannot read back.
val find_relabelled_inbox_proof :
Tezos_protocol_025_PsUshuai.Protocol.Alpha_context.packed_operation ->
Tezos_protocol_025_PsUshuai.Environment.Error_monad.error
Tezos_protocol_025_PsUshuai.Environment.Error_monad.trace
optionfind_relabelled_inbox_proof op returns the error of the first refutation Proof move of op whose inbox proof its own batch does not back, or backs with indices the skip list contradicts. Used by the mempool, so that a forged move stops at the first node that reads it.
val index_proofs_of_batch :
Tezos_protocol_025_PsUshuai.Protocol.Alpha_context.packed_operation ->
(Tezos_protocol_025_PsUshuai.Protocol.Alpha_context.Sc_rollup.Inbox_merkelized_payload_hashes.Hash.t
* Tezos_smart_rollup_025_PsUshuai.Inbox_index_proof.t)
listindex_proofs_of_batch op returns the index proofs published by the Sc_rollup_add_messages operations of the manager batch op, keyed by the inbox cell whose index each of them establishes.
val check_refute_proof :
Tezos_protocol_025_PsUshuai.Protocol.Alpha_context.t ->
rollup:Tezos_protocol_025_PsUshuai.Protocol.Alpha_context.Sc_rollup.t ->
stakers:
Tezos_protocol_025_PsUshuai.Protocol.Alpha_context.Sc_rollup.Game.Index.t ->
choice:Tezos_protocol_025_PsUshuai.Protocol.Alpha_context.Sc_rollup.Tick.t ->
index_proofs:
(Tezos_protocol_025_PsUshuai.Protocol.Alpha_context.Sc_rollup.Inbox_merkelized_payload_hashes.Hash.t
* Tezos_smart_rollup_025_PsUshuai.Inbox_index_proof.t)
list ->
proof:
Tezos_protocol_025_PsUshuai.Protocol.Alpha_context.Sc_rollup.Proof.serialized
Tezos_protocol_025_PsUshuai.Protocol.Alpha_context.Sc_rollup.Proof.t ->
unit Tezos_protocol_025_PsUshuai.Environment.Error_monad.tzresult Lwt.tcheck_refute_proof context ~rollup ~stakers ~choice ~index_proofs ~proof checks the validity of a given refutation proof at tick choice for the game between stakers. index_proofs are the index proofs published by the batch proof belongs to, as returned by index_proofs_of_batch. Returns an error if not the case.