NCNs

An overview of the Node Consensus Network (NCN) component.

Overview

A Node Consensus Network (NCN) is a decentralized service or network that reaches onchain consensus on offchain data or workloads. This may include oracles, DePIN services, bridges, co-processors, or new chains. NCNs represent one of the core components in the Jito Restaking ecosystem, alongside Operators and Vaults.

It is one of typical NCN design (On-Chain NCN Program), so every NCN does not have to follow this design.

Key functionalities include:

  • Authority Management: Designate and validate admins for various NCN operations
  • Operator and Vault Tracking: Manage relationships with operators and vaults through mutual opt-in mechanisms
  • Consensus Coordination: Facilitate onchain consensus on offchain execution results
  • Reward Distribution: Calculate and distribute rewards to participating operators, vaults and stakers
  • Asset Weight Management: Define supported tokens and their respective weights in the network

On-Chain NCN Program Components

NCN consists of several key components that work together to provide decentralized services:

Pricing

  • Defines supported tokens and their respective weights in the network, determining how different assets are valued within the NCN ecosystem
  • Manages token weight tables that influence voting power and reward distribution
  • Controlled by the weight_table_admin role

Snapshot

  • Captures the current state of Vaults, Operators, and Operator Stake Weights at specific intervals to establish consensus baselines
  • Creates a frozen, point-in-time view of the network's state for consistent voting
  • Includes EpochSnapshot accounts to track total stake weight and participant counts
  • Records individual OperatorSnapshot accounts for each operator's delegated stake weights

Core Logic

  • Implements the fundamental consensus mechanisms that govern how nodes participate and validate output within the network
  • Handles vote tallying and determines when consensus thresholds are reached
  • Manages epoch transitions and consensus finalization
  • Defines slashing conditions and enforcement logic

Reward Payments

  • Manages how rewards are calculated and distributed to participating operators, vaults and stakers based on their contributions to the network
  • Implements stake-weighted reward distribution mechanisms
  • Handles fee collection and distribution according to NCN-specific logic
  • Coordinates with the restaking program for reward processing

Key Components

1. NCN Structure

The NCN account structure is designed to handle various administrative and operational roles within the network:

FieldTypeDescription
basePubkeyThe base account used as a PDA seed.
adminPubkeyOverall administrator of the NCN.
operator_adminPubkeyAdmin responsible for managing operators.
vault_adminPubkeyAdmin responsible for managing vaults.
slasher_adminPubkeyAdmin responsible for managing slashers.
delegate_adminPubkeyAdmin for delegating assets of NCN account.
metadata_adminPubkeyAdmin responsible for NCN metadata updates.
weight_table_adminPubkeyAdmin for managing asset weight tables.
ncn_program_adminPubkeyAdmin for on-chain programs associated with the NCN.
indexu64Index of the NCN account.
operator_countu64Number of operators registered with the NCN.
vault_countu64Number of vaults registered with the NCN.
slasher_countu64Number of slashers registered with the NCN.

Finding NCN PDA

use jito_restaking_core::ncn::Ncn;

let program_id = jito_restaking_program::id();
let base_pubkey = pubkey!("base pubkey here");
let ncn_pubkey = Ncn::find_program_address(&program_id, &base_pubkey).0;

Node Operator Client

The Node Operator Client represents the core off-chain logic of the NCN. This is where the actual work and computation happens that the NCN is designed to coordinate and secure.

Key characteristics:

  • Runs arbitrary computation as defined by the NCN's specific requirements
  • Posts data on-chain through custom instructions
  • Signs transactions using the operator keypair
  • Executes the offchain services that the NCN was designed to provide

Sample Node Operator Clients:

Permissionless Cranker

For all of the permissionless operations that need to occur on a regular cycle, NCNs require a client that continually executes instructions to maintain network health and progression.

Functions include:

  • Triggering epoch transitions and snapshots
  • Processing routine maintenance operations
  • Executing time-sensitive consensus operations
  • Managing account cleanup and optimization

Sample Permissionless Cranker:

NCN Operation Cycle

NCNs operate in continuous cycles that involve:

  1. Setup Phase: Establishing relationships with operators and vaults through mutual opt-in
  2. Snapshot Phase: Capturing network state for consistent consensus baselines
  3. Execution Phase: Operators perform offchain work and submit results
  4. Consensus Phase: Onchain vote tallying and consensus determination
  5. Reward Phase: Distribution of rewards based on performance and stake weights
  6. Maintenance Phase: Account cleanup and network parameter updates

Administrative Roles

NCNs use a sophisticated role-based access control system:

  • Primary Admin: Overall control and high-level governance
  • Operator Admin: Manages operator approvals and relationships
  • Vault Admin: Manages vault approvals and delegation relationships
  • Slasher Admin: Manages slashing logic and enforcement
  • Delegate Admin: Handles asset delegation from NCN accounts
  • Metadata Admin: Updates NCN configuration and metadata
  • Weight Table Admin: Manages token weights and pricing parameters
  • NCN Program Admin: Controls associated onchain programs