Tezos_alpha_test_helpers.Slashing_helpers
Helpers related to denunciations and slashing.
val slashing_percentage :
block_before_slash:Block.t ->
Tezos_protocol_alpha.Protocol.Misbehaviour_repr.t ->
all_culprits:Signature.public_key_hash list ->
Tezos_protocol_alpha.Protocol.Percentage.t Tezos_base.TzPervasives.tzresult
Lwt.t
Returns the slashing percentage to apply for the given misbehaviour.
Preconditions:
all_culprits
is the list of all delegates that have been denounced for the given misbehaviour.block_before_slash
is any block from cycle misbehaviour_cycle - consensus_rights_delay
up to the last block **before** the slashing gets applied. Indeed, the block that applies the slashing also moves on to the next cycle and discards the seed for the misbehaviour level rights from the context.module Misbehaviour_repr : sig ... end
Helpers related to Protocol.Misbehaviour_repr
.
module Full_denunciation : sig ... end
Helpers about "full denunciations", that is, a denunciation item and its culprit. See type t
of this module.
val apply_all_slashes_at_cycle_end :
Tezos_protocol_alpha.Protocol.Alpha_context.Cycle.t ->
Block.t ->
State.t ->
State.t Tezos_base.TzPervasives.tzresult Lwt.t
Applies all slashes at cycle end in the state