Removed trackomatron, updated config to tendermint 0.16 (config dir) and changed services to in-process

This commit is contained in:
Greg Szabo
2018-02-19 19:38:29 -05:00
parent 9bd1f28b8d
commit 1eb7a8a2cc
24 changed files with 216 additions and 268 deletions
+8 -8
View File
@@ -3,7 +3,7 @@
- name: gather tendermint public keys
when: (validators == true or validators == 'true') and genesis_file is not defined
tags: reconfig-toml,reconfig-genesis
command: "/usr/bin/tendermint show_validator --home /etc/{{service}} --log_level error"
command: "/usr/bin/tendermint show_validator --home /etc/{{service}}/config --log_level error"
register: pubkeys
changed_when: false
@@ -22,21 +22,21 @@
tags: reconfig-genesis
template:
src: genesis.json.j2
dest: "/etc/{{service}}/genesis.json"
dest: "/etc/{{service}}/config/genesis.json"
owner: "{{service}}"
group: "{{service}}"
- name: copy pre-created genesis.json
when: genesis_file is defined
tags: reconfig-genesis
copy: "src={{genesis_file}} dest=/etc/{{service}}/genesis.json owner={{service}} group={{service}}"
copy: "src={{genesis_file}} dest=/etc/{{service}}/config/genesis.json owner={{service}} group={{service}}"
- name: copy tendermint config.toml
tags: reconfig-toml
when: validators == true or validators == 'true'
template:
src: config.toml.j2
dest: "/etc/{{service}}/config.toml"
dest: "/etc/{{service}}/config/config.toml"
owner: "{{service}}"
group: "{{service}}"
@@ -45,14 +45,14 @@
tags: reconfig-toml,reconfig-genesis
get_url: "url={{item['src']}} dest={{item['dst']}} force=yes"
with_items:
- { src: "https://raw.githubusercontent.com/tendermint/testnets/master/{{validator_network}}/{{service}}/genesis.json" , dst: "/etc/{{service}}/genesis.json" }
- { src: "https://raw.githubusercontent.com/tendermint/testnets/master/{{validator_network}}/config.toml" , dst: "/etc/{{service}}/config.toml" }
- { src: "https://raw.githubusercontent.com/tendermint/testnets/master/{{validator_network}}/{{service}}/genesis.json" , dst: "/etc/{{service}}/config/genesis.json" }
- { src: "https://raw.githubusercontent.com/tendermint/testnets/master/{{validator_network}}/config.toml" , dst: "/etc/{{service}}/config/config.toml" }
- name: Set validator network files permissions for non-validators
when: validators == false or validators == 'false'
tags: reconfig-toml,reconfig-genesis
file: "path={{item}} owner={{service}} group={{service}}"
with_items:
- "/etc/{{service}}/genesis.json"
- "/etc/{{service}}/config.toml"
- "/etc/{{service}}/config/genesis.json"
- "/etc/{{service}}/config/config.toml"
+184 -34
View File
@@ -1,63 +1,213 @@
# This is a TOML config file.
# For more information, see https://github.com/toml-lang/toml
##### main base config options #####
# TCP or UNIX socket address of the ABCI application,
# or the name of an ABCI application compiled in with the Tendermint binary
proxy_app = "tcp://127.0.0.1:46658"
# A custom human readable name for this node
moniker = "{{inventory_hostname}}"
# If this node is many blocks behind the tip of the chain, FastSync
# allows them to catchup quickly by downloading blocks in parallel
# and verifying their commits
fast_sync = true
{% if service == 'tendermint' %}
# Database backend: leveldb | memdb
db_backend = "memdb"
# Database directory
db_path = "data"
# Output level for logging, including package level options
log_level = "mempool:error,*:debug"
{% else %}
# Database backend: leveldb | memdb
db_backend = "leveldb"
log_level = "state:info,*:error"
#log_level = "*:debug"
# Database directory
db_path = "data"
# Output level for logging, including package level options
log_level = "main:info,state:info,*:error"
#log_level = "mempool:error,*:debug"
{% endif %}
##### additional base config options #####
# Path to the JSON file containing the initial validator set and other meta data
genesis_file = "config/genesis.json"
# Path to the JSON file containing the private key to use as a validator in the consensus protocol
priv_validator_file = "config/priv_validator.json"
# Path to the JSON file containing the private key to use for node authentication in the p2p protocol
node_key_file = "config/node_key.json"
# Mechanism to connect to the ABCI application: socket | grpc
abci = "socket"
# TCP or UNIX socket address for the profiling server to listen on
prof_laddr = ""
# If true, query the ABCI app on connecting to a new peer
# so the app can decide if we should keep the connection or not
filter_peers = false
##### advanced configuration options #####
##### rpc server configuration options #####
[rpc]
# TCP or UNIX socket address for the RPC server to listen on
laddr = "tcp://0.0.0.0:46657"
{% if service == 'tendermint' %}
# TCP or UNIX socket address for the gRPC server to listen on
# NOTE: This server only supports /broadcast_tx_commit
grpc_laddr = ""
[mempool]
recheck = false
broadcast = true
wal_dir = ""
[consensus]
max_block_size_txs = 10000
create_empty_blocks = false
timeout_propose = 10000
skip_timeout_commit = true
timeout_commit = 1
wal_light = true
block_part_size = 262144
create_empty_blocks_interval = 60
{% else %}
[consensus]
create_empty_blocks_interval = 60
[tx_index]
index_all_tags = true
{% endif %}
# Activate unsafe RPC commands like /dial_seeds and /unsafe_flush_mempool
unsafe = false
##### peer to peer configuration options #####
[p2p]
max_num_peers = 300
pex = true
{% if service == 'tendermint' %}
max_msg_packet_payload_size=65536
send_rate=51200000 # 50 MB/s
recv_rate=51200000 # 50 MB/s
{% endif %}
# Address to listen for incoming connections
laddr = "tcp://0.0.0.0:46656"
# Comma separated list of seed nodes to connect to
{% if validators == true or validators == 'true' %}
{% set comma = joiner(",") %}seeds = "{% for host in ((groups[testnet_name]|default([]))+(groups['tag_Environment_'~(testnet_name|regex_replace('-','_'))]|default([])))|difference(inventory_hostname) %}{{ comma() }}{{hostvars[host]["inventory_hostname"]}}:46656{% endfor %}"
{% else %}
seeds = "{{ seeds | default() }}"
{% endif %}
# Comma separated list of nodes to keep persistent connections to
persistent_peers = ""
# Path to address book
addr_book_file = "config/addrbook.json"
# Set true for strict address routability rules
addr_book_strict = true
# Time to wait before flushing messages out on the connection, in ms
flush_throttle_timeout = 100
# Maximum number of peers to connect to
#max_num_peers = 50
max_num_peers = 300
# Maximum size of a message packet payload, in bytes
{% if service == 'tendermint' %}
max_msg_packet_payload_size = 65536
{% else %}
max_msg_packet_payload_size = 1024
{% endif %}
# Rate at which packets can be sent, in bytes/second
{% if service == 'tendermint' %}
send_rate = 51200000 # 50 MB/s
{% else %}
send_rate = 512000
{% endif %}
# Rate at which packets can be received, in bytes/second
{% if service == 'tendermint' %}
recv_rate = 51200000 # 50 MB/s
{% else %}
recv_rate = 512000
{% endif %}
# Set true to enable the peer-exchange reactor
pex = true
# Seed mode, in which node constantly crawls the network and looks for
# peers. If another node asks it for addresses, it responds and disconnects.
#
# Does not work if the peer-exchange reactor is disabled.
seed_mode = false
##### mempool configuration options #####
[mempool]
{% if service == 'tendermint' %}
recheck = false
{% else %}
recheck = true
{% endif %}
recheck_empty = true
broadcast = true
{% if service == 'tendermint' %}
wal_dir = ""
{% else %}
wal_dir = "data/mempool.wal"
{% endif %}
##### consensus configuration options #####
[consensus]
wal_file = "data/cs.wal/wal"
{% if service == 'tendermint' %}
wal_light = true
{% else %}
wal_light = false
{% endif %}
# All timeouts are in milliseconds
{% if service == 'tendermint' %}
timeout_propose = 10000
{% else %}
timeout_propose = 3000
{% endif %}
timeout_propose_delta = 500
timeout_prevote = 1000
timeout_prevote_delta = 500
timeout_precommit = 1000
timeout_precommit_delta = 500
{% if service == 'tendermint' %}
timeout_commit = 1
{% else %}
timeout_commit = 1000
{% endif %}
# Make progress as soon as we have all the precommits (as if TimeoutCommit = 0)
{% if service == 'tendermint' %}
skip_timeout_commit = true
{% else %}
skip_timeout_commit = false
{% endif %}
# BlockSize
max_block_size_txs = 10000
max_block_size_bytes = 1
# EmptyBlocks mode and possible interval between empty blocks in seconds
{% if service == 'tendermint' %}
create_empty_blocks = false
{% else %}
create_empty_blocks = true
create_empty_blocks_interval = 60
{% endif %}
# Reactor sleep duration parameters are in milliseconds
peer_gossip_sleep_duration = 100
peer_query_maj23_sleep_duration = 2000
##### transactions indexer configuration options #####
[tx_index]
# What indexer to use for transactions
#
# Options:
# 1) "null" (default)
# 2) "kv" - the simplest possible indexer, backed by key-value storage (defaults to levelDB; see DBBackend).
indexer = "kv"
+1 -1
View File
@@ -1,6 +1,6 @@
---
- name: Get config.toml from node
fetch: "dest={{ destination | default('.') }}/config.toml flat=yes src=/etc/{{service}}/config.toml"
fetch: "dest={{ destination | default('.') }}/config.toml flat=yes src=/etc/{{service}}/config/config.toml"
run_once: yes
+8 -8
View File
@@ -8,13 +8,13 @@
- name: Result
debug: var=status.stdout_lines
- name: tendermint service status
when: service != 'tendermint'
command: "service {{service}}-server status"
changed_when: false
register: tendermintstatus
#- name: tendermint service status
# when: service != 'tendermint'
# command: "service {{service}}-server status"
# changed_when: false
# register: tendermintstatus
- name: Result
when: service != 'tendermint'
debug: var=tendermintstatus.stdout_lines
#- name: Result
# when: service != 'tendermint'
# debug: var=tendermintstatus.stdout_lines