Skip to content

Commit 640db40

Browse files
authored
Merge pull request #66 from ten-protocol/anthony/3695_node_docs
TEN Validator Cloud Deployment Guide
2 parents ef21774 + 3be3884 commit 640db40

File tree

6 files changed

+244
-7
lines changed

6 files changed

+244
-7
lines changed
214 KB
Loading

docs/assets/ten-validator-flow.png

181 KB
Loading
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
sidebar_position: 3
3+
---
4+
# Node Architecture
5+
6+
## SGX Enclave and Trusted Execution Environment (TEE)
7+
The TEN network leverages Intel Software Guard Extensions (SGX) enclaves to create a secure and trusted execution environment (TEE) for processing transactions and executing smart contracts. SGX enclaves are isolated regions of memory that are encrypted and protected from unauthorized access, ensuring that sensitive data remains confidential and secure. Every transaction and smart contract execution on the TEN network is processed within an SGX enclave, guaranteeing the integrity and confidentiality of the data involved. Additionally, SGX enclaves provide hardware-based attestation, enabling nodes to verify the authenticity of each other and establish trust within the network.
8+
9+
## Node Composition
10+
11+
![TEN Validator Composition](../../assets/ten-validator-composition.png)
12+
13+
The TEN Validator is composed of the following components:
14+
15+
## Host and Enclave Architecture
16+
17+
#### Process Separation
18+
- Separate OS processes for Host and Enclave
19+
- Communication via gRPC
20+
- Enclave managed by independent supervisor
21+
22+
#### Security Considerations
23+
- Minimized TCB (Trusted Computing Base)
24+
- Reduced attestation frequency
25+
26+
### Host Component Responsibilities
27+
- External request handling
28+
- L1/L2 network synchronization
29+
- Secret management and rollup publishing
30+
- Peer node communication
31+
- High-availability management
32+
33+
### Enclave Components and Responsibilities
34+
- Transaction validation and execution
35+
- Smart contract computation
36+
- Cryptographic operations and key management
37+
- State management and confidential data processing
38+
- Attestation generation and verification
39+
- Secure random number generation
40+
- Batch processing and sequencing
41+
42+
## Deployment Containerization
43+
44+
There are four deployment containers on a TEN Validator node:
45+
- **Host**: The host component is responsible for external communications and network operations.
46+
- **HostDB/Postgres**: Postgres is used to store the validator's host state.
47+
- **Enclave**: The enclave component is responsible for sensitive computations and data processing (SGX).
48+
- **EnclaveDB/Edgeless**: Edgeless is used to store the validator's enclave state (SGX).
49+
50+
Running a TEN validator will automatically deploy these containers.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
sidebar_position: 1
3+
---
4+
# Node Overview
5+
Running a node on the TEN network involves participating in the network’s transaction processing, batching, and roll-up mechanisms. As a node operator, you will play a critical role in maintaining the network’s security, scalability, and efficiency. Understanding the flow of transactions and the mechanics of batches and roll-ups is essential for effectively running a node and contributing to the network’s operation.
6+
7+
8+
## Transaction Flow (TX)
9+
![TEN Validator Flow](../../assets/ten-validator-flow.png)
10+
11+
### 1. Transactions
12+
Transactions are the fundamental operations executed on the TEN network, representing actions such as transferring value, interacting with smart contracts, or executing other network functions. Each transaction serves as a discrete unit of activity, altering the state of the network based on its payload.
13+
14+
### 2. Batches
15+
Batches consist of multiple transactions grouped together on the TEN network, functioning similarly to blocks on the Ethereum network. By aggregating transactions into batches, the network enhances throughput and lowers latency, optimizing resource usage and improving overall efficiency.
16+
17+
### 3. Roll-ups
18+
Roll-ups are a layer 2 scaling mechanism employed by the TEN network to securely aggregate and process transactions off-chain, before submitting a compressed version of these transactions to the Ethereum mainnet (Layer 1) for finalization. This approach significantly boosts throughput and reduces latency while maintaining the security guarantees of the Ethereum network.
19+
20+
## Gateway
21+
The TEN Gateway is a network managed service and load balancer that routes transactions to the appropriate TEN validator nodes. It is responsible for securely encrypting and decrypting transactions, ensuring that sensitive data remains confidential throughout the transaction process. Validators interact with the Gateway to receive transactions, process them, and submit them to the Sequencer for batching and roll-up.
22+
23+
## Node Types
24+
There are two types of nodes in the TEN network: Sequencers and Validators. They use the same software but have different roles and responsibilities. As a node operator you will be running a Validator node, but it is important to understand the role of Sequencers in the network.
25+
26+
### Sequencer
27+
The TEN Sequencer is a central node that is responsible for ordering transactions, generating new batches, and creating roll-ups on the TEN network. It is the only node that can create new batches and is responsible for broadcasting these to the network, as well as submitting them to the Ethereum mainnet via roll-up.
28+
29+
30+
### Validator
31+
A TEN Validator is decentralized node that participates in the TEN network by processing transactions, validating transactions and batches against Ethereum L1 roll-ups, and providing data availability. The participation of multiple validators ensures the network’s security and integrity.
32+
33+
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
---
2+
sidebar_position: 2
3+
---
4+
# Node Rewards
5+
6+
As a node operator, your participation is essential in maintaining a secure, reliable, and high-performance network. In recognition of your contributions, TEN has implemented a comprehensive reward structure to incentivize active and consistent engagement in the network’s testnet phases.
7+
8+
---
9+
10+
## Program Overview
11+
12+
TEN is an encrypted Layer 2 network built on Ethereum, designed by the team behind Corda. TEN offers a highly scalable and private environment for Web3 applications,including AI, tokenizing real-world assets (RWA), enabling decentralized financial solutions (DeFi) and on-chain games.
13+
14+
### Objective
15+
16+
TEN’s incentivized testnet rewards participants—including node operators, developers, and users—who actively contribute to testing and improving the network. Node operators play a vital role in decentralizing TEN and ensuring robust node operations, and they are rewarded for maintaining network health, stability, and performance.
17+
18+
---
19+
20+
## Node Operator Rewards Structure
21+
22+
TEN has allocated **22,500,000 TEN** (representing 2.25% of the total token supply) to incentivize contributions across the community, including node operations.
23+
24+
### Rewards Overview
25+
26+
1. **Staking Requirements**: Node operators do not need an initial stake to participate in the testnet (however, a minimum of 50,000 TEN tokens will be required for staking on Mainnet).
27+
2. **ETH-Based Compensation**: Node operators receive rewards paid in **ETH** to help cover hosting costs and encourage active participation.
28+
3. **Delegated Staking Model**: Community members can delegate their TEN tokens to node operators, broadening community involvement and fostering a more decentralized ecosystem.
29+
30+
### Performance-Based Rewards
31+
32+
Performance-based rewards are structured to motivate the consistent and high-quality performance of nodes, as follows:
33+
34+
- **Top 10% Performers**: The highest 10% of node operators, ranked by performance and uptime, will earn the top reward bracket. Top performers will receive a reward equivalent to the minimum mainnet staking requirement and will be offered priority access to participate in the mainnet launch.
35+
- **Remaining Participants**: Node operators outside the top 10% but in the top 20% will also receive a reward based on their contributions and performance.
36+
37+
### Participation-Based Rewards
38+
39+
Node operators who meet minimum participation requirements but do not rank in the top 20% will still receive a reward. These rewards aim to foster inclusivity and recognize the contributions of all node operators.
40+
41+
---
42+
43+
## Testnet Phases & Participation
44+
45+
The incentivized testnet is split into three phases, each lasting approximately **6-8 weeks**, followed by a short intermission between phases. The phases are designed to test and validate different aspects of the network:
46+
47+
1. **Phase 1**: Focus on onboarding developers and user quests aimed at network resilience.
48+
2. **Phase 2**: Dedicated to expanding node operations and enhancing network decentralization.
49+
3. **Phase 3**: Final phase with an emphasis on testing newly deployed dApps and security-focused initiatives.
50+
51+
### Eligibility
52+
53+
- **Application**: Node operators can apply via the [Validator Application Form](https://cform.coinlist.co/forms/56274a78-8291-4899-bee1-a68ecbc5b2b8).
54+
- **Selection**: Applications are prioritized based on node management experience and community commitment, with selected participants notified by email.
55+
56+
\* Jurisdictional Limitations will be applied.
57+
58+
## Additional Information
59+
60+
- **Updates and Notifications**: Important updates will be shared via the **TEN Discord testnet channel** and by email for selected participants.
61+
- **Documentation**: Technical documents and guides are available on TEN’s official documentation site, with more added throughout the testnet phases.
62+
63+
### Reward Distribution
64+
65+
All rewards will be distributed after the mainnet launch, following the tokenomics vesting schedule outlined in the official TEN whitepaper.
66+
67+
---
68+
69+
This Node Rewards program aims to build a community-driven network powered by participants' shared efforts and contributions. By rewarding commitment and performance, TEN is cultivating a stable, high-performance Layer 2 ecosystem that is decentralized, secure, and inclusive.
70+
71+
---
72+
73+
For further queries, please reach out via our **[Discord channel](https://discord.gg/tenprotocol)** or reach out on to **[@TENprotocol](https://twitter.com/tenprotocol)** on X.
Lines changed: 88 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,93 @@
11
---
2-
sidebar_position: 3
2+
sidebar_position: 4
33
---
4-
# Running a node
4+
# Running a TEN Validator Node on Azure
55

6-
Thank you for your interest in running a node on the Ten testnet.
6+
This guide provides detailed instructions to set up and manage a TEN Validator Node on Azure using Terraform and Ansible. Due to TEN’s use of SGX architecture and cloud-specific security assurances, all current deployments are limited to cloud infrastructure to mitigate risks associated with physical attacks. A proof-of-cloud assertion, provided by TEN, certifies the security and reliability of each validator node running in the cloud.
77

8-
Reasons for running a node on testnet:
9-
- The best performers will receive rewards as per the [FAQ](../faq.md)
10-
- The top performers in this group will be invited to run nodes on mainnet
8+
---
9+
10+
## Overview
11+
12+
The deployment process leverages **Terraform** for Azure infrastructure provisioning and **Ansible** for configuring the Validator Node. By following this guide, you’ll set up a secure, compliant environment that meets TEN’s standards for validator operations.
13+
14+
- **Terraform**: Automates the creation of Azure resources for a TEN Validator Node.
15+
- **Ansible**: Configures and deploys node software on the provisioned infrastructure.
16+
17+
---
18+
19+
## Requirements
20+
21+
Before starting, ensure the following dependencies are installed on your local machine:
22+
23+
- [**Terraform**](https://www.terraform.io/downloads.html) (version >= 0.12)
24+
- [Terraform Installation Guide](https://learn.hashicorp.com/tutorials/terraform/install-cli)
25+
- [**Ansible**](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html)
26+
- [Ansible Installation guide](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html)
27+
- **Required Ansible Collections**: Install with:
28+
```sh
29+
ansible-galaxy collection install community.docker community.crypto
30+
```
31+
- [**Azure CLI**](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli): For authenticating and managing Azure resources.
32+
- [**Docker**](https://docs.docker.com/get-docker/): Required for node deployment.
33+
- [**Docker Compose**](https://docs.docker.com/compose/install/): Used for managing containerized services.
34+
- [**Git**](https://git-scm.com/downloads): For repository cloning and version control.
35+
36+
---
37+
## Clone the TEN Validator Repository
38+
```
39+
git clone https://github.com/ten-protocol/ten-validator.git
40+
cd ten-validator
41+
```
42+
## Azure Setup Instructions (Terraform)
43+
44+
### Step 1: Authenticate and Configure Azure
45+
46+
1. **Log into Azure**:
47+
```sh
48+
az login
49+
2. Set Your Azure Subscription: Specify the Azure subscription for deploying the resources:
50+
```sh
51+
az account set --subscription <your-subscription-id>
52+
```
53+
54+
### Step 2: Configure Terraform Variables (optional)
55+
```
56+
cp terraform.tfvars.example terraform.tfvars
57+
```
58+
59+
### Step 3: Deploy the Terraform Script
60+
```
61+
terraform init
62+
terraform apply
63+
```
64+
65+
### Step 4: Access the Validator Node (Optional)
66+
1. ```chmod +x get-key.sh ./get-key.sh```
67+
2. ```ssh -i <path-to-key> <username>@<public-ip>```
68+
69+
## TEN Validator Setup Instructions (Ansible)
70+
1. Network Configuration: Node network settings are located in `ansible/files/network_vars.yml`. These settings are typically not changed and are specific to the L2 network. One will be provided by the TEN team for ITN (testnet) and another for mainnet.
71+
2. Run the Installation Script: Use Ansible to configure and deploy the TEN Validator Node:
72+
```
73+
chmod +x install-ten.sh
74+
./install-ten.sh
75+
```
76+
During deployment, you will be prompted to enter:
77+
78+
- Host ID: Public key of the validator node wallet
79+
80+
- Private Key: Private key of the validator node wallet
81+
82+
- Host Public P2P Address: Public IP or DNS of the node
83+
84+
- SSH Details: Username and key path (or password if applicable)
85+
86+
- L1 WS URL: WebSocket URL for the Layer 1 node (e.g., Infura)
87+
88+
- Postgres DB Host: Leave blank to provision a new database
89+
90+
Note: If Terraform provisioned the VM, default values are often applicable—just press Enter to accept.
1191
12-
Applications to run a node on testnet will be open at a later stage in the campaign. Join the Ten [Discord](https://discord.gg/tenprotocol) to stay up to date.
92+
## Managing the Validator Node
93+
Coming soon! (monitoring, backups, tear down, etc.)

0 commit comments

Comments
 (0)