-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
7 additions
and
5 deletions.
There are no files selected for viewing
12 changes: 7 additions & 5 deletions
12
source/docs/casper/operators/becoming-a-validator/fast-sync.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,20 @@ | ||
--- | ||
title: Fast-Sync | ||
title: Fast Sync | ||
--- | ||
|
||
# Introducing Fast-Sync | ||
# Introducing Fast Sync | ||
|
||
import useBaseUrl from '@docusaurus/useBaseUrl'; | ||
|
||
The Casper Network is a smart contract platform. It requires new nodes to download and execute each and every block to join the network. Starting from genesis (start of the Mainnet), the node executes each deploy in every block. This process continues until the node has arrived at the current state of the blockchain. This process to sync a node with the blockchain can take a very long time. | ||
A Casper Network requires new nodes to download and execute every block to join the network. From genesis (start of the Mainnet), the node executes each deploy in every block. This process continues until the node has arrived at the current state of the blockchain. Syncing a node this way can take a very long time. | ||
|
||
To provide an alternative and faster approach to joining a Casper network, we have introduced fast‑sync. Fast-sync does not start syncing at the genesis block; instead, the user verifies a recent block, e.g. using block explorers, and provides its hash to the node software. The network [global state](../../concepts/design/casper-design.md#global-state-head) — smart contract data, account balances and all other on-chain information — is the storage layer of the blockchain and is massive in size, so fast-sync downloads the global state of only the most recent block. The following section briefly describes the fast-sync process. | ||
We have introduced a fast syncing process (fast sync) to provide a faster alternative to joining a Casper network. Fast sync does not start syncing at the genesis block; instead, the operator verifies a recent block and provides a [trusted hash](../setup/basic-node-configuration.md#trusted-hash-for-synchronizing) to the node software. The global state, account balances, and all other on-chain information is the storage layer of the blockchain and is massive in size, so fast sync downloads the global state of only the most recent block. The following section briefly describes the fast sync process. | ||
|
||
## How Fast-sync Works | ||
|
||
<img src={useBaseUrl("/image/fast-sync-process.png")} class="Fast-sync process" width="500"/> | ||
|
||
For fast-sync, you need to provide the trusted hash of a block on a Casper network in the config.toml file. Fast-sync uses this trusted block as part of the cryptographic verification for the later blocks. This trusted block is downloaded, as are all newer blocks up to and including the most recent block from the current era. For example, if the trusted block hash is 5 hours old, it will first download that block, then newer blocks until it arrives at one that is only a few minutes old. It then downloads the newer block's global state. Finally, it executes all blocks the network created while the download was in progress, until it is fully in sync. | ||
For fast sync, operators must provide the trusted hash of a block in the `config.toml` file. An example can be found [here](). | ||
|
||
Fast sync uses this trusted block as part of the cryptographic verification for the later blocks. The node downloads the trusted block first, then newer blocks up to and including the most recent block from the current era. For example, if the trusted hash is 5 hours old, it will first download that block, then newer blocks, until it arrives at one that is only a few minutes old. It then downloads the newer block's global state. Finally, it executes all the blocks the network created while the download was in progress until it is entirely in sync. | ||
|