mirror of
https://github.com/sigp/lighthouse.git
synced 2026-07-02 20:34:27 +00:00
Merge remote-tracking branch 'origin/unstable' into tree-states
This commit is contained in:
@@ -21,9 +21,7 @@ The beacon node and validator client each require a new flag for lighthouse to b
|
||||
```
|
||||
lighthouse bn --builder https://mainnet-builder.test
|
||||
```
|
||||
The `--builder` flag will cause the beacon node to query the provided URL during block production for a block
|
||||
payload with stubbed-out transactions. If this request fails, Lighthouse will fall back to the local
|
||||
execution engine and produce a block using transactions gathered and verified locally.
|
||||
The `--builder` flag will cause the beacon node to simultaneously query the provided URL and the local execution engine during block production for a block payload with stubbed-out transactions. If either fails, the successful result will be used; If both succeed, the more profitable result will be used.
|
||||
|
||||
The beacon node will *only* query for this type of block (a "blinded" block) when a validator specifically requests it.
|
||||
Otherwise, it will continue to serve full blocks as normal. In order to configure the validator client to query for
|
||||
|
||||
@@ -158,3 +158,38 @@ lighthouse db version --network mainnet
|
||||
```
|
||||
|
||||
[run-correctly]: #how-to-run-lighthouse-db-correctly
|
||||
|
||||
## How to prune historic states
|
||||
|
||||
Pruning historic states helps in managing the disk space used by the Lighthouse beacon node by removing old beacon
|
||||
states from the freezer database. This can be especially useful when the database has accumulated a significant amount
|
||||
of historic data. This command is intended for nodes synced before 4.4.1, as newly synced node no longer store
|
||||
historic states by default.
|
||||
|
||||
Here are the steps to prune historic states:
|
||||
|
||||
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:
|
||||
|
||||
```bash
|
||||
sudo systemctl stop lighthousebeacon
|
||||
```
|
||||
|
||||
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:
|
||||
|
||||
```bash
|
||||
sudo -u "$LH_USER" lighthouse db prune-states --datadir "$LH_DATADIR" --network "$NET"
|
||||
```
|
||||
|
||||
3. If you are ready to prune the states irreversibly, add the `--confirm` flag to commit the changes:
|
||||
|
||||
```bash
|
||||
sudo -u "$LH_USER" lighthouse db prune-states --confirm --datadir "$LH_DATADIR" --network "$NET"
|
||||
```
|
||||
|
||||
The `--confirm` flag ensures that you are aware the action is irreversible, and historic states will be permanently removed.
|
||||
|
||||
4. After successfully pruning the historic states, you can restart the Lighthouse beacon node:
|
||||
|
||||
```bash
|
||||
sudo systemctl start lighthousebeacon
|
||||
```
|
||||
|
||||
@@ -25,7 +25,8 @@ Commands to run the test suite are available via the `Makefile` in the
|
||||
project root for the benefit of CI/CD. We list some of these commands below so
|
||||
you can run them locally and avoid CI failures:
|
||||
|
||||
- `$ make cargo-fmt`: (fast) runs a Rust code linter.
|
||||
- `$ make cargo-fmt`: (fast) runs a Rust code formatting check.
|
||||
- `$ make lint`: (fast) runs a Rust code linter.
|
||||
- `$ make test`: (medium) runs unit tests across the whole project.
|
||||
- `$ make test-ef`: (medium) runs the Ethereum Foundation test vectors.
|
||||
- `$ make test-full`: (slow) runs the full test suite (including all previous
|
||||
|
||||
Reference in New Issue
Block a user