Skip to content

Commit

Permalink
Add akash
Browse files Browse the repository at this point in the history
  • Loading branch information
husonghua committed Jan 3, 2022
1 parent e64123d commit 728797a
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 32 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

This repo is to set up the Cosmos-based node. It currently support:

- Akash
- BitCanna
- Chihuahua
- Comdex
Expand Down Expand Up @@ -57,6 +58,7 @@ The structure allows you to target `vars` to each node, or a group cluster, or t
The key Ansible playbook is `<chain>.yml` files. It will set up a fresh node from scratch. For example:

```bash
ansible-playbook -i inventory akash.yml -e "target=akash"
ansible-playbook -i inventory bitcanna.yml -e "target=bitcanna_mainnet_main"
ansible-playbook -i inventory chihuahua.yml -e "target=chihuahua_mainnet_main"
ansible-playbook -i inventory comdex.yml -e "target=comdex_mainnet_main"
Expand Down Expand Up @@ -110,6 +112,8 @@ Alternatively, you can add a cronjob. For example, this following cronjob will r

When you install a node that has upgrades in the past, you can either sync from Block 1, or use a snapshot to time-travel to the present quickly. We strongly recommend using snapshots. It will save you time of syncing and debugging. Here are a list of trusted snapshot providers. Do your own research and make sure that you can trust the snapshot providers:

Akash: Snapshot here [here](https://docs.akash.network/operations/node#step9-blockchain-snapshot-use)

Kava: Snapshot is [here](https://www.chainlayer.io/quicksync/)

KiChain: Follow instruction [here](https://mzonder.notion.site/KiChain-2-Mainnet-Clean-Install-b20ce6400131499f854abc7567ce3b3f). In fact, we cannot make it work with the peers listed when we tried to sync from Block 1. The only way we made it work is by syncing with the snapshot from the included link.
Expand All @@ -122,6 +126,7 @@ Sifchain: Follow instruction [here](https://github.com/Sifchain/sifchain-validat

| Network | Validator | Useful Commands |
| ------------ | --------------------------------------------------------- | ------------------------------ |
| Akash 🌿 | `akashvaloper1gp957czryfgyvxwn3tfnyy2f0t9g2p4pz5w0ry` | [Akash](docs/akash.md) |
| Bitcanna 🌿 | `bcnavaloper1gp957czryfgyvxwn3tfnyy2f0t9g2p4pxqv0cj` | [BitCanna](docs/bitcanna.md) |
| Chihuahua 🐶 | `chihuahuavaloper1gp957czryfgyvxwn3tfnyy2f0t9g2p4p40qac2` | [Chihuahua](docs/chihuahua.md) |
| Comdex 🛢️ | `comdexvaloper1gp957czryfgyvxwn3tfnyy2f0t9g2p4p3447dz` | [Comdex](docs/comdex.md) |
Expand Down
16 changes: 8 additions & 8 deletions akash.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
---
# - name: Prepare
# hosts: '{{ target }}'
# become: true
# gather_facts: false
# roles:
# - prepare
- name: Prepare
hosts: '{{ target }}'
become: true
gather_facts: false
roles:
- prepare

- name: Install node
hosts: '{{ target }}'
gather_facts: false
roles:
- standard_node_installation
- initialize_akash
# - standard_node_installation
# - launch_node
- launch_node
23 changes: 23 additions & 0 deletions docs/akash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
## Akash

create validator

```bash

akash tx staking create-validator \
--amount=1000000uakt \
--website "https://polkachu.com" \
--identity "0A6AF02D1557E5B4" \
--details "Polkachu is the trusted staking service provider for blockchain projects. 100% refund for downtime slash. Contact us at [email protected]" \
--pubkey="$(akash tendermint show-validator)" \
--moniker 'polkachu.com | 0% fee' \
--chain-id="akashnet-2" \
--commission-rate="0" \
--commission-max-rate="0.10" \
--commission-max-change-rate="0.05" \
--min-self-delegation="1" \
--gas="auto" \
--gas-adjustment 1.15 \
--gas-prices="0.025uakt" \
--from=polkachu
```
4 changes: 2 additions & 2 deletions group_vars/akash_mainnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ chain_id: 'akashnet-2'
node_version: 'v0.14.1'
repo: 'https://github.com/ovrclk/akash'
genesis: 'https://raw.githubusercontent.com/ovrclk/net/master/mainnet/genesis.json'
peers: ''
minimum_gas_price: ''
seeds: '[email protected]:26656,[email protected]:26656,[email protected]:26656'
minimum_gas_price: '0.025uakt'
39 changes: 17 additions & 22 deletions roles/initialize_akash/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,25 @@
---
# - name: Initialize Node
# command: '{{ daemon }} init {{ validator_name }} --chain-id {{ chain_id }} -o'
# environment:
# PATH: '{{ path }}'
- name: Initialize Node
command: '{{ daemon }} init {{ validator_name }} --chain-id {{ chain_id }} -o'
environment:
PATH: '{{ path }}'

- name: Download genesis file
get_url:
url: '{{ genesis }}'
dest: '/home/{{ ansible_user }}/{{ folder }}/config/genesis.json'
mode: '0644'
# - name: Update minimum gas price on config file
# lineinfile:
# path: '/home/{{ ansible_user }}/{{ folder }}/config/app.toml'
# regexp: 'minimum-gas-prices '
# line: 'minimum-gas-prices = "{{ minimum_gas_price }}"'
# state: present

# - name: Update seeds on the config.toml file
# lineinfile:
# path: '/home/{{ ansible_user }}/{{ folder }}/config/config.toml'
# regexp: 'seeds = ""'
# line: 'seeds = "{{ seeds }}"'
# state: present
- name: Update minimum gas price on config file
lineinfile:
path: '/home/{{ ansible_user }}/{{ folder }}/config/app.toml'
regexp: 'minimum-gas-prices '
line: 'minimum-gas-prices = "{{ minimum_gas_price }}"'
state: present

# - name: Update the config.toml file
# lineinfile:
# path: '/home/{{ ansible_user }}/{{ folder }}/config/config.toml'
# regexp: 'persistent_peers = ""'
# line: 'persistent_peers = "{{ peers }}"'
# state: present
- name: Update seeds on the config.toml file
lineinfile:
path: '/home/{{ ansible_user }}/{{ folder }}/config/config.toml'
regexp: 'seeds = ""'
line: 'seeds = "{{ seeds }}"'
state: present

0 comments on commit 728797a

Please sign in to comment.