Skip to content
This repository has been archived by the owner on Apr 15, 2024. It is now read-only.

chore: implement blobstream feedback from docs #1275 #603

Merged
merged 5 commits into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/keys.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Use "blobstream orchestrator keys [command] --help" for more information about a

### EVM keystore

The first subcommand of the `keys` command is `evm`. This latter allows managing EVM keys.
The first subcommand of the `keys` command is `evm`. This command allows managing EVM keys.

The EVM keys are `ECDSA` keys using the `secp256k1` curve. The implementation uses `geth` file system keystore [implementation](https://geth.ethereum.org/docs/developers/dapp-developer/native-accounts). Thus, keys can be used interchangeably with any compatible software.

Expand Down
44 changes: 27 additions & 17 deletions docs/orchestrator.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,9 @@ The orchestrator does the following:
4. Then, the orchestrator pushes its signature to the P2P network it is connected to, via adding it as a DHT value.
5. Listen for new attestations and go back to step 2.

The orchestrator connects to a separate P2P network than the consensus or the data availability one. So, we will provide bootstrappers for that one.
The orchestrator connects to a separate P2P network than the consensus or the data availability networks.

Bootstrapper for the Blockspace Race is:

- `/dns/bootstr-incent-1.celestia.tools/tcp/30000/p2p/12D3KooWSGZ2LXW2soQFHgU82uLfN7pNW5gMMkTnu1fhMXG43TvP`

Make sure to specify it using the `--p2p.bootstrappers` flag when running the orchestrator or set it in the `<orchestrator_home>/config/config.toml` config file.
Make sure to specify the bootstrapper using the `--p2p.bootstrappers` flag when running the orchestrator or set it in the `<orchestrator_home>/config/config.toml` config file.

This means that even if the consensus node is already connected to the consensus network, if the orchestrator doesn't start with a list of bootstrapper to its specific network, then, it will not work and will output the following logs:

Expand All @@ -42,8 +38,8 @@ I[2023-04-26|00:04:28.175] waiting for routing table to populate targetnu

To run an orchestrator, you will need to have access to the following:

- Access to your EVM address private key. This latter doesn't need to be funded in any network. If yours is not yet set, check the [register an EVM address](#register-evm-address) section.
- A list of bootstrappers for the P2P network. These will be shared by the team for every network we plan on supporting.
- Access to your EVM address private key. This address doesn't need to be funded in any network. If yours is not yet set, check the [register an EVM address](#register-evm-address) section.
- A list of bootstrappers for the P2P network.
- Access to your consensus node RPC and gRPC ports.

### Install the Blobstream binary
Expand Down Expand Up @@ -105,6 +101,12 @@ For more information about the `keys` command, check [the `keys` documentation](

Then, you will need to register the EVM address for your validator as specified in the [Register EVM Address](#register-evm-address) section.

### Open the P2P port

In order for the signature propagation to be successful, you will need to expose the P2P port, which is by default `30000`.

If not, then the signatures may not be available to the network and relayers will not be able to query them.

### Start the orchestrator

Now that we have the store initialized, we can start the orchestrator. Make sure you have your Celestia-app node RPC and gRPC accessible, and able to connect to the P2P network bootstrappers.
Expand All @@ -118,9 +120,23 @@ Starts the Blobstream orchestrator to sign attestations

Usage:
blobstream orchestrator start <flags> [flags]

Flags:
--core.grpc string Specify the celestia app grpc address (default "localhost:9090")
--core.rpc string Specify the celestia app rest rpc address (default "tcp://localhost:26657")
--evm.account string Specify the EVM account address to use for signing (Note: the private key should be in the keystore)
--evm.passphrase string the evm account passphrase (if not specified as a flag, it will be asked interactively)
--grpc.insecure allow gRPC over insecure channels, if not TLS the server must use TLS
-h, --help help for start
--home string The Blobstream orchestrator home directory (default "/Users/joshstein/.orchestrator")
--log.format string The logging format (json|plain) (default "plain")
--log.level string The logging level (trace|debug|info|warn|error|fatal|panic) (default "info")
--p2p.bootstrappers string Comma-separated multiaddresses of p2p peers to connect to
--p2p.listen-addr string MultiAddr for the p2p peer to listen on (default "/ip4/0.0.0.0/tcp/30000")
--p2p.nickname string Nickname of the p2p private key to use (if not provided, an existing one from the p2p store or a newly generated one will be used)
```

Also, you can set the necessary configuration in the orchestrator's TOML config file. You can find the latter in the orchestrator's home directory under `config/config.toml`.
Also, you can set the necessary configuration in the orchestrator's TOML config file. You can find the orchestrator's TOML config file in the orchestrator's home directory under `config/config.toml`. This would save you the pain of setting all the flags in the command.

> **_NOTE:_** The CLI flags take precedence over the config files for the same parameters.

Expand All @@ -136,12 +152,6 @@ Then, you will be prompted to enter your EVM key passphrase so that the orchestr

If you no longer have access to your EVM address, you could always edit your validator with a new EVM address. This can be done through the `edit-validator` command. Check the [Register EVM Address](#register-evm-address) section.

### Open the P2P port

In order for the signature propagation to be successful, you will need to expose the P2P port, which is by default `30000`.

If not, then the signatures may not be available to the network and relayers will not be able to query them.

### Known issues

#### `transport: authentication handshake failed`
Expand All @@ -160,7 +170,7 @@ So, seeing that warning is not a problem.

### Register EVM Address

When creating a validator, a random EVM address corresponding to its operator is set in the Blobstream state. This latter will be used by the orchestrator to sign attestations. And since validators will generally not have access to its corresponding private key, that address needs to be edited with one whose private key is known to the validator operator.
When creating a validator, a random EVM address corresponding to its operator is set in the Blobstream state. This address will be used by the orchestrator to sign attestations. And since validators will generally not have access to its corresponding private key, that address needs to be edited with one whose private key is known to the validator operator.

> **_NOTE:_** When a validator wants to start an orchestrator for a Celestia network for the first time, they will need to generate an EVM address offchain, either using the [EVM keystore](#evm-key) methods or a third party software that allows generating Ethereum addresses and provide you with a private key or a BIP39 mnemonic.

Expand Down Expand Up @@ -279,7 +289,7 @@ celestia-appd query qgb evm <validator_valoper_address>

Now, you can restart the orchestrator, and it should start signing.

Note: A validator set change is triggered if more than 5% of the total staking power of the network changes (0.5% for BSR). This means that even if you change your EVM address, and you don't see your orchestrator signing, it's alright. Just wait until the validator set changes, and then your orchestrator will automatically start signing.
Note: A validator set change is triggered if more than 5% of the total staking power of the network changes. This means that even if you change your EVM address, and you don't see your orchestrator signing, it's alright. Just wait until the validator set changes, and then your orchestrator will automatically start signing.

#### Systemd service

Expand Down
4 changes: 2 additions & 2 deletions docs/relayer.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The role of the relayer is to gather attestations' signatures from the orchestra

Also, while every validator in the Celestia validator set needs to run an orchestrator, we only need one entity to run the relayer, and it can be anyone. Thus, if you're a validator, most likely you want to read [the orchestrator documentation](https://docs.celestia.org/nodes/blobstream-orchestrator/).

Every relayer needs to target a Blobstream smart contract. This latter can be deployed, if not already, using the `blobstream deploy` command. More details in the [Deploy the Blobstream contract guide](https://docs.celestia.org/nodes/blobstream-deploy/).
Every relayer needs to target a Blobstream smart contract. This contract can be deployed, if not already, using the `blobstream deploy` command. More details in the [Deploy the Blobstream contract guide](https://docs.celestia.org/nodes/blobstream-deploy/).

## How it works

Expand Down Expand Up @@ -108,7 +108,7 @@ Usage:
blobstream relayer start <flags> [flags]
```

Also, you can set the necessary configuration in the relayers's TOML config file. You can find the latter in the relayer's home directory under `config/config.toml`.
Also, you can set the necessary configuration in the relayers's TOML config file. You can find the orchestrator's TOML config file in the relayer's home directory under `config/config.toml`.

> **_NOTE:_** The CLI flags take precedence over the config files for the same parameters.

Expand Down
Loading