mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-18 05:18:30 +00:00
Some updates to Lighthouse book (#6995)
* #6447 - Move some deprecated pages to a new section under `Archived` - Remove fallback log in mev as the log will not be present after VC using `/eth/v3/validator/blocks` endpoint by default - Add warning against using Btrfs file system (thank you @ChosunOne for the report) - Add data shared by @mcdee on tree states API queries time - Rename partial withdrawals to validator sweep to differentiate it from the upcoming execution layer partial withdrawals - Update NAT API response - Update docs on IPv6 - Rename .md files to follow a standard prefix section name, e.g., installation_*.md, advanced_*.md - Standardise .md files using underscore `_` instead of hyphen `-` to be consistent with other files naming conventions.
This commit is contained in:
43
book/src/api_vc.md
Normal file
43
book/src/api_vc.md
Normal file
@@ -0,0 +1,43 @@
|
||||
# Validator Client API
|
||||
|
||||
Lighthouse implements a JSON HTTP API for the validator client which enables programmatic management
|
||||
of validators and keys.
|
||||
|
||||
The API includes all of the endpoints from the [standard keymanager
|
||||
API](https://ethereum.github.io/keymanager-APIs/) that is implemented by other clients and remote
|
||||
signers. It also includes some Lighthouse-specific endpoints which are described in
|
||||
[Endpoints](./api_vc_endpoints.md).
|
||||
|
||||
> Note: All requests to the HTTP server must supply an
|
||||
> [`Authorization`](./api_vc_auth_header.md) header.
|
||||
|
||||
## Starting the server
|
||||
|
||||
A Lighthouse validator client can be configured to expose a HTTP server by supplying the `--http` flag. The default listen address is `http://127.0.0.1:5062`.
|
||||
|
||||
The following CLI flags control the HTTP server:
|
||||
|
||||
- `--http`: enable the HTTP server (required even if the following flags are
|
||||
provided).
|
||||
- `--http-address`: specify the listen address of the server. It is almost always unsafe to use a non-default HTTP listen address. Use this with caution. See the **Security** section below for more information.
|
||||
- `--http-port`: specify the listen port of the server.
|
||||
- `--http-allow-origin`: specify the value of the `Access-Control-Allow-Origin`
|
||||
header. The default is to not supply a header.
|
||||
|
||||
## Security
|
||||
|
||||
The validator client HTTP server is **not encrypted** (i.e., it is **not HTTPS**). For
|
||||
this reason, it will listen by default on `http://127.0.0.1`.
|
||||
|
||||
It is unsafe to expose the validator client to the public Internet without
|
||||
additional transport layer security (e.g., HTTPS via nginx, SSH tunnels, etc.).
|
||||
|
||||
For custom setups, such as certain Docker configurations, a custom HTTP listen address can be used by passing the `--http-address` and `--unencrypted-http-transport` flags. The `--unencrypted-http-transport` flag is a safety flag which is required to ensure the user is aware of the potential risks when using a non-default listen address.
|
||||
|
||||
### CLI Example
|
||||
|
||||
Start the validator client with the HTTP server listening on [http://localhost:5062](http://localhost:5062):
|
||||
|
||||
```bash
|
||||
lighthouse vc --http
|
||||
```
|
||||
Reference in New Issue
Block a user