Skip to content

Commit 562fc25

Browse files
committed
Merge branch 'master' of github.com:jito-foundation/ncn-portal
2 parents 89eb27b + ab0dfba commit 562fc25

File tree

7 files changed

+35
-146
lines changed

7 files changed

+35
-146
lines changed

content/docs/ncn-design/meta.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,9 @@
22
"title": "NCN Design",
33
"pages": [
44
"overview",
5-
"pricing",
6-
"snapshot",
7-
"core-logic",
8-
"reward-payments",
9-
"permissionless-cranker",
10-
"node-operator-client"
5+
"on-chain-ncn",
6+
"node-operator-client",
7+
"permissionless-cranker"
118
],
129
"defaultOpen": true
1310
}
File renamed without changes.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"title": "On-Chain NCN Program",
3+
"pages": [
4+
"pricing",
5+
"snapshot",
6+
"core-logic",
7+
"reward-payments"
8+
],
9+
"defaultOpen": false
10+
}
File renamed without changes.
File renamed without changes.
File renamed without changes.

content/docs/ncn-design/overview.mdx

Lines changed: 22 additions & 140 deletions
Original file line numberDiff line numberDiff line change
@@ -3,156 +3,38 @@ title: Overview
33
description: Understanding the technical architecture and components of Node Consensus Networks
44
---
55

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

8-
## Onchain NCN Program
8+
## On-Chain NCN Program
99

10-
11-
<Callout>
12-
NCN consisits of several components:
10+
NCN consisits of several components:
1311

14-
- Pricing
15-
- Snapshot
16-
- Core Logic
17-
- Reward Payment
18-
</Callout>
19-
20-
### Pricing
21-
22-
#### Tracked Mints
23-
24-
Register all vault's [support token] mint account that is associated with NCN.
25-
Permissionless Cranker can [initialize] and [register] through Jito Tip Router Program.
26-
27-
##### TrackedMints
28-
29-
30-
| Field | Type | Description |
31-
| ------------------- | ----------------- | ---------------------------------------------------- |
32-
| ncn | Pubkey | NCN account pubkey. |
33-
| st_mint_list | [MintEntry; 16] | The list of support token mint account pubkey. |
34-
35-
36-
##### MintEntry
37-
38-
| Field | Type | Description |
39-
| ------------------- | ----------------- | ---------------------------------------------------- |
40-
| st_mint | Pubkey | The mint account of support token. |
41-
| vault_index | u64 | The index of vault. |
42-
43-
44-
[support token]: https://github.com/jito-foundation/restaking/blob/406903e569da657035a2ca71ad16f8a930db6940/vault_core/src/vault.rs#L45
45-
[initialize]: https://github.com/jito-foundation/jito-tip-router/blob/master/program/src/initialize_tracked_mints.rs
46-
[register]: https://github.com/jito-foundation/jito-tip-router/blob/master/program/src/register_mint.rs
47-
48-
#### Weight Table
49-
50-
Determines the relative weight of assets (supported_mints) deposited in all the Vaults associated with NCN.
51-
Permissionless Cranker can initialize `WeightTable` each epoch through [`initialize_weight_table`] instruction on Jito Tip Router Program and NCN admin update it.
52-
53-
##### WeightTable
54-
55-
| Field | Type | Description |
56-
| ------------------- | ----------------- | ---------------------------------------------------- |
57-
| ncn | Pubkey | NCN account pubkey. |
58-
| ncn_epoch | u64 | The NCN epoch for which the weight table is valid. |
59-
| slot_created | u64 | Slot weight table was created. |
60-
| table | [WeightEntry; 32] | The weight table. |
61-
62-
63-
##### WeightEntry
64-
65-
| Field | Type | Description |
66-
| ------------------- | ----------- | ---------------------------------------------------------- |
67-
| mint | Pubkey | The supported mint account pubkey in the vault. |
68-
| weight | u128 | Usually price of the asset. |
69-
| slot_set | u64 | The slot that weight entry is set. |
70-
| slot_updated | u64 | The slot that weight entry is updated. |
71-
72-
73-
<Callout>
74-
Weight is flexible, if NCNs want to give one asset more "weight" over others, they can increase its value relative to the others.
75-
</Callout>
76-
77-
78-
[`initialize_weight_table`]: https://github.com/jito-foundation/jito-tip-router/blob/master/program/src/initialize_weight_table.rs
79-
12+
- <a href="./on-chain-ncn/pricing" target="_blank">Pricing</a>
13+
- Defines supported tokens and their respective weights in the network, determining how different assets are valued within the NCN ecosystem.
14+
- <a href="./on-chain-ncn/snapshot" target="_blank">Snapshot</a>
15+
- Captures the current state of Vaults, Operators, and Operator Stake Weights at specific intervals to establish consensus baselines.
16+
- <a href="./on-chain-ncn/core-logic" target="_blank">Core Logic</a>
17+
- Implements the fundamental consensus mechanisms that govern how nodes participate and validate output within the network.
18+
- <a href="./on-chain-ncn/reward-payments" target="_blank">Reward Payments</a>
19+
- Manages how rewards are calculated and distributed to participating operators, vaults and stakers based on their contributions to the network.
8020

81-
### Snapshot
82-
83-
Determines the current status of all active NCNs and Vaults, and condenses the stake weight they each have for the current epoch in one account per operator.
84-
85-
#### Epoch Snapshot
86-
87-
| Field | Type | Description |
88-
| ------------------------------- | ----------- | ---------------------------------------------------------- |
89-
| ncn | Pubkey | NCN account pubkey. |
90-
| ncn_epoch | u64 | The NCN epoch for which the Epoch snapshot is valid. |
91-
| slot_created | u64 | The slot that epoch snapshot is created. |
92-
| slot_finalized | u64 | The slot that epoch snapshot is finalized. |
93-
| ncn_fees | u64 | The fees of NCN. |
94-
| operator_count | u64 | The count of operator in this epoch. |
95-
| vault_count | u64 | The count of vault in this epoch. |
96-
| operators_registered | u64 | The count of operator that registered in this epoch. |
97-
| valid_operator_vault_delegation | u64 | The count of operator delegation is registered. |
98-
| stake_weight | u128 | Counted as each delegate gets added. |
99-
100-
101-
#### Operator Snapshot
102-
103-
##### OperatorSnapshot
104-
105-
| Field | Type | Description |
106-
| ------------------------------------- | ------------------------------ | ---------------------------------------------------------- |
107-
| operator | Pubkey | NCN account pubkey. |
108-
| ncn | Pubkey | The NCN epoch for which the Epoch snapshot is valid. |
109-
| ncn_epoch | u64 | The NCN epoch for which the Epoch snapshot is valid. |
110-
| slot_created | u64 | The slot that epoch snapshot is created. |
111-
| slot_finalized | u64 | The slot that epoch snapshot is finalized. |
112-
| is_active | bool | The fees of NCN. |
113-
| ncn_operator_index | u64 | The count of operator in this epoch. |
114-
| operator_index | u16 | The count of vault in this epoch. |
115-
| operator_fee_bps | u64 | The count of operator that registered in this epoch. |
116-
| vault_operator_delegation_count | u64 | The count of operator delegation. |
117-
| vault_operator_delegations_registered | u64 | The count of operator delegation is registered. |
118-
| valid_operator_vault_delegations | u64 | Valid operator delegation. |
119-
| stake_weight | u128 | The stake weight of the operator. |
120-
| vault_operator_stake_weight | [VaultOperatorStakeWeight; 32] | The vault operator stake weight. |
121-
122-
123-
##### VaultOperatorStakeWeight
124-
125-
| Field | Type | Description |
126-
| ------------------------------------- | ------------------------------ | ---------------------------------------------------------- |
127-
| vault | Pubkey | Vault account pubkey. |
128-
| stake_weight | u128 | The stake weight of this operator associated with vault. |
129-
| vault_index | u64 | The index of vault. |
130-
131-
132-
### Core Logic
133-
134-
This is the essence of the NCN, where Node Operators post data on chain that proves they did their job, and the NCN can run actions based on those results.
135-
136-
#### Keeper
137-
138-
Keeper can publish some data into on-chain with consensus.
139-
140-
141-
### Rewards Payment
142-
143-
Based on the operators who successfully performed the last step, the NCN calculates payments for the Operators and their Vaults, and distributes payments pro-rata according to their stake weight.
144-
145-
In progress
14621

14722
## Node Operator Client
14823

149-
This is the core off-chain logic of the NCN. It will run some arbitrary computation, and post some data on chain to a custom instruction, signing the transaction with the operator keypair.
24+
This is the core off-chain logic of the NCN.
25+
It will run some arbitrary computation, and post some data on chain to a custom instruction, signing the transaction with the operator keypair.
15026

15127
Sample Node Operator Client:
15228

153-
- [solana-merkle-root-uploader](https://github.com/jito-foundation/jito-solana/blob/837300fa58cb450e041443bafc6e21a7ee8f15b7/tip-distributor/src/bin/merkle-root-uploader.rs)
154-
- [stakenet-keeper](https://github.com/jito-foundation/stakenet/blob/master/keepers/stakenet-keeper/src/main.rs)
29+
- <a href="https://github.com/jito-foundation/jito-tip-router/blob/master/tip-router-operator-cli/Cargo.toml" target="_blank">Tip Router Operator Client</a>
30+
- <a href="https://github.com/jito-foundation/jito-solana/blob/master/tip-distributor/src/bin/merkle-root-uploader.rs" target="_blank">Solana Merkle Root Uploader</a>
31+
- <a href="https://github.com/jito-foundation/stakenet/blob/master/keepers/stakenet-keeper/src/main.rs" target="_blank">Stakenet Keeper</a>
32+
15533

15634
## Permissionless Cranker
15735

158-
For all of the permissionless operations that need to occur on a regular cycle, we need a client that is continually executing instructions.
36+
For all of the permissionless operations that need to occur on a regular cycle, we need a client that is continually executing instructions.
37+
38+
Sample Permissionless Cranker:
39+
40+
- [Jito Tip Router Keeper](https://github.com/jito-foundation/jito-tip-router/blob/master/cli/src/keeper/mod.rs)

0 commit comments

Comments
 (0)