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

Lines changed: 2 additions & 0 deletions
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

Lines changed: 35 additions & 0 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 3 additions & 3 deletions
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

Lines changed: 27 additions & 8 deletions
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

Lines changed: 3 additions & 3 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

0 commit comments

Comments
 (0)