From bd88e22422a0552b1bf89130c91a14c0cc5aa369 Mon Sep 17 00:00:00 2001 From: Songhua Hu Date: Thu, 2 Dec 2021 16:24:30 -0800 Subject: [PATCH] add comdex support --- README.md | 11 ++++---- comdex.yml | 15 +++++++++++ docs/comdex.md | 1 + docs/kichain.md | 4 +-- docs/terra.md | 35 +++++++++++++++++++++++++ group_vars/comdex_mainnet.yml | 10 +++++++ roles/initialize_comdex/tasks/main.yml | 32 ++++++++++++++++++++++ roles/initialize_osmosis/tasks/main.yml | 7 ----- roles/initialize_terra/tasks/main.yml | 7 ----- 9 files changed, 100 insertions(+), 22 deletions(-) create mode 100644 comdex.yml create mode 100644 docs/comdex.md create mode 100644 group_vars/comdex_mainnet.yml create mode 100644 roles/initialize_comdex/tasks/main.yml diff --git a/README.md b/README.md index a36770b9..1f6714ff 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ This repo is to set up the Cosmos-based node. It currently support: - BitCanna (mainnet) +- Comdex (mainnet) - Juno (mainnet and testnet) - Kava (mainnet) - KiChain (mainnet) @@ -16,12 +17,6 @@ You run one playbook and set up a node. For example: ```bash ansible-playbook -i inventory bitcanna.yml -e "target=bitcanna_mainnet" -ansible-playbook -i inventory juno.yml -e "target=juno_mainnet" -ansible-playbook -i inventory kava.yml -e "target=kava_mainnet" -ansible-playbook -i inventory kichain.yml -e "target=kichain_mainnet" -ansible-playbook -i inventory osmosis.yml -e "target=osmosis_mainnet" -ansible-playbook -i inventory sifchain.yml -e "target=sifchain_betanet" -ansible-playbook -i inventory terra.yml -e "target=terra_mainnet" ``` But before you rush with this easy setup, you probably want to read on so you understand the structure of this Ansible program and all the features it offers. @@ -62,6 +57,7 @@ The key Ansible playbook is `.yml` files. It will set up a fresh node fro ```bash ansible-playbook -i inventory bitcanna.yml -e "target=bitcanna_mainnet" +ansible-playbook -i inventory bitcanna.yml -e "target=comdex_mainnet" ansible-playbook -i inventory juno.yml -e "target=juno_mainnet" ansible-playbook -i inventory kava.yml -e "target=kava_mainnet" ansible-playbook -i inventory kichain.yml -e "target=kichain_mainnet" @@ -78,6 +74,7 @@ Playbooks are: | -------------- | ----------------------------------------------------------------------------------------- | | `prepare.yml ` | Prepare the server with node_exporter, promtail, go, cosmovisor, and firewall rules | | `bitcanna.yml` | Set up Bitcanna node. It includes the general `prepare` task and `bitcanna` specific task | +| `comdex.yml` | Set up Comdex node. It includes the general `prepare` task and `comdex` specific task | | `juno.yml` | Set up Juno node. It includes the general `prepare` task and `juno` specific task | | `kava.yml` | Set up Kava node. It includes the general `prepare` task and `kava` specific task | | `kichain.yml` | Set up KiChain node. It includes the general `prepare` task and `kichain` specific task | @@ -103,6 +100,8 @@ Sifchain: Follow instruction [here](https://github.com/Sifchain/sifchain-validat [BitCanna](docs/bitcanna.md) +[Comdex](docs/comdex.md) + [Juno](docs/juno.md) [Kava](docs/kava.md) diff --git a/comdex.yml b/comdex.yml new file mode 100644 index 00000000..34e8c68d --- /dev/null +++ b/comdex.yml @@ -0,0 +1,15 @@ +--- +# - name: Prepare +# hosts: '{{ target }}' +# become: true +# gather_facts: false +# roles: +# - prepare + +- name: Install node + hosts: '{{ target }}' + gather_facts: false + roles: + # - standard_node_installation + # - initialize_comdex + - launch_node diff --git a/docs/comdex.md b/docs/comdex.md new file mode 100644 index 00000000..988830e2 --- /dev/null +++ b/docs/comdex.md @@ -0,0 +1 @@ +## Comdex diff --git a/docs/kichain.md b/docs/kichain.md index 5fba8609..0b75b473 100644 --- a/docs/kichain.md +++ b/docs/kichain.md @@ -30,8 +30,8 @@ kid tx staking delegate kivaloper1gp957czryfgyvxwn3tfnyy2f0t9g2p4pq8jud7 7000000 ```bash kid tx staking edit-validator \ - --commission-rate="0.01" \ - --moniker="polkachu.com | 1% fee" \ + --commission-rate="0.02" \ + --moniker="polkachu.com | 2% fee" \ --chain-id=kichain-2 \ --gas-prices=0.025uxki \ --from=polkachu diff --git a/docs/terra.md b/docs/terra.md index 8f584b00..07c81ef1 100644 --- a/docs/terra.md +++ b/docs/terra.md @@ -1,3 +1,38 @@ ## Terra +### Testnet + Create validator + +```bash +terrad tx staking create-validator \ + --amount=5000000uluna \ + --pubkey=$(terrad tendermint show-validator) \ + --moniker 'polkachu.com' \ + --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 hello@polkachu.com" \ + --chain-id=bombay-12 \ + --from=polkachu \ + --commission-max-change-rate "0.01" \ + --commission-rate "0.02" \ + --commission-max-rate "0.1" \ + --min-self-delegation "1" \ + --fees=3000uluna \ + --from=polkachu +``` + +Set oracle + +```bash +terrad tx oracle set-feeder terra13v9q6pek6cwu4js989d22wl8sdm48j4r9cnrg7 --from=polkachu --chain-id=bombay-12 --fees=3000uluna +``` + +```bash +npm start vote -- \ + --source http://localhost:8532/latest \ + --lcd https://lcd.terra.dev \ + --chain-id columbus-5 \ + --validator terravaloper168epm0dvd6v9kpxjz2x800sad0mq4sm9herwzz \ + --password "" +``` diff --git a/group_vars/comdex_mainnet.yml b/group_vars/comdex_mainnet.yml new file mode 100644 index 00000000..bb70d4ad --- /dev/null +++ b/group_vars/comdex_mainnet.yml @@ -0,0 +1,10 @@ +network: comdex +folder: '.comdex' +daemon: comdex +chain_id: comdex-1 +node_version: v0.0.4 +repo: https://github.com/comdex-official/comdex.git +genesis: 'https://raw.githubusercontent.com/comdex-official/networks/main/mainnet/comdex-1/genesis.json' +peers: 'f74518ad134630da8d2405570f6a3639954c985f@65.0.173.217:26656,d478882a80674fa10a32da63cc20cae13e3a2a57@43.204.0.243:26656,61d743ea796ad1e1ff838c9e84adb38dfffd1d9d@15.235.9.222:26656,b8468f64788a17dbf34a891d9cd29d54b2b6485d@194.163.178.25:26656,d8b74791ee56f1b345d822f62bd9bc969668d8df@194.163.128.55:36656,81444353d70bab79742b8da447a9564583ed3d6a@164.68.105.248:26656,5b1ceb8110da4e90c38c794d574eb9418a7574d6@43.254.41.56:26656,98b4522a541a69007d87141184f146a8f04be5b9@40.112.90.170:26656,9a59b6dc59903d036dd476de26e8d2b9f1acf466@195.201.195.111:26656' +seeds: 'aef35f45db2d9f5590baa088c27883ac3d5e0b33@3.108.102.92:26656,7ca14a1d156299999eba9c394ca060368022d52f@54.194.178.110:26656,08ab4552a74dd7e211fc79432918d35818a67189@52.69.58.231:26656,449a0f1b7dafc142cf23a1f6166bbbf035edfb10@13.232.85.66:26656,5b27a6d4cf33909c0e5b217789e7455e261941d1@15.222.29.207:26656' +minimum_gas_price: '0.025ucmdx' diff --git a/roles/initialize_comdex/tasks/main.yml b/roles/initialize_comdex/tasks/main.yml new file mode 100644 index 00000000..912189ca --- /dev/null +++ b/roles/initialize_comdex/tasks/main.yml @@ -0,0 +1,32 @@ +--- +# - name: Initialize Node +# command: '{{ daemon }} init {{ validator_name }} --chain-id {{ chain_id }} -o' +# environment: +# PATH: '{{ path }}' + +# - 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: Download genesis file +# get_url: +# url: '{{ genesis }}' +# dest: '/home/{{ ansible_user }}/{{ folder }}/config/genesis.json' +# mode: '0644' + +- name: Update seeds on the config.toml file + lineinfile: + path: '/home/{{ ansible_user }}/{{ folder }}/config/config.toml' + regexp: 'seeds = ""' + line: 'seeds = "{{ seeds }}"' + state: present diff --git a/roles/initialize_osmosis/tasks/main.yml b/roles/initialize_osmosis/tasks/main.yml index 058b52e5..0f6cb9fd 100644 --- a/roles/initialize_osmosis/tasks/main.yml +++ b/roles/initialize_osmosis/tasks/main.yml @@ -17,13 +17,6 @@ line: 'persistent_peers = "{{ peers }}"' state: present -- name: Update pruning to everything to save storage - lineinfile: - path: '/home/{{ ansible_user }}/{{ folder }}/config/app.toml' - regexp: 'pruning = "default"' - line: 'pruning = "everything"' - state: present - # launch node - name: register public ip uri: diff --git a/roles/initialize_terra/tasks/main.yml b/roles/initialize_terra/tasks/main.yml index 292ae04b..2bc2994b 100644 --- a/roles/initialize_terra/tasks/main.yml +++ b/roles/initialize_terra/tasks/main.yml @@ -39,13 +39,6 @@ line: 'minimum-gas-prices = "{{ minimum_gas_price }}"' state: present -- name: Update pruning to everything to save storage - lineinfile: - path: '/home/{{ ansible_user }}/{{ folder }}/config/app.toml' - regexp: 'pruning = "default"' - line: 'pruning = "everything"' - state: present - # Launch Node - name: register public ip uri: