Module Tezos_alpha_test_helpers.Consensus_helpers

type kind =
  1. | Preattestation
  2. | Attestation
  3. | Aggregate

Crafts a consensus operation.

By default, a (pre)attestation is for the first slot, whereas an attestations aggregate is for all the level's attesters that are using a BLS consensus key.

Moreover, the operation points to the given attested_block: in other words, it has that block's level, round, payload hash, and its branch is the predecessor of that block.

Optional arguments allow to override these default parameters.

val test_consensus_operation : ?attesting_slot:Op.attesting_slot -> ?level:Tezos_protocol_alpha.Protocol.Alpha_context.Raw_level.t -> ?round:Tezos_protocol_alpha.Protocol.Alpha_context.Round.t -> ?block_payload_hash:Tezos_protocol_alpha.Protocol.Block_payload_hash.t -> ?branch:Tezos_base.TzPervasives.Block_hash.t -> attested_block:Block.t -> ?predecessor:Block.t -> ?error:(Tezos_protocol_alpha.Environment.Error_monad.error -> bool) -> loc:string -> kind -> Op.tested_mode -> (unit, Tezos_base.TzPervasives.tztrace) Stdlib.result Lwt.t
val test_consensus_operation_all_modes_different_outcomes : ?attesting_slot:Op.attesting_slot -> ?level:Tezos_protocol_alpha.Protocol.Alpha_context.Raw_level.t -> ?round:Tezos_protocol_alpha.Protocol.Alpha_context.Round.t -> ?block_payload_hash:Tezos_protocol_alpha.Protocol.Block_payload_hash.t -> ?branch:Tezos_base.TzPervasives.Block_hash.t -> attested_block:Block.t -> ?predecessor:Block.t -> loc:string -> ?application_error: (Tezos_protocol_alpha.Environment.Error_monad.error -> bool) -> ?construction_error: (Tezos_protocol_alpha.Environment.Error_monad.error -> bool) -> ?mempool_error:(Tezos_protocol_alpha.Environment.Error_monad.error -> bool) -> kind -> (unit, Tezos_base.TzPervasives.tztrace) Stdlib.result Lwt.t
val test_consensus_operation_all_modes : ?attesting_slot:Op.attesting_slot -> ?level:Tezos_protocol_alpha.Protocol.Alpha_context.Raw_level.t -> ?round:Tezos_protocol_alpha.Protocol.Alpha_context.Round.t -> ?block_payload_hash:Tezos_protocol_alpha.Protocol.Block_payload_hash.t -> ?branch:Tezos_base.TzPervasives.Block_hash.t -> attested_block:Block.t -> ?predecessor:Block.t -> ?error:(Tezos_protocol_alpha.Environment.Error_monad.error -> bool) -> loc:string -> kind -> (unit, Tezos_base.TzPervasives.tztrace) Stdlib.result Lwt.t
val test_consensus_op_for_next : genesis:Block.t -> kind:[< `Attestation | `Preattestation ] -> next:[< `Level | `Round ] -> (unit, Tezos_base.TzPervasives.tztrace) Stdlib.result Lwt.t