threefoldtech / tfchain

Threefold Chain.
Apache License 2.0
15 stars 11 forks source link

Node Verification System with Initial Verification Period, stacking, and Workload Deployment Testing. #1001

Open sameh-farouk opened 2 months ago

sameh-farouk commented 2 months ago

The motivation behind this feature request is to prevent the registration of fake nodes and significantly improve the quality of the nodes ledger by combining multiple layers of verification, staking, and workload testing.

Summary:

The proposal is to implement a comprehensive Node Verification System to ensure that newly registered nodes in the network are legitimate and active. The system will consist of the following components:

  1. Initial Verification Period.
  2. Staking/Depositing Mechanism.
  3. Unique Workload Deployment.
  4. Trusted Executors with the ability to verify nodes and update their status on-chain.

Key Features:

1. Initial Verification Period

Objective: When a node is newly registered, it must pass an initial verification period during which it must stay online and respond to basic checks (e.g., pings over RMB).

Implementation:

2. Staking/Depositing Mechanism

Objective: Introduce a staking/depositing mechanism to incentivize honest node registration and penalize bad actors. Node operators must lock up a certain amount of tokens as a stake during registration.

Implementation:

3. Unique Workload Deployment

Objective: Ensure that nodes can handle legitimate workloads by deploying unique resource-intensive workloads to test their capabilities. Nodes must run these workloads and provide verifiable proof of execution.

Implementation:

4. Node Verifiers (Trusted Executors)

Objective: Node Verifiers are special entities with known public keys on the blockchain responsible for verifying nodes. They will have on-chain privileges to update node verification status.

Implementation:

Workflow:

  1. Node Registration: A new node is registered on the chain but is marked as unverified.

  2. Staking: During registration, the node operator locks up a predefined amount of tokens as a stake. If the node fails verification, the stake is slashed.

  3. Initial Verification Period: The node enters the verification period, where it must maintain consistent uptime and respond to health checks.

  4. Workload Deployment: Trusted executors deploy a unique workload to the node, which must run it and provide proof of successful execution.

  5. Verification: If the node passes the verification period, staking, and workload checks, the Nodes Verifiers update the node’s status on-chain by setting the isVerified flag to true.

  6. (Optional) Ongoing Monitoring: Node Verifiers continue to monitor the node’s status over time, ensuring it remains compliant with uptime and resources requirements.

Benefits:

Action Items: