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

Commit

Permalink
Merge branch 'main' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
adlrocha committed Aug 4, 2023
2 parents 8122281 + 611a989 commit 19d1d51
Showing 1 changed file with 24 additions and 26 deletions.
50 changes: 24 additions & 26 deletions docs/quickstart-calibration.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,19 +85,21 @@ registry_addr = "0x28337700f4432ff140360BbBEAfE3a80AcaaD1Be"
```


## Step 3: Set up your primary account
## Step 3: Set up your owner wallets

In order to interact with through the IPC agent, you'll need to create a set of wallets. Please make a note of the addresses as you go along.
You'll need to create a set of owner wallets. Please make a note of the addresses as you go along.

* You can create a primary wallet through the following command
* Create the owner wallets for each validator (OWNER_1, OWNER_2, and OWNER_3)
```bash
./ipc-agent/bin/ipc-agent wallet new -w evm
./ipc-agent/bin/ipc-agent wallet new -w evm
./ipc-agent/bin/ipc-agent wallet new -w evm
```

* Add your new wallet address to `~/.ipc-agent/config.toml`
* Copy your new wallet addresses into `~/.ipc-agent/config.toml`
```toml
...
accounts = ["<PRIMARY_ADDRESS>"]
accounts = ["<OWNER_1>", "<OWNER_2>", "<OWNER_3>"]
...
```

Expand All @@ -106,33 +108,21 @@ accounts = ["<PRIMARY_ADDRESS>"]
./ipc-agent/bin/ipc-agent config reload
```

* Go to the [Calibration faucet](https://faucet.calibration.fildev.network/) and get some funds sent to your address.

>💡 In case you'd like to import an EVM account into Metamask, you can use export the private key using `./ipc-agent/bin/ipc-agent wallet export -w evm -a <ADDRESS>`. More information is available in the [EVM IPC agent support docs](./evm-usage.md#key-management).

## Step 4: Set up your validator owner wallets

* Create the owner wallets for each validator (OWNER1, OWNER2, and OWNER3)
```bash
./ipc-agent/bin/ipc-agent wallet new -w evm
./ipc-agent/bin/ipc-agent wallet new -w evm
./ipc-agent/bin/ipc-agent wallet new -w evm
```

* Go to the [Calibration faucet](https://faucet.calibration.fildev.network/) and get some funds sent to each of your addresses

* Convert the 0x addresses to f4 addresses for later usage (OWNER_1_F4, OWNER_2_F4, and OWNER_3_F4)
```bash
./ipc-agent/bin/ipc-agent util eth-to-f4-addr --addr <OWNER_1>
./ipc-agent/bin/ipc-agent util eth-to-f4-addr --addr <OWNER_2>
./ipc-agent/bin/ipc-agent util eth-to-f4-addr --addr <OWNER_3>
```

* Go to the [Calibration faucet](https://faucet.calibration.fildev.network/) and get some funds sent to each of your addresses

>💡 In case you'd like to import an EVM account into Metamask, you can use export the private key using `./ipc-agent/bin/ipc-agent wallet export -w evm -a <ADDRESS>`. More information is available in the [EVM IPC agent support docs](./evm-usage.md#key-management).
>💡 Note that you may hit faucet rate limits. In that case, wait a few minutes or continue with the guide and come back to this before step 9. Alternatively, you can send funds from your primary wallet to your owner wallets.

## Step 5: Set up your validator worker wallets
## Step 4: Set up your validator worker wallets

Mir validators do not support the use of EVM addresses to create new blocks. Therefore, we'll need to create separate worker wallets for each validator.

Expand All @@ -151,17 +141,17 @@ Mir validators do not support the use of EVM addresses to create new blocks. The
```


## Step 6: Create a child subnet
## Step 5: Create a child subnet

* The next step is to create a subnet under `/r314159` in calibration
```bash
./ipc-agent/bin/ipc-agent subnet create --parent /r314159 --name andromeda --min-validator-stake 5 --min-validators 2 --bottomup-check-period 30 --topdown-check-period 30
./ipc-agent/bin/ipc-agent subnet create --parent /r314159 --name andromeda --min-validator-stake 10 --min-validators 2 --bottomup-check-period 30 --topdown-check-period 30
```

* Make a note of the address of the subnet you created (`/r314159/<SUBNET_ID>`)


## Step 7: Deploy the infrastructure
## Step 6: Deploy the infrastructure

We can deploy the subnet nodes. Note that each node should be importing a different worker wallet key for their validator, and should be exposing different ports. If these ports are unavailable in your system, please pick different ones.

Expand All @@ -183,6 +173,14 @@ We can deploy the subnet nodes. Note that each node should be importing a differ
>>> Validator listening in host port <VALIDATOR_PORT_#>
```

## Step 7: Interconnect the validators

* Establish pairwise peer connections between all validators
```bash
docker exec -it <CONTAINER_NAME_1> eudico net connect `docker exec -it <CONTAINER_NAME_2> eudico net listen | head -n 1 | tr -d '\r'`
docker exec -it <CONTAINER_NAME_1> eudico net connect `docker exec -it <CONTAINER_NAME_3> eudico net listen | head -n 1 | tr -d '\r'`
docker exec -it <CONTAINER_NAME_2> eudico net connect `docker exec -it <CONTAINER_NAME_3> eudico net listen | head -n 1 | tr -d '\r'`
```

## Step 8: Update the IPC Agent configuration

Expand Down Expand Up @@ -275,7 +273,7 @@ echo '<AUTH_TOKEN_1>' > ~/.lotus/token
>💡 You may now use your chain ID and `http://<IP_ADDR>:2346/rpc/v1` as your RPC endpoint in EVM tooling.

## Step 12: What now?
## Step 11: What now?
* Proceed to the [usage](usage.md) guide to learn how you can test your new subnet.
* If something went wrong, please have a look at the [README](https://github.com/consensus-shipyard/ipc-agent). If it doesn't help, please join us in #ipc-help. In either case, let us know your experience!
* Please note that to repeat this guide or spawn a new subnet, you may need to change the parameters or reset your system.

0 comments on commit 19d1d51

Please sign in to comment.