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.

check_refute_proof context ~rollup ~stakers ~choice ~proof checks the validity of a given refutation proof at tick choice for the game between stakers. Returns an error if not the case.