Skip to content

Commit e83414d

Browse files
docs: address RocksDB removal review feedback
Preserve PebbleDB encoding guidance and make snapshot and config checks actionable before RocksDB support is removed. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 0c611da commit e83414d

5 files changed

Lines changed: 64 additions & 15 deletions

File tree

‎assets/pebbledb-vs-rocksdb.png‎

-124 KB
Binary file not shown.

‎node/giga-storage-migration.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ ss-backend = "pebbledb"
7676
evm-ss-split = true
7777
```
7878

79-
<Warning>Keep `ss-backend = "pebbledb"` during this migration. RocksDB support for the state store will be deprecated and removed in upcoming Sei releases.</Warning>
79+
<Warning>Keep `ss-backend = "pebbledb"` during this migration. RocksDB support for the state store will be removed. No target release has been published.</Warning>
8080

8181
### Step 2: State sync into the new layout
8282

‎node/node-operators.mdx‎

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ sc-enable = true
8989
[state-store]
9090
# Historical SS layer for queries. Required for any node serving RPC.
9191
ss-enable = true
92+
# State-store backend. Use PebbleDB; RocksDB support will be removed.
9293
ss-backend = "pebbledb"
9394
# 0 = keep everything; 100,000 is roughly 28 hours of pacific-1 history.
9495
ss-keep-recent = 100000
@@ -104,7 +105,7 @@ The full unmodified `app.toml`, `config.toml`, and `client.toml` produced by
104105
`seid init` against the latest tagged `seid` release. Use these as the
105106
canonical reference for every available knob and its default value.
106107

107-
<Warning>The generated `app.toml` below mirrors the latest tagged release and may still list RocksDB as a state-store option. Do not use RocksDB for new or resynced nodes. RocksDB support for the SeiDB state store will be deprecated and removed in upcoming Sei releases.</Warning>
108+
<Warning>The generated `app.toml` below mirrors the latest tagged release and may still list RocksDB as a state-store option. Do not use RocksDB for new or resynced nodes. RocksDB support for the SeiDB state store will be removed. No target release has been published.</Warning>
108109

109110
<Tabs>
110111
<Tab title="app.toml">
@@ -1369,10 +1370,12 @@ legacy single-database IAVL store with separate hot- and historical-data tiers:
13691370
modes is set to a non-default value.
13701371
2. **State Store (SS)** — versioned raw key/value pairs used for historical
13711372
queries. Required for any node that serves RPC. The default backend is
1372-
**PebbleDB**. RocksDB support for this layer will be deprecated and removed
1373-
in upcoming Sei releases. Use PebbleDB for new nodes. Before upgrading,
1374-
resync any node that uses RocksDB onto PebbleDB through
1375-
[state sync](/node/statesync) or a [PebbleDB snapshot](/node/snapshot).
1373+
**PebbleDB**. RocksDB support for this layer will be removed. No target
1374+
release has been published. Check the
1375+
[Sei release notes](https://github.com/sei-protocol/sei-chain/releases)
1376+
before each upgrade. Use PebbleDB for new nodes. Before upgrading, resync
1377+
any node that uses RocksDB onto PebbleDB through [state sync](/node/statesync)
1378+
or a [PebbleDB snapshot](/node/snapshot).
13761379

13771380
The legacy IAVL backend is still selectable via `sc-enable = false` but is
13781381
deprecated and slated for removal — new deployments and existing nodes
@@ -1424,7 +1427,7 @@ snapshot-keep-recent = 2
14241427
# serving RPC must keep it on.
14251428
ss-enable = true
14261429

1427-
# Use the default PebbleDB backend.
1430+
# Use PebbleDB. RocksDB support will be removed.
14281431
ss-backend = "pebbledb"
14291432

14301433
ss-async-write-buffer = 100
@@ -1448,6 +1451,21 @@ async-write-buffer = 100
14481451
prune-interval-seconds = 600
14491452
```
14501453

1454+
#### PebbleDB version encoding
1455+
1456+
Fresh PebbleDB state stores use descending-version MVCC encoding. Sei includes
1457+
the version in each key and sorts newer versions first. This lets
1458+
latest-version reads reach the newest visible value without scanning older
1459+
versions. The store records this format with the `s/_mvcc_descending` sentinel
1460+
key, which `seid` detects automatically when it opens the database.
1461+
1462+
PebbleDB state stores created by older builds use ascending-version encoding.
1463+
`seid` detects these stores and opens them in compatibility mode without an
1464+
error. They remain on the slower ascending read path. Rebuild the state store
1465+
through [state sync](/node/statesync) with a current `seid` release to adopt
1466+
descending encoding. A filesystem snapshot preserves the source store's
1467+
encoding, so confirm its encoding with the snapshot provider.
1468+
14511469
Setting small (more frequent) pruning intervals may collide with
14521470
snapshot creation. Too-large (less frequent) intervals mean pruning takes
14531471
longer overall, which can cause missed blocks and excessive resync time.

‎node/snapshot.mdx‎

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Follow this guide to join an existing network through **snapshot sync**. To quic
1212

1313
Snapshot sync allows a new node to join a network by downloading a recent, compressed copy of the entire application state and extracting it directly into the data directory. This reduces the initial sync time from days to minutes.
1414

15-
<Warning>RocksDB support for the SeiDB state store will be deprecated and removed in upcoming Sei releases. Use a PebbleDB snapshot for new or resynced nodes, and keep `ss-backend = "pebbledb"` in `app.toml`. If your node currently uses RocksDB, resync it onto PebbleDB before upgrading to a release without RocksDB support.</Warning>
15+
<Warning>RocksDB support for the SeiDB state store will be removed. No target release has been published. For new or resynced nodes, use a snapshot only after confirming that its state store uses PebbleDB. Keep `ss-backend = "pebbledb"` in `app.toml`.</Warning>
1616

1717
## Snapshot Providers
1818

@@ -25,6 +25,10 @@ You can select from various providers for downloading snapshots:
2525

2626
<iframe src="https://seistream.app/labs?page=snapshots" width="100%" height="600" style={{ border: 'none', borderRadius: '8px' }} title="Sei Snapshot Providers" />
2727

28+
Snapshot providers do not consistently label the state-store backend. Follow
29+
the verification step below before you extract a snapshot. If you cannot
30+
identify the backend from the archive, ask the provider to confirm it.
31+
2832
## Clean Up & Preparation
2933

3034
If you are **not** starting a node from fresh, perform the following backups and clean‑ups first.
@@ -81,21 +85,37 @@ sudo apt install curl lz4 wget aria2 pv -y
8185
SNAPSHOT_URL="<PASTE_SNAPSHOT_URL_HERE>"
8286
```
8387

84-
2. **Download and Extract**
85-
Most providers compress the `data` and `wasm` directory directly. The following command streams the download and extracts it into `$HOME/.sei`.
88+
2. **Download, verify, and extract**
89+
Most providers compress the `data` and `wasm` directories directly. Download the archive so you can inspect its state-store path before extraction:
90+
91+
```bash
92+
curl -L "$SNAPSHOT_URL" -o snapshot.tar.lz4
93+
94+
lz4 -c -d snapshot.tar.lz4 | tar -tf - | \
95+
awk '/(^|\/)data\/(state_store\/cosmos\/)?(pebbledb|rocksdb)\// { print; exit }'
96+
```
97+
98+
The printed path must contain either `data/pebbledb/` or
99+
`data/state_store/cosmos/pebbledb/`. Do not extract the archive if the path
100+
contains `rocksdb` or the command prints no state-store path.
101+
102+
Extract the verified archive, then remove it:
86103

87104
```bash
88-
curl -L $SNAPSHOT_URL | lz4 -c -d | tar -x -C $HOME/.sei
105+
lz4 -c -d snapshot.tar.lz4 | tar -x -C $HOME/.sei
106+
rm snapshot.tar.lz4
89107
```
90108

91-
**Alternative: Parallel Download with aria2**
109+
**Alternative: parallel download with aria2**
92110

93111
For faster downloads, especially with large snapshots, you can use `aria2c` which supports parallel connections:
94112

95113
```bash
96114
# Download with 16 parallel connections
97115
aria2c -x 16 -s 16 -o snapshot.tar.lz4 $SNAPSHOT_URL
98116

117+
# Run the backend verification command above before extraction
118+
99119
# Extract after download completes
100120
lz4 -c -d snapshot.tar.lz4 | tar -x -C $HOME/.sei
101121

@@ -123,9 +143,14 @@ sudo apt install curl lz4 wget aria2 pv -y
123143
Make sure SeiDB is enabled and the state-store backend is PebbleDB:
124144

125145
```bash
126-
sed -i.bak -E "/^\[state-commit\]/,/^\[.*\]/ s|^(sc-enable[[:space:]]*=[[:space:]]*).*$|\1true| ; /^\[state-store\]/,/^\[.*\]/ s|^(ss-enable[[:space:]]*=[[:space:]]*).*$|\1true| ; /^\[state-store\]/,/^\[.*\]/ s|^(ss-backend[[:space:]]*=[[:space:]]*).*$|\1\"pebbledb\"|" $HOME/.sei/config/app.toml
146+
sed -i.bak -E "/^\[state-commit\]/,/^\[.*\]/ s|^[#[:space:]]*(sc-enable[[:space:]]*=[[:space:]]*).*$|\1true| ; /^\[state-store\]/,/^\[.*\]/ s|^[#[:space:]]*(ss-enable[[:space:]]*=[[:space:]]*).*$|\1true| ; /^\[state-store\]/,/^\[.*\]/ s|^[#[:space:]]*(ss-backend[[:space:]]*=[[:space:]]*).*$|\1\"pebbledb\"|" $HOME/.sei/config/app.toml
147+
148+
sed -n '/^\[state-store\]/,/^\[.*\]/p' $HOME/.sei/config/app.toml
127149
```
128150

151+
Confirm that the output includes `ss-backend = "pebbledb"`. If the key is
152+
absent, add it directly below `[state-store]` before you restart the node.
153+
129154
5. **Restart the Node**
130155

131156
```bash

‎node/statesync.mdx‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Follow this guide to join an existing network through statesync. To quickly spin
1010

1111
State sync allows a new node to join a network by fetching a snapshot of the application state at a recent height instead of fetching and replaying all historical blocks. This can reduce the time needed to sync with the network from days to minutes.
1212

13-
<Warning>RocksDB support for the SeiDB state store will be deprecated and removed in upcoming Sei releases. Set `ss-backend = "pebbledb"` before you start state sync, especially when rebuilding a node that previously used RocksDB.</Warning>
13+
<Warning>RocksDB support for the SeiDB state store will be removed. No target release has been published. Set `ss-backend = "pebbledb"` before you start state sync, especially when rebuilding a node that previously used RocksDB.</Warning>
1414

1515
## Clean Up
1616

@@ -116,10 +116,16 @@ sed -i.bak -e "s|^persistent-peers *=.*|persistent-peers = \"$STATE_SYNC_PEER\"|
116116
$HOME/.sei/config/config.toml
117117

118118
# Use PebbleDB for the SeiDB state store
119-
sed -i.bak -E '/^\[state-store\]/,/^\[.*\]/ s|^(ss-backend[[:space:]]*=[[:space:]]*).*$|\1"pebbledb"|' \
119+
sed -i.bak -E '/^\[state-store\]/,/^\[.*\]/ s|^[#[:space:]]*(ss-backend[[:space:]]*=[[:space:]]*).*$|\1"pebbledb"|' \
120120
$HOME/.sei/config/app.toml
121+
122+
# Print the state-store section so you can verify the backend
123+
sed -n '/^\[state-store\]/,/^\[.*\]/p' $HOME/.sei/config/app.toml
121124
```
122125

126+
Confirm that the script output includes `ss-backend = "pebbledb"`. If the key
127+
is absent, add it directly below `[state-store]` before you start `seid`.
128+
123129
Finally start the daemon:
124130

125131
```bash

0 commit comments

Comments
 (0)