package octez-protocol-alpha-libs

  1. Overview
  2. Docs
Octez protocol alpha libraries

Install

Dune Dependency

Authors

Maintainers

Sources

tezos-octez-v20.1.tag.bz2
sha256=ddfb5076eeb0b32ac21c1eed44e8fc86a6743ef18ab23fff02d36e365bb73d61
sha512=d22a827df5146e0aa274df48bc2150b098177ff7e5eab52c6109e867eb0a1f0ec63e6bfbb0e3645a6c2112de3877c91a17df32ccbff301891ce4ba630c997a65

doc/octez-protocol-alpha-libs.test-helpers/Tezos_alpha_test_helpers/Consensus_helpers/index.html

Module Tezos_alpha_test_helpers.Consensus_helpersSource

Sourcetype mode =
  1. | Application
  2. | Construction
  3. | Mempool
Sourceval show_mode : mode -> string
Sourcetype kind =
  1. | Preattestation
  2. | Attestation
Sourceval test_consensus_operation : ?delegate:Tezos_protocol_alpha.Protocol.Alpha_context.public_key_hash -> ?slot:Tezos_protocol_alpha.Protocol.Alpha_context.Slot.t -> ?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 -> mode -> (unit, Tezos_base.TzPervasives.tztrace) result Lwt.t

Craft an attestation or preattestation, and bake a block containing it (in application or construction modes) or inject it into a mempool. When error is None, check that it succeeds, otherwise check that it fails as specified by error.

By default, the (pre)attestation is for the first slot and is signed by the delegate that owns this slot. 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.

The predecessor is used as the predecessor of the baked block or the head of the mempool. When it is not provided, we use the attested_block for this.

Sourceval test_consensus_operation_all_modes_different_outcomes : ?delegate:Tezos_protocol_alpha.Protocol.Alpha_context.public_key_hash -> ?slot:Tezos_protocol_alpha.Protocol.Alpha_context.Slot.t -> ?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) result Lwt.t
Sourceval test_consensus_operation_all_modes : ?delegate:Tezos_protocol_alpha.Protocol.Alpha_context.public_key_hash -> ?slot:Tezos_protocol_alpha.Protocol.Alpha_context.Slot.t -> ?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) result Lwt.t
Sourceval delegate_of_first_slot : Context.t -> (Tezos_protocol_alpha.Environment.Signature.public_key_hash * Tezos_protocol_alpha.Protocol.Alpha_context.Slot.t, Tezos_base.TzPervasives.tztrace) result Lwt.t
Sourceval delegate_of_slot : ?different_slot:bool -> Tezos_protocol_alpha.Protocol.Alpha_context.Slot.t -> Context.t -> (Tezos_protocol_alpha.Environment.Signature.public_key_hash, Tezos_base.TzPervasives.tztrace) result Lwt.t
Sourceval test_consensus_op_for_next : genesis:Block.t -> kind:[< `Attestation | `Preattestation ] -> next:[< `Level | `Round ] -> (unit, Tezos_base.TzPervasives.tztrace) result Lwt.t
OCaml

Innovation. Community. Security.