package tezt-tezos

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Operation.ConsensusSource

Sourcetype t

A representation of a consensus operation.

Sourceval dal_attestation : attestation:bool array -> level:int -> t

dal_attestation ~attestation ~level crafts a slot attestation operation to attest at level slot headers published at level level - attestation_lag. For each slot, the value of the booleans indicates whether the data is deemed available.

Sourceval consensus : use_legacy_name:bool -> kind:consensus_kind -> slot:int -> level:int -> round:int -> block_payload_hash:string -> t

consensus ~kind ~use_legacy_name ~level ~round ~slot ~block_payload_hash crafts a consensus operation with the kind at level on the round with the slot and block_payload_hash. If use_legacy_name is set, the kind field in the crafted JSON will be "(pre)endorsement" instead of "(pre)attestation".

Sourceval preattestation : use_legacy_name:bool -> slot:int -> level:int -> round:int -> block_payload_hash:string -> t

preattestation ?use_legacy_name ~level ~round ~slot ~block_payload_hash crafts a preattestation operation at level on the round with the slot and block_payload_hash. If use_legacy_name is set, the kind field in the crafted JSON will be "preendorsement" instead of "preattestation".

Sourceval attestation : use_legacy_name:bool -> slot:int -> level:int -> round:int -> block_payload_hash:string -> t

attestation ?use_legacy_name ~level ~round ~slot ~block_payload_hash crafts an attestation operation at level on the round with the slot and block_payload_hash. If use_legacy_name is set, the kind field in the crafted JSON will be "endorsement" instead of "attestation".

Sourceval kind_to_string : consensus_kind -> bool -> string

kind_to_string kind use_legacy_name return the name of the kind. If use_legacy_name is set, the name corresponding to the kind will be "(pre)endorsement" instead of "(pre)attestation".

Sourceval operation : ?branch:string -> ?chain_id:string -> signer:Account.key -> t -> Client.t -> operation Lwt.t

operation constructs an operation from a consensus operation. the client is used to fetch the branch and the chain_id.

Sourceval inject : ?request:[ `Inject | `Notify ] -> ?force:bool -> ?branch:string -> ?chain_id:string -> ?error:Tezt.Base.rex -> signer:Account.key -> t -> Client.t -> [ `OpHash of string ] Lwt.t

A wrapper for inject with consensus operations. The client is used to get all the data that was not provided if it can be recovered via RPCs. Mainly those are the branch and the chain_id.

OCaml

Innovation. Community. Security.