Skip to content

Commit

Permalink
docs: mainnet documentation (#316)
Browse files Browse the repository at this point in the history
* docs: update docs for mainnet

* update docs

* add evmos space

* (doc): Update with correct bank transaction cmd

* update version

* add misc emojis

* comment clients

Co-authored-by: Prajjwol Gautam <[email protected]>
  • Loading branch information
fedekunze and prajjwol authored Mar 2, 2022
1 parent 18ab3e4 commit f079774
Show file tree
Hide file tree
Showing 11 changed files with 325 additions and 42 deletions.
40 changes: 39 additions & 1 deletion docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ module.exports = {
rpc_url_local: 'http://localhost:8545/',
chain_id: '9001',
testnet_chain_id: '9000',
latest_version: 'v1.0.0',
latest_version: 'v1.1.0',
version_number: '1',
testnet_version_number: '3',
testnet_evm_explorer_url: 'https://evm.evmos.dev',
Expand Down Expand Up @@ -158,6 +158,31 @@ module.exports = {
},
]
},
// {
// title: 'Clients',
// children: [
// {
// title: 'APIs',
// directory: false,
// path: '/clients/apis'
// },
// {
// title: 'Evmosjs',
// directory: false,
// path: '/clients/evmosjs'
// },
// ]
// },
{
title: 'Mainnet',
children: [
{
title: 'Join Mainnet',
directory: false,
path: '/mainnet/join'
},
]
},
{
title: 'Testnet',
children: [
Expand Down Expand Up @@ -203,6 +228,19 @@ module.exports = {
},
]
},
{
title: 'Ecosystem',
children: [
{
title: 'Awesome Evmos',
path: 'https://github.com/tharsis/awesome'
},
{
title: 'Evmos Space',
path: 'https://evmos.space/'
}
]
},
{
title: 'Resources',
children: [
Expand Down
12 changes: 6 additions & 6 deletions docs/basics/chain_id.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ Learn about the Evmos chain-id format {synopsis}
## Official Chain IDs

:::: tabs
::: tab Mainnet

| Name | Chain ID | Identifier | EIP155 Number | Version Number |
|-------------------------------------------------|-----------------------------------------------|------------|---------------------------------------|-------------------------------------------|
| Evmos {{ $themeConfig.project.version_number }} | `evmos_{{ $themeConfig.project.chain_id }}-1` | `evmos` | `{{ $themeConfig.project.chain_id }}` | {{ $themeConfig.project.version_number }} |
:::
::: tab Testnets

| Name | Chain ID | Identifier | EIP155 Number | Version Number |
Expand All @@ -17,12 +23,6 @@ Learn about the Evmos chain-id format {synopsis}
| Olympus Mons Incentivized Testnet | `evmos_{{ $themeConfig.project.testnet_chain_id }}-2` | `evmos` | `{{ $themeConfig.project.testnet_chain_id }}` | `2` |
| Arsia Mons Testnet | `evmos_{{ $themeConfig.project.testnet_chain_id }}-1` | `evmos` | `{{ $themeConfig.project.testnet_chain_id }}` | `1` |

:::
::: tab Mainnet

| Name | Chain ID | Identifier | EIP155 Number | Version Number |
|-------------------------------------------------|-----------------------------------------------|------------|---------------------------------------|-------------------------------------------|
| Evmos {{ $themeConfig.project.version_number }} | `evmos_{{ $themeConfig.project.chain_id }}-1` | `evmos` | `{{ $themeConfig.project.chain_id }}` | {{ $themeConfig.project.version_number }} |
:::
::::

Expand Down
22 changes: 22 additions & 0 deletions docs/clients/apis.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

# Evmos APIs

::: tip
🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧

This documentation page is currently under work in progress.

🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧
:::

## Public Testnet Nodes

<!-- TODO: List public nodes for testnet -->

## Ethereum JSON-RPC

<!-- TODO: Link JSON-RPC docs -->

## Evmos gRPC Web API

<!-- TODO: intro -->
27 changes: 27 additions & 0 deletions docs/clients/evmosjs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!--
order: 1
-->

# Evmosjs

Use the evmosjs library for connecting clients to Evmos {synopsis}

[`evmosjs`](https://github.com/tharsis/evmosjs) is a JavaScript and TypeScript client library for [Evmos](https://github.com/tharsis/evmos) and [Ethermint](https://github.com/tharsis/ethermint) nodes.

::: tip
🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧

This documentation page is currently under work in progress.

🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧
:::

## Cosmjs

Additionally to `evmosjs`, users can integrate [cosmjs](https://github.com/cosmos/cosmjs) to:

- Connect to Evmos Tendermint RPC
- Use Evmos Cosmos Proto Signing
- Network and misc. utils and more

CosmJS documentation can be found [here](https://cosmos.github.io/cosmjs). As of February 2022, CosmJS documentation is still work in progress.
15 changes: 15 additions & 0 deletions docs/guides/keys-wallets/ledger.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!--
order: 5
-->

# Ledger

Connect your account with Evmos using a Ledger device {synopsis}

::: tip
🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧

This documentation page is currently under work in progress.

🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧
:::
6 changes: 4 additions & 2 deletions docs/guides/keys-wallets/metamask.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ order: 2

# MetaMask

Connect your MetaMask wallet with Evmos {synopsis}
Connect your Metamask wallet with Evmos {synopsis}

The MetaMask browser extension is a wallet for accessing Ethereum-enabled applications and managing user identities. It can be used to connect to {{ $themeConfig.project.name }} through the official testnet or via a locally-running {{ $themeConfig.project.name }} node.
- [Download Metamask](https://metamask.io/download/) {prereq}

The [MetaMask](https://metamask.io/) browser extension is a wallet for accessing Ethereum-enabled applications and managing user identities. It can be used to connect to {{ $themeConfig.project.name }} through the official testnet or via a locally-running {{ $themeConfig.project.name }} node.

::: tip
If you are planning on developing on Evmos locally and you haven’t already set up your own local node, refer to [the quickstart tutorial](../../quickstart/run_node/), or follow the instructions in the [GitHub repository](https://github.com/tharsis/evmos/).
Expand Down
8 changes: 4 additions & 4 deletions docs/guides/keys-wallets/multisig.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ evmosd keys show multi
pubkeys: []
```

Let's add 10 PHOTON to the multisig wallet:
Let's add 10 EVMOS to the multisig wallet:

```bash
evmosd tx send \
evmosd tx bank send \
test1 \
evmos1e0fx0q9meawrcq7fmma9x60gk35lpr4xk3884m \
10000000000000000000aevmos \
Expand All @@ -88,10 +88,10 @@ evmosd tx send \

### Step 2: Create the multisig transaction

We want to send 5 PHOTON from our multisig account to `evmos1rgjxswhuxhcrhmyxlval0qa70vxwvqn2e0srft`.
We want to send 5 EVMOS from our multisig account to `evmos1rgjxswhuxhcrhmyxlval0qa70vxwvqn2e0srft`.

```bash
evmosd tx send \
evmosd tx bank send \
evmos1rgjxswhuxhcrhmyxlval0qa70vxwvqn2e0srft \
evmos157g6rn6t6k5rl0dl57zha2wx72t633axqyvvwq \
5000000000000000000aevmos \
Expand Down
193 changes: 193 additions & 0 deletions docs/mainnet/join.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,193 @@
<!--
order: 1
-->

# Joining Mainnet

This document outlines the steps to join an existing testnet {synopsis}

## Mainnet

You need to set the **genesis file** and **seeds**. If you need more information about past networks, check our [mainnet repo](https://github.com/tharsis/mainnet).

| Chain ID | Description | Site | Version | Status |
| -------------- | ------------- | ------------------------------------------------------------------ | ----------------------------------------------------- | ---------- |
| `evmos_9001-1` | Evmos Mainnet | [Evmos](https://github.com/tharsis/mainnet/tree/main/evmos_9001-1) | [`v1.1.x`](https://github.com/tharsis/evmos/releases) | `Not Live` |

## Install `evmosd`

Follow the [installation](./../quickstart/installation) document to install the {{ $themeConfig.project.name }} binary `{{ $themeConfig.project.binary }}`.

:::warning
Make sure you have the right version of `{{ $themeConfig.project.binary }}` installed.
:::

### Save Chain ID

We recommend saving the mainnet `chain-id` into your `{{ $themeConfig.project.binary }}`'s `client.toml`. This will make it so you do not have to manually pass in the `chain-id` flag for every CLI command.

::: tip
See the Official [Chain IDs](./../basics/chain_id.md#official-chain-ids) for reference.
:::

```bash
evmosd config chain-id evmos_9001-1
```

## Initialize Node

We need to initialize the node to create all the necessary validator and node configuration files:

```bash
evmosd init <your_custom_moniker> --chain-id evmos_9001-1
```

::: danger
Monikers can contain only ASCII characters. Using Unicode characters will render your node unreachable.
:::

By default, the `init` command creates your `~/.evmosd` (i.e `$HOME`) directory with subfolders `config/` and `data/`.
In the `config` directory, the most important files for configuration are `app.toml` and `config.toml`.

## Genesis & Seeds

### Copy the Genesis File

Check the `genesis.json` file from the [`mainnet`](https://github.com/tharsis/mainnet) repository and copy it over to the `config` directory: `~/.evmosd/config/genesis.json`. This is a genesis file with the chain-id and genesis accounts balances.

```bash
curl https://raw.githubusercontent.com/tharsis/mainnet/main/evmos_9001-1/genesis.zip > ~/.evmosd/config/genesis.zip
sudo apt install -y unzip
cd ~/.evmosd/config
unzip genesis.zip
rm genesis.zip
```

Then verify the correctness of the genesis configuration file:

```bash
evmosd validate-genesis
```

### Add Seed Nodes

Your node needs to know how to find [peers](https://docs.tendermint.com/master/tendermint-core/using-tendermint.html#peers). You'll need to add healthy [seed nodes](https://docs.tendermint.com/master/tendermint-core/using-tendermint.html#seed) to `$HOME/.evmosd/config/config.toml`. The [`mainnet`](https://github.com/tharsis/mainnet) repo contains links to some seed nodes.

Edit the file located in `~/.evmosd/config/config.toml` and the `seeds` to the following:

```toml
#######################################################
### P2P Configuration Options ###
#######################################################
[p2p]

# ...

# Comma separated list of seed nodes to connect to
seeds = "<node-id>@<ip>:<p2p port>"
```

You can use the following code to get seeds from the repo and add it to your config:

```bash
SEEDS=`curl -sL https://raw.githubusercontent.com/tharsis/mainnet/main/evmos_9001-1/seeds.txt | awk '{print $1}' | paste -s -d, -`
sed -i.bak -e "s/^seeds =.*/seeds = \"$SEEDS\"/" ~/.evmosd/config/config.toml
```

:::tip
For more information on seeds and peers, you can the Tendermint [P2P documentation](https://docs.tendermint.com/master/spec/p2p/peer.html).
:::

### Add Persistent Peers

We can set the [`persistent_peers`](https://docs.tendermint.com/master/tendermint-core/using-tendermint.html#persistent-peer) field in `~/.evmosd/config/config.toml` to specify peers that your node will maintain persistent connections with. You can retrieve them from the list of
available peers on the [`mainnet`](https://github.com/tharsis/mainnet) repo.

A list of available persistent peers is also available in the `#find-peers` channel in the [Evmos Discord](https://discord.gg/evmos). You can get a random 10 entries from the `peers.txt` file in the `PEERS` variable by running the following command:

```bash
PEERS=`curl -sL https://raw.githubusercontent.com/tharsis/mainnet/main/evmos_9001-1/peers.txt | sort -R | head -n 10 | awk '{print $1}' | paste -s -d, -`
```

Use `sed` to include them into the configuration. You can also add them manually:

```bash
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" ~/.evmosd/config/config.toml
```

## Run a Mainnet Validator

::: tip
For more details on how to configure your validator, follow the validator [setup](./../guides/validators/setup.md) instructions.
:::

```bash
evmosd tx staking create-validator \
--amount=1000000000000aevmos \
--pubkey=$(evmosd tendermint show-validator) \
--moniker="EvmosWhale" \
--chain-id=<chain_id> \
--commission-rate="0.05" \
--commission-max-rate="0.20" \
--commission-max-change-rate="0.01" \
--min-self-delegation="1000000" \
--gas="auto" \
--gas-prices="0.025aevmos" \
--from=<key_name>
```

## Start mainnet

The final step is to [start the nodes](./../quickstart/run_node#start-node). Once enough voting power (+2/3) from the genesis validators is up-and-running, the node will start producing blocks.

```bash
evmosd start
```

## Upgrading Your Node

::: tip
These instructions are for full nodes that have ran on previous versions of and would like to upgrade to the latest mainnet version.
:::

### Reset Data

::: warning
If the version <new_version> you are upgrading to is not breaking from the previous one, you **should not** reset the data. If this is the case you can skip to [Restart](#restart)
:::

First, remove the outdated files and reset the data.

```bash
rm $HOME/.evmosd/config/addrbook.json $HOME/.evmosd/config/genesis.json
evmosd unsafe-reset-all
```

Your node is now in a pristine state while keeping the original `priv_validator.json` and `config.toml`. If you had any sentry nodes or full nodes setup before,
your node will still try to connect to them, but may fail if they haven't also
been upgraded.

::: danger Warning
Make sure that every node has a unique `priv_validator.json`. Do not copy the `priv_validator.json` from an old node to multiple new nodes. Running two nodes with the same `priv_validator.json` will cause you to double sign.
:::

### Restart

To restart your node, just type:

```bash
evmosd start
```

## Share your Peer

You can share your peer to posting it in the `#find-peers` channel in the [Evmos Discord](https://discord.gg/evmos).

::: tip
To get your Node ID use

```bash
evmosd tendermint show-node-id
```

:::
4 changes: 0 additions & 4 deletions docs/quickstart/interact_node.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,6 @@ func queryState() error {
}
```

### CosmJS

CosmJS documentation can be found at [https://cosmos.github.io/cosmjs](https://cosmos.github.io/cosmjs). As of January 2021, CosmJS documentation is still work in progress.

## Using the REST Endpoints

All gRPC services on the Cosmos SDK are made available for more convenient REST-based queries through gRPC-gateway. The format of the URL path is based on the Protobuf service method's full-qualified name, but may contain small customizations so that final URLs look more idiomatic. For example, the REST endpoint for the `cosmos.bank.v1beta1.Query/AllBalances` method is `GET /cosmos/bank/v1beta1/balances/{address}`. Request arguments are passed as query parameters.
Expand Down
Loading

0 comments on commit f079774

Please sign in to comment.