Pruned Full-Node Mode
The Ergo Protocol Reference Client 5.0.13 introduced a new feature: bootstrapping using a verified UTXO set snapshot and NiPoPoWS. This feature allows you to achieve full node security on a standard laptop within minutes.
Overview
This mode is akin to the fast-sync in Geth or Grothendieck and warp-mode in Parity, used by Ethereum protocol clients, but with more aggressive optimizations. It eliminates the need to check approximately 95% of the blockchain, addressing the increasing demands for downloading, storing, and processing the entire blockchain.
Important Note
You cannot restore an old wallet with a pruned node. The recommended approach is to create a new wallet and transfer funds to it.
Getting Started
Add the following utxo and nipopowsections to your node configuration to enable UTXO Set Snapshots.
ergo {
node {
mining = false
utxo {
utxoBootstrap = true
storingUtxoSnapshots = 0
}
nipopow {
nipopowBootstrap = true
p2pNipopows = 2
}
}
}
scorex {
restApi {
apiKeyHash = "324dcf027dd4a30a932c441f365a25e86b173defa4b8e58948253471b81b72cf"
}
}Note on Progress Reporting
Currently, the node may not provide detailed progress updates specifically during the download phaseof the UTXO snapshot itself when utxoBootstrap = true. Synchronization progress for headers and subsequent blocks is typically visible via the node panel (/panel) or logs, but the snapshot download phase might appear as a period of inactivity before regular block processing resumes.
Technical Details
The UTXO set authentication uses an AVL+ tree, outlined in the research paper and available in the Scrypto framework. Research indicates that this method can be as secure as processing all blocks under certain statistical assumptions.
Security Analysis
This research paper indicates that this method can be as secure as processing all blocks under certain statistical assumptions.
View Security Analysis →Key Features
Fast Synchronization
Achieve full node security on a standard laptop within minutes, eliminating the need to check approximately 95% of the blockchain.
UTXO Set Snapshots
Uses verified UTXO set snapshots for bootstrapping, providing a secure and efficient way to start a full node.
NiPoPoWS Integration
Integrates NiPoPoWS (Non-Interactive Proofs of Proof-of-Work) for enhanced security and verification capabilities.
Aggressive Optimizations
More aggressive optimizations compared to Ethereum's fast-sync and warp-mode implementations.
Digest State
The "Digest State" feature in the Ergo protocol allows nodes to optimize the storage of blockchain data without compromising security and performance. By enabling the Digest State feature, nodes can prune or reduce the size of the UTXO (Unspent Transaction Output) set, blocks, and headers, resulting in more efficient storage utilization.
How does it work?
In a traditional blockchain, each node stores the complete history of transactions, blocks, and headers, which can lead to significant storage requirements as the blockchain grows. However, with the Digest State feature, Ergo nodes can selectively retain only the essential data.
To enable the Digest State feature, set the ergo.node.stateType = "digest" configuration parameter to "digest". Once enabled, the node supports UTXO set pruning, allowing it to reduce the storage footprint while still maintaining full-node security guarantees.
Benefits of Digest State
- •Efficient Storage: By pruning unnecessary data, Digest State reduces the storage requirements for nodes, making it feasible to run Ergo nodes on devices with limited storage capacity.
- •Performance Optimization: With a smaller UTXO set, blocks, and headers, nodes can process transactions and blocks more efficiently, potentially improving overall network performance.
- •Full-Node Security: Despite not storing the entire UTXO set, nodes with Digest State enabled can still validate transactions and blocks, ensuring compliance with the consensus rules of the network.
Considerations
While Digest State provides storage and performance benefits, it's important to note that a healthy network requires a sufficient number of full (non-pruning) nodes. Full nodes maintain the complete history and state of the blockchain, serving as a reference for new nodes and ensuring the integrity of the entire blockchain's history.
History Pruning
"History Pruning" is a feature in Ergo's blockchain that allows nodes to reduce the amount of stored historical block data, which can lead to a significant decrease in storage requirements. It's particularly useful for nodes running on devices with limited storage capacity.
What is History Pruning?
The concept of pruning in blockchain technology involves the removal of some of the less relevant data on a node while keeping the information necessary for maintaining the network's security and functionality. In Ergo's case, this means removing certain block data but keeping all block headers.
How does it work?
This is achieved using the ergo.node.blocksToKeep parameter. This parameter dictates the number of full blocks (i.e., blocks containing all transactions) that the node should store. Once this limit is reached, the node will start pruning older blocks, removing the full transactions but retaining the block headers.
Importance of Block Headers
A block header in a blockchain is a portion of a block that contains metadata about the block, including the reference to the previous block (which establishes the chain's sequence), the difficulty target for the block, and a nonce value that is part of the Proof-of-Work system. The block header is crucial for the operation of the blockchain, as it helps maintain the integrity and continuity of the blockchain.
Full-Node Security
By keeping the block headers, a node can still participate in verifying and validating new blocks and transactions, thus maintaining full-node security. Full-node security refers to the ability of a node to independently validate the rules of the network without relying on other nodes.