Module Operation.Anonymous

type t

A representation of an anonymous operation.

type double_consensus_evidence_kind =
  1. | Double_attestation_evidence
  2. | Double_preattestation_evidence

double_consensus_evidence ~kind op1 op2 crafts a double consensus evidence operation with the kind, op1 and op2. Both operations should be of the same kind and the same as the one expected by kind.

val double_attestation_evidence : (operation * Tezos_crypto.Signature.t) -> (operation * Tezos_crypto.Signature.t) -> t

double_attestation_evidence op1 op2 crafts a double attestation evidence operation with op1 and op2. Both operations should be attestations.

val double_preattestation_evidence : (operation * Tezos_crypto.Signature.t) -> (operation * Tezos_crypto.Signature.t) -> t

double_preattestation_evidence op1 op2 crafts a double preattestation evidence operation with op1 and op2. Both operations should be preattestations.

val dal_entrapment_evidence_standalone_attestation : protocol:Protocol.t -> attestation:(operation * Tezos_crypto.Signature.t) -> slot_index:int -> Tezos_crypto_dal.Cryptobox.shard -> Tezos_crypto_dal.Cryptobox.shard_proof -> t

dal_entrapment_evidence crafts a DAL entrapment evidence operation.

val kind_to_string : double_consensus_evidence_kind -> string

kind_to_string kind return the name of the kind.

val operation : ?branch:string -> t -> Client.t -> operation Lwt.t

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

val inject : ?request:[ `Inject | `Notify ] -> ?force:bool -> ?branch:string -> ?error:Tezt_wrapper.Base.rex -> t -> Client.t -> [ `OpHash of string ] Lwt.t

A wrapper for inject with anonymous 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.

val make_double_consensus_evidence_with_distinct_bph : kind:double_consensus_evidence_kind -> misbehaviour_level:int -> misbehaviour_round:int -> culprit:Account.key -> Client.t -> t Lwt.t

Crafts two (pre)attestations that only differ in their block payload hash, then a well-formed double (pre)attestation evidence operation on them.

The denounced (pre)attestations have the specified misbehaviour_level and misbehaviour_round, the first slot of culprit, and two constant and distinct block payload hashes. They are signed by culprit.