Skip to content

Commit 1de4983

Browse files
authored
Add spell check and update Lighthouse book (#6627)
* spellcheck config * Merge remote-tracking branch 'origin/unstable' into spellcheck * spellcheck update * update spellcheck * spell check passes * Remove ignored and add other md files * Remove some words in wordlist * CI * test spell check CI * correct spell check * Merge branch 'unstable' into spellcheck * minor fix * Merge branch 'spellcheck' of https://github.com/chong-he/lighthouse into spellcheck * Update book * mdlint * delete previous_epoch_active_gwei * Merge branch 'unstable' into spellcheck * Tweak "container runtime" wording * Try `BeaconState`s
1 parent d74b2d9 commit 1de4983

18 files changed

+331
-33
lines changed

.github/workflows/test-suite.yml

+2
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,8 @@ jobs:
363363
run: CARGO_HOME=$(readlink -f $HOME) make vendor
364364
- name: Markdown-linter
365365
run: make mdlint
366+
- name: Spell-check
367+
uses: rojopolis/spellcheck-github-actions@v0
366368
check-msrv:
367369
name: check-msrv
368370
runs-on: ubuntu-latest

.spellcheck.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
matrix:
2+
- name: Markdown
3+
sources:
4+
- './book/**/*.md'
5+
- 'README.md'
6+
- 'CONTRIBUTING.md'
7+
- 'SECURITY.md'
8+
- './scripts/local_testnet/README.md'
9+
default_encoding: utf-8
10+
aspell:
11+
lang: en
12+
dictionary:
13+
wordlists:
14+
- wordlist.txt
15+
encoding: utf-8
16+
pipeline:
17+
- pyspelling.filters.url:
18+
- pyspelling.filters.markdown:
19+
markdown_extensions:
20+
- pymdownx.superfences:
21+
- pymdownx.highlight:
22+
- pymdownx.striphtml:
23+
- pymdownx.magiclink:
24+
- pyspelling.filters.html:
25+
comments: false
26+
ignores:
27+
- code
28+
- pre
29+
- pyspelling.filters.context:
30+
context_visible_first: true
31+
delimiters:
32+
# Ignore hex strings
33+
- open: '0x[a-fA-F0-9]'
34+
close: '[^a-fA-F0-9]'
35+

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ steps:
8585
5. Commit your changes and push them to your fork with `$ git push origin
8686
your_feature_name`.
8787
6. Go to your fork on github.com and use the web interface to create a pull
88-
request into the sigp/lighthouse repo.
88+
request into the sigp/lighthouse repository.
8989

9090
From there, the repository maintainers will review the PR and either accept it
9191
or provide some constructive feedback.

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Lighthouse is:
2626
- Built in [Rust](https://www.rust-lang.org), a modern language providing unique safety guarantees and
2727
excellent performance (comparable to C++).
2828
- Funded by various organisations, including Sigma Prime, the
29-
Ethereum Foundation, ConsenSys, the Decentralization Foundation and private individuals.
29+
Ethereum Foundation, Consensys, the Decentralization Foundation and private individuals.
3030
- Actively involved in the specification and security analysis of the
3131
Ethereum proof-of-stake consensus specification.
3232

book/src/advanced_database.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ that we have observed are:
5656
_a lot_ of space. It's even possible to push beyond that with `--hierarchy-exponents 0` which
5757
would store a full state every single slot (NOT RECOMMENDED).
5858
- **Less diff layers are not necessarily faster**. One might expect that the fewer diff layers there
59-
are, the less work Lighthouse would have to do to reconstruct any particular state. In practise
59+
are, the less work Lighthouse would have to do to reconstruct any particular state. In practice
6060
this seems to be offset by the increased size of diffs in each layer making the diffs take longer
6161
to apply. We observed no significant performance benefit from `--hierarchy-exponents 5,7,11`, and
6262
a substantial increase in space consumed.

book/src/advanced_networking.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ The steps to do port forwarding depends on the router, but the general steps are
6868
1. Determine the default gateway IP:
6969

7070
- On Linux: open a terminal and run `ip route | grep default`, the result should look something similar to `default via 192.168.50.1 dev wlp2s0 proto dhcp metric 600`. The `192.168.50.1` is your router management default gateway IP.
71-
- On MacOS: open a terminal and run `netstat -nr|grep default` and it should return the default gateway IP.
71+
- On macOS: open a terminal and run `netstat -nr|grep default` and it should return the default gateway IP.
7272
- On Windows: open a command prompt and run `ipconfig` and look for the `Default Gateway` which will show you the gateway IP.
7373

7474
The default gateway IP usually looks like 192.168.X.X. Once you obtain the IP, enter it to a web browser and it will lead you to the router management page.
@@ -91,7 +91,7 @@ The steps to do port forwarding depends on the router, but the general steps are
9191
- Internal port: `9001`
9292
- IP address: Choose the device that is running Lighthouse.
9393

94-
1. To check that you have successfully opened the ports, go to [yougetsignal](https://www.yougetsignal.com/tools/open-ports/) and enter `9000` in the `port number`. If it shows "open", then you have successfully set up port forwarding. If it shows "closed", double check your settings, and also check that you have allowed firewall rules on port 9000. Note: this will only confirm if port 9000/TCP is open. You will need to ensure you have correctly setup port forwarding for the UDP ports (`9000` and `9001` by default).
94+
1. To check that you have successfully opened the ports, go to [`yougetsignal`](https://www.yougetsignal.com/tools/open-ports/) and enter `9000` in the `port number`. If it shows "open", then you have successfully set up port forwarding. If it shows "closed", double check your settings, and also check that you have allowed firewall rules on port 9000. Note: this will only confirm if port 9000/TCP is open. You will need to ensure you have correctly setup port forwarding for the UDP ports (`9000` and `9001` by default).
9595

9696
## ENR Configuration
9797

@@ -141,7 +141,7 @@ To listen over both IPv4 and IPv6:
141141
- Set two listening addresses using the `--listen-address` flag twice ensuring
142142
the two addresses are one IPv4, and the other IPv6. When doing so, the
143143
`--port` and `--discovery-port` flags will apply exclusively to IPv4. Note
144-
that this behaviour differs from the Ipv6 only case described above.
144+
that this behaviour differs from the IPv6 only case described above.
145145
- If necessary, set the `--port6` flag to configure the port used for TCP and
146146
UDP over IPv6. This flag has no effect when listening over IPv6 only.
147147
- If necessary, set the `--discovery-port6` flag to configure the IPv6 UDP

book/src/api-lighthouse.md

+27-8
Original file line numberDiff line numberDiff line change
@@ -508,23 +508,31 @@ curl "http://localhost:5052/lighthouse/database/info" | jq
508508

509509
```json
510510
{
511-
"schema_version": 18,
511+
"schema_version": 22,
512512
"config": {
513-
"slots_per_restore_point": 8192,
514-
"slots_per_restore_point_set_explicitly": false,
515513
"block_cache_size": 5,
514+
"state_cache_size": 128,
515+
"compression_level": 1,
516516
"historic_state_cache_size": 1,
517+
"hdiff_buffer_cache_size": 16,
517518
"compact_on_init": false,
518519
"compact_on_prune": true,
519520
"prune_payloads": true,
521+
"hierarchy_config": {
522+
"exponents": [
523+
5,
524+
7,
525+
11
526+
]
527+
},
520528
"prune_blobs": true,
521529
"epochs_per_blob_prune": 1,
522530
"blob_prune_margin_epochs": 0
523531
},
524532
"split": {
525-
"slot": "7454656",
526-
"state_root": "0xbecfb1c8ee209854c611ebc967daa77da25b27f1a8ef51402fdbe060587d7653",
527-
"block_root": "0x8730e946901b0a406313d36b3363a1b7091604e1346a3410c1a7edce93239a68"
533+
"slot": "10530592",
534+
"state_root": "0xd27e6ce699637cf9b5c7ca632118b7ce12c2f5070bb25a27ac353ff2799d4466",
535+
"block_root": "0x71509a1cb374773d680cd77148c73ab3563526dacb0ab837bb0c87e686962eae"
528536
},
529537
"anchor": {
530538
"anchor_slot": "7451168",
@@ -543,8 +551,19 @@ curl "http://localhost:5052/lighthouse/database/info" | jq
543551
For more information about the split point, see the [Database Configuration](./advanced_database.md)
544552
docs.
545553

546-
The `anchor` will be `null` unless the node has been synced with checkpoint sync and state
547-
reconstruction has yet to be completed. For more information
554+
For archive nodes, the `anchor` will be:
555+
556+
```json
557+
"anchor": {
558+
"anchor_slot": "0",
559+
"oldest_block_slot": "0",
560+
"oldest_block_parent": "0x0000000000000000000000000000000000000000000000000000000000000000",
561+
"state_upper_limit": "0",
562+
"state_lower_limit": "0"
563+
},
564+
```
565+
566+
indicating that all states with slots `>= 0` are available, i.e., full state history. For more information
548567
on the specific meanings of these fields see the docs on [Checkpoint
549568
Sync](./checkpoint-sync.md#reconstructing-states).
550569

book/src/faq.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ If the reason for the error message is caused by no. 1 above, you may want to lo
9292

9393
- Power outage. If power outages are an issue at your place, consider getting a UPS to avoid ungraceful shutdown of services.
9494
- The service file is not stopped properly. To overcome this, make sure that the process is stopped properly, e.g., during client updates.
95-
- Out of memory (oom) error. This can happen when the system memory usage has reached its maximum and causes the execution engine to be killed. To confirm that the error is due to oom, run `sudo dmesg -T | grep killed` to look for killed processes. If you are using geth as the execution client, a short term solution is to reduce the resources used. For example, you can reduce the cache by adding the flag `--cache 2048`. If the oom occurs rather frequently, a long term solution is to increase the memory capacity of the computer.
95+
- Out of memory (oom) error. This can happen when the system memory usage has reached its maximum and causes the execution engine to be killed. To confirm that the error is due to oom, run `sudo dmesg -T | grep killed` to look for killed processes. If you are using Geth as the execution client, a short term solution is to reduce the resources used. For example, you can reduce the cache by adding the flag `--cache 2048`. If the oom occurs rather frequently, a long term solution is to increase the memory capacity of the computer.
9696

9797
### <a name="bn-upcheck"></a> I see beacon logs showing `Error during execution engine upcheck`, what should I do?
9898

@@ -302,7 +302,7 @@ An example of the log: (debug logs can be found under `$datadir/beacon/logs`):
302302
Delayed head block, set_as_head_time_ms: 27, imported_time_ms: 168, attestable_delay_ms: 4209, available_delay_ms: 4186, execution_time_ms: 201, blob_delay_ms: 3815, observed_delay_ms: 3984, total_delay_ms: 4381, slot: 1886014, proposer_index: 733, block_root: 0xa7390baac88d50f1cbb5ad81691915f6402385a12521a670bbbd4cd5f8bf3934, service: beacon, module: beacon_chain::canonical_head:1441
303303
```
304304

305-
The field to look for is `attestable_delay`, which defines the time when a block is ready for the validator to attest. If the `attestable_delay` is greater than 4s which has past the window of attestation, the attestation wil fail. In the above example, the delay is mostly caused by late block observed by the node, as shown in `observed_delay`. The `observed_delay` is determined mostly by the proposer and partly by your networking setup (e.g., how long it took for the node to receive the block). Ideally, `observed_delay` should be less than 3 seconds. In this example, the validator failed to attest the block due to the block arriving late.
305+
The field to look for is `attestable_delay`, which defines the time when a block is ready for the validator to attest. If the `attestable_delay` is greater than 4s which has past the window of attestation, the attestation will fail. In the above example, the delay is mostly caused by late block observed by the node, as shown in `observed_delay`. The `observed_delay` is determined mostly by the proposer and partly by your networking setup (e.g., how long it took for the node to receive the block). Ideally, `observed_delay` should be less than 3 seconds. In this example, the validator failed to attest the block due to the block arriving late.
306306

307307
Another example of log:
308308

@@ -315,7 +315,7 @@ In this example, we see that the `execution_time_ms` is 4694ms. The `execution_t
315315

316316
### <a name="vc-head-vote"></a> Sometimes I miss the attestation head vote, resulting in penalty. Is this normal?
317317

318-
In general, it is unavoidable to have some penalties occasionally. This is particularly the case when you are assigned to attest on the first slot of an epoch and if the proposer of that slot releases the block late, then you will get penalised for missing the target and head votes. Your attestation performance does not only depend on your own setup, but also on everyone elses performance.
318+
In general, it is unavoidable to have some penalties occasionally. This is particularly the case when you are assigned to attest on the first slot of an epoch and if the proposer of that slot releases the block late, then you will get penalised for missing the target and head votes. Your attestation performance does not only depend on your own setup, but also on everyone else's performance.
319319

320320
You could also check for the sync aggregate participation percentage on block explorers such as [beaconcha.in](https://beaconcha.in/). A low sync aggregate participation percentage (e.g., 60-70%) indicates that the block that you are assigned to attest to may be published late. As a result, your validator fails to correctly attest to the block.
321321

book/src/graffiti.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Lighthouse provides four options for setting validator graffiti.
44

55
## 1. Using the "--graffiti-file" flag on the validator client
66

7-
Users can specify a file with the `--graffiti-file` flag. This option is useful for dynamically changing graffitis for various use cases (e.g. drawing on the beaconcha.in graffiti wall). This file is loaded once on startup and reloaded everytime a validator is chosen to propose a block.
7+
Users can specify a file with the `--graffiti-file` flag. This option is useful for dynamically changing graffitis for various use cases (e.g. drawing on the beaconcha.in graffiti wall). This file is loaded once on startup and reloaded every time a validator is chosen to propose a block.
88

99
Usage:
1010
`lighthouse vc --graffiti-file graffiti_file.txt`

book/src/homebrew.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ Alternatively, you can find the `lighthouse` binary at:
3131

3232
The [formula][] is kept up-to-date by the Homebrew community and a bot that lists for new releases.
3333

34-
The package source can be found in the [homebrew-core](https://github.com/Homebrew/homebrew-core/blob/master/Formula/l/lighthouse.rb) repo.
34+
The package source can be found in the [homebrew-core](https://github.com/Homebrew/homebrew-core/blob/master/Formula/l/lighthouse.rb) repository.
3535

3636
[formula]: https://formulae.brew.sh/formula/lighthouse

book/src/late-block-re-orgs.md

+13-6
Original file line numberDiff line numberDiff line change
@@ -46,24 +46,31 @@ You can track the reasons for re-orgs being attempted (or not) via Lighthouse's
4646

4747
A pair of messages at `INFO` level will be logged if a re-org opportunity is detected:
4848

49-
> INFO Attempting re-org due to weak head threshold_weight: 45455983852725, head_weight: 0, parent: 0x09d953b69041f280758400c671130d174113bbf57c2d26553a77fb514cad4890, weak_head: 0xf64f8e5ed617dc18c1e759dab5d008369767c3678416dac2fe1d389562842b49
50-
51-
> INFO Proposing block to re-org current head head_to_reorg: 0xf64f…2b49, slot: 1105320
49+
```text
50+
INFO Attempting re-org due to weak head threshold_weight: 45455983852725, head_weight: 0, parent: 0x09d953b69041f280758400c671130d174113bbf57c2d26553a77fb514cad4890, weak_head: 0xf64f8e5ed617dc18c1e759dab5d008369767c3678416dac2fe1d389562842b49
51+
INFO Proposing block to re-org current head head_to_reorg: 0xf64f…2b49, slot: 1105320
52+
```
5253

5354
This should be followed shortly after by a `INFO` log indicating that a re-org occurred. This is
5455
expected and normal:
5556

56-
> INFO Beacon chain re-org reorg_distance: 1, new_slot: 1105320, new_head: 0x72791549e4ca792f91053bc7cf1e55c6fbe745f78ce7a16fc3acb6f09161becd, previous_slot: 1105319, previous_head: 0xf64f8e5ed617dc18c1e759dab5d008369767c3678416dac2fe1d389562842b49
57+
```text
58+
INFO Beacon chain re-org reorg_distance: 1, new_slot: 1105320, new_head: 0x72791549e4ca792f91053bc7cf1e55c6fbe745f78ce7a16fc3acb6f09161becd, previous_slot: 1105319, previous_head: 0xf64f8e5ed617dc18c1e759dab5d008369767c3678416dac2fe1d389562842b49
59+
```
5760

5861
In case a re-org is not viable (which should be most of the time), Lighthouse will just propose a
5962
block as normal and log the reason the re-org was not attempted at debug level:
6063

61-
> DEBG Not attempting re-org reason: head not late
64+
```text
65+
DEBG Not attempting re-org reason: head not late
66+
```
6267

6368
If you are interested in digging into the timing of `forkchoiceUpdated` messages sent to the
6469
execution layer, there is also a debug log for the suppression of `forkchoiceUpdated` messages
6570
when Lighthouse thinks that a re-org is likely:
6671

67-
> DEBG Fork choice update overridden slot: 1105320, override: 0x09d953b69041f280758400c671130d174113bbf57c2d26553a77fb514cad4890, canonical_head: 0xf64f8e5ed617dc18c1e759dab5d008369767c3678416dac2fe1d389562842b49
72+
```text
73+
DEBG Fork choice update overridden slot: 1105320, override: 0x09d953b69041f280758400c671130d174113bbf57c2d26553a77fb514cad4890, canonical_head: 0xf64f8e5ed617dc18c1e759dab5d008369767c3678416dac2fe1d389562842b49
74+
```
6875

6976
[the spec]: https://github.com/ethereum/consensus-specs/pull/3034

book/src/ui-faqs.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Yes, the most current Siren version requires Lighthouse v4.3.0 or higher to func
66

77
## 2. Where can I find my API token?
88

9-
The required Api token may be found in the default data directory of the validator client. For more information please refer to the lighthouse ui configuration [`api token section`](./api-vc-auth-header.md).
9+
The required API token may be found in the default data directory of the validator client. For more information please refer to the lighthouse ui configuration [`api token section`](./api-vc-auth-header.md).
1010

1111
## 3. How do I fix the Node Network Errors?
1212

book/src/ui-installation.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# 📦 Installation
22

3-
Siren supports any operating system that supports container runtimes and/or NodeJS 18, this includes Linux, MacOS, and Windows. The recommended way of running Siren is by launching the [docker container](https://hub.docker.com/r/sigp/siren) , but running the application directly is also possible.
3+
Siren supports any operating system that supports containers and/or NodeJS 18, this includes Linux, macOS, and Windows. The recommended way of running Siren is by launching the [docker container](https://hub.docker.com/r/sigp/siren) , but running the application directly is also possible.
44

55
## Version Requirement
66

book/src/validator-inclusion.md

-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ The following fields are returned:
5656
able to vote) during the current epoch.
5757
- `current_epoch_target_attesting_gwei`: the total staked gwei that attested to
5858
the majority-elected Casper FFG target epoch during the current epoch.
59-
- `previous_epoch_active_gwei`: as per `current_epoch_active_gwei`, but during the previous epoch.
6059
- `previous_epoch_target_attesting_gwei`: see `current_epoch_target_attesting_gwei`.
6160
- `previous_epoch_head_attesting_gwei`: the total staked gwei that attested to a
6261
head beacon block that is in the canonical chain.

book/src/validator-manager.md

+1
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,4 @@ The `validator-manager` boasts the following features:
3232

3333
- [Creating and importing validators using the `create` and `import` commands.](./validator-manager-create.md)
3434
- [Moving validators between two VCs using the `move` command.](./validator-manager-move.md)
35+
- [Managing validators such as delete, import and list validators.](./validator-manager-api.md)

book/src/validator-monitoring.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ validator_monitor_attestation_simulator_source_attester_hit_total
134134
validator_monitor_attestation_simulator_source_attester_miss_total
135135
```
136136

137-
A grafana dashboard to view the metrics for attestation simulator is available [here](https://github.com/sigp/lighthouse-metrics/blob/master/dashboards/AttestationSimulator.json).
137+
A Grafana dashboard to view the metrics for attestation simulator is available [here](https://github.com/sigp/lighthouse-metrics/blob/master/dashboards/AttestationSimulator.json).
138138

139139
The attestation simulator provides an insight into the attestation performance of a beacon node. It can be used as an indication of how expediently the beacon node has completed importing blocks within the 4s time frame for an attestation to be made.
140140

0 commit comments

Comments
 (0)