Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: tenderdash 0.5 support #241

Merged
merged 1 commit into from
Jul 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 41 additions & 22 deletions ansible/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,44 +97,30 @@
tags:
- dashd

# Setup seed nodes
# Setup core on seed nodes

- hosts: seed_nodes
become: true
pre_tasks:
- set_fact:
node: "{{ seed_nodes[inventory_hostname] }}"
tags: always
when: inventory_hostname in seed_nodes
- fail:
msg: Seed node not defined in tenderdash config
when: node is not defined
roles:
- role: dashd
dashd_listen: true
dashd_zmq: true
dashd_indexes: true
tags:
- dashd
- role: mn-evo-services
tags:
- evo
when: evo_services
- role: elastic-beats

# Setup masternodes
# Setup core on masternodes

- hosts: masternodes
become: true
pre_tasks:
- set_fact:
node: "{{ masternodes[inventory_hostname] }}"
masternode: "{{ masternodes[inventory_hostname] }}"
tags: always
when: inventory_hostname in masternodes
- fail:
msg: Masternode not defined in network config
when: node is not defined
when: masternode is not defined
roles:
- role: dashd
dashd_listen: true
Expand All @@ -143,11 +129,6 @@
tags:
- dashd
- mn-sentinel
- role: mn-evo-services
tags:
- evo
when: evo_services
- role: elastic-beats

# Generate first block on seed node
# so that all nodes leave IBD mode (required for mining)
Expand Down Expand Up @@ -195,6 +176,44 @@
- role: activate-dashd-sporks
when: dash_network != "mainnet" and dash_network != "testnet"

# Setup platform on seed nodes

- hosts: seed_nodes
become: true
pre_tasks:
- set_fact:
node: "{{ seed_nodes[inventory_hostname] }}"
tags: always
when: inventory_hostname in seed_nodes
- fail:
msg: Seed node not defined in network config
when: node is not defined
roles:
- role: mn-evo-services
tags:
- evo
when: evo_services
- role: elastic-beats

# Setup platform on masternodes

- hosts: masternodes
become: true
pre_tasks:
- set_fact:
node: "{{ masternodes[inventory_hostname] }}"
tags: always
when: inventory_hostname in masternodes
- fail:
msg: Masternode not defined in network config
when: node is not defined
roles:
- role: mn-evo-services
tags:
- evo
when: evo_services
- role: elastic-beats

# Prune unused Docker images

- hosts: all
Expand Down
2 changes: 0 additions & 2 deletions ansible/roles/dashd/templates/dash.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ maxconnections=256
debug={{ dashd_debug }}
printtoconsole=1

llmq-qvvec-sync={{ core_llmq_types[platform_drive_validator_set_llmq_type] }}:0

{% if dashd_indexes %}
# optional indices (required for Insight)
txindex=1
Expand Down
8 changes: 0 additions & 8 deletions ansible/roles/mn-evo-services/tasks/tendermint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,4 @@
loop:
- config.toml
- genesis.json
- priv_validator_key.json
- node_key.json

- name: create Tendermint priv_validator_state.json
template:
src: 'roles/mn-evo-services/templates/tendermint/priv_validator_state.json.j2'
dest: '{{ mn_evo_services_path }}/tendermint/data/priv_validator_state.json'
owner: '{{ tendermint_uid }}'
group: '{{ tendermint_gid }}'
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ log_format = "plain"
# Path to the JSON file containing the initial validator set and other meta data
genesis_file = "config/genesis.json"

is_masternode = {% if inventory_hostname in groups.masternodes %}true{% else %}false{% endif %}

# Path to the JSON file containing the private key to use as a validator in the consensus protocol
priv_validator_key_file = "config/priv_validator_key.json"

Expand Down
19 changes: 2 additions & 17 deletions ansible/roles/mn-evo-services/templates/tendermint/genesis.json.j2
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,8 @@
},
"version": {}
},
"validators": [
{
"address": "0751C0B717E3F9CB0ABC0AD63B740978ABD597BF",
"pub_key": {
"type": "tendermint/PubKeyBLS12381",
"value": "A+OY6bG13RElaxL7Mko+Q2S5oRvg8y32zU4YxeKtY32bJw8SQBqZFTt6RXF8VuJ9"
},
"power": "100",
"name": "",
"pro_tx_hash": "5CD8233AAFF03609721D36E682D84346F2134551E44C10AE2B1A86CB1ACCF5D3"
}
],
"threshold_public_key": {
"type": "tendermint/PubKeyBLS12381",
"value": "A+OY6bG13RElaxL7Mko+Q2S5oRvg8y32zU4YxeKtY32bJw8SQBqZFTt6RXF8VuJ9"
},
"threshold_public_key": null,
"quorum_type": "{{ platform_drive_validator_set_llmq_type }}",
"quorum_hash": "00000201a9d68294b1aa11d689eee77fa588a76247a80e09e903dd250e4ead83",
"quorum_hash": null,
"app_hash": ""
}

This file was deleted.

This file was deleted.