Run an Attester 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:

  • AVS_WEBAPI_HOST is the address where Validation Service is running

  • AVS_WEBAPI_PORT is the port exposed by the Validation Service

  • 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
AVS_WEBAPI_HOST=localhost
AVS_WEBAPI_PORT=8080

# 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 Attester Nodes

othentic-cli node attester \
  /ip4/127.0.0.1/tcp/9876/p2p/<BOOTSTRAP_NODE_ID> \
  --avs-webapi <AVS_WEBAPI_HOST> \
  --avs-webapi-port <AVS_WEBAPI_PORT> \
  --json-rpc \
  --l1-chain holesky \
  --l2-chain amoy,base-sepolia

The following configurations are mandatory 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 an example docker file to run an Attester node.

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 

Next Steps :

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

Last updated