Skip to content

Commit

Permalink
make linter less angry
Browse files Browse the repository at this point in the history
  • Loading branch information
joaniefromtheblock committed Oct 21, 2024
1 parent 2fcb6ec commit d770f2e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
6 changes: 4 additions & 2 deletions docs/reference/cli/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2781,15 +2781,17 @@ This flag restricts the server's responding addresses, but not the client access
By default, Teku's REST API server responds only to requests where the `Host` header matches `localhost` or `127.0.0.1`.
If you specify values, the server will only respond to requests where the `Host` header matches one of the specified hosts or IP addresses.
You can configure the API to listen on all network interfaces using [`rest-api-interface="0.0.0.0"`](#rest-api-interface) and allow connections from specific addresses by setting `rest-api-host-allowlist`. See [configure the API for network interfaces and host allowlist](../rest.md#configure-the-api-for-network-interfaces-and-host-allowlist) for more information.
You can configure the API to listen on all network interfaces using [`rest-api-interface="0.0.0.0"`](#rest-api-interface)
and allow connections from specific addresses by setting `rest-api-host-allowlist`.

Check failure on line 2785 in docs/reference/cli/index.md

View workflow job for this annotation

GitHub Actions / Lint

Trailing spaces

docs/reference/cli/index.md:2785:84 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1] https://github.com/DavidAnson/markdownlint/blob/v0.35.0/doc/md009.md

Check failure on line 2785 in docs/reference/cli/index.md

View workflow job for this annotation

GitHub Actions / Lint

Trailing spaces

docs/reference/cli/index.md:2785:84 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1] https://github.com/DavidAnson/markdownlint/blob/v0.35.0/doc/md009.md

Check failure on line 2785 in docs/reference/cli/index.md

View workflow job for this annotation

GitHub Actions / Lint

Trailing spaces

docs/reference/cli/index.md:2785:84 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1] https://github.com/DavidAnson/markdownlint/blob/v0.35.0/doc/md009.md
See [configure the API for network interfaces and host allowlist](../rest.md#configure-the-api-for-network-interfaces-and-host-allowlist)
for more information.
:::tip
To allow all hostnames, use "*". We don't recommend allowing all hostnames for production environments.

Check failure on line 2791 in docs/reference/cli/index.md

View workflow job for this annotation

GitHub Actions / Spelling

[vale] reported by reviewdog 🐶 [Microsoft.Quotes] Punctuation should be inside the quotes. Raw Output: {"message": "[Microsoft.Quotes] Punctuation should be inside the quotes.", "location": {"path": "docs/reference/cli/index.md", "range": {"start": {"line": 2791, "column": 29}}}, "severity": "ERROR"}

Check failure on line 2791 in docs/reference/cli/index.md

View workflow job for this annotation

GitHub Actions / Spelling

[vale] reported by reviewdog 🐶 [Microsoft.Quotes] Punctuation should be inside the quotes. Raw Output: {"message": "[Microsoft.Quotes] Punctuation should be inside the quotes.", "location": {"path": "docs/reference/cli/index.md", "range": {"start": {"line": 2791, "column": 29}}}, "severity": "ERROR"}

Check failure on line 2791 in docs/reference/cli/index.md

View workflow job for this annotation

GitHub Actions / Spelling

[vale] reported by reviewdog 🐶 [Microsoft.Quotes] Punctuation should be inside the quotes. Raw Output: {"message": "[Microsoft.Quotes] Punctuation should be inside the quotes.", "location": {"path": "docs/reference/cli/index.md", "range": {"start": {"line": 2791, "column": 29}}}, "severity": "ERROR"}

:::


:::warning

Only trusted parties should access the REST API.
Expand Down
21 changes: 14 additions & 7 deletions docs/reference/rest.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ You can also use tools such as [Postman] or [cURL] to interact with Teku APIs.
<Tabs>
<TabItem value="cURL request" label="cURL request" default>


```bash
curl -X GET "http://localhost:5051/eth/v1/node/identity"
```
Expand Down Expand Up @@ -69,8 +68,10 @@ curl -X GET "http://localhost:5051/eth/v1/node/identity"

### Configure the API for network interfaces and host allowlist

You can use the [`rest-api-host-allowlist`](cli/index.md#rest-api-host-allowlist) and [`rest-api-interface`](cli/index.md#rest-api-interface) options to control which hosts and network interfaces Teku's REST API responds to. Configure the API to listen on specific IP addresses or all interfaces with `rest-api-interface` and control which hosts can connect using `rest-api-host-allowlist`:

You can use the [`rest-api-host-allowlist`](cli/index.md#rest-api-host-allowlist) and [`rest-api-interface`](cli/index.md#rest-api-interface)
options to control which hosts and network interfaces Teku's REST API responds to.

Check failure on line 72 in docs/reference/rest.md

View workflow job for this annotation

GitHub Actions / Lint

Trailing spaces

docs/reference/rest.md:72:83 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1] https://github.com/DavidAnson/markdownlint/blob/v0.35.0/doc/md009.md

Check failure on line 72 in docs/reference/rest.md

View workflow job for this annotation

GitHub Actions / Lint

Trailing spaces

docs/reference/rest.md:72:83 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1] https://github.com/DavidAnson/markdownlint/blob/v0.35.0/doc/md009.md

Check failure on line 72 in docs/reference/rest.md

View workflow job for this annotation

GitHub Actions / Lint

Trailing spaces

docs/reference/rest.md:72:83 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1] https://github.com/DavidAnson/markdownlint/blob/v0.35.0/doc/md009.md
Configure the API to listen on specific IP addresses or all interfaces with `rest-api-interface` and control
which hosts can connect using `rest-api-host-allowlist`:

| Configuration | Interface | Allowlist | Result |
|---------------|-----------|-----------|--------|
Expand All @@ -81,17 +82,23 @@ You can use the [`rest-api-host-allowlist`](cli/index.md#rest-api-host-allowlist

## Enable the validator client API

The [validator client API](../how-to/use-external-signer/manage-keys.md) allows you to call the [key manager API endpoints](https://ethereum.github.io/keymanager-APIs/) and is enabled separately from the REST API methods.
The [validator client API](../how-to/use-external-signer/manage-keys.md) allows you to call the
[key manager API endpoints](https://ethereum.github.io/keymanager-APIs/) and is enabled separately from the REST API methods.

Check warning on line 86 in docs/reference/rest.md

View workflow job for this annotation

GitHub Actions / Spelling

[vale] reported by reviewdog 🐶 [Microsoft.Adverbs] Remove 'separately' if it's not important to the meaning of the statement. Raw Output: {"message": "[Microsoft.Adverbs] Remove 'separately' if it's not important to the meaning of the statement.", "location": {"path": "docs/reference/rest.md", "range": {"start": {"line": 86, "column": 89}}}, "severity": "WARNING"}

Check warning on line 86 in docs/reference/rest.md

View workflow job for this annotation

GitHub Actions / Spelling

[vale] reported by reviewdog 🐶 [Microsoft.Adverbs] Remove 'separately' if it's not important to the meaning of the statement. Raw Output: {"message": "[Microsoft.Adverbs] Remove 'separately' if it's not important to the meaning of the statement.", "location": {"path": "docs/reference/rest.md", "range": {"start": {"line": 86, "column": 89}}}, "severity": "WARNING"}

Check warning on line 86 in docs/reference/rest.md

View workflow job for this annotation

GitHub Actions / Spelling

[vale] reported by reviewdog 🐶 [Microsoft.Adverbs] Remove 'separately' if it's not important to the meaning of the statement. Raw Output: {"message": "[Microsoft.Adverbs] Remove 'separately' if it's not important to the meaning of the statement.", "location": {"path": "docs/reference/rest.md", "range": {"start": {"line": 86, "column": 89}}}, "severity": "WARNING"}

Enable the validator client API service from the command line by including the [`--validator-api-enabled`](cli/index.md#validator-api-enabled) command line option.
Enable the validator client API service from the command line by including the
[`--validator-api-enabled`](cli/index.md#validator-api-enabled) command line option.

When enabling the validator client API, you must [create a keystore](../how-to/use-external-signer/manage-keys.md#create-a-keystore). Set the keystore using [`--validator-api-keystore-file`](cli/index.md#validator-api-keystore-file) and the password file for the keystore using [`--validator-api-keystore-password-file`](cli/index.md#validator-api-keystore-password-file).
When enabling the validator client API, you must [create a keystore](../how-to/use-external-signer/manage-keys.md#create-a-keystore).

Check failure on line 91 in docs/reference/rest.md

View workflow job for this annotation

GitHub Actions / Lint

Trailing spaces

docs/reference/rest.md:91:134 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1] https://github.com/DavidAnson/markdownlint/blob/v0.35.0/doc/md009.md

Check failure on line 91 in docs/reference/rest.md

View workflow job for this annotation

GitHub Actions / Lint

Trailing spaces

docs/reference/rest.md:91:134 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1] https://github.com/DavidAnson/markdownlint/blob/v0.35.0/doc/md009.md

Check failure on line 91 in docs/reference/rest.md

View workflow job for this annotation

GitHub Actions / Lint

Trailing spaces

docs/reference/rest.md:91:134 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1] https://github.com/DavidAnson/markdownlint/blob/v0.35.0/doc/md009.md
Set the keystore using [`--validator-api-keystore-file`](cli/index.md#validator-api-keystore-file) and the password file for the
keystore using [`--validator-api-keystore-password-file`](cli/index.md#validator-api-keystore-password-file).

```bash title="Example"
teku --validator-api-enabled --validator-api-keystore-file=validator_keystore.p12 --validator-api-keystore-password-file=validator_keystore_pass.txt
```

The [OpenAPI specifications](https://swagger.io/specification/) for the validator client API are available at `/swagger-docs` when the [`--validator-api-docs-enabled`](cli/index.md#validator-api-docs-enabled) option is set to `true`. The `/swagger-docs` endpoint defines the API if code generators are in use.
The [OpenAPI specifications](https://swagger.io/specification/) for the validator client API are available at `/swagger-docs` when
the [`--validator-api-docs-enabled`](cli/index.md#validator-api-docs-enabled) option is set to `true`.

Check failure on line 100 in docs/reference/rest.md

View workflow job for this annotation

GitHub Actions / Lint

Trailing spaces

docs/reference/rest.md:100:103 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1] https://github.com/DavidAnson/markdownlint/blob/v0.35.0/doc/md009.md

Check failure on line 100 in docs/reference/rest.md

View workflow job for this annotation

GitHub Actions / Lint

Trailing spaces

docs/reference/rest.md:100:103 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1] https://github.com/DavidAnson/markdownlint/blob/v0.35.0/doc/md009.md

Check failure on line 100 in docs/reference/rest.md

View workflow job for this annotation

GitHub Actions / Lint

Trailing spaces

docs/reference/rest.md:100:103 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1] https://github.com/DavidAnson/markdownlint/blob/v0.35.0/doc/md009.md
The `/swagger-docs` endpoint defines the API if code generators are in use.

When enabling the API documentation endpoint, specify:

Expand Down

0 comments on commit d770f2e

Please sign in to comment.