Files
py-libp2p/libp2p/kad_dht/common.py
2025-06-20 16:01:11 -04:00

15 lines
302 B
Python

"""
Common Objects for Kademlia DHT implementation.
"""
from libp2p.custom_types import (
TProtocol,
)
# Constants for the Kademlia algorithm
ALPHA = 3 # Concurrency parameter
PROTOCOL_ID = TProtocol("/ipfs/kad/1.0.0")
QUERY_TIMEOUT = 10
TTL = DEFAULT_TTL = 24 * 60 * 60 # 24 hours in seconds