Module proto

Module proto 

Source
Expand description

P2P protocol implementation for the Event Graph

StructsΒ§

EventPut
A P2P message representing publishing an event on the network
EventRep
A P2P message representing an event reply
EventReq
A P2P message representing an event request
MovingWindow πŸ”’
ProtocolEventGraph
P2P protocol implementation for the Event Graph.
TipRep
A P2P message representing a reply for the peer’s DAG tips
TipReq
A P2P message representing a request for a peer’s DAG tips

ConstantsΒ§

MALICIOUS_THRESHOLD πŸ”’
Malicious behaviour threshold. If the threshold is reached, we will drop the peer from our P2P connection.
RATELIMIT_EXPIRY_TIME πŸ”’
Rolling length of the window
RATELIMIT_MIN_COUNT πŸ”’
Ratelimit kicks in above this count
RATELIMIT_SAMPLE_IDX πŸ”’
Sample point used to calculate sleep time when ratelimit is active
RATELIMIT_SAMPLE_SLEEP πŸ”’
Sleep for this amount of time when count == RATE_LIMIT_SAMPLE_IDX.
WINDOW_EXPIRY_TIME πŸ”’
Rolling length of the window
WINDOW_MAXSIZE πŸ”’
Global limit of messages per window