Akai
A libp2p generic DA sampler for the Web3 space
Akai is a generic libp2p data sampler originally developed to perform Data Availability Sampling in the context of blockchain networks. However, due to it similarities with other protocols, it has been extended to support the discovery and monitoring of DHT items across various other peer-to-peer networks, including Celestia and IPFS.
Methodology
- DHT Discovery & Finding: Akai features a
findcommand to perform single-operation queries across supported networks. This allows users to actively find providers for CIDs, locate peers for specific keys, fetch values, or find the closest peers in a given DHT. - Periodic Data Sampling: Using the
daemonmode, Akai is instructed to track specific items over time, continuously checking their availability under the configured frequency. - Multi-Network Support: It natively interacts with distinct network environments, supporting operations on Avail, Celestia, and IPFS.
Impact
The measurements and data gathered by Akai are critical for monitoring the health, reachability, and availability of distributed networks:
- Data Availability Tracking: It ensures that networks heavily reliant on Data Availability (like Avail and Celestia) are actively retaining and serving the block cells and namespaces they are expected to hold.
- DHT Performance Auditing: It allows researchers and developers to evaluate the responsiveness, latency, and success rates of finding providers and retrieving values within different DHT implementations.
- Historical Analysis: By automatically exporting daemon sampling results into a ClickHouse database, Akai enables long-term metric tracking and historical network health assessments.
Usage & Integration
Akai is built in Go and provides unified entry points for straightforward installation and operation. It can be configured to:
- Run one-off DHT discovery operations directly via the CLI.
- Run as a persistent background process to systematically sample items and report metrics to a ClickHouse database (either local or replicated).
- Deploy quickly using included Docker Compose setups or compile locally using
just.
Detailed setup instructions, configuration flags, and example commands can be found in the GitHub repository.