LogoLogo
  • Introduction
    • Introducing Othentic Stack
    • Use Cases
  • AVS Framework
    • Abstract
    • Quick Start
    • Othentic CLI
      • Key Management
      • Contracts Deployment
      • Operator Registration
      • AVS Logic Implementation
      • Operator Deposit
      • Node Operators
      • Rewards Distribution
      • P2P Config
        • Custom P2P Messaging
        • P2P Auth Layer
        • Metrics and Monitoring
        • Logging
        • Persistent storage
        • Latency
      • CLI Command Reference
    • Smart Contracts
      • AVS Governance
      • Attestation Center
      • Hooks
        • Task Logic
        • Operator Management
        • Rewards Fee Calculator
      • OBLS
      • Internal Task Handler
      • Othentic Registry
      • Message Handlers
    • Othentic Consensus
      • Abstract
      • Task & Task Definitions
      • Leader Election
      • Proof of Task
      • Execution Service
      • Validation Service
      • Voting Power
      • Rewards and Penalties
      • Internal Tasks
    • FAQ
    • Supported Networks
    • Explainers
      • Networking
      • Multichain
      • Production Guidelines
      • Operator Allowlisting
      • Governance Multisig
  • External
    • AVS Examples
  • GitHub
  • Othentic Hub
Powered by GitBook
On this page
  • Overview
  • Example Logs
  • Enabling Debug Logs
  1. AVS Framework
  2. Othentic CLI
  3. P2P Config

Latency

Enable debug logs, interpret ping latency outputs, and understand the factors affecting peer latency

Overview

To assess the latency and health of your P2P network, you can leverage the built-in ping protocol. This mechanism allows you to measure the round-trip operation timeframe.

The ping protocol is actively running in your network.

  1. Send a ping message to a given peer.

  2. Wait for a response.

  3. Measure the time elapsed during the operation.

The stack logs the latency automatically, assuming the appropriate debug logs are enabled.

Example Logs

When debug logging is enabled, you'll see entries like the following in your logs:

[2025-04-15 08:19:49]:[v1.10.0]:[debug]:: 2025-04-15T08:19:49.919Z libp2p:ping incoming ping from 12D3KooWAQ8UrZkbDCyPSyRWrzPbn9vP5pMoV1F8hXi6AMVFKYqE complete in 54ms
[2025-04-15 08:19:49]:[v1.10.0]:[debug]:: 2025-04-15T08:19:49.098Z libp2p:ping incoming ping from 12D3KooWSJw4HjLba4Fp63DT3jCiGYf9fBQQ1mvP6LLJogZGxzmC complete in 8ms
[2025-04-15 08:19:48]:[v1.10.0]:[debug]:: 2025-04-15T08:19:48.577Z libp2p:ping incoming ping from 12D3KooWH45THrNhhDSNMzWcaxQ39ydQ5WqXfku7j396c4JDAt8C complete in 30ms

Latency between peers can be influenced by:

  • Geographical distribution

  • Network routing

  • NAT traversal complexity

  • ISP conditions

  • Transport layers (WebSockets, QUIC, TCP, etc.)

Enabling Debug Logs

Enable the libp2p:ping debug namespace. This can be done by setting the following environment variable before starting your node:

DEBUG=libp2p:ping*

For detailed diagnostics (e.g. libp2p:gossipsub, libp2p:connection-manager)

DEBUG=libp2p:*
PreviousPersistent storageNextCLI Command Reference

Last updated 29 days ago