Onionr/src/gossip/constants.py

16 lines
492 B
Python
Raw Normal View History

2022-03-02 13:29:59 +00:00
BOOTSTRAP_ATTEMPTS = 5
PEER_AMOUNT_TO_ASK = 3
TRANSPORT_SIZE_BYTES = 64
BLOCK_MAX_SIZE = 1024 * 2000
2022-03-26 23:24:40 +00:00
BLOCK_MAX_SIZE_LEN = len(str(BLOCK_MAX_SIZE))
BLOCK_ID_SIZE = 128
2022-03-26 23:24:40 +00:00
DANDELION_EPOCH_LENGTH = 60
2022-03-13 01:28:18 +00:00
# Magic number i made up, not really specified in dandelion++ paper
2022-03-13 06:35:22 +00:00
MAX_INBOUND_DANDELION_EDGE = 50 # Mainly picked to avoid slowloris
2022-03-13 01:28:18 +00:00
# Dandelion subgraph is aprox 4-regular
OUTBOUND_DANDELION_EDGES = 2
2022-03-13 01:28:18 +00:00
MAX_STEM_BLOCKS_PER_STREAM = 1000
BLACKHOLE_EVADE_TIMER_SECS = DANDELION_EPOCH_LENGTH * 3