diff --git a/ansible/README.rst b/ansible/README.rst index 24ca6f878..5c416c018 100644 --- a/ansible/README.rst +++ b/ansible/README.rst @@ -9,8 +9,8 @@ Using Ansible The playbooks in `our ansible directory `__ run ansible `roles `__ which: -- install and configure basecoin or ethermint -- start/stop basecoin or ethermint and reset their configuration +- install and configure basecoind or ethermint +- start/stop basecoind or ethermint and reset their configuration Prerequisites ------------- @@ -200,7 +200,7 @@ DigitalOcean DO_API_TOKEN="" TF_VAR_TESTNET_NAME="testnet-servers" - ansible-playbook -i inventory/digital_ocean.py install.yml -e service=basecoin + ansible-playbook -i inventory/digital_ocean.py install.yml -e service=basecoind Amazon AWS ~~~~~~~~~~ @@ -210,12 +210,12 @@ Amazon AWS AWS_ACCESS_KEY_ID='' AWS_SECRET_ACCESS_KEY='' TF_VAR_TESTNET_NAME="testnet-servers" - ansible-playbook -i inventory/ec2.py install.yml -e service=basecoin + ansible-playbook -i inventory/ec2.py install.yml -e service=basecoind Installing custom versions ~~~~~~~~~~~~~~~~~~~~~~~~~~ -By default ansible installs the tendermint, basecoin or ethermint binary +By default ansible installs the tendermint, basecoind or ethermint binary versions from the latest release in the repository. If you build your own version of the binaries, you can tell ansible to install that instead. @@ -223,11 +223,11 @@ instead. :: GOPATH="" - go get -u github.com/tendermint/basecoin/cmd/basecoin + go get -u github.com/tendermint/basecoin/cmd/basecoind DO_API_TOKEN="" TF_VAR_TESTNET_NAME="testnet-servers" - ansible-playbook -i inventory/digital_ocean.py install.yml -e service=basecoin -e release_install=false + ansible-playbook -i inventory/digital_ocean.py install.yml -e service=basecoind -e release_install=false Alternatively you can change the variable settings in ``group_vars/all``. @@ -237,15 +237,15 @@ Other commands and roles There are few extra playbooks to make life easier managing your servers. -- install.yml - Install basecoin or ethermint applications. (Tendermint +- install.yml - Install basecoind or ethermint applications. (Tendermint gets installed automatically.) Use the ``service`` parameter to - define which application to install. Defaults to ``basecoin``. + define which application to install. Defaults to ``basecoind``. - reset.yml - Stop the application, reset the configuration and data, then start the application again. You need to pass - ``-e service=``, like ``-e service=basecoin``. It will + ``-e service=``, like ``-e service=basecoind``. It will restart the underlying tendermint application too. - restart.yml - Restart a service on all nodes. You need to pass - ``-e service=``, like ``-e service=basecoin``. It will + ``-e service=``, like ``-e service=basecoind``. It will restart the underlying tendermint application too. - stop.yml - Stop the application. You need to pass ``-e service=``. diff --git a/ansible/app_options_files/kingethan b/ansible/app_options_files/kingethan deleted file mode 100644 index 2245ffd4d..000000000 --- a/ansible/app_options_files/kingethan +++ /dev/null @@ -1,12 +0,0 @@ - "accounts": [{ - "address": "C13B2A17030E416D0C83B7FF7CDFFB2E2353FA11", - "coins": [ - { - "denom": "mycoin", - "amount": 9007199254740992 - } - ] - }], - "plugin_options": [ - "coin/issuer", {"app": "sigs", "addr": "C13B2A17030E416D0C83B7FF7CDFFB2E2353FA11"} - ] diff --git a/ansible/app_options_files/public_testnet b/ansible/app_options_files/public_testnet index 66f3dddf1..9320b3f65 100644 --- a/ansible/app_options_files/public_testnet +++ b/ansible/app_options_files/public_testnet @@ -22,8 +22,8 @@ }, "coins": [ { - "denom": "buckyball", - "amount": 9007199254740991 + "denom": "fermion", + "amount": 1000000 }, { "denom": "gregcoin", @@ -31,6 +31,42 @@ } ] }, + { + "name": "monitor1", + "address": "CE456B8BA9AFD1CBDF4ED14558E8C30691E549EA", + "coins": [ + { + "denom": "fermion", + "amount": 100 + }, + { + "denom": "moncoin", + "amount": 600000 + }, + { + "denom": "leadertoken", + "amount": 1 + } + ] + }, + { + "name": "monitor2", + "address": "EF708182E21F893634FD8DCB82A5128E16C76B83", + "coins": [ + { + "denom": "fermion", + "amount": 100 + }, + { + "denom": "moncoin", + "amount": 0 + }, + { + "denom": "leadertoken", + "amount": 0 + } + ] + }, { "name": "anton", "address": "40CC622438D3E42148A1FFD3A27C07C100F8FA3D", @@ -40,8 +76,8 @@ }, "coins": [ { - "denom": "buckyball", - "amount": 9007199254740992 + "denom": "fermion", + "amount": 100 }, { "denom": "antoncoin", @@ -51,11 +87,11 @@ }, { "name": "adrian", - "address": "0FA1DB09E8B174E81E94280C047C158D4271457B", + "address": "4548017683F771FDBCF7D8E74F4723868AA20009", "coins": [ { - "denom": "buckyball", - "amount": 1928936473812 + "denom": "fermion", + "amount": 100 }, { "denom": "adriancoin", @@ -66,14 +102,10 @@ { "name": "bucky", "address": "2B24DEE2364762300168DF19B6C18BCE2D399EA2", - "pub_key": { - "type": "ed25519", - "data": "37BF9D6F8D66DC3FAECD330291CF08DF52E2F646B01F7E43BC0A746AED927A62" - }, "coins": [ { - "denom": "buckyball", - "amount": 20000000000 + "denom": "fermion", + "amount": 10000 }, { "denom": "buckycoin", @@ -81,35 +113,55 @@ } ] }, + { + "name": "bucky-new", + "address": "4FE8FFE12EDBA34BE4E587B2125177AC24594BAF", + "coins": [ + { + "denom": "fermion", + "amount": 10000 + }, + { + "denom": "buckycoin", + "amount": 2000 + } + ] + }, { "name": "rigel", - "address": "3A8BE0EEE474C8D197AA14312B59ACB2D9DFECDE", - "pub_key": { - "type": "ed25519", - "data": "C7CAC198E3999C4DD9F25C575C4C10587C083F73B1E985AC65658992DE6B552E" - }, + "address": "C7A6F5FD77DDCA5C43600F33D14533A27C683F55", + "coins": [ + { + "denom": "rigelcoin", + "amount": 1000 + }, + { + "denom": "fermion", + "amount": 1000 + } + ] + }, + { + "name": "rigel2", + "address": "5B228AB64E290F1FC4D3E933B7623CCA3F015C34", "coins": [ { "denom": "rigelcoin", "amount": 1000 }, { - "denom": "buckyball", - "amount": 3478765434568 + "denom": "fermion", + "amount": 1000 } ] }, { "name": "shadow", "address": "B140EFAAE6D5CA1C8E98814C557AF7112E3B9EAE", - "pub_key": { - "type": "ed25519", - "data": "F492282705DF29ACC3BB803D543B7BF98C8080FA28AE85B62B45827EA9DA8167" - }, "coins": [ { - "denom": "buckyball", - "amount": 53712836452781 + "denom": "fermion", + "amount": 100 }, { "denom": "shadowcoin", @@ -119,11 +171,11 @@ }, { "name": "peng", - "address": "7B8422A210D0F0B8734908C093ECF0E9A768BDB8", + "address": "DC97A6E1A3E1FE868B55BA93C7FC626368261E09", "coins": [ { - "denom": "buckyball", - "amount": 53712836452781 + "denom": "fermion", + "amount": 100 }, { "denom": "pengcoin", @@ -131,13 +183,75 @@ } ] }, + { + "name": "official-faucet", + "address": "2406B52B1DE26F992E5BF334E5F30049C682B5CB", + "coins": [ + { + "denom": "fermion", + "amount": 100000 + }, + { + "denom": "antoncoin", + "amount": 100000 + }, + { + "denom": "adriancoin", + "amount": 100000 + }, + { + "denom": "buckycoin", + "amount": 100000 + }, + { + "denom": "rigelcoin", + "amount": 100000 + }, + { + "denom": "shadowcoin", + "amount": 100000 + }, + { + "denom": "pengcoin", + "amount": 100000 + }, + { + "denom": "mattcoin", + "amount": 100000 + }, + { + "denom": "freycoin", + "amount": 100000 + }, + { + "denom": "wancloudcoin", + "amount": 100000 + }, + { + "denom": "bianjiecoin", + "amount": 100000 + }, + { + "denom": "alexiscoin", + "amount": 100000 + }, + { + "denom": "zakicoin", + "amount": 100000 + }, + { + "denom": "gregcoin", + "amount": 100000 + } + ] + }, { "name": "matt", "address": "C2104A8191E282AA45D210BA93282B36768EDDA1", "coins": [ { - "denom": "buckyball", - "amount": 53712836452781 + "denom": "fermion", + "amount": 100 }, { "denom": "mattcoin", @@ -150,8 +264,8 @@ "address": "0F8FB94B5A4D04220F15058B7AA16AF1328B57A9", "coins": [ { - "denom": "buckyball", - "amount": 53712836452781 + "denom": "fermion", + "amount": 100 }, { "denom": "freycoin", @@ -161,11 +275,11 @@ }, { "name": "wancloud", - "address": "117FE408E1F74C453901BCB638F996964FD29CBB", + "address": "02C1F2CE501DAF30F758E657B71FC7AD568C4BE5", "coins": [ { - "denom": "buckyball", - "amount": 53712836452781 + "denom": "fermion", + "amount": 100 }, { "denom": "wancloudcoin", @@ -175,17 +289,89 @@ }, { "name": "bianjie", - "address": "F63F2D34C03430A54B7F6A43C886B4A83F366B84", + "address": "7D626173FAA69D96E56523A333EAF78F87843CE5", "coins": [ { - "denom": "buckyball", - "amount": 53712836452781 + "denom": "fermion", + "amount": 100 }, { "denom": "bianjiecoin", "amount": 1000 } ] + }, + { + "name": "alexis", + "address": "42989458D3285F05FE0233EE669A1CCD90AE6F3E", + "coins": [ + { + "denom": "fermion", + "amount": 100 + }, + { + "denom": "alexiscoin", + "amount": 1000 + } + ] + }, + { + "name": "zaki", + "address": "E2080141FEAD5986FD411121CA077F2835294F5A", + "coins": [ + { + "denom": "fermion", + "amount": 100 + }, + { + "denom": "zakicoin", + "amount": 1000 + } + ] + }, + { + "name": "jimyang", + "address": "6F94C5B7FEB6EF926A8901A8E8F4B2077D02B354", + "coins": [ + { + "denom": "fermion", + "amount": 1000 + } + ] + }, + { + "name": "MichaelYuan", + "address": "F75D0FD7036A3BB9092DD0938BBF0A9323224832", + "coins": [ + { + "denom": "fermion", + "amount": 100000 + } + ] + }, + { + "name": "Fabo", + "address": "DF096FDE8D380FA5B2AD20DB2962C82DDEA1ED9B", + "coins": [ + { + "denom": "fermion", + "amount": 100 + } + ] + }, + { + "name": "chjango", + "address": "1C0F9000D0AF1CBCAF8EAD636B729797905D6D24", + "coins": [ + { + "denom": "fermion", + "amount": 100 + }, + { + "denom": "tokenchjango", + "amount": 1000 + } + ] } ], diff --git a/ansible/group_vars/all b/ansible/group_vars/all index ea8ff4857..bd14134cc 100644 --- a/ansible/group_vars/all +++ b/ansible/group_vars/all @@ -9,8 +9,8 @@ ## install ## -## service variable defines which service is going to be managed. It can be set to basecoin or ethermint. -service: basecoin +## service variable defines which service is going to be managed. It can be set to basecoind or ethermint. +service: basecoind ## release_install indicates if the install role should look for a privately built binary after installing the service package. If set to false, the privately built binary in the GOPATH is going to override the binary on the target systems. #release_install: true diff --git a/ansible/roles/config/tasks/main.yml b/ansible/roles/config/tasks/main.yml index 8fa90583f..85c37e3b3 100644 --- a/ansible/roles/config/tasks/main.yml +++ b/ansible/roles/config/tasks/main.yml @@ -1,41 +1,55 @@ --- - name: gather tendermint public keys - when: (validators == true or validators == 'true') and tendermint_genesis_file is not defined + 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" register: pubkeys changed_when: false +- name: gather tendermint peer IDs + when: genesis_file is not defined + tags: reconfig-toml + command: "/usr/bin/tendermint show_node_id --home /etc/{{service}} --log_level error" + register: nodeids + changed_when: false + - name: resetting permissions from root after gathering public keys tags: reconfig-toml,reconfig-genesis file: "path=/etc/{{service}} owner={{service}} group={{service}} recurse=yes" - name: register tendermint public keys as host facts - when: (validators == true or validators == 'true') and tendermint_genesis_file is not defined + when: (validators == true or validators == 'true') and genesis_file is not defined tags: reconfig-toml,reconfig-genesis set_fact: "pubkey='{{pubkeys.stdout}}'" connection: local +- name: register node ids as host facts + when: genesis_file is not defined + tags: reconfig-toml + set_fact: "nodeid='{{nodeids.stdout}}'" + connection: local + - name: copy generated genesis.json - genesis_time will be updated when: (validators == true or validators == 'true') and (genesis_file is not defined) 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 - copy: "src={{genesis_file}} dest=/etc/{{service}}/genesis.json owner={{service}} group={{service}}" + tags: reconfig-genesis + 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}}" @@ -44,14 +58,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" diff --git a/ansible/roles/config/templates/config.toml.j2 b/ansible/roles/config/templates/config.toml.j2 index 828299c24..020baf61e 100644 --- a/ansible/roles/config/templates/config.toml.j2 +++ b/ansible/roles/config/templates/config.toml.j2 @@ -1,57 +1,221 @@ # 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" + +# 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" +# TCP or UNIX socket address for the gRPC server to listen on +# NOTE: This server only supports /broadcast_tx_commit +grpc_laddr = "" + +# Activate unsafe RPC commands like /dial_seeds and /unsafe_flush_mempool +unsafe = false + +##### peer to peer configuration options ##### +[p2p] + +# Address to listen for incoming connections +laddr = "tcp://0.0.0.0:46656" + +# Comma separated list of seed nodes to connect to +seeds = "{{ seeds | default() }}" + +# Comma separated list of nodes to keep persistent connections to +{% set comma = joiner(",") %}persistent_peers = "{% for host in ((groups[testnet_name]|default([]))+(groups['tag_Environment_'~(testnet_name|regex_replace('-','_'))]|default([])))|difference(inventory_hostname) %}{{ comma() }}{{hostvars[host]["nodeid"]}}@{{hostvars[host]["inventory_hostname"]}}:46656{% endfor %}" + +# 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] -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 = 1 +wal_file = "data/cs.wal/wal" +{% if service == 'tendermint' %} +wal_light = true {% else %} +wal_light = false +{% endif %} -[consensus] -create_empty_blocks_interval = 1 - +# 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 %} -[p2p] +# Make progress as soon as we have all the precommits (as if TimeoutCommit = 0) {% if service == 'tendermint' %} -max_msg_packet_payload_size=65536 -send_rate=51200000 # 50 MB/s -recv_rate=51200000 # 50 MB/s +skip_timeout_commit = true +{% else %} +skip_timeout_commit = false {% endif %} -laddr = "tcp://0.0.0.0:46656" -{% 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 %}" + +# 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 %} -seeds = "{{ seeds | default() }}" +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" + +# Comma-separated list of tags to index (by default the only tag is tx hash) +# +# It's recommended to index only a subset of tags due to possible memory +# bloat. This is, of course, depends on the indexer's DB and the volume of +# transactions. +index_tags = "" + +# When set to true, tells indexer to index all tags. Note this may be not +# desirable (see the comment above). IndexTags has a precedence over +# IndexAllTags (i.e. when given both, IndexTags will be indexed). +index_all_tags = false + diff --git a/ansible/roles/config/templates/genesis-server.json.j2 b/ansible/roles/config/templates/genesis-server.json.j2 deleted file mode 100644 index a1c7741b3..000000000 --- a/ansible/roles/config/templates/genesis-server.json.j2 +++ /dev/null @@ -1,24 +0,0 @@ -{ - "genesis_time":"{{ansible_date_time.iso8601}}", - "chain_id":"{{testnet_name}}", - "validators": - [ -{% if (validators == true) or (validators == 'true') %} -{% set comma = joiner(",") %} -{% for host in (groups[testnet_name]|default([]))+(groups['tag_Environment_'~(testnet_name|regex_replace('-','_'))]|default([])) %} - {{ comma() }} - { - "pub_key": { - "data": "{{hostvars[host]["pubkey"]["data"]}}", - "type": "{{hostvars[host]["pubkey"]["type"]}}" - }, - "power":10, - "name":"{{hostvars[host]["inventory_hostname"]}}" - } -{% endfor %} -{% endif %} - ], - "app_hash":"", - "app_options": {} -} - diff --git a/ansible/roles/config/templates/genesis-service.json.j2 b/ansible/roles/config/templates/genesis-service.json.j2 deleted file mode 100644 index 7f9a48316..000000000 --- a/ansible/roles/config/templates/genesis-service.json.j2 +++ /dev/null @@ -1,12 +0,0 @@ -{ - "genesis_time":"{{ansible_date_time.iso8601}}", - "chain_id":"{{testnet_name}}", - "validators": [], - "app_hash":"", - "app_options": { -{% if app_options_file is defined %} -{% include app_options_file %} -{% endif %} - } -} - diff --git a/ansible/roles/config/templates/genesis.json.j2 b/ansible/roles/config/templates/genesis.json.j2 index e2f956ebb..6ca0f876d 100644 --- a/ansible/roles/config/templates/genesis.json.j2 +++ b/ansible/roles/config/templates/genesis.json.j2 @@ -12,14 +12,18 @@ "data": "{{hostvars[host]["pubkey"]["data"]}}", "type": "{{hostvars[host]["pubkey"]["type"]}}" }, - "power":10, + "power":1000, "name":"{{hostvars[host]["inventory_hostname"]}}" } {% endfor %} {% endif %} ], "app_hash":"", +{% if service == 'basecoind' %} + "app_state": { +{% else %} "app_options": { +{% endif %} {% if app_options_file is defined %} {% include app_options_file %} {% endif %} diff --git a/ansible/roles/generic-service/templates/systemd.service.j2 b/ansible/roles/generic-service/templates/systemd.service.j2 index 201b7942d..c38cca468 100644 --- a/ansible/roles/generic-service/templates/systemd.service.j2 +++ b/ansible/roles/generic-service/templates/systemd.service.j2 @@ -4,7 +4,7 @@ Requires=network-online.target After=network-online.target [Service] -Environment="TMHOME=/etc/{{service}}/tendermint" +Environment="TMHOME=/etc/{{service}}" Restart=on-failure User={{service}} Group={{service}} diff --git a/ansible/roles/getconfigtoml/tasks/main.yml b/ansible/roles/getconfigtoml/tasks/main.yml index d0495f103..5daab5b6f 100644 --- a/ansible/roles/getconfigtoml/tasks/main.yml +++ b/ansible/roles/getconfigtoml/tasks/main.yml @@ -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 diff --git a/ansible/roles/install/tasks/centos.yml b/ansible/roles/install/tasks/centos.yml index dc8b86b57..06db3ba21 100644 --- a/ansible/roles/install/tasks/centos.yml +++ b/ansible/roles/install/tasks/centos.yml @@ -46,6 +46,8 @@ - python-virtualenv - unzip - tar +#For show_validator command: + - tendermint - name: Install toml when: ansible_os_family == "RedHat" diff --git a/ansible/roles/install/tasks/debian.yml b/ansible/roles/install/tasks/debian.yml index d92a8c3ed..706f53fd0 100644 --- a/ansible/roles/install/tasks/debian.yml +++ b/ansible/roles/install/tasks/debian.yml @@ -29,3 +29,6 @@ - python-toml - unzip - tar +#For show_validator command: + - tendermint + diff --git a/ansible/roles/install/tasks/main.yml b/ansible/roles/install/tasks/main.yml index 410468adb..939b1acec 100644 --- a/ansible/roles/install/tasks/main.yml +++ b/ansible/roles/install/tasks/main.yml @@ -5,14 +5,23 @@ file: path=/etc/localtime state=link src=/usr/share/zoneinfo/{{timezone}} force=yes - name: Disable journald rate-limiting - lineinfile: "path=/etc/systemd/journald.conf regexp={{item.regexp}} line='{{item.line}}'" + lineinfile: "dest=/etc/systemd/journald.conf regexp={{item.regexp}} line='{{item.line}}'" with_items: - { regexp: "^#RateLimitInterval", line: "RateLimitInterval=0s" } - { regexp: "^#RateLimitBurst", line: "RateLimitBurst=0" } +- name: Create journal directory for permanent logs + file: path=/var/log/journal state=directory + +- name: Set journal folder with systemd-tmpfiles + command: "systemd-tmpfiles --create --prefix /var/log/journal" + - name: Restart journald service: name=systemd-journald state=restarted +- name: Ability to get the core dump on SIGABRT + shell: "ulimit -c unlimited" + #TODO include is deprecated in Ansible 2.4.0 and will be removed in 2.8.0 #Replace it with include_tasks diff --git a/ansible/roles/status/tasks/main.yml b/ansible/roles/status/tasks/main.yml index e47d634e7..c9229d400 100644 --- a/ansible/roles/status/tasks/main.yml +++ b/ansible/roles/status/tasks/main.yml @@ -1,6 +1,6 @@ --- -- name: start service +- name: application service status command: "service {{service}} status" changed_when: false register: status @@ -8,3 +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: Result +# when: service != 'tendermint' +# debug: var=tendermintstatus.stdout_lines + diff --git a/ansible/roles/unsafe_reset/tasks/main.yml b/ansible/roles/unsafe_reset/tasks/main.yml index e6f21da68..7cf8aebf8 100644 --- a/ansible/roles/unsafe_reset/tasks/main.yml +++ b/ansible/roles/unsafe_reset/tasks/main.yml @@ -2,12 +2,9 @@ when: "service == 'ethermint'" become_user: ethermint -- shell: "export BCHOME=/etc/basecoin ; basecoin unsafe_reset_all" - when: "service == 'basecoin'" - become_user: basecoin - -- shell: "export TMHOME=/etc/{{service}} ; tendermint unsafe_reset_all" +- command: "{{service}} node unsafe_reset_all --home=/etc/{{service}}" become_user: "{{service}}" -- file: "path=/etc/{{service}}/data state=absent" +- file: "path=/etc/{{service}}/config/addrbook.json state=absent" + diff --git a/build/Makefile b/build/Makefile index ca44de525..a47644b63 100644 --- a/build/Makefile +++ b/build/Makefile @@ -1,12 +1,13 @@ ## -# Extra checks, because we do not use autoconf. Set extra_check to false if it is bothering you. +# Extra checks, because we do not use autoconf. ## -extra_check = true -go_min_version = 1.8.3 +requirements_check = true +gpg_check = false +go_min_version = 1.9.4 gpg_key = 2122CBE9 -ifeq ($(extra_check),true) +ifeq ($(requirements_check),true) ifndef GOPATH $(error GOPATH not set) else @@ -17,6 +18,7 @@ ifneq ($(go_min_version),$(go_version_check)) $(error go version go_min_version or above is required) endif endif +ifeq ($(gpg_check),true) gpg_check := $(shell gpg -K | grep '/$(gpg_key) ' | sed 's,^.*/\($(gpg_key)\) .*$$,\1,') ifneq ($(gpg_check),$(gpg_key)) $(error GPG key $(gpg_key) not found.) @@ -27,17 +29,18 @@ ifndef GPG_PASSPHRASE $(error GPG_PASSPHRASE not set) endif endif +endif ### # Here comes the real deal ### -binaries = tendermint basecoin ethermint trackomatron gaia -build-binaries = build-tendermint build-basecoin build-ethermint build-trackomatron build-gaia -package-rpm = package-rpm-tendermint package-rpm-basecoin package-rpm-ethermint package-rpm-trackomatron package-rpm-gaia -install-rpm = install-rpm-tendermint install-rpm-basecoin install-rpm-ethermint install-rpm-trackomatron install-rpm-gaia -package-deb = package-deb-tendermint package-deb-basecoin package-deb-ethermint package-deb-trackomatron package-deb-gaia -install-deb = install-deb-tendermint install-deb-basecoin install-deb-ethermint install-deb-trackomatron install-deb-gaia +binaries = tendermint basecoind ethermint gaia +build-binaries = build-tendermint build-basecoind build-ethermint build-gaia +package-rpm = package-rpm-tendermint package-rpm-basecoind package-rpm-ethermint package-rpm-gaia +install-rpm = install-rpm-tendermint install-rpm-basecoind install-rpm-ethermint install-rpm-gaia +package-deb = package-deb-tendermint package-deb-basecoind package-deb-ethermint package-deb-gaia +install-deb = install-deb-tendermint install-deb-basecoind install-deb-ethermint install-deb-gaia all: $(binaries) build: $(build-binaries) @@ -52,59 +55,53 @@ $(binaries): %: build-% package-rpm-% package-deb-% git-branch: $(eval GIT_BRANCH=$(shell echo $${GIT_BRANCH:-master})) -build-tendermint: git-branch +gopath-setup: + test -d $(GOPATH) || mkdir -p $(GOPATH) + test -d $(GOPATH)/bin || mkdir -p $(GOPATH)/bin + test -d $(GOPATH)/src || mkdir -p $(GOPATH)/src + +build-tendermint: git-branch gopath-setup @echo "*** Building tendermint" go get -d -u github.com/tendermint/tendermint/cmd/tendermint cd $(GOPATH)/src/github.com/tendermint/tendermint && git checkout "$(GIT_BRANCH)" && git pull - $(MAKE) -C $(GOPATH)/src/github.com/tendermint/tendermint get_vendor_deps build + export PATH=$(GOPATH)/bin:$(PATH) && $(MAKE) -C $(GOPATH)/src/github.com/tendermint/tendermint get_tools get_vendor_deps build cp $(GOPATH)/src/github.com/tendermint/tendermint/build/tendermint $(GOPATH)/bin @echo "*** Built tendermint" -#build-basecoin: git-branch -# @echo "*** Building basecoin-old" -# go get -d -u github.com/tendermint/basecoin/cmd/basecoin -# cd $(GOPATH)/src/github.com/tendermint/basecoin && git checkout "$(GIT_BRANCH)" && git pull -# $(MAKE) -C $(GOPATH)/src/github.com/tendermint/basecoin get_vendor_deps install -# @echo "*** Built basecoin" - -build-ethermint: git-branch +build-ethermint: git-branch gopath-setup @echo "*** Building ethermint" go get -d -u github.com/tendermint/ethermint/cmd/ethermint cd $(GOPATH)/src/github.com/tendermint/ethermint && git checkout "$(GIT_BRANCH)" && git pull - $(MAKE) -C $(GOPATH)/src/github.com/tendermint/ethermint get_vendor_deps build + export PATH=$(GOPATH)/bin:$(PATH) && $(MAKE) -C $(GOPATH)/src/github.com/tendermint/ethermint get_vendor_deps build cp $(GOPATH)/src/github.com/tendermint/ethermint/build/ethermint $(GOPATH)/bin @echo "*** Built ethermint" -build-trackomatron: git-branch - @echo "*** Building trackomatron" - go get -d -u github.com/tendermint/trackomatron/cmd/tracko - cd $(GOPATH)/src/github.com/tendermint/trackomatron && git checkout "$(GIT_BRANCH)" && git pull - $(MAKE) -C $(GOPATH)/src/github.com/tendermint/trackomatron get_vendor_deps install - @echo "Workaround: trackomatron package has tracko as the binary - trackomatron needed for proper packaging" && rm -rf $(GOPATH)/bin/trackomatron && ln -s $(GOPATH)/bin/tracko $(GOPATH)/bin/trackomatron - @echo "*** Built trackomatron" - -build-gaia: git-branch +build-gaia: git-branch gopath-setup @echo "*** Building gaia" go get -d -u go github.com/cosmos/gaia || echo "Workaround for go downloads." cd $(GOPATH)/src/github.com/cosmos/gaia && git checkout "$(GIT_BRANCH)" && git pull - $(MAKE) -C $(GOPATH)/src/github.com/cosmos/gaia get_vendor_deps install + export PATH=$(GOPATH)/bin:$(PATH) && $(MAKE) -C $(GOPATH)/src/github.com/cosmos/gaia get_vendor_deps install @echo "*** Built gaia" -build-basecoin: git-branch - @echo "*** Building basecoin from cosmos-sdk" - go get -d -u go github.com/cosmos/cosmos-sdk || echo "Workaround for go downloads." +build-basecoind: git-branch gopath-setup + @echo "*** Building basecoind from cosmos-sdk" + go get -d -u github.com/cosmos/cosmos-sdk/examples/basecoin/cmd/basecoind cd $(GOPATH)/src/github.com/cosmos/cosmos-sdk && git checkout "$(GIT_BRANCH)" && git pull - $(MAKE) -C $(GOPATH)/src/github.com/cosmos/cosmos-sdk get_vendor_deps install - @echo "*** Built basecoin from cosmos-sdk" + export PATH=$(GOPATH)/bin:$(PATH) && $(MAKE) -C $(GOPATH)/src/github.com/cosmos/cosmos-sdk get_tools get_vendor_deps build + cp $(GOPATH)/src/github.com/cosmos/cosmos-sdk/build/basecoind $(GOPATH)/bin/basecoind + @echo "*** Built basecoind from cosmos-sdk" ### # Prepare package files ### # set app_version -version-%: $(GOPATH)/bin/% - if [ -z "$(BUILD_NUMBER)" ]; then echo "BUILD_NUMBER not set" ; false ; fi - $(eval $*_version=$(shell $< version | head -1 | cut -d- -f1 | sed 's/^\(ethermint:\s*\|\)\(v\|\)//' )) +version-%: + @echo "Checking if binary exists" + test -f $(GOPATH)/bin/$* + @echo "BUILD_NUMBER is $(BUILD_NUMBER)" + test -n "$(BUILD_NUMBER)" + $(eval $*_version=$(shell $(GOPATH)/bin/$* version | head -1 | cut -d- -f1 | sed 's/^\(ethermint:\s*\|\)\(v\|\)//' | tr -d '\t ' )) # set build_folder folder-%: version-% @@ -121,9 +118,8 @@ prepare-tendermint = prepare-ethermint = mkdir -p $(build_folder)/etc/ethermint && \ cp $(GOPATH)/src/github.com/tendermint/ethermint/setup/genesis.json $(build_folder)/etc/ethermint/genesis.json && \ cp -r $(GOPATH)/src/github.com/tendermint/ethermint/setup/keystore $(build_folder)/etc/ethermint -prepare-trackomatron = rm -f $(build_folder)/usr/bin/trackomatron && cp $(GOPATH)/bin/tracko $(GOPATH)/bin/trackocli $(build_folder)/usr/bin -prepare-gaia = cp $(GOPATH)/bin/gaiacli $(build_folder)/usr/bin -prepare-basecoin = cp $(GOPATH)/bin/basecli $(GOPATH)/bin/basecoin $(GOPATH)/bin/baseserver $(GOPATH)/bin/counter $(GOPATH)/bin/countercli $(GOPATH)/bin/eyes $(GOPATH)/bin/eyescli $(build_folder)/usr/bin +prepare-gaia = +prepare-basecoind = cp $(GOPATH)/bin/basecoind $(build_folder)/usr/bin ### # Package the binary for CentOS/RedHat (RPM) and Debian/Ubuntu (DEB) @@ -203,7 +199,7 @@ install-rpm-%: version-% cp ./RPM-GPG-KEY-Tendermint tmp/s3/7/os/x86_64/ cp ./tendermint.repo tmp/s3/7/os/x86_64/ rm -f tmp/s3/7/os/x86_64/repodata/*.bz2 tmp/s3/7/os/x86_64/repodata/*.gz tmp/s3/7/os/x86_64/repodata/repomd.xml.asc - createrepo tmp/s3/7/os/x86_64/Packages -u https://tendermint-packages.interblock.io/$(DEVOPS_PATH)centos/7/os/x86_64/Packages -o tmp/s3/7/os/x86_64 --update -S --repo Tendermint --content tendermint --content basecoin --content ethermint + createrepo tmp/s3/7/os/x86_64/Packages -u https://tendermint-packages.interblock.io/$(DEVOPS_PATH)centos/7/os/x86_64/Packages -o tmp/s3/7/os/x86_64 --update -S --repo Tendermint --content tendermint --content basecoind --content ethermint gpg --batch --passphrase "$(GPG_PASSPHRASE)" --detach-sign -a tmp/s3/7/os/x86_64/repodata/repomd.xml aws s3 sync tmp/s3/ s3://tendermint-packages/$(DEVOPS_PATH)centos/ --delete --acl public-read @echo "*** Uploaded $* to AWS $(DEVOPS_PATH)CentOS repository" @@ -282,17 +278,12 @@ clean: mostlyclean distclean: clean rm -rf $(GOPATH)/src/github.com/tendermint/tendermint - rm -rf $(GOPATH)/src/github.com/tendermint/basecoin + rm -rf $(GOPATH)/src/github.com/cosmos/cosmos-sdk rm -rf $(GOPATH)/src/github.com/tendermint/ethermint - rm -rf $(GOPATH)/src/github.com/tendermint/trackomatron rm -rf $(GOPATH)/bin/tendermint - rm -rf $(GOPATH)/bin/basecoin - rm -rf $(GOPATH)/bin/basecli + rm -rf $(GOPATH)/bin/basecoind rm -rf $(GOPATH)/bin/ethermint rm -rf $(GOPATH)/bin/gaia - rm -rf $(GOPATH)/bin/gaiacli - rm -rf $(GOPATH)/bin/tracko - rm -rf $(GOPATH)/bin/trackocli .PHONY : clean diff --git a/build/basecoin/DEBIAN/changelog b/build/basecoin/DEBIAN/changelog deleted file mode 100644 index e316bcd35..000000000 --- a/build/basecoin/DEBIAN/changelog +++ /dev/null @@ -1,6 +0,0 @@ -basecoin (@VERSION@) @STABILITY@; urgency=medium - - * Automatic build. See https://github.com/tendermint/basecoin for more information. - - -- Greg Szabo @DATETIMESTAMP@ - diff --git a/build/basecoin/DEBIAN/control b/build/basecoin/DEBIAN/control deleted file mode 100644 index c5857eb5d..000000000 --- a/build/basecoin/DEBIAN/control +++ /dev/null @@ -1,15 +0,0 @@ -Source: basecoin -Section: net -Priority: optional -Maintainer: Greg Szabo -Build-Depends: debhelper (>=9) -Depends: tendermint (>=0.11.0) -Standards-Version: 3.9.6 -Homepage: https://tendermint.com -Package: basecoin -Architecture: amd64 -Version: @VERSION@ -Installed-Size: @INSTALLEDSIZE@ -Description: basecoin is a Proof-of-Stake cryptocurrency and framework - Basecoin is an ABCI application designed to be used with the Tendermint consensus engine to form a Proof-of-Stake cryptocurrency. It also provides a general purpose framework for extending the feature-set of the cryptocurrency by implementing plugins. - diff --git a/build/basecoin/DEBIAN/copyright b/build/basecoin/DEBIAN/copyright deleted file mode 100644 index 22340c79a..000000000 --- a/build/basecoin/DEBIAN/copyright +++ /dev/null @@ -1,21 +0,0 @@ -Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: basecoin -Source: https://github.com/tendermint/basecoin - -Files: * -Copyright: 2017 All In Bits, Inc. -License: Apache-2.0 - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - . - http://www.apache.org/licenses/LICENSE-2.0 - . - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - . - On Debian systems, the full text of the Apache License 2.0 can be found - in the file `/usr/share/common-licenses/Apache-2.0'. diff --git a/build/basecoin/etc/systemd/system-preset/50-basecoin.preset b/build/basecoin/etc/systemd/system-preset/50-basecoin.preset deleted file mode 100644 index c97097b13..000000000 --- a/build/basecoin/etc/systemd/system-preset/50-basecoin.preset +++ /dev/null @@ -1,3 +0,0 @@ -disable basecoin.service -disable basecoin-server.service - diff --git a/build/basecoin/etc/systemd/system/basecoin-server.service b/build/basecoin/etc/systemd/system/basecoin-server.service deleted file mode 100644 index 5bf269498..000000000 --- a/build/basecoin/etc/systemd/system/basecoin-server.service +++ /dev/null @@ -1,24 +0,0 @@ -[Unit] -Description=Basecoin server -Requires=network-online.target -BindTo=basecoin.service -PartOf=basecoin.service -Before=basecoin.service -After=network-online.target -PropagatesReloadTo=basecoin.service -ReloadPropagatedFrom=basecoin.service - -[Service] -Environment="TMHOME=/etc/basecoin" -Restart=on-failure -User=basecoin -Group=basecoin -PermissionsStartOnly=true -ExecStart=/usr/bin/tendermint node -ExecReload=/bin/kill -HUP $MAINPID -KillSignal=SIGTERM - -[Install] -WantedBy=multi-user.target -Also=basecoin.service - diff --git a/build/basecoin/etc/systemd/system/basecoin.service b/build/basecoin/etc/systemd/system/basecoin.service deleted file mode 100644 index 3b62e75bd..000000000 --- a/build/basecoin/etc/systemd/system/basecoin.service +++ /dev/null @@ -1,28 +0,0 @@ -[Unit] -Description=Basecoin -#propagates activation, deactivation and activation fails. -Requires=network-online.target -#propagates activation, deactivation, activation fails and stops -BindTo=basecoin-server.service -#propagates stop and restart (one-way) -PartOf=basecoin-server.service -#order -After=network-online.target basecoin-server.service -#propagates reload -PropagatesReloadTo=basecoin-server.service -ReloadPropagatedFrom=basecoin-server.service - -[Service] -Environment="BCHOME=/etc/basecoin" -Restart=on-failure -User=basecoin -Group=basecoin -PermissionsStartOnly=true -ExecStart=/usr/bin/basecoin start --without-tendermint -ExecReload=/bin/kill -HUP $MAINPID -KillSignal=SIGTERM - -[Install] -WantedBy=multi-user.target basecoin-server.service -Also=basecoin-server.service - diff --git a/build/cosmos-sdk/DEBIAN/changelog b/build/basecoind/DEBIAN/changelog similarity index 73% rename from build/cosmos-sdk/DEBIAN/changelog rename to build/basecoind/DEBIAN/changelog index 13eb09125..260718eaf 100644 --- a/build/cosmos-sdk/DEBIAN/changelog +++ b/build/basecoind/DEBIAN/changelog @@ -1,4 +1,4 @@ -cosmos-sdk (@VERSION@) @STABILITY@; urgency=medium +basecoind (@VERSION@) @STABILITY@; urgency=medium * Automatic build. See https://github.com/cosmos/cosmos-sdk for more information. diff --git a/build/basecoin/DEBIAN/compat b/build/basecoind/DEBIAN/compat similarity index 100% rename from build/basecoin/DEBIAN/compat rename to build/basecoind/DEBIAN/compat diff --git a/build/basecoind/DEBIAN/control b/build/basecoind/DEBIAN/control new file mode 100644 index 000000000..c15d49110 --- /dev/null +++ b/build/basecoind/DEBIAN/control @@ -0,0 +1,14 @@ +Source: basecoind +Section: net +Priority: optional +Maintainer: Greg Szabo +Build-Depends: debhelper (>=9) +Standards-Version: 3.9.6 +Homepage: https://tendermint.com +Package: basecoind +Architecture: amd64 +Version: @VERSION@ +Installed-Size: @INSTALLEDSIZE@ +Description: basecoind is a Proof-of-Stake cryptocurrency and framework + Basecoind is an ABCI application designed to be used with the Tendermint consensus engine to form a Proof-of-Stake cryptocurrency. It also provides a general purpose framework for extending the feature-set of the cryptocurrency by implementing plugins. + diff --git a/build/cosmos-sdk/DEBIAN/copyright b/build/basecoind/DEBIAN/copyright similarity index 97% rename from build/cosmos-sdk/DEBIAN/copyright rename to build/basecoind/DEBIAN/copyright index ddb9d0272..fe449650c 100644 --- a/build/cosmos-sdk/DEBIAN/copyright +++ b/build/basecoind/DEBIAN/copyright @@ -1,5 +1,5 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: cosmos-sdk +Upstream-Name: basecoind Source: https://github.com/cosmos/cosmos-sdk Files: * diff --git a/build/basecoin/DEBIAN/postinst b/build/basecoind/DEBIAN/postinst similarity index 59% rename from build/basecoin/DEBIAN/postinst rename to build/basecoind/DEBIAN/postinst index 9a06d6e3f..d7d8f4413 100644 --- a/build/basecoin/DEBIAN/postinst +++ b/build/basecoind/DEBIAN/postinst @@ -1,5 +1,5 @@ #!/bin/sh -# postinst script for basecoin +# postinst script for basecoind # set -e @@ -19,13 +19,8 @@ set -e case "$1" in configure) - chown basecoin.basecoin /etc/basecoin - sudo -Hu basecoin basecoin init --home /etc/basecoin 2B24DEE2364762300168DF19B6C18BCE2D399EA2 - #The above command generates a genesis.json file that contains validators. This is wrong, the validator part should be empty. https://github.com/tendermint/basecoin/issues/124 - sudo -Hu basecoin tendermint init --home /etc/basecoin/tendermint - #The above command might need some kind of additional option in the future. https://github.com/tendermint/tendermint/issues/542 - chmod 755 /etc/basecoin/tendermint - chown basecoin.basecoin /etc/basecoin/tendermint + chown basecoind.basecoind /etc/basecoind + sudo -Hu basecoind basecoind node init --home /etc/basecoind 2B24DEE2364762300168DF19B6C18BCE2D399EA2 systemctl daemon-reload ;; diff --git a/build/basecoin/DEBIAN/postrm b/build/basecoind/DEBIAN/postrm similarity index 100% rename from build/basecoin/DEBIAN/postrm rename to build/basecoind/DEBIAN/postrm diff --git a/build/basecoin/DEBIAN/preinst b/build/basecoind/DEBIAN/preinst similarity index 79% rename from build/basecoin/DEBIAN/preinst rename to build/basecoind/DEBIAN/preinst index 8fc1ec82a..53124c0ce 100644 --- a/build/basecoin/DEBIAN/preinst +++ b/build/basecoind/DEBIAN/preinst @@ -1,5 +1,5 @@ #!/bin/sh -# preinst script for basecoin +# preinst script for basecoind # set -e @@ -15,9 +15,9 @@ set -e case "$1" in install|upgrade) - if ! grep -q '^basecoin:' /etc/passwd ; then - useradd -k /dev/null -r -m -b /etc basecoin - chmod 755 /etc/basecoin + if ! grep -q '^basecoind:' /etc/passwd ; then + useradd -k /dev/null -r -m -b /etc basecoind + chmod 755 /etc/basecoind fi ;; diff --git a/build/basecoin/DEBIAN/prerm b/build/basecoind/DEBIAN/prerm similarity index 89% rename from build/basecoin/DEBIAN/prerm rename to build/basecoind/DEBIAN/prerm index 5cc57e154..18ef42079 100644 --- a/build/basecoin/DEBIAN/prerm +++ b/build/basecoind/DEBIAN/prerm @@ -18,8 +18,7 @@ set -e case "$1" in remove|upgrade|deconfigure) - systemctl stop basecoin 2> /dev/null || : - systemctl stop basecoin-service 2> /dev/null || : + systemctl stop basecoind 2> /dev/null || : ;; failed-upgrade) diff --git a/build/basecoind/etc/systemd/system-preset/50-basecoind.preset b/build/basecoind/etc/systemd/system-preset/50-basecoind.preset new file mode 100644 index 000000000..358334fc3 --- /dev/null +++ b/build/basecoind/etc/systemd/system-preset/50-basecoind.preset @@ -0,0 +1,2 @@ +disable basecoind.service + diff --git a/build/basecoind/etc/systemd/system/basecoind.service b/build/basecoind/etc/systemd/system/basecoind.service new file mode 100644 index 000000000..68b46d84f --- /dev/null +++ b/build/basecoind/etc/systemd/system/basecoind.service @@ -0,0 +1,18 @@ +[Unit] +Description=Basecoind +Requires=network-online.target +After=network-online.target + +[Service] +Environment="BCHOME=/etc/basecoind" +Restart=on-failure +User=basecoind +Group=basecoind +PermissionsStartOnly=true +ExecStart=/usr/bin/basecoind start +ExecReload=/bin/kill -HUP $MAINPID +KillSignal=SIGTERM + +[Install] +WantedBy=multi-user.target + diff --git a/build/basecoin/usr/share/basecoin/key.json b/build/basecoind/usr/share/basecoind/key.json similarity index 100% rename from build/basecoin/usr/share/basecoin/key.json rename to build/basecoind/usr/share/basecoind/key.json diff --git a/build/basecoin/usr/share/basecoin/key2.json b/build/basecoind/usr/share/basecoind/key2.json similarity index 100% rename from build/basecoin/usr/share/basecoin/key2.json rename to build/basecoind/usr/share/basecoind/key2.json diff --git a/build/cosmos-sdk/DEBIAN/compat b/build/cosmos-sdk/DEBIAN/compat deleted file mode 100644 index ec635144f..000000000 --- a/build/cosmos-sdk/DEBIAN/compat +++ /dev/null @@ -1 +0,0 @@ -9 diff --git a/build/cosmos-sdk/DEBIAN/control b/build/cosmos-sdk/DEBIAN/control deleted file mode 100644 index bf4e0229a..000000000 --- a/build/cosmos-sdk/DEBIAN/control +++ /dev/null @@ -1,15 +0,0 @@ -Source: cosmos-sdk -Section: net -Priority: optional -Maintainer: Greg Szabo -Build-Depends: debhelper (>=9) -Depends: tendermint (>=0.11.0) -Standards-Version: 3.9.6 -Homepage: https://tendermint.com -Package: cosmos-sdk -Architecture: amd64 -Version: @VERSION@ -Installed-Size: @INSTALLEDSIZE@ -Description: cosmos-sdk is a Proof-of-Stake framework - Cosmos-SDK is a general purpose framework for the Tendermint consensus engine to form a Proof-of-Stake cryptocurrency. - diff --git a/build/cosmos-sdk/DEBIAN/postinst b/build/cosmos-sdk/DEBIAN/postinst deleted file mode 100644 index 7f179b0eb..000000000 --- a/build/cosmos-sdk/DEBIAN/postinst +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh -# postinst script for cosmos-sdk -# - -set -e - -# summary of how this script can be called: -# * `configure' -# * `abort-upgrade' -# * `abort-remove' `in-favour' -# -# * `abort-remove' -# * `abort-deconfigure' `in-favour' -# `removing' -# -# for details, see https://www.debian.org/doc/debian-policy/ or -# the debian-policy package - - -case "$1" in - configure) - chown cosmos-sdk.cosmos-sdk /etc/cosmos-sdk - sudo -Hu cosmos-sdk basecoin init --home /etc/cosmos-sdk 2B24DEE2364762300168DF19B6C18BCE2D399EA2 - #The above command generates a genesis.json file that contains validators. This is wrong, the validator part should be empty. https://github.com/tendermint/basecoin/issues/124 - sudo -Hu cosmos-sdk tendermint init --home /etc/cosmos-sdk/tendermint - #The above command might need some kind of additional option in the future. https://github.com/tendermint/tendermint/issues/542 - chmod 755 /etc/cosmos-sdk/tendermint - chown cosmos-sdk.cosmos-sdk /etc/cosmos-sdk/tendermint - systemctl daemon-reload - ;; - - abort-upgrade|abort-remove|abort-deconfigure) - ;; - - *) - echo "postinst called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 diff --git a/build/cosmos-sdk/DEBIAN/postrm b/build/cosmos-sdk/DEBIAN/postrm deleted file mode 100644 index e23f777d1..000000000 --- a/build/cosmos-sdk/DEBIAN/postrm +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh -# postrm script for cosmos-sdk -# - -set -e - -# summary of how this script can be called: -# * `remove' -# * `purge' -# * `upgrade' -# * `failed-upgrade' -# * `abort-install' -# * `abort-install' -# * `abort-upgrade' -# * `disappear' -# -# for details, see https://www.debian.org/doc/debian-policy/ or -# the debian-policy package - - -case "$1" in - upgrade|failed-upgrade|abort-upgrade) - systemctl daemon-reload - ;; - - purge|remove|abort-install|disappear) - systemctl daemon-reload - ;; - - *) - echo "postrm called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 diff --git a/build/cosmos-sdk/DEBIAN/preinst b/build/cosmos-sdk/DEBIAN/preinst deleted file mode 100644 index f7108e5d6..000000000 --- a/build/cosmos-sdk/DEBIAN/preinst +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh -# preinst script for cosmos-sdk -# - -set -e - -# summary of how this script can be called: -# * `install' -# * `install' -# * `upgrade' -# * `abort-upgrade' -# for details, see https://www.debian.org/doc/debian-policy/ or -# the debian-policy package - - -case "$1" in - install|upgrade) - if ! grep -q '^cosmos-sdk:' /etc/passwd ; then - useradd -k /dev/null -r -m -b /etc cosmos-sdk - chmod 755 /etc/cosmos-sdk - fi - ;; - - abort-upgrade) - ;; - - *) - echo "preinst called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 diff --git a/build/cosmos-sdk/DEBIAN/prerm b/build/cosmos-sdk/DEBIAN/prerm deleted file mode 100644 index d7a07ab8f..000000000 --- a/build/cosmos-sdk/DEBIAN/prerm +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh -# prerm script for cosmos-sdk -# - -set -e - -# summary of how this script can be called: -# * `remove' -# * `upgrade' -# * `failed-upgrade' -# * `remove' `in-favour' -# * `deconfigure' `in-favour' -# `removing' -# -# for details, see https://www.debian.org/doc/debian-policy/ or -# the debian-policy package - - -case "$1" in - remove|upgrade|deconfigure) - systemctl stop cosmos-sdk 2> /dev/null || : - systemctl stop cosmos-sdk-service 2> /dev/null || : - ;; - - failed-upgrade) - ;; - - *) - echo "prerm called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 diff --git a/build/cosmos-sdk/etc/systemd/system-preset/50-cosmos-sdk.preset b/build/cosmos-sdk/etc/systemd/system-preset/50-cosmos-sdk.preset deleted file mode 100644 index 7f9e2f450..000000000 --- a/build/cosmos-sdk/etc/systemd/system-preset/50-cosmos-sdk.preset +++ /dev/null @@ -1,3 +0,0 @@ -disable cosmos-sdk.service -disable cosmos-sdk-server.service - diff --git a/build/cosmos-sdk/etc/systemd/system/cosmos-sdk-server.service b/build/cosmos-sdk/etc/systemd/system/cosmos-sdk-server.service deleted file mode 100644 index d1d929ba6..000000000 --- a/build/cosmos-sdk/etc/systemd/system/cosmos-sdk-server.service +++ /dev/null @@ -1,23 +0,0 @@ -[Unit] -Description=Cosmos SDK Basecoin Tendermint server -Requires=network-online.target -BindTo=cosmos-sdk.service -PartOf=cosmos-sdk.service -After=network-online.target cosmos-sdk.service -PropagatesReloadTo=cosmos-sdk.service -ReloadPropagatedFrom=cosmos-sdk.service - -[Service] -Environment="TMHOME=/etc/cosmos-sdk" -Restart=on-failure -User=cosmos-sdk -Group=cosmos-sdk -PermissionsStartOnly=true -ExecStart=/usr/bin/tendermint node -ExecReload=/bin/kill -HUP $MAINPID -KillSignal=SIGTERM - -[Install] -WantedBy=multi-user.target -Also=cosmos-sdk.service - diff --git a/build/cosmos-sdk/etc/systemd/system/cosmos-sdk.service b/build/cosmos-sdk/etc/systemd/system/cosmos-sdk.service deleted file mode 100644 index 9d142195e..000000000 --- a/build/cosmos-sdk/etc/systemd/system/cosmos-sdk.service +++ /dev/null @@ -1,29 +0,0 @@ -[Unit] -Description=Cosmos-SDK Basecoin -#propagates activation, deactivation and activation fails. -Requires=network-online.target -#propagates activation, deactivation, activation fails and stops -BindTo=cosmos-sdk-server.service -#propagates stop and restart (one-way) -PartOf=cosmos-sdk-server.service -#order -Before=cosmos-sdk-server.service -After=network-online.target -#propagates reload -PropagatesReloadTo=cosmos-sdk-server.service -ReloadPropagatedFrom=cosmos-sdk-server.service - -[Service] -Environment="BCHOME=/etc/cosmos-sdk" -Restart=on-failure -User=cosmos-sdk -Group=cosmos-sdk -PermissionsStartOnly=true -ExecStart=/usr/bin/basecoin start --without-tendermint -ExecReload=/bin/kill -HUP $MAINPID -KillSignal=SIGTERM - -[Install] -WantedBy=multi-user.target cosmos-sdk-server.service -Also=cosmos-sdk-server.service - diff --git a/build/cosmos-sdk/usr/share/cosmos-sdk/key.json b/build/cosmos-sdk/usr/share/cosmos-sdk/key.json deleted file mode 100644 index bdefe8fd4..000000000 --- a/build/cosmos-sdk/usr/share/cosmos-sdk/key.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "address": "1B1BE55F969F54064628A63B9559E7C21C925165", - "priv_key": { - "type": "ed25519", - "data": "C70D6934B4F55F1B7BC33B56B9CA8A2061384AFC19E91E44B40C4BBA182953D1619D3678599971ED29C7529DDD4DA537B97129893598A17C82E3AC9A8BA95279" - }, - "pub_key": { - "type": "ed25519", - "data": "619D3678599971ED29C7529DDD4DA537B97129893598A17C82E3AC9A8BA95279" - } -} - diff --git a/build/cosmos-sdk/usr/share/cosmos-sdk/key2.json b/build/cosmos-sdk/usr/share/cosmos-sdk/key2.json deleted file mode 100644 index ddfc6809b..000000000 --- a/build/cosmos-sdk/usr/share/cosmos-sdk/key2.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "address": "1DA7C74F9C219229FD54CC9F7386D5A3839F0090", - "priv_key": { - "type": "ed25519", - "data": "34BAE9E65CE8245FAD035A0E3EED9401BDE8785FFB3199ACCF8F5B5DDF7486A8352195DA90CB0B90C24295B90AEBA25A5A71BC61BAB2FE2387241D439698B7B8" - }, - "pub_key": { - "type": "ed25519", - "data": "352195DA90CB0B90C24295B90AEBA25A5A71BC61BAB2FE2387241D439698B7B8" - } -} - diff --git a/build/ethermint/DEBIAN/postinst b/build/ethermint/DEBIAN/postinst index 90739f818..439fdc395 100644 --- a/build/ethermint/DEBIAN/postinst +++ b/build/ethermint/DEBIAN/postinst @@ -1,5 +1,5 @@ #!/bin/sh -# postinst script for basecoin +# postinst script for ethermint # set -e @@ -25,11 +25,7 @@ case "$1" in chown ethermint.ethermint /etc/ethermint/keystore/UTC--2016-10-21T22-30-03.071787745Z--7eff122b94897ea5b0e2a9abf47b86337fafebdc sudo -Hu ethermint /usr/bin/ethermint --datadir /etc/ethermint init /etc/ethermint/genesis.json - sudo -Hu ethermint tendermint init --home /etc/ethermint/tendermint - - chown ethermint.ethermint /etc/ethermint/tendermint - chmod 755 /etc/ethermint/tendermint - + sudo -Hu ethermint tendermint init --home /etc/ethermint systemctl daemon-reload ;; diff --git a/build/ethermint/DEBIAN/prerm b/build/ethermint/DEBIAN/prerm index 5af626fdf..00a775cef 100644 --- a/build/ethermint/DEBIAN/prerm +++ b/build/ethermint/DEBIAN/prerm @@ -19,7 +19,6 @@ set -e case "$1" in remove|upgrade|deconfigure) systemctl stop ethermint 2> /dev/null || : - systemctl stop ethermint-service 2> /dev/null || : ;; failed-upgrade) diff --git a/build/ethermint/etc/systemd/system-preset/50-ethermint.preset b/build/ethermint/etc/systemd/system-preset/50-ethermint.preset index f181a0bcc..836a28c30 100644 --- a/build/ethermint/etc/systemd/system-preset/50-ethermint.preset +++ b/build/ethermint/etc/systemd/system-preset/50-ethermint.preset @@ -1,3 +1,2 @@ disable ethermint.service -disable ethermint-server.service diff --git a/build/ethermint/etc/systemd/system/ethermint-server.service b/build/ethermint/etc/systemd/system/ethermint-server.service deleted file mode 100644 index 4cbd8adcf..000000000 --- a/build/ethermint/etc/systemd/system/ethermint-server.service +++ /dev/null @@ -1,24 +0,0 @@ -[Unit] -Description=Ethermint server -Requires=network-online.target -BindTo=ethermint.service -PartOf=ethermint.service -Before=ethermint.service -After=network-online.target -PropagatesReloadTo=ethermint.service -ReloadPropagatedFrom=ethermint.service - -[Service] -Environment="TMHOME=/etc/ethermint" -Restart=on-failure -User=ethermint -Group=ethermint -PermissionsStartOnly=true -ExecStart=/usr/bin/tendermint node -ExecReload=/bin/kill -HUP $MAINPID -KillSignal=SIGTERM - -[Install] -WantedBy=multi-user.target ethermint.service -Also=ethermint.service - diff --git a/build/ethermint/etc/systemd/system/ethermint.service b/build/ethermint/etc/systemd/system/ethermint.service index ad03103ab..f71a074ea 100644 --- a/build/ethermint/etc/systemd/system/ethermint.service +++ b/build/ethermint/etc/systemd/system/ethermint.service @@ -1,16 +1,7 @@ [Unit] Description=Ethermint -#propagates activation, deactivation and activation fails. Requires=network-online.target -#propagates activation, deactivation, activation fails and stops -BindTo=ethermint-server.service -#propagates stop and restart (one-way) -PartOf=ethermint-server.service -#order -After=network-online.target ethermint-server.service -#propagates reload -PropagatesReloadTo=ethermint-server.service -ReloadPropagatedFrom=ethermint-server.service +After=network-online.target [Service] Restart=on-failure @@ -22,6 +13,5 @@ ExecReload=/bin/kill -HUP $MAINPID KillSignal=SIGTERM [Install] -WantedBy=multi-user.target ethermint-server.service -Also=ethermint-server.service +WantedBy=multi-user.target diff --git a/build/gaia/DEBIAN/control b/build/gaia/DEBIAN/control index 521a7cdba..55d1cd5dd 100644 --- a/build/gaia/DEBIAN/control +++ b/build/gaia/DEBIAN/control @@ -3,7 +3,6 @@ Section: net Priority: optional Maintainer: Greg Szabo Build-Depends: debhelper (>=9) -Depends: tendermint (>=0.11.0) Standards-Version: 3.9.6 Homepage: https://cosmos.network Package: gaia diff --git a/build/gaia/DEBIAN/postinst b/build/gaia/DEBIAN/postinst index e1b606cb8..427b7c493 100644 --- a/build/gaia/DEBIAN/postinst +++ b/build/gaia/DEBIAN/postinst @@ -20,14 +20,7 @@ set -e case "$1" in configure) chown gaia.gaia /etc/gaia - sudo -Hu gaia gaia init --home /etc/gaia 2B24DEE2364762300168DF19B6C18BCE2D399EA2 - #The above command generates a genesis.json file that contains validators. This is wrong, the validator part should be empty. https://github.com/tendermint/basecoin/issues/124 - sudo -Hu gaia tendermint init --home /etc/gaia/tendermint - #The above command might need some kind of additional option in the future. https://github.com/tendermint/tendermint/issues/542 - - chmod 755 /etc/gaia/tendermint - chown gaia.gaia /etc/gaia/tendermint - + sudo -Hu gaia gaia node init --home /etc/gaia 2B24DEE2364762300168DF19B6C18BCE2D399EA2 systemctl daemon-reload ;; diff --git a/build/gaia/DEBIAN/prerm b/build/gaia/DEBIAN/prerm index 8a0522a41..165c1ab6a 100644 --- a/build/gaia/DEBIAN/prerm +++ b/build/gaia/DEBIAN/prerm @@ -19,7 +19,6 @@ set -e case "$1" in remove|upgrade|deconfigure) systemctl stop gaia 2> /dev/null || : - systemctl stop gaia-service 2> /dev/null || : ;; failed-upgrade) diff --git a/build/gaia/etc/systemd/system-preset/50-gaia.preset b/build/gaia/etc/systemd/system-preset/50-gaia.preset index a9fe09116..dfbf0bc06 100644 --- a/build/gaia/etc/systemd/system-preset/50-gaia.preset +++ b/build/gaia/etc/systemd/system-preset/50-gaia.preset @@ -1,3 +1,2 @@ disable gaia.service -disable gaia-server.service diff --git a/build/gaia/etc/systemd/system/gaia-server.service b/build/gaia/etc/systemd/system/gaia-server.service deleted file mode 100644 index ef0f65cab..000000000 --- a/build/gaia/etc/systemd/system/gaia-server.service +++ /dev/null @@ -1,24 +0,0 @@ -[Unit] -Description=Gaia server -Requires=network-online.target -BindTo=gaia.service -PartOf=gaia.service -Before=gaia.service -After=network-online.target -PropagatesReloadTo=gaia.service -ReloadPropagatedFrom=gaia.service - -[Service] -Environment="TMHOME=/etc/gaia" -Restart=on-failure -User=gaia -Group=gaia -PermissionsStartOnly=true -ExecStart=/usr/bin/tendermint node -ExecReload=/bin/kill -HUP $MAINPID -KillSignal=SIGTERM - -[Install] -WantedBy=multi-user.target -Also=gaia.service - diff --git a/build/gaia/etc/systemd/system/gaia.service b/build/gaia/etc/systemd/system/gaia.service index 2a8b3195e..372fe9343 100644 --- a/build/gaia/etc/systemd/system/gaia.service +++ b/build/gaia/etc/systemd/system/gaia.service @@ -1,27 +1,17 @@ [Unit] Description=Gaia -#propagates activation, deactivation and activation fails. Requires=network-online.target -#propagates activation, deactivation, activation fails and stops -BindTo=gaia-server.service -#propagates stop and restart (one-way) -PartOf=gaia-server.service -#order -After=network-online.target gaia-server.service -#propagates reload -PropagatesReloadTo=gaia-server.service -ReloadPropagatedFrom=gaia-server.service +After=network-online.target [Service] Restart=on-failure User=gaia Group=gaia PermissionsStartOnly=true -ExecStart=/usr/bin/gaia start --without-tendermint --home=/etc/gaia +ExecStart=/usr/bin/gaia node start --home=/etc/gaia ExecReload=/bin/kill -HUP $MAINPID KillSignal=SIGTERM [Install] -WantedBy=multi-user.target gaia-server.service -Also=gaia-server.service +WantedBy=multi-user.target diff --git a/build/spectemplates/app-template.spec b/build/spectemplates/app-template.spec index ad937d029..6cb8145bb 100644 --- a/build/spectemplates/app-template.spec +++ b/build/spectemplates/app-template.spec @@ -10,7 +10,6 @@ Summary: @PACKAGE_SUMMARY@ License: Apache 2.0 URL: @PACKAGE_URL@ Packager: Greg Szabo -Requires: tendermint >= 0.11.0 @PACKAGE_ADDITIONAL_HEADER@ %description @@ -35,18 +34,11 @@ cd %{name}-%{version}-%{release} %{__cp} -a * %{buildroot} %post -sudo -Hu %{name} tendermint init --home %{_sysconfdir}/%{name} -sudo -Hu %{name} %{name} init --home %{_sysconfdir}/%{name} 2B24DEE2364762300168DF19B6C18BCE2D399EA2 - -#Temporary until https://github.com/tendermint/basecoin/issues/123 -rm -f %{_sysconfdir}/%{name}/key.json -rm -f %{_sysconfdir}/%{name}/key2.json - +sudo -Hu %{name} %{name} node init --home %{_sysconfdir}/%{name} 2B24DEE2364762300168DF19B6C18BCE2D399EA2 systemctl daemon-reload %preun systemctl stop %{name} 2> /dev/null || : -systemctl stop %{name}-service 2> /dev/null || : %postun systemctl daemon-reload diff --git a/build/spectemplates/basecoin.data b/build/spectemplates/basecoin.data deleted file mode 100644 index b74d64309..000000000 --- a/build/spectemplates/basecoin.data +++ /dev/null @@ -1,5 +0,0 @@ -PACKAGE_SUMMARY="basecoin is a Proof-of-Stake cryptocurrency and framework" -PACKAGE_URL="https://cosmos.network/" -PACKAGE_ADDITIONAL_HEADER="Provides: basecli" -PACKAGE_DESCRIPTION="Basecoin is an ABCI application designed to be used with the Tendermint consensus engine to form a Proof-of-Stake cryptocurrency. It also provides a general purpose framework for extending the feature-set of the cryptocurrency by implementing plugins." - diff --git a/build/spectemplates/basecoind.data b/build/spectemplates/basecoind.data new file mode 100644 index 000000000..36b172ecf --- /dev/null +++ b/build/spectemplates/basecoind.data @@ -0,0 +1,5 @@ +PACKAGE_SUMMARY="basecoind is a Proof-of-Stake cryptocurrency and framework" +PACKAGE_URL="https://cosmos.network/" +PACKAGE_ADDITIONAL_HEADER="Provides: basecoind" +PACKAGE_DESCRIPTION="Basecoind is an ABCI application designed to be used with the Tendermint consensus engine to form a Proof-of-Stake cryptocurrency. It also provides a general purpose framework for extending the feature-set of the cryptocurrency by implementing plugins." + diff --git a/build/spectemplates/cosmos-sdk.data b/build/spectemplates/cosmos-sdk.data deleted file mode 100644 index 5b00998a0..000000000 --- a/build/spectemplates/cosmos-sdk.data +++ /dev/null @@ -1,5 +0,0 @@ -PACKAGE_SUMMARY="cosmos-sdk is a Proof-of-Stake framework" -PACKAGE_URL="https://cosmos.network/" -PACKAGE_ADDITIONAL_HEADER="Provides: basecoin basecli" -PACKAGE_DESCRIPTION="Cosmos-SDK is a general purpose framework for the Tendermint consensus engine to form a Proof-of-Stake cryptocurrency." - diff --git a/build/spectemplates/ethermint.data b/build/spectemplates/ethermint.data index b736c0bb8..e9d403db7 100644 --- a/build/spectemplates/ethermint.data +++ b/build/spectemplates/ethermint.data @@ -1,5 +1,5 @@ PACKAGE_SUMMARY="ethermint enables ethereum as an ABCI application on tendermint and the COSMOS hub" PACKAGE_URL="https://tendermint.com/" -PACKAGE_ADDITIONAL_HEADER="Provides: basecli" +PACKAGE_ADDITIONAL_HEADER="Provides: ethermint" PACKAGE_DESCRIPTION="Ethermint enables ethereum to run as an ABCI application on tendermint and the COSMOS hub. This application allows you to get all the benefits of ethereum without having to run your own miners." diff --git a/build/spectemplates/gaia.data b/build/spectemplates/gaia.data index dad756e47..7152b1b51 100644 --- a/build/spectemplates/gaia.data +++ b/build/spectemplates/gaia.data @@ -1,5 +1,5 @@ PACKAGE_SUMMARY="gaia - Tendermint Cosmos delegation game chain" PACKAGE_URL="https://cosmos.network/" -PACKAGE_ADDITIONAL_HEADER="Provides: gaiacli" +PACKAGE_ADDITIONAL_HEADER="" PACKAGE_DESCRIPTION="Gaia description comes later." diff --git a/build/spectemplates/trackomatron.data b/build/spectemplates/trackomatron.data deleted file mode 100644 index daaad64b3..000000000 --- a/build/spectemplates/trackomatron.data +++ /dev/null @@ -1,5 +0,0 @@ -PACKAGE_SUMMARY="Trackomatron - Track invoices on the blockchain" -PACKAGE_URL="https://tendermint.com/" -PACKAGE_ADDITIONAL_HEADER="" -PACKAGE_DESCRIPTION="This software is intended to create a space to easily send invoices between and within institutions. Firstly, the commands of trackmatron are separated into two broad categories: submitting information to the blockchain (transactions), and retrieving information from the blockchain (query)." - diff --git a/build/spectemplates/trackomatron.spec b/build/spectemplates/trackomatron.spec deleted file mode 100644 index 1c952411e..000000000 --- a/build/spectemplates/trackomatron.spec +++ /dev/null @@ -1,63 +0,0 @@ -Version: @VERSION@ -Release: @BUILD_NUMBER@ - -%define __spec_install_post %{nil} -%define debug_package %{nil} -%define __os_install_post %{nil} - -Name: @PACKAGE_NAME@ -Summary: @PACKAGE_SUMMARY@ -License: Apache 2.0 -URL: @PACKAGE_URL@ -Packager: Greg Szabo -Requires: tendermint >= 0.11.0 -@PACKAGE_ADDITIONAL_HEADER@ - -%description -@PACKAGE_DESCRIPTION@ - -%pre -if ! %{__grep} -q '^%{name}:' /etc/passwd ; then - useradd -r -b %{_sysconfdir} %{name} - mkdir -p %{_sysconfdir}/%{name} - chmod 755 %{_sysconfdir}/%{name} - chown %{name}.%{name} %{_sysconfdir}/%{name} -fi - -%prep -# Nothing to do here. - It is done in the Makefile. - -%build -# Nothing to do here. - -%install -cd %{name}-%{version}-%{release} -%{__cp} -a * %{buildroot} - -%post -sudo -Hu %{name} tendermint init --home %{_sysconfdir}/%{name} -sudo -Hu %{name} tracko init --home %{_sysconfdir}/%{name} 2B24DEE2364762300168DF19B6C18BCE2D399EA2 - -#Temporary until https://github.com/tendermint/basecoin/issues/123 -rm -f %{_sysconfdir}/%{name}/key.json -rm -f %{_sysconfdir}/%{name}/key2.json - -systemctl daemon-reload - -%preun -systemctl stop %{name} 2> /dev/null || : -systemctl stop %{name}-service 2> /dev/null || : - -%postun -systemctl daemon-reload - -%files -%ghost %attr(0755, %{name}, %{name}) %dir %{_sysconfdir}/%{name} -%{_bindir}/* -%{_sysconfdir}/systemd/system/* -%{_sysconfdir}/systemd/system-preset/* -%dir %{_datadir}/%{name} -%{_datadir}/%{name}/* -%dir %{_defaultlicensedir}/%{name} -%doc %{_defaultlicensedir}/%{name}/LICENSE - diff --git a/build/trackomatron/DEBIAN/changelog b/build/trackomatron/DEBIAN/changelog deleted file mode 100644 index aab92cc02..000000000 --- a/build/trackomatron/DEBIAN/changelog +++ /dev/null @@ -1,6 +0,0 @@ -trackomatron (@VERSION@) @STABILITY@; urgency=medium - - * Automatic build. See https://github.com/tendermint/trackomatron for more information. - - -- Greg Szabo @DATETIMESTAMP@ - diff --git a/build/trackomatron/DEBIAN/compat b/build/trackomatron/DEBIAN/compat deleted file mode 100644 index ec635144f..000000000 --- a/build/trackomatron/DEBIAN/compat +++ /dev/null @@ -1 +0,0 @@ -9 diff --git a/build/trackomatron/DEBIAN/control b/build/trackomatron/DEBIAN/control deleted file mode 100644 index a71d02ace..000000000 --- a/build/trackomatron/DEBIAN/control +++ /dev/null @@ -1,15 +0,0 @@ -Source: trackomatron -Section: net -Priority: optional -Maintainer: Greg Szabo -Build-Depends: debhelper (>=9) -Depends: tendermint (>=0.11.0) -Standards-Version: 3.9.6 -Homepage: https://tendermint.com -Package: trackomatron -Architecture: amd64 -Version: @VERSION@ -Installed-Size: @INSTALLEDSIZE@ -Description: Trackomatron - Track invoices on the blockchain - This software is intended to create a space to easily send invoices between and within institutions. Firstly, the commands of trackmatron are separated into two broad categories: submitting information to the blockchain (transactions), and retrieving information from the blockchain (query). - diff --git a/build/trackomatron/DEBIAN/copyright b/build/trackomatron/DEBIAN/copyright deleted file mode 100644 index 32a1921d5..000000000 --- a/build/trackomatron/DEBIAN/copyright +++ /dev/null @@ -1,21 +0,0 @@ -Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: trackomatron -Source: https://github.com/tendermint/trackomatron - -Files: * -Copyright: 2017 All In Bits, Inc. -License: Apache-2.0 - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - . - http://www.apache.org/licenses/LICENSE-2.0 - . - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - . - On Debian systems, the full text of the Apache License 2.0 can be found - in the file `/usr/share/common-licenses/Apache-2.0'. diff --git a/build/trackomatron/DEBIAN/postinst b/build/trackomatron/DEBIAN/postinst deleted file mode 100644 index 9aac7fc78..000000000 --- a/build/trackomatron/DEBIAN/postinst +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh -# postinst script for trackomatron -# - -set -e - -# summary of how this script can be called: -# * `configure' -# * `abort-upgrade' -# * `abort-remove' `in-favour' -# -# * `abort-remove' -# * `abort-deconfigure' `in-favour' -# `removing' -# -# for details, see https://www.debian.org/doc/debian-policy/ or -# the debian-policy package - - -case "$1" in - configure) - chown trackomatron.trackomatron /etc/trackomatron - sudo -Hu trackomatron tracko init --home /etc/trackomatron 2B24DEE2364762300168DF19B6C18BCE2D399EA2 - #The above command generates a genesis.json file that contains validators. This is wrong, the validator part should be empty. https://github.com/tendermint/basecoin/issues/124 - sudo -Hu trackomatron tendermint init --home /etc/trackomatron/tendermint - #The above command might need some kind of additional option in the future. https://github.com/tendermint/tendermint/issues/542 - - chown trackomatron.trackomatron /etc/trackomatron/tendermint - chmod 755 /etc/trackomatron/tendermint - - systemctl daemon-reload - ;; - - abort-upgrade|abort-remove|abort-deconfigure) - ;; - - *) - echo "postinst called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 diff --git a/build/trackomatron/DEBIAN/postrm b/build/trackomatron/DEBIAN/postrm deleted file mode 100644 index 445d4fbd8..000000000 --- a/build/trackomatron/DEBIAN/postrm +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh -# postrm script for trackomatron -# - -set -e - -# summary of how this script can be called: -# * `remove' -# * `purge' -# * `upgrade' -# * `failed-upgrade' -# * `abort-install' -# * `abort-install' -# * `abort-upgrade' -# * `disappear' -# -# for details, see https://www.debian.org/doc/debian-policy/ or -# the debian-policy package - - -case "$1" in - upgrade|failed-upgrade|abort-upgrade) - systemctl daemon-reload - ;; - - purge|remove|abort-install|disappear) - systemctl daemon-reload - ;; - - *) - echo "postrm called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 diff --git a/build/trackomatron/DEBIAN/preinst b/build/trackomatron/DEBIAN/preinst deleted file mode 100644 index ac866587a..000000000 --- a/build/trackomatron/DEBIAN/preinst +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh -# preinst script for trackomatron -# - -set -e - -# summary of how this script can be called: -# * `install' -# * `install' -# * `upgrade' -# * `abort-upgrade' -# for details, see https://www.debian.org/doc/debian-policy/ or -# the debian-policy package - - -case "$1" in - install|upgrade) - if ! grep -q '^trackomatron:' /etc/passwd ; then - useradd -k /dev/null -r -m -b /etc trackomatron - chmod 755 /etc/trackomatron - fi - ;; - - abort-upgrade) - ;; - - *) - echo "preinst called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 diff --git a/build/trackomatron/DEBIAN/prerm b/build/trackomatron/DEBIAN/prerm deleted file mode 100644 index e18afec04..000000000 --- a/build/trackomatron/DEBIAN/prerm +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh -# prerm script for trackomatron -# - -set -e - -# summary of how this script can be called: -# * `remove' -# * `upgrade' -# * `failed-upgrade' -# * `remove' `in-favour' -# * `deconfigure' `in-favour' -# `removing' -# -# for details, see https://www.debian.org/doc/debian-policy/ or -# the debian-policy package - - -case "$1" in - remove|upgrade|deconfigure) - systemctl stop trackomatron 2> /dev/null || : - systemctl stop trackomatron-service 2> /dev/null || : - ;; - - failed-upgrade) - ;; - - *) - echo "prerm called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 diff --git a/build/trackomatron/etc/systemd/system-preset/50-trackomatron.preset b/build/trackomatron/etc/systemd/system-preset/50-trackomatron.preset deleted file mode 100644 index 7ddca4019..000000000 --- a/build/trackomatron/etc/systemd/system-preset/50-trackomatron.preset +++ /dev/null @@ -1,3 +0,0 @@ -disable trackomatron.service -disable trackomatron-server.service - diff --git a/build/trackomatron/etc/systemd/system/trackomatron-server.service b/build/trackomatron/etc/systemd/system/trackomatron-server.service deleted file mode 100644 index cb7ef8768..000000000 --- a/build/trackomatron/etc/systemd/system/trackomatron-server.service +++ /dev/null @@ -1,24 +0,0 @@ -[Unit] -Description=Trackomatron server -Requires=network-online.target -BindTo=trackomatron.service -PartOf=trackomatron.service -Before=trackomatron.service -After=network-online.target -PropagatesReloadTo=trackomatron.service -ReloadPropagatedFrom=trackomatron.service - -[Service] -Environment="TMHOME=/etc/trackomatron" -Restart=on-failure -User=trackomatron -Group=trackomatron -PermissionsStartOnly=true -ExecStart=/usr/bin/tendermint node -ExecReload=/bin/kill -HUP $MAINPID -KillSignal=SIGTERM - -[Install] -WantedBy=multi-user.target -Also=trackomatron.service - diff --git a/build/trackomatron/etc/systemd/system/trackomatron.service b/build/trackomatron/etc/systemd/system/trackomatron.service deleted file mode 100644 index 2ebcae4a9..000000000 --- a/build/trackomatron/etc/systemd/system/trackomatron.service +++ /dev/null @@ -1,27 +0,0 @@ -[Unit] -Description=Trackomatron -#propagates activation, deactivation and activation fails. -Requires=network-online.target -#propagates activation, deactivation, activation fails and stops -BindTo=trackomatron-server.service -#propagates stop and restart (one-way) -PartOf=trackomatron-server.service -#order -After=network-online.target trackomatron-server.service -#propagates reload -PropagatesReloadTo=trackomatron-server.service -ReloadPropagatedFrom=trackomatron-server.service - -[Service] -Restart=on-failure -User=trackomatron -Group=trackomatron -PermissionsStartOnly=true -ExecStart=/usr/bin/tracko start --without-tendermint --home /etc/trackomatron -ExecReload=/bin/kill -HUP $MAINPID -KillSignal=SIGTERM - -[Install] -WantedBy=multi-user.target trackomatron-server.service -Also=trackomatron-server.service - diff --git a/build/trackomatron/usr/share/trackomatron/key.json b/build/trackomatron/usr/share/trackomatron/key.json deleted file mode 100644 index bdefe8fd4..000000000 --- a/build/trackomatron/usr/share/trackomatron/key.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "address": "1B1BE55F969F54064628A63B9559E7C21C925165", - "priv_key": { - "type": "ed25519", - "data": "C70D6934B4F55F1B7BC33B56B9CA8A2061384AFC19E91E44B40C4BBA182953D1619D3678599971ED29C7529DDD4DA537B97129893598A17C82E3AC9A8BA95279" - }, - "pub_key": { - "type": "ed25519", - "data": "619D3678599971ED29C7529DDD4DA537B97129893598A17C82E3AC9A8BA95279" - } -} - diff --git a/build/trackomatron/usr/share/trackomatron/key2.json b/build/trackomatron/usr/share/trackomatron/key2.json deleted file mode 100644 index ddfc6809b..000000000 --- a/build/trackomatron/usr/share/trackomatron/key2.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "address": "1DA7C74F9C219229FD54CC9F7386D5A3839F0090", - "priv_key": { - "type": "ed25519", - "data": "34BAE9E65CE8245FAD035A0E3EED9401BDE8785FFB3199ACCF8F5B5DDF7486A8352195DA90CB0B90C24295B90AEBA25A5A71BC61BAB2FE2387241D439698B7B8" - }, - "pub_key": { - "type": "ed25519", - "data": "352195DA90CB0B90C24295B90AEBA25A5A71BC61BAB2FE2387241D439698B7B8" - } -} - diff --git a/docker/tendermint-automated/Dockerfile b/docker/tendermint-automated/Dockerfile new file mode 100644 index 000000000..73497c5a0 --- /dev/null +++ b/docker/tendermint-automated/Dockerfile @@ -0,0 +1,21 @@ +FROM ubuntu:16.04 +MAINTAINER Greg Szabo + +#Default home for tendermint. The node command will look for $TMHOME/config/genesis.json at initialization. +ENV TMHOME /tendermint +RUN apt-get -y update && \ + apt-get -y upgrade && \ + apt-get -y install curl jq && \ + adduser --system --home "$TMHOME" --group tmuser + +USER tmuser +VOLUME [ $TMHOME ] +WORKDIR $TMHOME +EXPOSE 46656 46657 +ENTRYPOINT ["/usr/bin/tendermint"] +CMD ["node", "--moniker=`hostname`"] +STOPSIGNAL SIGTERM + +ARG BINARY=tendermint +COPY $BINARY /usr/bin/tendermint + diff --git a/docker/tendermint-automated/README.rst b/docker/tendermint-automated/README.rst new file mode 100644 index 000000000..f5582ce80 --- /dev/null +++ b/docker/tendermint-automated/README.rst @@ -0,0 +1 @@ +This is a temporary folder to contain the Dockerfile used for automated builds, until it is merged with the tendermint repository.