🌐Node Operators

AVS network is composed of many nodes working simultaneously on validating tasks published to the network.

Overview


The Othentic Stack utilizes libp2p for inter-node communication.

Four node types exist:

  • Task Performer

  • Task Attesters

  • Attestations Aggregator

  • Bootstrap Node

The Othentic Stack enables the deployment of a whole network, including bootstrapped peer discovery, which allows nodes to find each other over the network.

Task Performer

Task Performer is an AVS Operator that executes a task, provides a Proof of Task, and sends the results to Attesters. After successfully executing a task, the Task Performer publishes an event via peer-to-peer networking for Attester nodes to discover.

The RPC call that the Task Performer sends to the Othentic Client:

{
    "jsonrpc": "2.0",
    "method": "sendTask",
    "params": [<proofOfTask>, <data>, <taskDefinitionId>,  <performerAddress>, <signature>]
}

Task Attesters

Task Attesters are AVS Operators' quorum that attests to the validity of the executed task. Each task must be attested as either "valid" or "invalid".

The Operator's voting power is proportional and calculated against the amount of re-stake assets staked on the shared security layer, referred to as “dynamic voting power.” The re-staked effective balance determines each Operator's influence in the consensus process. If over ⅔ of the quorum's voting power attest "valid", the task is considered approved. If over ⅓ of the quorum's voting power attest "invalid", the task is rejected, and the quorum executes a slashing event to the Performer. The Attesters run the validation logic using a local HTTP request to the AVS WebAPI.

curl -X POST \
  http://localhost/validate_task \
  -H 'Content-Type: application/json' \
  -d '{
    "proofOfTask": "{your_proof_of_task_data}",
    "data": "{Represent an additional data to be added to the Consensus}",
    "taskDefinitionID": "{The ID of specific Task definition}",
    "performer": "{The address of the Task Performer}"
  }'

Aggregator

The Aggregator listens to events from the Attester nodes and monitors the necessary voting power contribution to a certain task. The Aggregator aggregates the signatures of the Attesters into a BLS aggregated signature and submits a transaction to the AttestationCenter smart contract. After successful validation, the Performer, Attesters, and Aggregator are eligible to claim task rewards.

Currently, the Aggregator node also acts as your bootstrap node. This might change in the future.

Bootstrap

A bootstrap node is the node responsible for connecting peers on the network. Every peer initially connects to the bootstrap node to discover other peers. You can also run multiple bootstrap nodes. The Aggregator node also plays the role of a bootstrap node.

The bootstrap node is a crucial part of your P2P network. It should have high availability so new nodes can join the network. If the bootstrap node is down, new nodes cannot join the network (existing nodes continue to work).

Setup


.env file

Change the .env.example file to .env and add the empty values. Contact Othentic support if you don't know what values you should use.

The .env.example file contains a bootstrap seed & id. While you can use these for starters, it is recommended to generate a new seed & id (see below).

Generating bootstrap seed & id

Your bootstrap node requires a seed for its encrypted transport. A bootstrap seed is simply a random 32-byte sequence.

To generate a new bootstrap seed, use openssl:

openssl rand -hex 32

If you like to immediately insert it into the .env, use the following command:

echo "OTHENTIC_BOOTSTRAP_SEED=$(openssl rand -hex 32)" >> .env

Once you added the new seed to your .env, use the yarn bootstrap-id command:

$ yarn bootstrap-id
...
Your node ID is:
12D3KooWBNFG1QjuF3UKAKvqhdXcxh9iBmj88cM5eU2EK5Pa91KB
✨  Done in 3.72s.

Copy the generated node ID and save it in your .env:

OTHENTIC_BOOTSTRAP_ID=12D3KooWBNFG1QjuF3UKAKvqhdXcxh9iBmj88cM5eU2EK5Pa91KB

Running a network


To find your BOOTSTRAP_NODE_ID:

othentic-cli node aggregator get-id

Run the aggregator node (and enable the JSON-RPC endpoint):

othentic-cli node aggregator --json-rpc

Run the attester nodes:

othentic-cli node attester \
    /ip4/127.0.0.1/tcp/9876/p2p/<BOOTSTRAP_NODE_ID> \
    --avs-webapi <HOST> \
    --avs-webapi-port <PORT>

Last updated