Module Tezos_protocol_plugin_025_PsUshuai.Block_validation

type Tezos_protocol_025_PsUshuai.Environment.Error_monad.error +=
  1. | Increase_paid_storage_amount_overflow of Z.t
  2. | Delegate_cannot_stake_during_finalization_of_slashed_period
type block_validation_state

Fast shell-side state threaded through block validation.

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.

find_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).

Raised 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.

stake_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.

check_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.

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.

find_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.

index_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.

check_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.