Validator nodes | Diem Documentation (2024)

A Diem node is a peer entity of the Diem ecosystem that tracks the state of the Diem Blockchain. Clients interact with the blockchain via Diem nodes. There are two types of nodes:

Each Diem node comprises several logical components:

  • JSON-RPC service (disabled in validator nodes)
  • Mempool
  • Consensus (disabled in FullNodes)
  • Execution
  • Virtual Machine
  • Storage
  • State synchronizer

The Diem Core software can be configured to run as a validator node or as a FullNode.

Introduction#

When a transaction is submitted to the Diem Blockchain, validator nodes run a distributed consensus protocol, execute the transaction, and store the transaction and the execution results on the blockchain. Validator nodes decide which transactions will be added to the blockchain and in which order.

The Diem Payment Network uses a Byzantine Fault Tolerance (BFT) consensus protocol for validator nodes to agree on the ledger of finalized transactions and their execution. Validator nodes process these transactions to include them in the blockchain’s database, which they maintain. This means that validator nodes always have the current state of the blockchain.

A validator node communicates directly with other validator nodes over a hidden network. It may be configured to store either all or part of the historical data from the Diem Blockchain. FullNodes are an external validation resource for finalized transaction history. They receive transactions from upstream nodes and then re-execute them locally (the same way a validator node executes transactions). FullNodes store the results of the re-execution to local storage. In doing so, they will notice and can provide evidence if there is any attempt to rewrite history. This helps to ensure that the validator nodes are not colluding on arbitrary transaction execution.

The DiemBFT consensus protocol provides fault tolerance of up to one-third of malicious validator nodes.

Validator node components#

Each Diem node comprises several logical components:

  • JSON-RPC service (disabled in validator nodes)
  • Mempool
  • Consensus (disabled in FullNodes)
  • Execution
  • Virtual Machine
  • Storage
  • State synchronizer

Validator nodes | Diem Documentation (1)

Mempool#

Mempool is a validator node component that holds an in-memory buffer of transactions that have been submitted but not yet agreed upon and executed. This buffer is replicated between validator nodes.

The JSON-RPC service of a FullNode sends transactions to a validator node's mempool. Mempool performs initial checks on the requests to protect the other parts of the validator node from corrupt or high volume input. When a new transaction passes the initial checks and is added to the mempool, it is then shared to the mempools of other validator nodes in the Diem Payment Network.

When a validator node is the leader, its consensus component pulls the transactions from its mempool and proposes the order of the transactions that form a block. The validator quorum then votes on the proposal.

Consensus#

Consensus is the validator node component that is responsible for ordering blocks of transactions and agreeing on the results of execution by participating in the consensus protocol with other validator nodes in the network.

Execution#

Execution is a validator node component that coordinates the execution of a block of transactions and maintains a transient state. The consensus component votes on this transient state. The execution component maintains an in-memory representation of the execution results until the consensus component commits the block to the distributed database.

The execution component uses the virtual machine to execute transactions.

Virtual machine#

The virtual machine component is used to run the Move program included in a submitted transaction and determine the results.

A validator node's mempool uses the virtual machine component to perform validation checks on transactions, while its execution component uses it to execute transactions.

Storage#

The storage component is used to persist agreed upon blocks of transactions and their execution results.

State synchronizer#

Validator nodes use their state synchronizer component to “catch up” to the latest state of the blockchain.

As a seasoned expert deeply immersed in the intricacies of blockchain technology, particularly the Diem ecosystem, I bring forth a wealth of first-hand expertise to elucidate the multifaceted aspects of Diem nodes and their pivotal role in the functioning of the Diem Blockchain.

In the realm of Diem, a Diem node stands as a peer entity within the ecosystem, meticulously tracking the state of the Diem Blockchain. The crux of client interactions with the blockchain hinges on these nodes. There exist two distinct types of nodes within this ecosystem: Validator nodes and FullNodes.

Validator nodes and FullNodes each play integral roles, with Validator nodes executing a distributed consensus protocol upon transaction submission to the Diem Blockchain. This execution involves determining the order in which transactions are added to the blockchain, encapsulating the transaction details and execution results. Notably, the Diem Payment Network employs a Byzantine Fault Tolerance (BFT) consensus protocol for validator nodes to collectively agree on the ledger of finalized transactions and their executions.

The Validator nodes maintain the current state of the blockchain, communicating directly with their peers over a concealed network. These nodes can be configured to store historical data, serving as custodians of the blockchain's evolution. On the other hand, FullNodes act as external validation resources for finalized transaction history, receiving and locally re-executing transactions to prevent collusion among Validator nodes.

A key underpinning of the Diem ecosystem is the DiemBFT consensus protocol, ensuring fault tolerance against malicious validator nodes. This fault tolerance extends up to one-third of the validator nodes being potentially compromised.

Delving into the logical components of a Diem node, we encounter several critical elements:

  1. JSON-RPC Service: This service facilitates communication between nodes, with a nuanced role and disabled status in Validator nodes.

  2. Mempool: An in-memory buffer for transactions awaiting consensus, shared among validator nodes.

  3. Consensus: Responsible for ordering transaction blocks and reaching agreement through the consensus protocol.

  4. Execution: Coordinates the execution of transaction blocks and maintains a transient state, interacting with the virtual machine.

  5. Virtual Machine: Executes the Move program within submitted transactions, performing validation checks in the mempool and transaction execution in the execution component.

  6. Storage: Persists agreed-upon blocks of transactions and their execution results.

  7. State Synchronizer: Facilitates validator nodes in catching up with the latest state of the blockchain.

In essence, the seamless orchestration of these components within a Diem node ensures the robustness, security, and integrity of the Diem Blockchain, setting the stage for a decentralized and trustworthy financial ecosystem.

Validator nodes | Diem Documentation (2024)
Top Articles
Latest Posts
Article information

Author: Edmund Hettinger DC

Last Updated:

Views: 5778

Rating: 4.8 / 5 (58 voted)

Reviews: 89% of readers found this page helpful

Author information

Name: Edmund Hettinger DC

Birthday: 1994-08-17

Address: 2033 Gerhold Pine, Port Jocelyn, VA 12101-5654

Phone: +8524399971620

Job: Central Manufacturing Supervisor

Hobby: Jogging, Metalworking, Tai chi, Shopping, Puzzles, Rock climbing, Crocheting

Introduction: My name is Edmund Hettinger DC, I am a adventurous, colorful, gifted, determined, precious, open, colorful person who loves writing and wants to share my knowledge and understanding with you.