Full and archive nodes (#293)
* Difference between full node and archive node Include a section (in Pruning.md) about the difference between the two nodes and how to run them. Misc changes to the various pruning options and sync mode options. Signed-off-by: grantnoble <grant.noble@consensys.net> * Fix two self-induced markdown lint errors. Signed-off-by: grantnoble <grant.noble@consensys.net> * Fix incorrect link to CLI-Syntax.md Signed-off-by: grantnoble <grant.noble@consensys.net> * Updates based on @MadelineMurray feedback Included a "Fast Synchronization" section in Pruning.md Signed-off-by: grantnoble <grant.noble@consensys.net> * Updates to Full/Archive node details based on dev feedback Specifically: - Archive node is full sync and not pruned - Full node is fast sync and pruned - Pruning is default on for fast sync and off for full sync. Can turn pruning on/off explicitly if they so choose. - Full nodes have the current state, so can’t serve the network with any data request (i.e. balance of address X at block Y, where Y is old). You can guarantee the latest state for everything (and some older states, but not all). Signed-off-by: grantnoble <grant.noble@consensys.net> * Fixed broken links Signed-off-by: grantnoble <grant.noble@consensys.net> * Updates based on @NicolasMassart, @timbeiko, and @RatanRSur feedback Signed-off-by: grantnoble <grant.noble@consensys.net> * Some updated inadvertently missed in the last update. Signed-off-by: grantnoble <grant.noble@consensys.net>pull/305/head
parent
ce43a44a74
commit
c67cdaee93
@ -1,25 +1,66 @@ |
|||||||
--- |
--- |
||||||
description: Pruning |
description: Full and archive node types |
||||||
--- |
--- |
||||||
|
|
||||||
# Pruning |
# Full and archive node types |
||||||
|
|
||||||
|
Besu supports two node types, commonly referred to as _full nodes_ and _archive nodes_. |
||||||
|
|
||||||
|
Full nodes have the current state of the blockchain so cannot serve the network with all data |
||||||
|
requests (for example, the balance of an account as at an old block). Full nodes can guarantee the |
||||||
|
latest state for the blockchain (and some older states, but not all). You can check current |
||||||
|
balances, sign and send transactions, and look at current Dapp data. |
||||||
|
|
||||||
|
Archive nodes have all of this and they also store the intermediary state of every account and |
||||||
|
contract for every block since the genesis block. With an archive node you can do everything you |
||||||
|
do with a full node, as well as access historical state data. |
||||||
|
|
||||||
|
For Besu on MainNet, Archive nodes require significantly more disk space (approximately 3TB) than |
||||||
|
full nodes (approximately 750GB). |
||||||
|
|
||||||
|
!!! note |
||||||
|
|
||||||
|
Besu running on other public testnets, such as Ropsten, and other Ethereum clients will have |
||||||
|
different disk space requirements. |
||||||
|
|
||||||
|
To run an archive node, enable full synchronization using |
||||||
|
[`--sync-mode=FULL`](../Reference/CLI/CLI-Syntax.md#sync-mode), which by default also disables |
||||||
|
pruning ([`--pruning-enabled=false`](../Reference/CLI/CLI-Syntax.md#pruning-enabled)). |
||||||
|
|
||||||
|
To run a full node, enable fast synchronization using |
||||||
|
[`--sync-mode=FAST`](../Reference/CLI/CLI-Syntax.md#sync-mode), which by default also enables |
||||||
|
pruning ([`--pruning-enabled=true`](../Reference/CLI/CLI-Syntax.md#pruning-enabled)). |
||||||
|
|
||||||
|
## Fast synchronization |
||||||
|
|
||||||
|
Instead of a full synchronization ([`--sync-mode=FULL`](../Reference/CLI/CLI-Syntax.md#sync-mode)), |
||||||
|
which starts from the genesis block and reprocesses all transactions, fast synchronization |
||||||
|
([`--sync-mode=FAST`](../Reference/CLI/CLI-Syntax.md#sync-mode)) downloads the block headers and |
||||||
|
transaction receipts, and verifies the chain of block headers from the genesis block. |
||||||
|
|
||||||
|
!!! note |
||||||
|
|
||||||
|
Fast synchronization enables pruning by default, but you can explicitly disable pruning |
||||||
|
using [`--pruning-enabled=false`](../Reference/CLI/CLI-Syntax.md#pruning-enabled). Full |
||||||
|
synchronization disables pruning by default. |
||||||
|
|
||||||
|
## Pruning |
||||||
|
|
||||||
!!! caution |
!!! caution |
||||||
|
|
||||||
Do not use pruning in Hyperledger Besu v1.4.0. Pruning has a |
Do not use pruning in Hyperledger Besu v1.4.0. Pruning has a |
||||||
[known bug](https://github.com/hyperledger/besu/blob/master/CHANGELOG.md#known-issues). |
[known bug](https://github.com/hyperledger/besu/blob/master/CHANGELOG.md#known-issues). |
||||||
|
|
||||||
If using fast sync in v1.4.0, explicitly disable pruning using |
If using fast synchronization |
||||||
[`--pruning-enabled=false`](../Reference/CLI/CLI-Syntax.md#pruning-enabled). |
([`--sync-mode=FAST`](../Reference/CLI/CLI-Syntax.md#sync-mode)) in v1.4.0, explicitly disable |
||||||
|
pruning using [`--pruning-enabled=false`](../Reference/CLI/CLI-Syntax.md#pruning-enabled). |
||||||
|
|
||||||
Use pruning to reduce storage required for the world state. Pruning removes state trie nodes that |
In Besu, pruning reduces the storage required by removing state trie nodes that are unreachable |
||||||
are not required. |
from [recent blocks](../Reference/CLI/CLI-Syntax.md#pruning-blocks-retained). |
||||||
|
|
||||||
!!! Important |
!!! Important |
||||||
Using pruning with [private transactions](Privacy/Privacy-Overview.md) is not supported. |
|
||||||
|
|
||||||
Running a full sync to the Ethereum Mainnet with pruning enabled requires about 700GB of available |
Using pruning with [private transactions](Privacy/Privacy-Overview.md) is not supported. |
||||||
disk space. To enable pruning, use the |
|
||||||
[`--pruning-enabled`](../Reference/CLI/CLI-Syntax.md#pruning-enabled) option. |
|
||||||
|
|
||||||
Pruning might increase block import times, but it does not affect the ability of nodes to stay in |
Pruning might increase block import times, but it does not affect the ability of nodes to stay in |
||||||
sync. |
sync. |
||||||
|
Loading…
Reference in new issue