Skip to content

docs: add clarity to statesync #1958

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions how-to-guides/consensus-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,16 @@ a trusted RPC endpoint (/block). RPC endpoints are also required for retrieving
light blocks. These can be found in the docs here under the respective networks or
from [the chain-registry](https://github.com/cosmos/chain-registry).

In `$HOME/.celestia-app/config/config.toml`, set
::: warning
State sync requires at least two RPC endpoints to function. These endpoints are used to:
1. Query the trusted header (height and hash)
2. Retrieve light blocks for verification
:::

In `$HOME/.celestia-app/config/config.toml`, set the RPC endpoints:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we'd also need to leave a note here to set trusted height and hash, because it isn't clear to me. if you set height/hash higher than 1, for example at 5000, do you not sync anything before that height 5000?


```toml
rpc_servers = ""
rpc_servers = "rpc.example1.com:port,rpc.example2.com:port" # Replace with actual RPC endpoints
trust_height = 0
trust_hash = ""
```
Expand All @@ -237,8 +243,9 @@ And also set statesync to `true`:
enable = true
```

To their respective fields. At least two different rpc endpoints should be provided.
The more, the greater the chance of detecting any fraudulent behavior.
::: tip
The more RPC endpoints you provide, the greater the chance of detecting any fraudulent behavior.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this true? if there are more than 2 endpoints provided, do we check them all? What happens if we do and say 1/10 endpoints is down?

also, if we are making the assumption that we are not eclipsed attacked, presumably we would either construct or someone would gossip some double signing, no?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Double signing, eclipse attacks, and invalid states should be impossible/irrelevant because a trusted height and hash are provided to initialize the state sync, no?

:::

Once setup, you should be ready to start the node as normal. In the logs, you should
see: `Discovering snapshots`. This may take a few minutes before snapshots are found
Expand Down