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

Commit

Permalink
docs: update qgb -> blobstream
Browse files Browse the repository at this point in the history
  • Loading branch information
jcstein committed Oct 11, 2023
1 parent 30527d1 commit fd505d9
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 71 deletions.
10 changes: 5 additions & 5 deletions docs/bootstrapper.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Make sure to have the Blobstream binary installed. Check [the Blobstream binary
Before starting the bootstrapper, we will need to init the store:

```ssh
qgb bootstrapper init
blobstream bootstrapper init
```

By default, the store will be created un `~/.bootstrapper`. However, if you want to specify a custom location, you can use the `--home` flag. Or, you can use the following environment variable:
Expand All @@ -29,28 +29,28 @@ The P2P private key is optional, and a new one will be generated automatically o
The `p2p` sub-command will help you set up this key if you want to use a specific one:

```ssh
qgb bootstrapper p2p --help
blobstream bootstrapper p2p --help
```

### Start the bootstrapper

Now that we have the store initialized, we can start the bootstrapper:

```shell
qgb bootstrapper
blobstream bootstrapper

Blobstream P2P network bootstrapper command

Usage:
qgb bootstrapper [command]
blobstream bootstrapper [command]

Aliases:
bootstrapper, bs

Flags:
-h, --help help for bootstrapper

Use "qgb bootstrapper [command] --help" for more information about a command.
Use "blobstream bootstrapper [command] --help" for more information about a command.
```

### Open the P2P port
Expand Down
14 changes: 7 additions & 7 deletions docs/deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ description: Learn how to deploy the Blobstream smart contract.
The `deploy` is a helper command that allows deploying the Blobstream smart contract to a new EVM chain:

```ssh
qgb deploy --help
blobstream deploy --help
Deploys the Blobstream contract and initializes it using the provided Celestia chain
Usage:
qgb deploy <flags> [flags]
qgb deploy [command]
blobstream deploy <flags> [flags]
blobstream deploy [command]
Available Commands:
keys Blobstream keys manager
Expand All @@ -33,21 +33,21 @@ Make sure to have the Blobstream binary installed. Check [the Blobstream binary
In order to deploy a Blobstream smart contract, you will need a funded EVM address and its private key. The `keys` command will help you set up this key:

```ssh
qgb deploy keys --help
blobstream deploy keys --help
```

To import your EVM private key, there is the `import` subcommand to assist you with that:

```ssh
qgb deploy keys evm import --help
blobstream deploy keys evm import --help
```

This subcommand allows you to either import a raw ECDSA private key provided as plaintext, or import it from a file. The files are JSON keystore files encrypted using a passphrase like in [this example](https://geth.ethereum.org/docs/developers/dapp-developer/native-accounts).

After adding the key, you can check that it's added via running:

```ssh
qgb deploy keys evm list
blobstream deploy keys evm list
```

For more information about the `keys` command, check [the `keys` documentation](https://docs.celestia.org/nodes/blobstream-keys).
Expand All @@ -57,7 +57,7 @@ For more information about the `keys` command, check [the `keys` documentation](
Now, we can deploy the Blobstream contract to a new EVM chain:

```ssh
qgb deploy \
blobstream deploy \
--evm.chain-id 4 \
--evm.contract-address 0x27a1F8CE94187E4b043f4D57548EF2348Ed556c7 \
--core.grpc.host localhost \
Expand Down
76 changes: 38 additions & 38 deletions docs/keys.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,23 @@ The Blobstream `keys` command allows managing EVM private keys and P2P identitie

## Orchestrator command

The `qgb orchestrator keys` command manages keys for the orchestrator. By default, it uses the orchestrator default home directory to store the keys: `~/.orchestrator/keystore`. However, the default home can be changed either by specifying a different directory using the `--home` flag or setting the following environment variable:
The `blobstream orchestrator keys` command manages keys for the orchestrator. By default, it uses the orchestrator default home directory to store the keys: `~/.orchestrator/keystore`. However, the default home can be changed either by specifying a different directory using the `--home` flag or setting the following environment variable:

| Variable | Explanation | Default value | Required |
| ------------------- | ----------------------------------- | ----------------- | -------- |
| `ORCHESTRATOR_HOME` | Home directory for the orchestrator | `~/.orchestrator` | Optional |

## Relayer command

The `qgb relayer keys` command manages keys for the relayer. By default, it uses the relayer default home directory to store the keys: `~/.relayer/keystore`. However, the default home can be changed either by specifying a different directory using the `--home` flag or setting the following environment variable:
The `blobstream relayer keys` command manages keys for the relayer. By default, it uses the relayer default home directory to store the keys: `~/.relayer/keystore`. However, the default home can be changed either by specifying a different directory using the `--home` flag or setting the following environment variable:

| Variable | Explanation | Default value | Required |
| -------------- | ------------------------------ | ------------- | -------- |
| `RELAYER_HOME` | Home directory for the relayer | `~/.relayer` | Optional |

## Deploy command

The `qgb deploy keys` command manages keys for the deployer. By default, it uses the deployer default home directory to store the keys: `~/.deployer/keystore`. However, the default home can be changed either by specifying a different directory using the `--home` flag or setting the following environment variable:
The `blobstream deploy keys` command manages keys for the deployer. By default, it uses the deployer default home directory to store the keys: `~/.deployer/keystore`. However, the default home can be changed either by specifying a different directory using the `--home` flag or setting the following environment variable:

| Variable | Explanation | Default value | Required |
| --------------- | ------------------------------------- | ------------- | -------- |
Expand All @@ -48,12 +48,12 @@ As specified above, aside from the difference in the default home directory, the
The examples will use the orchestrator command to access the keys. However, the same behaviour applies to the other commands as well.

```ssh
qgb orchestrator keys --help
blobstream orchestrator keys --help
Blobstream keys manager
Usage:
qgb orchestrator keys [command]
blobstream orchestrator keys [command]
Available Commands:
evm Blobstream EVM keys manager
Expand All @@ -62,7 +62,7 @@ Available Commands:
Flags:
-h, --help help for keys
Use "qgb orchestrator keys [command] --help" for more information about a command.
Use "blobstream orchestrator keys [command] --help" for more information about a command.
```

### EVM keystore
Expand All @@ -72,12 +72,12 @@ The first subcommand of the `keys` command is `evm`. This latter allows managing
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.

```ssh
qgb orchestrator keys evm --help
blobstream orchestrator keys evm --help
Blobstream EVM keys manager
Usage:
qgb orchestrator keys evm [command]
blobstream orchestrator keys evm [command]
Available Commands:
add create a new EVM address
Expand All @@ -89,7 +89,7 @@ Available Commands:
Flags:
-h, --help help for evm
Use "qgb orchestrator keys evm [command] --help" for more information about a command.
Use "blobstream orchestrator keys evm [command] --help" for more information about a command.
```

The store also uses the `accounts.StandardScryptN` and `accounts.StandardScryptP` for the `Scrypt` password-based key derivation algorithm to improve its resistance to parallel hardware attacks:
Expand All @@ -103,20 +103,20 @@ evmKs = keystore.NewKeyStore(evmKeyStorePath(path), keystore.StandardScryptN, ke
The `add` subcommand allows creating a new EVM private key and storing it in the keystore:

```ssh
qgb orchestrator keys evm add --help
blobstream orchestrator keys evm add --help
create a new EVM address
Usage:
qgb orchestrator keys evm add [flags]
blobstream orchestrator keys evm add [flags]
```

The passphrase of the key encryption can be passed as a flag. But it is advised not to pass it as plain text and instead enter it when prompted interactively.

After creating a new key, you will see its corresponding address printed:

```ssh
qgb orchestrator keys evm add
blobstream orchestrator keys evm add
I[2023-04-13|14:16:11.387] successfully opened store path=/home/midnight/.orchestrator
I[2023-04-13|14:16:11.387] please provide a passphrase for your account
Expand All @@ -129,12 +129,12 @@ I[2023-04-13|14:16:30.534] successfully closed store path=/ho
The `delete` subcommand allows deleting an EVM private key from store via providing its corresponding address:

```ssh
qgb orchestrator keys evm delete --help
blobstream orchestrator keys evm delete --help
delete an EVM addresses from the key store
Usage:
qgb orchestrator keys evm delete <account address in hex> [flags]
blobstream orchestrator keys evm delete <account address in hex> [flags]
```

The provided address should be a `0x` prefixed EVM address.
Expand All @@ -144,7 +144,7 @@ After running the command, you will be prompted to enter the passphrase for the
Then, you will be prompted to confirm that you want to delete that private key. Make sure to verify if you're deleting the right one because once deleted, it can no longer be recovered!

```ssh
qgb orchestrator keys evm delete 0x27a1F8CE94187E4b043f4D57548EF2348Ed556c7
blobstream orchestrator keys evm delete 0x27a1F8CE94187E4b043f4D57548EF2348Ed556c7
I[2023-04-13|15:01:41.308] successfully opened store path=/home/midnight/.orchestrator
I[2023-04-13|15:01:41.309] deleting account address=0x27a1F8CE94187E4b043f4D57548EF2348Ed556c7
Expand All @@ -160,7 +160,7 @@ I[2023-04-13|15:01:45.534] successfully closed store path=/ho
The `list` subcommand allows listing the existing keys in the keystore:

```ssh
qgb orchestrator keys evm list
blobstream orchestrator keys evm list
I[2023-04-13|16:08:45.084] successfully opened store path=/home/midnight/.orchestrator
I[2023-04-13|16:08:45.084] listing accounts available in store
Expand All @@ -175,18 +175,18 @@ You could specify a different home using the `--home` flag to list the keys in a
The `update` subcommand allows changing the EVM private key passphrase to a new one. It takes as argument the `0x` prefixed EVM address corresponding to the private key we want to edit.

```ssh
qgb orchestrator evm update --help
blobstream orchestrator evm update --help
update an EVM account passphrase
Usage:
qgb orchestrator keys evm update <account address in hex> [flags]
blobstream orchestrator keys evm update <account address in hex> [flags]
```

Example:

```ssh
qgb orchestrator evm update 0x7Dd8F9CAfe6D25165249A454F2d0b72FD149Bbba
blobstream orchestrator evm update 0x7Dd8F9CAfe6D25165249A454F2d0b72FD149Bbba
I[2023-04-13|16:21:17.139] successfully opened store path=/home/midnight/.orchestrator
I[2023-04-13|16:21:17.140] updating account address=0x7Dd8F9CAfe6D25165249A454F2d0b72FD149Bbba
Expand All @@ -205,12 +205,12 @@ The `--home` can be specified if the store is not in the default directory.
The `import` subcommand allows importing existing private keys into the keystore. It has two subcommands: `ecdsa` and `file`. The first allows importing a private key in plaintext, while the other allows importing a private key from a JSON file secured with a passphrase.

```ssh
qgb orchestrator keys evm import --help
blobstream orchestrator keys evm import --help
import evm keys to the keystore
Usage:
qgb orchestrator keys evm import [command]
blobstream orchestrator keys evm import [command]
Available Commands:
ecdsa import an EVM address from an ECDSA private key
Expand All @@ -219,7 +219,7 @@ Available Commands:
Flags:
-h, --help help for import
Use "qgb orchestrator keys evm import [command] --help" for more information about a command.
Use "blobstream orchestrator keys evm import [command] --help" for more information about a command.
```

#### EVM: Import ECDSA
Expand All @@ -229,7 +229,7 @@ For the first one, it takes as argument the private key in plaintext. Then, it p
Example:

```ssh
qgb orchestrator keys evm import ecdsa da6ed55cb2894ac2c9c10209c09de8e8b9d109b910338d5bf3d747a7e1fc9eb7
blobstream orchestrator keys evm import ecdsa da6ed55cb2894ac2c9c10209c09de8e8b9d109b910338d5bf3d747a7e1fc9eb7
I[2023-04-13|17:00:48.617] successfully opened store path=/home/midnight/.orchestrator
I[2023-04-13|17:00:48.617] importing account
Expand All @@ -243,18 +243,18 @@ I[2023-04-13|17:00:51.990] successfully closed store path=/ho
For the second, it takes a JSON key file, as defined in [@ethereum/eth-keyfile](https://github.com/ethereum/eth-keyfile), and imports it to your keystore, so it can be used for signatures.

```ssh
qgb orchestrator keys evm import file --help
blobstream orchestrator keys evm import file --help
import an EVM address from a file
Usage:
qgb orchestrator keys evm import file <path to key file> [flags]
blobstream orchestrator keys evm import file <path to key file> [flags]
```

For example, if we have a file in the current directory containing a private key, we could run the following:

```ssh
qgb orchestrator keys evm import file UTC--2023-04-13T15-00-50.302148204Z--966e6f22781ef6a6a82bbb4db3df8e225dfd9488
blobstream orchestrator keys evm import file UTC--2023-04-13T15-00-50.302148204Z--966e6f22781ef6a6a82bbb4db3df8e225dfd9488
I[2023-04-13|17:31:53.307] successfully opened store path=/home/midnight/.orchestrator
I[2023-04-13|17:31:53.307] importing account
Expand All @@ -273,12 +273,12 @@ Similar to the above EVM keystore, the P2P store has similar subcommands for han
To access the P2P keystore, run the following:

```ssh
qgb orchestrator keys p2p
blobstream orchestrator keys p2p
Blobstream p2p keys manager
Usage:
qgb orchestrator keys p2p [command]
blobstream orchestrator keys p2p [command]
Available Commands:
add create a new Ed25519 P2P address
Expand All @@ -289,7 +289,7 @@ Available Commands:
Flags:
-h, --help help for p2p
Use "qgb orchestrator keys p2p [command] --help" for more information about a command.
Use "blobstream orchestrator keys p2p [command] --help" for more information about a command.
```

The `orchestrator` could be replaced by `relayer` and the only difference would be the default home directory. Aside from that, all the methods defined for the orchestrator will also work with the relayer.
Expand All @@ -299,18 +299,18 @@ The `orchestrator` could be replaced by `relayer` and the only difference would
The `add` subcommand creates a new p2p key to the p2p store:

```ssh
qgb orchestrator keys p2p add --help
blobstream orchestrator keys p2p add --help
create a new Ed25519 P2P address
Usage:
qgb orchestrator keys p2p add <nickname> [flags]
blobstream orchestrator keys p2p add <nickname> [flags]
```

It takes as argument an optional `<nickname>` which would be the name that we can use to reference that private key. If not specified, an incremental nickname will be assigned.

```ssh
qgb orchestrator keys p2p add
blobstream orchestrator keys p2p add
I[2023-04-13|17:38:17.289] successfully opened store path=/home/midnight/.orchestrator
I[2023-04-13|17:38:17.290] generating a new Ed25519 private key nickname=1
Expand All @@ -327,36 +327,36 @@ The nickname will be needed in case the orchestrator needs to use a specific pri
The `delete` subcommand will delete a P2P private key from store referenced by its nickname:

```ssh
qgb orchestrator keys p2p delete --help
blobstream orchestrator keys p2p delete --help
delete an Ed25519 P2P private key from store
Usage:
qgb orchestrator keys p2p delete <nickname> [flags]
blobstream orchestrator keys p2p delete <nickname> [flags]
```

#### P2P: Import subcommand

The `import` subcommand will import an existing Ed25519 private key to the store. It takes as argument the nickname that we wish to save the private key under, and the actual private key in hex format without `0x`:

```ssh
qgb orchestrator keys p2p import --help
blobstream orchestrator keys p2p import --help
import an existing p2p private key
Usage:
qgb orchestrator keys p2p import <nickname> <private_key_in_hex_without_0x> [flags]
blobstream orchestrator keys p2p import <nickname> <private_key_in_hex_without_0x> [flags]
```

#### P2P: List subcommand

The `list` subcommand lists the existing P2P private keys in the store:

```ssh
qgb orchestrator keys p2p list --help
blobstream orchestrator keys p2p list --help
list existing p2p addresses
Usage:
qgb orchestrator keys p2p list [flags]
blobstream orchestrator keys p2p list [flags]
```
Loading

0 comments on commit fd505d9

Please sign in to comment.