-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: add syncing documentation #23344
base: main
Are you sure you want to change the base?
Conversation
📝 WalkthroughWalkthroughThe pull request introduces a new documentation section titled Changes
Assessment against linked issues
Possibly related PRs
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (4)
docs/learn/advanced/18-syncing.md (4)
5-7
: Enhance the introduction with context and importance.Consider expanding the introduction to explain why syncing is important for blockchain networks and when different sync methods should be used.
# Syncing -Syncing is the process of downloading the blockchain and state from a remote node. +Syncing is the process of downloading the blockchain and state from a remote node. This process is crucial for new nodes joining the network to catch up with the current state and for existing nodes to stay up-to-date with the latest blockchain data.
11-14
: Improve grammar and formatting in sync types description.The descriptions need grammatical improvements for better clarity.
-1. Blockchain syncing. - With block sync a node is downloading all of the data of an application from genesis and verifying it. -2. State syncing. - 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. +1. Blockchain syncing: + With block sync, a node downloads all data from genesis and verifies it. +2. State syncing: + With state sync, your node downloads data related to the head or near the head of the chain and verifies it. This leads to drastically shorter times for joining a network.🧰 Tools
🪛 LanguageTool
[formatting] ~12-~12: Consider inserting a comma here, unless the first half is essential to the meaning of the sentence.
Context: .... Blockchain syncing. With block sync a node is downloading all of the data o...(WITH_THAT_COMMA)
[style] ~12-~12: Consider removing “of” to be more concise
Context: ... With block sync a node is downloading all of the data of an application from genesis and...(ALL_OF_THE)
[grammar] ~12-~12: Before the countable noun ‘from’ an article or a possessive pronoun is necessary.
Context: ... all of the data of an application from genesis and verifying it. 2. State syncing. ...(IN_NN_CC_VBG)
[formatting] ~14-~14: Consider inserting a comma here, unless the first half is essential to the meaning of the sentence.
Context: ...t. 2. State syncing. With state sync your node will download data related to...(WITH_THAT_COMMA)
21-25
: Maintain consistent list style using asterisks.Replace dashes with asterisks for consistent unordered list formatting throughout the document.
- - `blocksync_syncing`: Indicates whether a node is currently block syncing. - - `blocksync_num_txs`: Number of transactions in the latest block. - - `blocksync_total_txs`: Total number of transactions. - - `blocksync_block_size_bytes`: Size of the latest block in bytes. - - `blocksync_latest_block_height`: Height of the latest block. + * `blocksync_syncing`: Indicates whether a node is currently block syncing. + * `blocksync_num_txs`: Number of transactions in the latest block. + * `blocksync_total_txs`: Total number of transactions. + * `blocksync_block_size_bytes`: Size of the latest block in bytes. + * `blocksync_latest_block_height`: Height of the latest block.Also applies to: 37-37
🧰 Tools
🪛 LanguageTool
[uncategorized] ~21-~21: Loose punctuation mark.
Context: ...lock Sync Metrics -blocksync_syncing
: Indicates whether a node is currently b...(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~22-~22: Loose punctuation mark.
Context: ...tly block syncing. -blocksync_num_txs
: Number of transactions in the latest bl...(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~23-~23: Loose punctuation mark.
Context: ...he latest block. -blocksync_total_txs
: Total number of transactions. - `blocks...(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~24-~24: Loose punctuation mark.
Context: ...sactions. -blocksync_block_size_bytes
: Size of the latest block in bytes. - `b...(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~25-~25: Loose punctuation mark.
Context: ...bytes. -blocksync_latest_block_height
: Height of the latest block. ### Block ...(UNLIKELY_OPENING_PUNCTUATION)
🪛 Markdownlint (0.37.0)
21-21: Expected: asterisk; Actual: dash
Unordered list style(MD004, ul-style)
22-22: Expected: asterisk; Actual: dash
Unordered list style(MD004, ul-style)
23-23: Expected: asterisk; Actual: dash
Unordered list style(MD004, ul-style)
24-24: Expected: asterisk; Actual: dash
Unordered list style(MD004, ul-style)
25-25: Expected: asterisk; Actual: dash
Unordered list style(MD004, ul-style)
63-63
: Add a troubleshooting section.Consider adding a section about common sync issues and their solutions, including:
- Network connectivity problems
- Insufficient disk space
- Corrupt database handling
- Common error messages and their meaning
Would you like me to provide a template for the troubleshooting section?
📜 Review details
Configuration used: .coderabbit.yml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
docs/learn/advanced/18-syncing.md
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
docs/learn/advanced/18-syncing.md (1)
Pattern **/*.md
: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"
🪛 LanguageTool
docs/learn/advanced/18-syncing.md
[formatting] ~12-~12: Consider inserting a comma here, unless the first half is essential to the meaning of the sentence.
Context: .... Blockchain syncing. With block sync a node is downloading all of the data o...
(WITH_THAT_COMMA)
[style] ~12-~12: Consider removing “of” to be more concise
Context: ... With block sync a node is downloading all of the data of an application from genesis and...
(ALL_OF_THE)
[grammar] ~12-~12: Before the countable noun ‘from’ an article or a possessive pronoun is necessary.
Context: ... all of the data of an application from genesis and verifying it. 2. State syncing. ...
(IN_NN_CC_VBG)
[formatting] ~14-~14: Consider inserting a comma here, unless the first half is essential to the meaning of the sentence.
Context: ...t. 2. State syncing. With state sync your node will download data related to...
(WITH_THAT_COMMA)
[uncategorized] ~21-~21: Loose punctuation mark.
Context: ...lock Sync Metrics - blocksync_syncing
: Indicates whether a node is currently b...
(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~22-~22: Loose punctuation mark.
Context: ...tly block syncing. - blocksync_num_txs
: Number of transactions in the latest bl...
(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~23-~23: Loose punctuation mark.
Context: ...he latest block. - blocksync_total_txs
: Total number of transactions. - `blocks...
(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~24-~24: Loose punctuation mark.
Context: ...sactions. - blocksync_block_size_bytes
: Size of the latest block in bytes. - `b...
(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~25-~25: Loose punctuation mark.
Context: ...bytes. - blocksync_latest_block_height
: Height of the latest block. ### Block ...
(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~37-~37: Loose punctuation mark.
Context: ...tate Sync Metrics - statesync_syncing
: Indicates whether a node is currently s...
(UNLIKELY_OPENING_PUNCTUATION)
🪛 Markdownlint (0.37.0)
docs/learn/advanced/18-syncing.md
21-21: Expected: asterisk; Actual: dash
Unordered list style
(MD004, ul-style)
22-22: Expected: asterisk; Actual: dash
Unordered list style
(MD004, ul-style)
23-23: Expected: asterisk; Actual: dash
Unordered list style
(MD004, ul-style)
24-24: Expected: asterisk; Actual: dash
Unordered list style
(MD004, ul-style)
25-25: Expected: asterisk; Actual: dash
Unordered list style
(MD004, ul-style)
37-37: Expected: asterisk; Actual: dash
Unordered list style
(MD004, ul-style)
56-56: Expected: asterisk; Actual: dash
Unordered list style
(MD004, ul-style)
57-57: Expected: asterisk; Actual: dash
Unordered list style
(MD004, ul-style)
58-58: Expected: asterisk; Actual: dash
Unordered list style
(MD004, ul-style)
⏰ Context from checks skipped due to timeout of 90000ms (9)
- GitHub Check: main
- GitHub Check: main
- GitHub Check: main
- GitHub Check: main
- GitHub Check: build (arm64)
- GitHub Check: build (amd64)
- GitHub Check: markdown-link-check
- GitHub Check: dependency-review
- GitHub Check: Summary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (3)
docs/learn/advanced/18-syncing.md (3)
7-14
: Improve clarity and formatting of the introductionThe introduction needs some grammatical improvements and better formatting:
-Syncing is the process of downloading the blockchain and state from a remote node. +Syncing is the process of downloading the blockchain data and state from a remote node. There are two types of syncing: -1. Blockchain syncing. - With block sync a node is downloading all of the data of an application from genesis and verifying it. -2. State syncing. - 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. +1. **Blockchain syncing:** + With block sync, a node downloads and verifies all application data from genesis. +2. **State syncing:** + With state sync, your node downloads and verifies data near the chain's head, drastically reducing network join time.🧰 Tools
🪛 LanguageTool
[formatting] ~12-~12: Consider inserting a comma here, unless the first half is essential to the meaning of the sentence.
Context: .... Blockchain syncing. With block sync a node is downloading all of the data o...(WITH_THAT_COMMA)
[style] ~12-~12: Consider removing “of” to be more concise
Context: ... With block sync a node is downloading all of the data of an application from genesis and...(ALL_OF_THE)
[grammar] ~12-~12: Before the countable noun ‘from’ an article or a possessive pronoun is necessary.
Context: ... all of the data of an application from genesis and verifying it. 2. State syncing. ...(IN_NN_CC_VBG)
[formatting] ~14-~14: Consider inserting a comma here, unless the first half is essential to the meaning of the sentence.
Context: ...t. 2. State syncing. With state sync your node will download data related to...(WITH_THAT_COMMA)
23-27
: Use consistent list formatting and add metric typesThe metrics should use consistent formatting and include their types for better clarity.
-Block Sync Metrics +### Block Sync Metrics -- `blocksync_syncing`: Indicates whether a node is currently block syncing. -- `blocksync_num_txs`: Number of transactions in the latest block. -- `blocksync_total_txs`: Total number of transactions. -- `blocksync_block_size_bytes`: Size of the latest block in bytes. -- `blocksync_latest_block_height`: Height of the latest block. +* `blocksync_syncing` (boolean): Indicates whether a node is currently block syncing. +* `blocksync_num_txs` (integer): Number of transactions in the latest block. +* `blocksync_total_txs` (integer): Total number of transactions. +* `blocksync_block_size_bytes` (integer): Size of the latest block in bytes. +* `blocksync_latest_block_height` (integer): Height of the latest block. -### State Sync Metrics +### State Sync Metrics -- `statesync_syncing`: Indicates whether a node is currently state syncing. +* `statesync_syncing` (boolean): Indicates whether a node is currently state syncing.Also applies to: 40-40
🧰 Tools
🪛 LanguageTool
[uncategorized] ~23-~23: Loose punctuation mark.
Context: ...lock Sync Metrics -blocksync_syncing
: Indicates whether a node is currently b...(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~24-~24: Loose punctuation mark.
Context: ...tly block syncing. -blocksync_num_txs
: Number of transactions in the latest bl...(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~25-~25: Loose punctuation mark.
Context: ...he latest block. -blocksync_total_txs
: Total number of transactions. - `blocks...(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~26-~26: Loose punctuation mark.
Context: ...sactions. -blocksync_block_size_bytes
: Size of the latest block in bytes. - `b...(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~27-~27: Loose punctuation mark.
Context: ...bytes. -blocksync_latest_block_height
: Height of the latest block. ### Block ...(UNLIKELY_OPENING_PUNCTUATION)
🪛 Markdownlint (0.37.0)
23-23: Expected: asterisk; Actual: dash
Unordered list style(MD004, ul-style)
24-24: Expected: asterisk; Actual: dash
Unordered list style(MD004, ul-style)
25-25: Expected: asterisk; Actual: dash
Unordered list style(MD004, ul-style)
26-26: Expected: asterisk; Actual: dash
Unordered list style(MD004, ul-style)
27-27: Expected: asterisk; Actual: dash
Unordered list style(MD004, ul-style)
69-90
: Improve API examples formatting and clarityThe API examples need better formatting and clarification about the response fields.
-Query for the node status using the REST or GRPC API: +Query for the node status using either the REST or gRPC API: REST example: + ```bash curl http://localhost:1317/cosmos/base/tendermint/v1beta1/syncingExpected response:
+{ "syncing": false }GRPC example:
+grpcurl -plaintext localhost:9090 cosmos.base.tendermint.v1beta1.Service/GetSyncing-The response includes
SyncInfo.CatchingUp
field
-Syncing is complete when this field isfalse
+The response field meanings:
+* REST API: Thesyncing
field indicates if the node is still syncing (true
) or has completed syncing (false
).
+* gRPC API: TheSyncInfo.CatchingUp
field serves the same purpose as the REST API'ssyncing
field.<details> <summary>🧰 Tools</summary> <details> <summary>🪛 Markdownlint (0.37.0)</summary> 72-72: null Fenced code blocks should be surrounded by blank lines (MD031, blanks-around-fences) --- 77-77: null Fenced code blocks should be surrounded by blank lines (MD031, blanks-around-fences) --- 84-84: null Fenced code blocks should be surrounded by blank lines (MD031, blanks-around-fences) </details> </details> </blockquote></details> </blockquote></details> <details> <summary>📜 Review details</summary> **Configuration used: .coderabbit.yml** **Review profile: CHILL** **Plan: Pro** <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between b9fcff05278da7e60807ae595c45609c42ea1a23 and aca8474c9aee735d0965f994e8edb9643df4f5a6. </details> <details> <summary>📒 Files selected for processing (1)</summary> * `docs/learn/advanced/18-syncing.md` (1 hunks) </details> <details> <summary>🧰 Additional context used</summary> <details> <summary>📓 Path-based instructions (1)</summary> <details> <summary>docs/learn/advanced/18-syncing.md (1)</summary> Pattern `**/*.md`: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness" </details> </details><details> <summary>🪛 LanguageTool</summary> <details> <summary>docs/learn/advanced/18-syncing.md</summary> [formatting] ~12-~12: Consider inserting a comma here, unless the first half is essential to the meaning of the sentence. Context: .... Blockchain syncing. With block sync a node is downloading all of the data o... (WITH_THAT_COMMA) --- [style] ~12-~12: Consider removing “of” to be more concise Context: ... With block sync a node is downloading all of the data of an application from genesis and... (ALL_OF_THE) --- [grammar] ~12-~12: Before the countable noun ‘from’ an article or a possessive pronoun is necessary. Context: ... all of the data of an application from genesis and verifying it. 2. State syncing. ... (IN_NN_CC_VBG) --- [formatting] ~14-~14: Consider inserting a comma here, unless the first half is essential to the meaning of the sentence. Context: ...t. 2. State syncing. With state sync your node will download data related to... (WITH_THAT_COMMA) --- [uncategorized] ~23-~23: Loose punctuation mark. Context: ...lock Sync Metrics - `blocksync_syncing`: Indicates whether a node is currently b... (UNLIKELY_OPENING_PUNCTUATION) --- [uncategorized] ~24-~24: Loose punctuation mark. Context: ...tly block syncing. - `blocksync_num_txs`: Number of transactions in the latest bl... (UNLIKELY_OPENING_PUNCTUATION) --- [uncategorized] ~25-~25: Loose punctuation mark. Context: ...he latest block. - `blocksync_total_txs`: Total number of transactions. - `blocks... (UNLIKELY_OPENING_PUNCTUATION) --- [uncategorized] ~26-~26: Loose punctuation mark. Context: ...sactions. - `blocksync_block_size_bytes`: Size of the latest block in bytes. - `b... (UNLIKELY_OPENING_PUNCTUATION) --- [uncategorized] ~27-~27: Loose punctuation mark. Context: ...bytes. - `blocksync_latest_block_height`: Height of the latest block. ### Block ... (UNLIKELY_OPENING_PUNCTUATION) --- [uncategorized] ~36-~36: Loose punctuation mark. Context: ...sync: version: "v0" ``` - `version`: The version of the block sync protocol ... (UNLIKELY_OPENING_PUNCTUATION) --- [uncategorized] ~40-~40: Loose punctuation mark. Context: ...tate Sync Metrics - `statesync_syncing`: Indicates whether a node is currently s... (UNLIKELY_OPENING_PUNCTUATION) --- [uncategorized] ~57-~57: Loose punctuation mark. Context: ... chunk_fetchers: "4" ``` - `enable`: Set to true to enable state sync. - `rp... (UNLIKELY_OPENING_PUNCTUATION) --- [uncategorized] ~58-~58: Loose punctuation mark. Context: ...ue to enable state sync. - `rpc_servers`: Comma-separated list of RPC servers for... (UNLIKELY_OPENING_PUNCTUATION) --- [uncategorized] ~59-~59: Loose punctuation mark. Context: ...servers for state sync. - `trust_height`: Block height to trust for state sync. -... (UNLIKELY_OPENING_PUNCTUATION) --- [uncategorized] ~60-~60: Loose punctuation mark. Context: ... to trust for state sync. - `trust_hash`: Block hash to trust for state sync. - `... (UNLIKELY_OPENING_PUNCTUATION) --- [grammar] ~60-~60: The singular proper name ‘Block’ must be used with a third-person or a past tense verb. Context: ...t for state sync. - `trust_hash`: Block hash to trust for state sync. - `trust_perio... (HE_VERB_AGR) --- [uncategorized] ~61-~61: Loose punctuation mark. Context: ...o trust for state sync. - `trust_period`: Trust period for light client verificat... (UNLIKELY_OPENING_PUNCTUATION) --- [uncategorized] ~62-~62: Loose punctuation mark. Context: ... client verification. - `discovery_time`: Time to spend discovering snapshots bef... (UNLIKELY_OPENING_PUNCTUATION) --- [uncategorized] ~63-~63: Loose punctuation mark. Context: ...apshots before picking one. - `temp_dir`: Directory for temporary state sync file... (UNLIKELY_OPENING_PUNCTUATION) --- [uncategorized] ~64-~64: Loose punctuation mark. Context: ...te sync files. - `chunk_request_timeout`: Timeout for chunk requests. - `chunk_fe... (UNLIKELY_OPENING_PUNCTUATION) --- [uncategorized] ~65-~65: Loose punctuation mark. Context: ...t for chunk requests. - `chunk_fetchers`: Number of concurrent chunk fetchers. #... (UNLIKELY_OPENING_PUNCTUATION) </details> </details> <details> <summary>🪛 Markdownlint (0.37.0)</summary> <details> <summary>docs/learn/advanced/18-syncing.md</summary> 23-23: Expected: asterisk; Actual: dash Unordered list style (MD004, ul-style) --- 24-24: Expected: asterisk; Actual: dash Unordered list style (MD004, ul-style) --- 25-25: Expected: asterisk; Actual: dash Unordered list style (MD004, ul-style) --- 26-26: Expected: asterisk; Actual: dash Unordered list style (MD004, ul-style) --- 27-27: Expected: asterisk; Actual: dash Unordered list style (MD004, ul-style) --- 36-36: Expected: asterisk; Actual: dash Unordered list style (MD004, ul-style) --- 40-40: Expected: asterisk; Actual: dash Unordered list style (MD004, ul-style) --- 57-57: Expected: asterisk; Actual: dash Unordered list style (MD004, ul-style) --- 58-58: Expected: asterisk; Actual: dash Unordered list style (MD004, ul-style) --- 59-59: Expected: asterisk; Actual: dash Unordered list style (MD004, ul-style) --- 60-60: Expected: asterisk; Actual: dash Unordered list style (MD004, ul-style) --- 61-61: Expected: asterisk; Actual: dash Unordered list style (MD004, ul-style) --- 62-62: Expected: asterisk; Actual: dash Unordered list style (MD004, ul-style) --- 63-63: Expected: asterisk; Actual: dash Unordered list style (MD004, ul-style) --- 64-64: Expected: asterisk; Actual: dash Unordered list style (MD004, ul-style) --- 65-65: Expected: asterisk; Actual: dash Unordered list style (MD004, ul-style) --- 19-19: Punctuation: '.' Trailing punctuation in heading (MD026, no-trailing-punctuation) --- 72-72: null Fenced code blocks should be surrounded by blank lines (MD031, blanks-around-fences) --- 77-77: null Fenced code blocks should be surrounded by blank lines (MD031, blanks-around-fences) --- 84-84: null Fenced code blocks should be surrounded by blank lines (MD031, blanks-around-fences) </details> </details> </details> <details> <summary>⏰ Context from checks skipped due to timeout of 90000ms (8)</summary> * GitHub Check: tests (02) * GitHub Check: test-x-epochs * GitHub Check: test-x-slashing * GitHub Check: build (arm64) * GitHub Check: build (amd64) * GitHub Check: dependency-review * GitHub Check: markdown-link-check * GitHub Check: Summary </details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be great to ask a validator for a review (eg @tac0turtle / Binary).
docs/learn/advanced/18-syncing.md
Outdated
There are two types of syncing: | ||
|
||
1. Blockchain syncing. | ||
With block sync a node is downloading all of the data of an application from genesis and verifying it. | ||
2. State syncing. | ||
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are two types of syncing: | |
1. Blockchain syncing. | |
With block sync a node is downloading all of the data of an application from genesis and verifying it. | |
2. State syncing. | |
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. | |
There are few types to sync a node: | |
1. Genesis Sync: operator downloads genesis, sets peers and syncs the blockchain by executing all blocks since genesis. | |
NOTE: requires a peer node that doesn't prune blocks (CometBFT state). | |
1. State Sync: operator need to set `trust_height` and `trust_hash` of a block that s/he trusts as well as `trust_period` - the time how long the operator will trust the given block height. The app will query peer nodes to stream state from that blocks as well as all following blocks. Once the state is downloaded, the node will start executing all blocks since the `trust_height`. | |
NOTE: requires a peer node that provides a state sync and is trusted by the validator. | |
1. Snapshot Sync: operator downloads a snapshot from snapshot provider (usually validators) s/he trusts. From there the operator needs to unpack the snapshot to the node directory, update config, set peers, set moniker, setup validator keys. Once the data directory is properly configured, the validator can start a node. The node will query blocks since the snapshot and execute them. | |
NOTE: requires a snapshot directory that is trusted by the validator. | |
Genesis Sync has zero trust assumptions, but it's the most resource heavy. It also requires a node with all blocks - many validators prune the blocks to optimize space. | |
Snapshot sync is the fastest and the most efficient: it downloads snapshot using a content delivery network or a protocol optimized for data dalivery, rather than streaming from existing nodes. Once you have a snapshot you can easily resync from the same snapshot if you have problems. State sync might be more complicated. |
docs/learn/advanced/18-syncing.md
Outdated
discovery_time: 15s | ||
temp_dir: "" | ||
chunk_request_timeout: 10s | ||
chunk_fetchers: "4" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not a toml syntax. The config snippet should be updated to a proper toml snippet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW, same for "Block sync configuration" section earlier on
docs/learn/advanced/18-syncing.md
Outdated
- `discovery_time`: Time to spend discovering snapshots before picking one. | ||
- `temp_dir`: Directory for temporary state sync files. | ||
- `chunk_request_timeout`: Timeout for chunk requests. | ||
- `chunk_fetchers`: Number of concurrent chunk fetchers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of creating another section to explain params, let's explain them in the config code using comments:
[statesync]
// Comma-separated list of RPC servers for state sync.
rpc_servers = ...
REST example: | ||
```bash | ||
curl http://localhost:1317/cosmos/base/tendermint/v1beta1/syncing | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can also check with app q consensus comet syncing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
🧹 Nitpick comments (1)
docs/learn/advanced/18-syncing.md (1)
34-34
: Clarify metrics location and access.Specify where these metrics are stored and how they can be accessed (e.g., Prometheus endpoint, metrics path).
-They are defined [here](https://github.com/cometbft/cometbft/blob/main/internal/blocksync/metrics.go) and are accessible from the node's metrics endpoint. +These metrics are defined [here](https://github.com/cometbft/cometbft/blob/main/internal/blocksync/metrics.go) and are exposed via the Prometheus metrics endpoint at `/metrics`. They can be queried using standard Prometheus queries or visualized using tools like Grafana.
📜 Review details
Configuration used: .coderabbit.yml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
docs/learn/advanced/18-syncing.md
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
docs/learn/advanced/18-syncing.md (1)
Pattern **/*.md
: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"
🪛 LanguageTool
docs/learn/advanced/18-syncing.md
[uncategorized] ~14-~14: Possible missing comma found.
Context: ...and
trust_hashof a block that s/he trusts as well as
trust_period` - the time ho...
(AI_HYDRA_LEO_MISSING_COMMA)
[style] ~14-~14: This phrasing can be wordy.
Context: ... nodes to stream state from that blocks as well as all following blocks. Once the state is...
(AS_WELL_AS_AND)
[grammar] ~28-~28: It looks like there is a word missing here. Did you mean “Listen to address”?
Context: ... /metrics
on 26660
port by default. Listen address can be changed in the config file (see ...
(LISTEN_TO_ME)
[uncategorized] ~36-~36: Loose punctuation mark.
Context: ...metrics endpoint. - blocksync_syncing
: Indicates whether a node is currently b...
(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~37-~37: Loose punctuation mark.
Context: ...tly block syncing. - blocksync_num_txs
: Number of transactions in the latest bl...
(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~38-~38: Loose punctuation mark.
Context: ...he latest block. - blocksync_total_txs
: Total number of transactions. - `blocks...
(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~39-~39: Loose punctuation mark.
Context: ...sactions. - blocksync_block_size_bytes
: Size of the latest block in bytes. - `b...
(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~40-~40: Loose punctuation mark.
Context: ...bytes. - blocksync_latest_block_height
: Height of the latest block. ### Block ...
(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~53-~53: Loose punctuation mark.
Context: ...metrics endpoint. - statesync_syncing
: Indicates whether a node is currently s...
(UNLIKELY_OPENING_PUNCTUATION)
🪛 Markdownlint (0.37.0)
docs/learn/advanced/18-syncing.md
36-36: Expected: asterisk; Actual: dash
Unordered list style
(MD004, ul-style)
37-37: Expected: asterisk; Actual: dash
Unordered list style
(MD004, ul-style)
38-38: Expected: asterisk; Actual: dash
Unordered list style
(MD004, ul-style)
39-39: Expected: asterisk; Actual: dash
Unordered list style
(MD004, ul-style)
40-40: Expected: asterisk; Actual: dash
Unordered list style
(MD004, ul-style)
53-53: Expected: asterisk; Actual: dash
Unordered list style
(MD004, ul-style)
75-75: null
Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
80-80: null
Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
87-87: null
Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
⏰ Context from checks skipped due to timeout of 90000ms (6)
- GitHub Check: repo-analysis
- GitHub Check: build (arm64)
- GitHub Check: build (amd64)
- GitHub Check: dependency-review
- GitHub Check: markdown-link-check
- GitHub Check: Summary
🔇 Additional comments (1)
docs/learn/advanced/18-syncing.md (1)
26-30
: Make Comet dependency more prominent.🧰 Tools
🪛 LanguageTool
[grammar] ~28-~28: It looks like there is a word missing here. Did you mean “Listen to address”?
Context: .../metrics
on26660
port by default. Listen address can be changed in the config file (see ...(LISTEN_TO_ME)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (3)
docs/learn/advanced/18-syncing.md (3)
34-34
: Clarify metrics storage location.Please specify where these metrics are stored and how they can be accessed in a monitoring system.
80-95
: Improve code block formatting consistency.Add blank lines around code blocks for better readability and consistent formatting.
Query for the node status using the REST or GRPC API: + REST example: + ```bash curl http://localhost:1317/cosmos/base/tendermint/v1beta1/syncing
Expected response:
+{ "syncing": false }
GRPC example:
+grpcurl -plaintext localhost:9090 cosmos.base.tendermint.v1beta1.Service/GetSyncing<details> <summary>🧰 Tools</summary> <details> <summary>🪛 Markdownlint (0.37.0)</summary> 81-81: null Fenced code blocks should be surrounded by blank lines (MD031, blanks-around-fences) --- 86-86: null Fenced code blocks should be surrounded by blank lines (MD031, blanks-around-fences) --- 93-93: null Fenced code blocks should be surrounded by blank lines (MD031, blanks-around-fences) </details> </details> --- `36-40`: **Use consistent list style.** Replace dashes with asterisks in unordered lists for consistency: ```diff - - `blocksync_syncing`: Indicates whether a node is currently block syncing. - - `blocksync_num_txs`: Number of transactions in the latest block. - - `blocksync_total_txs`: Total number of transactions. - - `blocksync_block_size_bytes`: Size of the latest block in bytes. - - `blocksync_latest_block_height`: Height of the latest block. + * `blocksync_syncing`: Indicates whether a node is currently block syncing. + * `blocksync_num_txs`: Number of transactions in the latest block. + * `blocksync_total_txs`: Total number of transactions. + * `blocksync_block_size_bytes`: Size of the latest block in bytes. + * `blocksync_latest_block_height`: Height of the latest block.
Also applies to: 53-53
🧰 Tools
🪛 LanguageTool
[uncategorized] ~36-~36: Loose punctuation mark.
Context: ...metrics endpoint. -blocksync_syncing
: Indicates whether a node is currently b...(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~37-~37: Loose punctuation mark.
Context: ...tly block syncing. -blocksync_num_txs
: Number of transactions in the latest bl...(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~38-~38: Loose punctuation mark.
Context: ...he latest block. -blocksync_total_txs
: Total number of transactions. - `blocks...(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~39-~39: Loose punctuation mark.
Context: ...sactions. -blocksync_block_size_bytes
: Size of the latest block in bytes. - `b...(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~40-~40: Loose punctuation mark.
Context: ...bytes. -blocksync_latest_block_height
: Height of the latest block. ### Block ...(UNLIKELY_OPENING_PUNCTUATION)
🪛 Markdownlint (0.37.0)
36-36: Expected: asterisk; Actual: dash
Unordered list style(MD004, ul-style)
37-37: Expected: asterisk; Actual: dash
Unordered list style(MD004, ul-style)
38-38: Expected: asterisk; Actual: dash
Unordered list style(MD004, ul-style)
39-39: Expected: asterisk; Actual: dash
Unordered list style(MD004, ul-style)
40-40: Expected: asterisk; Actual: dash
Unordered list style(MD004, ul-style)
📜 Review details
Configuration used: .coderabbit.yml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
docs/learn/advanced/18-syncing.md
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
docs/learn/advanced/18-syncing.md (1)
Pattern **/*.md
: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"
🪛 LanguageTool
docs/learn/advanced/18-syncing.md
[style] ~14-~14: This phrasing can be wordy.
Context: ... nodes to stream state from that blocks as well as all following blocks. Once the state is...
(AS_WELL_AS_AND)
[grammar] ~28-~28: It looks like there is a word missing here. Did you mean “Listen to address”?
Context: ... /metrics
on 26660
port by default. Listen address can be changed in the config file (see ...
(LISTEN_TO_ME)
[uncategorized] ~36-~36: Loose punctuation mark.
Context: ...metrics endpoint. - blocksync_syncing
: Indicates whether a node is currently b...
(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~37-~37: Loose punctuation mark.
Context: ...tly block syncing. - blocksync_num_txs
: Number of transactions in the latest bl...
(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~38-~38: Loose punctuation mark.
Context: ...he latest block. - blocksync_total_txs
: Total number of transactions. - `blocks...
(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~39-~39: Loose punctuation mark.
Context: ...sactions. - blocksync_block_size_bytes
: Size of the latest block in bytes. - `b...
(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~40-~40: Loose punctuation mark.
Context: ...bytes. - blocksync_latest_block_height
: Height of the latest block. ### Block ...
(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~53-~53: Loose punctuation mark.
Context: ...metrics endpoint. - statesync_syncing
: Indicates whether a node is currently s...
(UNLIKELY_OPENING_PUNCTUATION)
🪛 Markdownlint (0.37.0)
docs/learn/advanced/18-syncing.md
36-36: Expected: asterisk; Actual: dash
Unordered list style
(MD004, ul-style)
37-37: Expected: asterisk; Actual: dash
Unordered list style
(MD004, ul-style)
38-38: Expected: asterisk; Actual: dash
Unordered list style
(MD004, ul-style)
39-39: Expected: asterisk; Actual: dash
Unordered list style
(MD004, ul-style)
40-40: Expected: asterisk; Actual: dash
Unordered list style
(MD004, ul-style)
53-53: Expected: asterisk; Actual: dash
Unordered list style
(MD004, ul-style)
81-81: null
Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
86-86: null
Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
93-93: null
Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
⏰ Context from checks skipped due to timeout of 90000ms (7)
- GitHub Check: repo-analysis
- GitHub Check: test-x-gov
- GitHub Check: build (arm64)
- GitHub Check: build (amd64)
- GitHub Check: dependency-review
- GitHub Check: markdown-link-check
- GitHub Check: Summary
🔇 Additional comments (3)
docs/learn/advanced/18-syncing.md (3)
14-14
: Fix grammatical issues in State Sync description.The sentence structure needs improvement in terms of grammar and clarity.
🧰 Tools
🪛 LanguageTool
[style] ~14-~14: This phrasing can be wordy.
Context: ... nodes to stream state from that blocks as well as all following blocks. Once the state is...(AS_WELL_AS_AND)
44-47
: Fix TOML syntax in configuration sections.The TOML configuration needs proper syntax and formatting.
Also applies to: 57-68
26-26
: Make Comet dependency more prominent.The note about Comet dependency should be more prominent and clear.
Description
Closes: #8369
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
in the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
Please see Pull Request Reviewer section in the contributing guide for more information on how to review a pull request.
I have...
Summary by CodeRabbit