A Diem node is a peer entity of the Diem ecosystem that tracks the statestate - A state in the Diem protocol is a snapshot of the distributed database. A transaction modifies the database and produces a new and updated state. of the Diem Blockchain. Clients interact with the blockchain via Diem nodes. There are two types of nodes:
- Validator nodes
Each Diem node comprises several logical components:
- JSON-RPC serviceJSON-RPC service - The JSON-RPC service component is the external interface of a Diem node. Any incoming client request, such as submitted transactions or queries, must first go through the JSON-RPC service to access storage or any other component in the system. This filters requests and protects the system. When a client submits a new transaction, the JSON-RPC service passes it to mempool. (disabled in validator nodes)
- Virtual Machine
- State synchronizer
The Diem CoreDiem Core - Diem Core is the open source technology on which the Diem Payment Network runs. Diem Core contains software for the Diem Blockchain itself, which generates and stores the immutable ledger of confirmed transactions and the validation process, which implements the consensus algorithm to validate transactions and add them to the Diem Blockchain immutable ledger. software can be configured to run as a validator node or as a FullNode.
FullNodes can be run by anyone who wants to verify the state of the Diem Blockchain and synchronize to it. FullNodes replicate the full state of the blockchain by querying each other or by querying the validator nodes directly. They can also accept transactions submitted by Diem clients and forward them to validator nodes.
Additionally, 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.
A public FullNode uses the same software as a validator node and connects directly to one or more validator nodes to submit transactions and synchronize to the statestate - A state in the Diem protocol is a snapshot of the distributed database. A transaction modifies the database and produces a new and updated state. of the Diem Blockchain.
A public FullNode has all Diem node components, with the consensus component being disabled.
Third-party blockchain explorers, wallets, exchanges, and DApps may run a local FullNode to:
- Leverage the JSON-RPC protocol for richer blockchain interactions.
- Get a consistent view of the Diem Payment Network.
- Avoid rate limitations on read traffic.
- Run custom analytics on historical data.
- Get notifications about particular on-chain events.
Updated 4 months ago