Skip to content

Commit

Permalink
Doc AWS cache option & update style (#116)
Browse files Browse the repository at this point in the history
* Doc AWS cache option & update style

* vale fix
  • Loading branch information
alexandratran authored Apr 27, 2022
1 parent 37f2b00 commit e44037e
Show file tree
Hide file tree
Showing 5 changed files with 104 additions and 77 deletions.
10 changes: 10 additions & 0 deletions docs/HowTo/Store-Keys-Vaults/Use-AWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,13 @@ Specify the following when
* Secret name.

* Region to connect to.

## Cache AWS Secrets Manager when loading multiple keys

When loading multiple keys from AWS Secrets Manager, the AWS client is created each time.
You can improve performance by caching and reusing the same AWS Secrets Manager for each key that uses the same access
key ID and region.

Set the [`eth2 --aws-connection-cache-size`](../../Reference/CLI/CLI-Subcommands.md#aws-connection-cache-size) option to
the maximum number of AWS Secrets Manager connections to cache.
The default is 1.
2 changes: 1 addition & 1 deletion docs/HowTo/Use-Configuration-File.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
description: Using the Web3Signer configuration file
---

# Using the Web3Signer configuration file
# Use the Web3Signer configuration file

Use a YAML configuration file to specify command line options in a file.

Expand Down
14 changes: 7 additions & 7 deletions docs/HowTo/Use-Signing-Keys.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ You can configure access to the signing key by:
* Using the [`eth2` subcommand options](../Reference/CLI/CLI-Subcommands.md#eth2) to bulk load
consensus layer signing keys stored in Azure Key Vault.

!!! note
!!! note

Bulk-loading is only available when using the consensus layer platform with keys stored in
Azure Key Vault, and can be used in combination with key configuration files.
Bulk-loading is only available when using the consensus layer platform with keys stored in
Azure Key Vault, and can be used in combination with key configuration files.

## Using key configuration files
## Use key configuration files

For each signing key, [configure a separate key configuration file] that defines the parameters
to access the key. The configuration files must be YAML-formatted, and can use any naming format,
Expand All @@ -44,7 +44,7 @@ to specify the location of the key configuration files.
web3signer --key-store-path=/Users/me/keyFiles/ eth2
```

## Bulk loading consensus layer keys
## Bulk load consensus layer keys

You can bulk load consensus layer keys that are stored in Azure Key Vault. To do this use the
Web3Signer [`eth2` subcommand options](../Reference/CLI/CLI-Subcommands.md#eth2).
Expand All @@ -58,7 +58,7 @@ Web3Signer [`eth2` subcommand options](../Reference/CLI/CLI-Subcommands.md#eth2)
--azure-vault-name=AzureKeyVault
```

## Reloading new keys
## Reload new keys

If you add new keys to an existing set of validators, reload the keys to ensure Web3Signer registers the new keys.
Use the [`reload`](https://consensys.github.io/web3signer/web3signer-eth2.html#tag/Reload-Signer-Keys) endpoint to reload the keys in Web3Signer.
Expand All @@ -77,7 +77,7 @@ Use the [`reload`](https://consensys.github.io/web3signer/web3signer-eth2.html#t
200 Call is successful
```

## Managing your keys
## Manage keys

You can manage your keys using the [key manager API endpoints](https://consensys.github.io/web3signer/web3signer-eth2.html#tag/Keymanager).
You can [list keys](#list-keys), [import keystores](#import-keystores), and [delete keys](#delete-keys).
Expand Down
80 changes: 51 additions & 29 deletions docs/Reference/CLI/CLI-Subcommands.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,50 +4,41 @@ description: Web3Signer command line interface subcommands

# Subcommands

The Web3Signer subcommands are used to specify the platform being used:
Use the Web3Signer subcommands to specify the platform being used:

* `web3signer [Options] eth2 [Eth2 Options]`
* `web3signer [Options] eth2 export [Eth2 Export Options]`
* `web3signer [Options] eth2 import [Eth2 Import Options]`
* `web3signer [Options] eth1`
* `web3signer [Options] filecoin [Filecoin Options]`
* `web3signer [options] eth2 [Eth2 options]`
* `web3signer [options] eth2 export [Eth2 export options]`
* `web3signer [options] eth2 import [Eth2 import options]`
* `web3signer [options] eth1`
* `web3signer [options] filecoin [Filecoin options]`

!!! note

This documentation has been updated in line with the name changes recommended by the [recommended by the Ethereum Foundation](https://blog.ethereum.org/2022/01/24/the-great-eth2-renaming/)..
The `eth1` subcommands relate to the execution layer, formally called “Ethereum 1.0.” The `eth2` subcommands relate to the consensus layer formally called “Ethereum 2.0.”
This documentation has been updated in line with the name changes [recommended by the Ethereum Foundation](https://blog.ethereum.org/2022/01/24/the-great-eth2-renaming/).
The `eth1` subcommands relate to the execution layer, previously called “Ethereum 1.0.”
The `eth2` subcommands relate to the consensus layer, previously called “Ethereum 2.0.”

## Specifying subcommand options
## Specify subcommand options

The subcommand must be specified on the command line, but the subcommand options can be specified:

* On the command line
* As [environment variables](#environment-variables)
* On the command line.
* As environment variables.
For each subcommand option, the equivalent environment variable is:
* Uppercase.
* `_` replaces `-`.
* Has a `WEB3SIGNER_` + `<SIGNING_OPTION>_` prefix.
* In a YAML configuration file.

For example, you can set the options for the `filecoin` subcommand in an environment variables
`export WEB3SIGNER_FILECOIN_NETWORK=TESTNET`, but the subcommand must be specified in the command line
For example, you can set the `--network` option for the `filecoin` subcommand in an environment variable
`export WEB3SIGNER_FILECOIN_NETWORK=TESTNET`, but the subcommand must be specified in the command line.

!!! example

```bash
web3signer --key-store-path=/Users/me/keyFiles/ filecoin
```

## Environment variables

For each subcommand option, the equivalent environment variable is:

* Upper-case
* `_` replaces `-`
* Has a `WEB3SIGNER_` + `<SIGNING_OPTION>_` prefix. For example set `filecoin --network`
using the `WEB3SIGNER_FILECOIN_NETWORK` environment variable.

!!! note

Only subcommand options can be set in environment variables. The actual subcommand must be
specified in the command line.

## View help

To view the command line help for the subcommands:
Expand All @@ -62,6 +53,37 @@ To view the command line help for the subcommands:

### `eth2`

#### `aws-connection-cache-size`

=== "Syntax"

```bash
--aws-connection-cache-size=<LONG>
```

=== "Example"

```bash
--aws-connection-cache-size=5
```

=== "Environment variable"

```bash
WEB3SIGNER_ETH2_AWS_CONNECTION_CACHE_SIZE=5
```

=== "Configuration file"

```bash
eth2.aws-connection-cache-size: 5
```

When
[loading multiple keys from AWS Secrets Manager](../../HowTo/Store-Keys-Vaults/Use-AWS.md#cache-aws-secrets-manager-when-loading-multiple-keys),
set to the maximum number of connections to cache.
The default is 1.

#### `azure-vault-enabled`

=== "Syntax"
Expand Down Expand Up @@ -235,7 +257,7 @@ Set [`--azure-client-id`](#azure-client-id) if using `CLIENT_SECRET` or
eth2.azure-vault-name: "AzureKeyVault"
```

Name of the vault to access. Sub-domain of vault.azure.net.
Name of the vault to access. Sub-domain of `vault.azure.net`.

#### `key-manager-api-enabled`

Expand Down Expand Up @@ -332,7 +354,7 @@ Possible values are:
=== "Environment variable"

```bash
WEB3SIGNER_ETH2_SLASHING_PROTECTION_DB_PASSWORD=change
WEB3SIGNER_ETH2_SLASHING_PROTECTION_DB_PASSWORD=changeme
```

=== "Configuration file"
Expand Down
Loading

0 comments on commit e44037e

Please sign in to comment.