tezos-p2p-services

Tezos: descriptions of RPCs exported by `tezos-p2p`
Library tezos-p2p-services
type t
val empty : unit -> t
val distributed_db_score : t -> float

the aggregate score function computed from the metadata collected for a peer

val prevalidation_score : t -> float
val score : t -> float
type requests_kind =
| Branch
| Head
| Block_header
| Operations
| Protocols
| Operation_hashes_for_block
| Operations_for_block
| Checkpoint
| Protocol_branch
| Predecessor_header
| Other
type resource_kind =
| Block
| Operations
| Protocol
type advertisement =
| Head
| Branch
type metadata =
| Received_request of requests_kind
| Sent_request of requests_kind
| Failed_request of requests_kind
| Scheduled_request of requests_kind
| Received_response of requests_kind
| Sent_response of requests_kind
| Unexpected_response
| Unactivated_chain
| Inactive_chain
| Future_block
| Unadvertised of resource_kind
| Sent_advertisement of advertisement
| Received_advertisement of advertisement
| Outdated_response
| Valid_blocks
| Old_heads
| Cannot_download
| Cannot_parse
| Refused_by_prefilter
| Refused_by_postfilter
| Applied
| Branch_delayed
| Branch_refused
| Refused
| Duplicate
| Outdated
val incr : t -> metadata -> unit

incr score counters . Used to compute the final score for a peer

val update_requests : t -> requests_kind -> bool -> unit
val update_responses : t -> requests_kind -> bool -> unit