Skip to content

Commit

Permalink
Updates to running a local testnet (#541)
Browse files Browse the repository at this point in the history
  • Loading branch information
emperorjm authored Nov 1, 2024
1 parent 9abb135 commit c9d30f5
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 14 deletions.
2 changes: 1 addition & 1 deletion content.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export const replaceValues = {
$$archwayVersion$$: 'v7.0.1',
$$archwayVersion$$: 'v9.0.0',
};
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Ultimately, as the network becomes more heavily used, multi-gigabyte per day ban

## Monitoring and alerting

Monitoring and alerting systems are really useful to avoid slashing. Even if Phi Labs do not suggest any specific solution, we document the [Prometheus + Graphana](4.monitoring-validators.md) combination. Other tools that are usually used by validators in CosmosSDK-based blockchains include: DataDog, Panic, Cloudwatch, Netdata, Tenderduty.
Monitoring and alerting systems are really useful to avoid slashing. Even if Phi Labs do not suggest any specific solution, we document the [Prometheus + Grafana](4.monitoring-validators.md) combination. Other tools that are usually used by validators in CosmosSDK-based blockchains include: DataDog, Panic, Cloudwatch, Netdata, Tenderduty.

## Security

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Binary
::highlight-card

```bash
archwayd add-genesis-account "$(archwayd keys show my-validator-account -a)" 10000000000000000000aarch
archwayd genesis add-genesis-account "$(archwayd keys show my-validator-account -a)" 10000000000000000000aarch
```

::
Expand All @@ -51,7 +51,7 @@ Docker
::highlight-card

```bash
docker run --rm -it -v ~/.archway:/root/.archway ghcr.io/archway-network/archway:$$archwayVersion$$ add-genesis-account <my-validator-account> 10000000000000000000aarch
docker run --rm -it -v ~/.archway:/root/.archway ghcr.io/archway-network/archway:$$archwayVersion$$ genesis add-genesis-account <my-validator-account> 10000000000000000000aarch
```

::
Expand Down Expand Up @@ -93,7 +93,7 @@ Binary
::highlight-card

```bash
archwayd gentx my-validator-account 9500000000000000000aarch --commission-rate 0.01 --commission-max-rate 0.1 --commission-max-change-rate 0.1 --pubkey "$(archwayd tendermint show-validator)" --chain-id archway-1 --fees 180000000000000000aarch
archwayd genesis gentx my-validator-account 9500000000000000000aarch --commission-rate 0.01 --commission-max-rate 0.1 --commission-max-change-rate 0.1 --pubkey "$(archwayd tendermint show-validator)" --chain-id archway-1 --fees 180000000000000000aarch
```
::

Expand All @@ -104,7 +104,7 @@ Docker
::highlight-card

```bash
docker run --rm -it -v ~/.archway:/root/.archway ghcr.io/archway-network/archway:$$archwayVersion$$ gentx my-validator-account 9500000000000000000aarch --commission-rate 0.01 --commission-max-rate 0.1 --commission-max-change-rate 0.1 --pubkey "$(archwayd tendermint show-validator)" --chain-id archway-1 --fees 180000000000000000aarch
docker run --rm -it -v ~/.archway:/root/.archway ghcr.io/archway-network/archway:$$archwayVersion$$ genesis gentx my-validator-account 9500000000000000000aarch --commission-rate 0.01 --commission-max-rate 0.1 --commission-max-change-rate 0.1 --pubkey "$(archwayd tendermint show-validator)" --chain-id archway-1 --fees 180000000000000000aarch
```
::

Expand All @@ -131,7 +131,7 @@ Binary
::highlight-card

```bash
archwayd collect-gentxs
archwayd genesis collect-gentxs

```
::
Expand All @@ -143,7 +143,7 @@ Docker
::highlight-card

```bash
docker run --rm -it -v ~/.archway:/root/.archway ghcr.io/archway-network/archway:$$archwayVersion$$ collect-gentxs
docker run --rm -it -v ~/.archway:/root/.archway ghcr.io/archway-network/archway:$$archwayVersion$$ genesis collect-gentxs
```
::

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ For the first node, you would launch the following command in the **node1** fold
::highlight-card

```bash
archwayd add-genesis-account $(archwayd keys show node1-account -a --home ./node1) 100000000000000000000000000aarch --home ./node1
archwayd genesis add-genesis-account "$(archwayd keys show node1-account -a --home ./node1)" 100000000000000000000000000aarch --home ./node1
```

::
Expand All @@ -266,14 +266,14 @@ For the second node, you would launch the following command in the **node2** fol
::highlight-card

```bash
archwayd add-genesis-account $(archwayd keys show node1-account -a --home ./node2) 100000000000000000000000000aarch --home ./node1
archwayd genesis add-genesis-account "$(archwayd keys show node1-account -a --home ../node2/node2)" 100000000000000000000000000aarch --home ./node1
```

::

## Submit the genesis transaction

When running a Cosmos SDK-based blockchain, new validators need to submit a **gentx** transaction to the network to become a validator. The genesis transactions is the first transaction of the local chain, while the **collect-gentxs** command collects all the gentx transactions submitted by potential validators and creates a new genesis file that includes these transactions.
When running a Cosmos SDK-based blockchain, new validators need to submit a **genesis gentx** transaction to the network to become a validator. The genesis transactions is the first transaction of the local chain, while the **genesis collect-gentxs** command collects all the gentx transactions submitted by potential validators and creates a new genesis file that includes these transactions.

The command typically involves the following steps:

Expand All @@ -289,7 +289,8 @@ Now you will generate the genesis transaction to create the validator. The gense

::highlight-card
```bash
archwayd gentx node1-account 100000000000000000000000aarch --chain-id my-chain --fees 100000000000000000000aarch --home ./node1
archwayd genesis gentx node1-account 100000000000000000000000aarch --chain-id my-chain --fees 100000000000000000000aarch --home ./node1
archwayd genesis collect-gentxs --home ./node1
```
::

Expand Down Expand Up @@ -328,12 +329,62 @@ nano ./node2/config/app.toml

Under the **gRPC Configuration** `[grpc]` section you will see the **address** settings. Change the value to the below:

`enable = true
address=“0.0.0.0:9092”`
```bash
enable = true
address=“0.0.0.0:9092”
```

Under the **gRPC Web Configuration** `[grpc-web]` section you will see the **address** settings. Change the value to the below:
`address=“0.0.0.0:9093”`

The network implements a minimum price of gas preventing a transaction to go through with a gas price lower than the value set. There is a corresponding value that is configurable within your node `minimum-gas-prices` that should be set to a value. This value can be 0 or the corresponding minimum gas price set by the network which you can find via:

::tab-card{noOfTabs=2}
#title0
mainnet

#desc0
::highlight-card

```bash
$(archwayd q rewards estimate-fees 1 --node 'https://rpc.mainnet.archway.io:443' --output json | jq -r '.gas_unit_price | (.amount + .denom)')
```


::

Try it:

::tryItButton

```bash
archwayd q rewards estimate-fees 1 --node 'https://rpc.mainnet.archway.io:443' --output json | jq -r '.gas_unit_price | (.amount + .denom)'
```
::

#title1
testnet

#desc1
::highlight-card

```bash
$(archwayd q rewards estimate-fees 1 --node 'https://rpc.constantine.archway.io:443' --output json | jq -r '.gas_unit_price | (.amount + .denom)')
```

::

Try it:

::tryItButton

```bash
archwayd q rewards estimate-fees 1 --node 'https://rpc.constantine.archway.io:443' --output json | jq -r '.gas_unit_price | (.amount + .denom)'
```
::

::

Save the file after making the above changes.

### Changes to the **config.toml** file
Expand Down

0 comments on commit c9d30f5

Please sign in to comment.