Operator Pool

Documentation for Operator Pool in the EigenLayer-AVS system.

Purpose and Overview#

The Operator Pool is a core component of the EigenLayer-AVS Aggregator service that manages and tracks connected operators. It maintains a registry of all active operators in the system, their connection status, and relevant metadata. The Operator Pool enables the Aggregator to monitor operator health, distribute tasks, and maintain an up-to-date view of the operator network.

For information about the Aggregator that houses this component, see Aggregator. For details about the operators themselves, see Operator.

Architecture and Components#

The Operator Pool is primarily responsible for tracking operator nodes and maintaining their status information in the storage layer. It consists of two main components:

  1. The OperatorPool struct, which provides methods for operator status management
  2. The OperatorNode struct, which represents individual operator information

Sources:

Data Flow and Integration#

The Operator Pool integrates with other components of the EigenLayer-AVS system as follows:

Sources:

Operator Node Data Structure#

The OperatorNode struct stores comprehensive information about each operator:

FieldTypeDescription
AddressstringEthereum address of the operator
RemoteIPstringIP address of the operator node
LastPingEpochint64Unix timestamp of the last ping
VersionstringVersion of the operator software
MetricsPortint32Port for accessing operator metrics
BlockNumerint64Latest block number processed by the operator
EventCountint64Count of events processed by the operator

Sources:

Core Functionality#

Operator Check-in Mechanism#

Operators periodically ping the Aggregator with their current status. The check-in process is handled by the Checkin method of the OperatorPool:

  1. The operator sends a Checkin message via gRPC
  2. The RPC server authenticates the operator
  3. The operator's status is updated in the database

Sources:

Operator Status Retrieval#

The GetAll method retrieves all operator information from the database:

  1. Get all entries with the operator prefix from the database
  2. Unmarshal the data into OperatorNode structs
  3. Return the list of operator nodes

The method is used by both the HTTP server's /operator and /telemetry endpoints to provide operator information.

Sources:

Operator Authentication#

The Aggregator includes authentication mechanisms for operators, though it's not enforced in the current version:

The authentication is verified through the verifyOperator method, which checks the validity of signatures submitted by operators.

Sources:

User Interface#

The Operator Pool data is accessible through two HTTP endpoints:

  1. /operator - Returns a JSON representation of all operators
  2. /telemetry - Provides a user-friendly HTML dashboard showing operator status

The HTML dashboard displays each operator with:

  • Ethereum address (linked to Etherscan)
  • EigenLayer profile link
  • Software version
  • Last seen time
  • Latest block number
  • Event count

Sources:

Implementation Details#

Storage#

The Operator Pool uses BadgerDB for persistent storage, with a specific prefix for operator keys:

Each operator is stored as a JSON-serialized OperatorNode struct, with a key of the form operator:<id>.

Sources:

Time Formatting#

The LastSeen method of OperatorNode formats the time since the last ping in a human-readable format (e.g., "5m30s ago", "2h15m ago", "3d4h ago").

Sources:

The OperatorNode struct includes helper methods for generating external links:

  • EtherscanURL() - Returns a link to the operator's address on Etherscan
  • EigenlayerURL() - Returns a link to the operator's profile on EigenLayer

Sources:

System Integration#

The Operator Pool is initialized when the Aggregator starts:

  1. The Aggregator creates an empty OperatorPool in NewAggregator()
  2. When the database is initialized in initDB(), the db reference is passed to the operatorPool

Sources:

Conclusion#

The Operator Pool is a critical component of the EigenLayer-AVS system, providing real-time tracking and management of operator nodes. It enables the Aggregator to maintain an up-to-date view of the operator network, monitor operator health, and provide visibility into the system's operational status.

Feature this wiki to auto refresh weekly

Try DeepWiki on your private codebase with Devin