Module Trust_system.Actions

type action =
| Incoming_connection_error(*

Connection error while peer connected to node.

*)
| Outgoing_connection_error(*

Encountered connection error while connecting to a peer.

*)
| Gossiped_old_transition of int64 * int(*

Peer gossiped a transition which was too old. Includes time before cutoff period in which the transition was received, expressed in slots and delta.

*)
| Gossiped_future_transition(*

Peer gossiped a transition before its slot.

*)
| Gossiped_invalid_transition(*

Peer gossiped an invalid transition to us.

*)
| Disconnected_chain(*

Peer has been determined to be on a chain that is not connected to our chain.

*)
| Sent_bad_hash(*

Peer sent us some data that doesn't hash to the expected value

*)
| Sent_invalid_signature(*

Peer sent us something with a signature that doesn't check

*)
| Sent_invalid_transaction(*

Peer sent us an invalid transaction

*)
| Sent_invalid_proof(*

Peer sent us a proof that does not verify.

*)
| Sent_invalid_signature_or_proof(*

Peer either sent us a proof or a signature that does not verify.

*)
| Sent_invalid_protocol_version(*

Peer sent block with invalid protocol version

*)
| Sent_mismatched_protocol_version(*

Peer sent block with protocol version not matching daemon protocol version

*)
| Has_invalid_genesis_protocol_state(*

Peer gossiped a transition that has a different genesis protocol state from that of mine

*)
| Sent_invalid_transition_chain_merkle_proof(*

Peer sent us a transition chain witness that does not verify

*)
| Violated_protocol(*

Peer violated the specification of the protocol.

*)
| Made_request(*

Peer made a valid request. This causes a small decrease to mitigate DoS.

*)
| Connected(*

Peer connected to TCP server. Very small decrease to mitigate DoS

*)
| Requested_unknown_item(*

Peer requested something we don't know. They might be ahead of us or they might be malicious.

*)
| Fulfilled_request(*

Peer fulfilled a request we made.

*)
| Epoch_ledger_provided(*

Special case of request fulfillment

*)
| Sent_useful_gossip(*

Peer sent us a gossip item that we added to our pool

*)
| Sent_useless_gossip(*

Peer sent us a gossip item that we rejected from our pool for reasons that may be innocent. e.g. too low of a fee for a user command, out of date, etc.

*)
| Sent_old_gossip(*

Peer sent us a gossip item we already knew.

*)
| No_reply_from_preferred_peer(*

A peer that should have had the response to a query did not provide it.

*)
| Unknown_rpc(*

A peer made an unknown RPC.

*)
| Decoding_failed(*

A gossip message could not be decoded.

*)
val pp_action : Ppx_deriving_runtime.Format.formatter -> action -> Ppx_deriving_runtime.unit
val show_action : action -> Ppx_deriving_runtime.string
type t = action * (string * ( string, Yojson.Safe.t ) Core.List.Assoc.t) option

The action they took, paired with a message and associated JSON metadata for logging.

val to_trust_response : (action * 'a) -> Peer_trust.Trust_response.t
val to_log : t -> string * ( string, Yojson.Safe.t ) Core.List.Assoc.t
val is_reason_for_heartbeat : (action * 'a) -> bool