Skip to content

Commit 0f5ebe8

Browse files
committed
feat: update docs for v0.26.x celestia-node
1 parent e82f112 commit 0f5ebe8

File tree

2 files changed

+26
-12
lines changed

2 files changed

+26
-12
lines changed

how-to-guides/celestia-node-trusted-hash.md

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ Celenium.
3434

3535
3. Set the trusted height & hash in your config file
3636
1. Open your `config.toml` at `.celestia-light/config.toml` (or `.celestia-light-<other-network>/config.toml`)
37-
2. Set `DASer.SampleFrom` to the trusted height (e.g. `SampleFrom = 123456`)
38-
3. Set `Header.TrustedHash` to the trusted hash (e.g. `TrustedHash = "<hash_of_block_n>"`)
37+
2. Set `Header.Syncer.SyncFromHeight` to the trusted height (e.g. `SyncFromHeight = 123456`)
38+
3. Set `Header.Syncer.SyncFromHash` to the trusted hash (e.g. `SyncFromHash = "<hash_of_block_n>"`)
3939
4. Run the node:
4040

4141
```sh
@@ -58,15 +58,15 @@ celestia light init --p2p.network mocha
5858
# Get both the height and hash values in a single call
5959
read -r TRUSTED_HEIGHT TRUSTED_HASH <<<"$(curl -s https://rpc-mocha.pops.one/header | jq -r '.result.header | "\(.height) \(.last_block_id.hash)"')" && export TRUSTED_HEIGHT TRUSTED_HASH
6060

61-
# Use sed to find and replace the SampleFrom value in the config file (macOS version)
62-
sed -i '' "s/SampleFrom = .*/SampleFrom = $TRUSTED_HEIGHT/" ~/.celestia-light-mocha-4/config.toml
61+
# Use sed to find and replace the SyncFromHeight value in the config file (macOS version)
62+
sed -i '' "s/SyncFromHeight = .*/SyncFromHeight = $TRUSTED_HEIGHT/" ~/.celestia-light-mocha-4/config.toml
6363

64-
# Add/update the TrustedHash value
65-
sed -i '' "s/TrustedHash = .*/TrustedHash = \"$TRUSTED_HASH\"/" ~/.celestia-light-mocha-4/config.toml
64+
# Add/update the SyncFromHash value
65+
sed -i '' "s/SyncFromHash = .*/SyncFromHash = \"$TRUSTED_HASH\"/" ~/.celestia-light-mocha-4/config.toml
6666

6767
# Display the updated values to confirm
68-
echo "SampleFrom updated to: $TRUSTED_HEIGHT"
69-
echo "TrustedHash updated to: $TRUSTED_HASH"
68+
echo "SyncFromHeight updated to: $TRUSTED_HEIGHT"
69+
echo "SyncFromHash updated to: $TRUSTED_HASH"
7070
```
7171

7272
### 3. Start the node
@@ -79,12 +79,26 @@ celestia light start --p2p.network mocha --core.ip rpc-mocha.pops.one --core.por
7979
For Linux users, remove the empty string (`''`) after `-i` in the `sed` commands:
8080

8181
```sh
82-
sed -i "s/SampleFrom = .*/SampleFrom = $TRUSTED_HEIGHT/" ~/.celestia-light-mocha-4/config.toml
83-
sed -i "s/TrustedHash = .*/TrustedHash = \"$TRUSTED_HASH\"/" ~/.celestia-light-mocha-4/config.toml
82+
sed -i "s/SyncFromHeight = .*/SyncFromHeight = $TRUSTED_HEIGHT/" ~/.celestia-light-mocha-4/config.toml
83+
sed -i "s/SyncFromHash = .*/SyncFromHash = \"$TRUSTED_HASH\"/" ~/.celestia-light-mocha-4/config.toml
8484
```
8585

8686
:::
8787

88+
## Historical queries
89+
90+
::: warning
91+
Default light nodes no longer support historical queries. By default, nodes maintain a sliding window of headers, bounded by Tail and Head headers. Requests with height below the Tail are rejected.
92+
93+
This is, however, temporary, and lazy header fetching will be available with Backward Sync.
94+
:::
95+
96+
To retain the ability to request older queries with light nodes, use the new configuration fields to set an absolute header that the node will sync from:
97+
- `Header.Syncer.SyncFromHeight`: Set the height from which the node will sync
98+
- `Header.Syncer.SyncFromHash`: Set the hash from which the node will sync
99+
100+
By configuring these fields, your light node will maintain history from the specified height onward, allowing you to query historical data from that point.
101+
88102
## For service operators
89103

90104
If you're using multiple light nodes for similar services like tracking the same rollup,

how-to-guides/quick-start.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ Let's set the trusted hash!
8484

8585
1. Set the trusted height & hash
8686
1. Open your `config.toml` at `~/.celestia-light-{{ constants.mochaChainId }}/config.toml`
87-
1. Set `DASer.SampleFrom` to the trusted height (e.g. `SampleFrom = 123456`)
88-
1. Set `Header.TrustedHash` to the trusted hash (e.g. `TrustedHash = "E8BD0C48260C496BB7A4D8D1E7BDBF1F26A2FE3CF5714DECE1741B2FFB3C095C"` )
87+
1. Set `Header.Syncer.SyncFromHeight` to the trusted height (e.g. `SyncFromHeight = 123456`)
88+
1. Set `Header.Syncer.SyncFromHash` to the trusted hash (e.g. `SyncFromHash = "E8BD0C48260C496BB7A4D8D1E7BDBF1F26A2FE3CF5714DECE1741B2FFB3C095C"` )
8989

9090
> If you don't do this, when trying to retrieve data in a few minutes, you'll see a response saying `"result": "header: syncing in progress: localHeadHeight: 94721, requestedHeight: 2983850"`. You'll either need to let the node sync to the `requestedHeight`, or use quick sync with trusted hash to do this.
9191
> Learn more in [the trusted hash quick sync guide](/how-to-guides/celestia-node-trusted-hash.md).

0 commit comments

Comments
 (0)