Skip to content

Commit b9fcff0

Browse files
committed
chore(docs): add syncing documentation
1 parent c79e19d commit b9fcff0

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed

Diff for: docs/learn/advanced/18-syncing.md

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
---
2+
sidebar_position: 1
3+
---
4+
5+
# Syncing
6+
7+
Syncing is the process of downloading the blockchain and state from a remote node.
8+
9+
There are two types of syncing:
10+
11+
1. Blockchain syncing.
12+
With block sync a node is downloading all of the data of an application from genesis and verifying it.
13+
2. State syncing.
14+
With state sync your node will download data related to the head or near the head of the chain and verify the data. This leads to drastically shorter times for joining a network.
15+
16+
17+
## Observing syncing progress
18+
19+
### Block Sync Metrics
20+
21+
- `blocksync_syncing`: Indicates whether a node is currently block syncing.
22+
- `blocksync_num_txs`: Number of transactions in the latest block.
23+
- `blocksync_total_txs`: Total number of transactions.
24+
- `blocksync_block_size_bytes`: Size of the latest block in bytes.
25+
- `blocksync_latest_block_height`: Height of the latest block.
26+
27+
### Block sync configuration
28+
29+
```toml
30+
blocksync:
31+
version: "v0"
32+
```
33+
34+
35+
### State Sync Metrics
36+
37+
- `statesync_syncing`: Indicates whether a node is currently state syncing.
38+
39+
### State sync configuration
40+
41+
```toml
42+
statesync:
43+
enable: true
44+
rpc_servers: ""
45+
trust_height: 0
46+
trust_hash: ""
47+
trust_period: 168h0m0s
48+
discovery_time: 15s
49+
temp_dir: ""
50+
chunk_request_timeout: 10s
51+
chunk_fetchers: "4"
52+
```
53+
54+
### Checking if sync is complete
55+
56+
- Query for the node status using the REST or GRPC API
57+
- Check the `SyncInfo.CatchingUp` field
58+
- If the field is `false`, then syncing is complete
59+
60+
61+
62+
63+

0 commit comments

Comments
 (0)