Run an Aggregator Node

The Othentic CLI includes built-in node software that AVS Operators run to participate in consensus.

Read More

Prerequisites

  1. Non zero Voting Power in the AVS Attestation center contract

  2. AVS Contract addresses

1

Environment Setup

Create or edit a .env file with your configuration:

  • Specify L1_CHAIN and L2_CHAIN variables; See Supported Networks page for chain names

  • Specify L1_RPC and L2_RPC, ensure you are using paid, reliable RPC endpoints

  • Specify the

    • PRIVATE_KEY: Set this to the Consensus Key

    • OPERATOR_ADDRESS: Set this to the public address of the Controller Key. the public address of the account that has signed up with the shared security protocol - the address to which stakers delegate their staked assets

# Network Configuration
BOOTSTRAP_NODE_ID=12D3KooW... # Bootstrap Peer ID

# Chain Configuration
L1_CHAIN=holesky              # Single L1 chain
L2_CHAIN=amoy,base-sepolia    # Comma-separated L2 chains

# RPC Endpoints
L1_RPC=<HOLESKY_RPC_URL>
L2_RPC=amoy@<AMOY_RPC_URL>,base-sepolia@<BASE_SEPOLIA_RPC_URL> # Comma-separated L2 names@RPCs

# Operator Configuration
OPERATOR_ADDRESS=0x...        # Operator public address
PRIVATE_KEY=0x...             # Consensus Key if separating operator keys
2

Running Aggregator Nodes

othentic-cli node aggregator \
  --json-rpc \
  --l1-chain holesky \
  --l2-chain amoy,base-sepolia \
  --internal-tasks \
  --metrics \
  --delay 1500
3

Health Check

When running the node with the --json-rpc flag, the RPC server starts and provides a /healthcheck endpoint to verify its status. For example:

curl -X GET http://localhost:8545/healthcheck

This endpoint should return OK if the node is functioning properly, indicating the RPC service is active. For more detailed monitoring, use Metrics or Logging.

Advanced Features

Custom P2P Messaging

Enable custom p2p messaging if required by the AVS.

othentic-cli node attester \
    /ip4/127.0.0.1/tcp/9876/p2p/<BOOTSTRAP_NODE_ID> \
    --json-rpc \
    --json-rpc.custom-message-enabled

For more information, see the Custom Messaging page.

Operator Status Throttling

Enable throttling mechanism to reduce idle RPC usage, with a default of 5000 milliseconds.

othentic-cli node attester \
  /ip4/127.0.0.1/tcp/9876/p2p/<BOOTSTRAP_NODE_ID> \
  --avs-webapi localhost \
  --avs-webapi-port 8080 \
  --json-rpc \
  --status-check-interval 8000 

The following configurations are mandatary for production AVSs.

Metric Collection & Monitoring

Enable performance metrics collection:

othentic-cli node attester \
  /ip4/127.0.0.1/tcp/9876/p2p/<BOOTSTRAP_NODE_ID> \
  --avs-webapi localhost \
  --avs-webapi-port 8080 \
  --json-rpc \
  --metrics

For more information, see the Metrics and Monitoring page.

Persistent Storage

Enable P2P layer data caching and peerStore usage:

othentic-cli node attester \
  /ip4/127.0.0.1/tcp/9876/p2p/<BOOTSTRAP_NODE_ID> \
  --avs-webapi localhost \
  --avs-webapi-port 8080 \
  --p2p.datadir ./data

For more information, see the Persistent Storage page.

Announced Addresses (NAT/Load Balancer Support)

The announce option in libp2p allows nodes to explicitly define which addresses they advertise to peers, overriding any automatically detected addresses. This is particularly useful when running behind a load balancer or NAT, where the external address needs to be manually set.

  1. Get Peer ID using following command

othentic-cli node get-id --node-type attester
  1. Add the Peer ID from above step in the below option

othentic-cli node attester \
  /ip4/127.0.0.1/tcp/9876/p2p/<BOOTSTRAP_NODE_ID> \
  --avs-webapi localhost \
  --avs-webapi-port 8080 \
  --json-rpc \
  --announced-addresses "/dnsaddr/my-node.example.com/tcp/9876/p2p/{Peer ID},/ip4/203.0.113.1/tcp/9876/p2p/{Peer ID}"

Here is a link to the docker file to run an Aggregator node

Next Steps :

Refer to the AVS-specific documentation for detailed instructions on running an Operator.

Last updated