You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> **Note**: All point releases (e.g. v2.3.1) are schema-compatible with the prior minor release
35
-
> (e.g. v2.3.0).
27
+
> **Note**: All point releases (e.g. v4.4.1) are schema-compatible with the prior minor release
28
+
> (e.g. v4.4.0).
36
29
37
30
> **Note**: Support for old schemas is gradually removed from newer versions of Lighthouse. We
38
-
usually do this after a major version has been out for a while and everyone has upgraded. In this
39
-
case the above table will continue to record the deprecated schema changes for reference.
31
+
usually do this after a major version has been out for a while and everyone has upgraded. Deprecated
32
+
schema versions for previous releases are archived under
33
+
[Full list of schema versions](#full-list-of-schema-versions). If you get stuck and are unable
34
+
to upgrade a **testnet** node to the latest version, sometimes it is possible to upgrade via an
35
+
intermediate version (e.g. upgrade from v3.5.0 to v4.6.0 via v4.0.1). This is never necessary
36
+
on mainnet.
40
37
41
38
## How to apply a database downgrade
42
39
43
40
To apply a downgrade you need to use the `lighthouse db migrate` command with the correct parameters.
44
41
45
42
1. Make sure you have a copy of the latest version of Lighthouse. This will be the version that
46
43
knows about the latest schema change, and has the ability to revert it.
47
-
2. Work out the schema version you would like to downgrade to by checking the table above, or the
48
-
Lighthouse release notes. E.g. if you want to downgrade from v2.3.0, which upgraded the version
49
-
from v8 to v9, then you'll want to _downgrade_ to v8 in order to run v2.2.x or earlier.
44
+
2. Work out the schema version you would like to downgrade to by checking the table above, or the [Full list of schema versions](#full-list-of-schema-versions) below. E.g. if you want to downgrade from v4.2.0, which upgraded the version from v16 to v17, then you'll want to downgrade to v16 in order to run v4.0.1.
50
45
3.**Ensure that downgrading is feasible**. Not all schema upgrades can be reverted, and some of
51
46
them are time-sensitive. The release notes will state whether a downgrade is available and
52
47
whether any caveats apply to it.
@@ -59,14 +54,13 @@ To apply a downgrade you need to use the `lighthouse db migrate` command with th
Where `lighthouse` is Lighthouse v2.3.0+. After the downgrade succeeds you can then replace your
63
+
Where `lighthouse` is Lighthouse v4.2.0+. After the downgrade succeeds you can then replace your
70
64
global `lighthouse` binary with the older version and start your node again.
71
65
72
66
## How to apply a database upgrade
@@ -161,35 +155,59 @@ lighthouse db version --network mainnet
161
155
162
156
## How to prune historic states
163
157
164
-
Pruning historic states helps in managing the disk space used by the Lighthouse beacon node by removing old beacon
165
-
states from the freezer database. This can be especially useful when the database has accumulated a significant amount
166
-
of historic data. This command is intended for nodes synced before 4.4.1, as newly synced node no longer store
158
+
Pruning historic states helps in managing the disk space used by the Lighthouse beacon node by removing old beacon
159
+
states from the freezer database. This can be especially useful when the database has accumulated a significant amount
160
+
of historic data. This command is intended for nodes synced before 4.4.1, as newly synced node no longer store
167
161
historic states by default.
168
162
169
163
Here are the steps to prune historic states:
170
164
171
165
1. Before running the prune command, make sure that the Lighthouse beacon node is not running. If you are using systemd, you might stop the Lighthouse beacon node with a command like:
172
-
166
+
173
167
```bash
174
168
sudo systemctl stop lighthousebeacon
175
169
```
176
170
177
171
2. Use the `prune-states`command to prune the historic states. You can do a test run without the `--confirm` flag to check that the database can be pruned:
178
-
172
+
179
173
```bash
180
174
sudo -u "$LH_USER" lighthouse db prune-states --datadir "$LH_DATADIR" --network "$NET"
181
175
```
182
176
183
177
3. If you are ready to prune the states irreversibly, add the `--confirm` flag to commit the changes:
0 commit comments