diff --git a/.dockerignore b/.dockerignore index b193b395..b178a73b 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,7 +1,8 @@ vendor/ Dockerfile -deployment/ *.sublime-project *.sublime-workspace .kvd/ .kvcli/ +scratch/ +testnets/ diff --git a/README.md b/README.md index bd1a7c38..8a840c9c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,97 @@ # Kava Blockchain -## Installation +A decentralized fast-finality blockchain for interoperable payment channel networks. +Building on the work of Tendermint and Interledger. - go install ./cmd/kvd - go install ./cmd/kvcli +Project status: We're currently in a very early public testnet. With future features being implemented. + +Try it out - send txs using our public node, or run a full node to sync to the testnet, or even run a validator. + + +# Try It Out + +## Install + +### Source + +Requirements: go installed and set up. + + mkdir -p $GOPATH/src/github.com/kava-labs + cd $GOPATH/src/github.com/kava-labs + git clone https://github.com/kava-labs/kava + cd kava + go install ./cmd/kvd + go install ./cmd/kvcli + + + +### Docker + +TODO + + + + + +## Run a Full Node + + kvd init --name --chain-id kava-test-0 + +This will generate config and keys in `$HOME/.kvd` and `$HOME/.kvcli`. +The default password is 'password'. + +Copy the testnet genesis file (from https://raw.githubusercontent.com/Kava-Labs/kava/master/testnets/kava-test-0/genesis.json) into `$HOME/.kvd/config/`, replacing the existing one. + +Add the kava node address (`4db23d731b4255c9624b283d0ca4e5b219e6cf67@validator.connector.kava.io:26656`) to `seeds` in `$HOME/.kvd/config/config.toml` + +Start your full node + + kvd start + + +## Run a Validator +Join the chat first. Follow setup for a full node above. + +Get you address with `kvcli keys list`. Should look like `cosmosaccaddr10jpp289accvkhsvrpz4tlj9zhqdaey2tl9m4rg`. +Ask @rhuairahrighairidh in the chat to give you some coins. + +Get your validator pubkey with `kvd tendermint show_validator` + + kvcli stake create-validator \ + --amount 100000KVA \ + --pubkey \ + --address-validator \ + --moniker "" \ + --chain-id kava-test-0 \ + --from + +Now you should be participating in consensus and validating blocks! + + +Running a validator requires that you keep validating blocks. If you stop then your stake will be slashed. +In order to stop validating, first remove yourself as validator, then you can stop your node. + + kvcli stake unbond begin \ + --address-delegator \ + --address-validator \ + --chain-id kava-test-0 \ + --shares-percent 1 \ + --from \ No newline at end of file diff --git a/testnets/kava-test-0/genesis.json b/testnets/kava-test-0/genesis.json new file mode 100644 index 00000000..e35c55a2 --- /dev/null +++ b/testnets/kava-test-0/genesis.json @@ -0,0 +1,99 @@ +{ + "genesis_time": "2018-08-16T20:19:19.700191483Z", + "chain_id": "kava-test-0", + "consensus_params": { + "block_size_params": { + "max_bytes": "22020096", + "max_txs": "10000", + "max_gas": "-1" + }, + "tx_size_params": { + "max_bytes": "10240", + "max_gas": "-1" + }, + "block_gossip_params": { + "block_part_size_bytes": "65536" + }, + "evidence_params": { + "max_age": "100000" + } + }, + "validators": [ + { + "pub_key": { + "type": "tendermint/PubKeyEd25519", + "value": "dnl/bkhWxCMuq5ia4AWwU4r2HRl+MJjU4bSS0qsmI/0=" + }, + "power": "500000", + "name": "" + } + ], + "app_hash": "", + "app_state": { + "accounts": [ + { + "address": "cosmosaccaddr10fa3g29glhkekp6nhsqq4njwrpv69kl9zt4a7q", + "coins": [ + { + "denom": "KVA", + "amount": "500000" + } + ] + } + ], + "stake": { + "pool": { + "loose_tokens": "1000000", + "bonded_tokens": "0", + "inflation_last_time": "0", + "inflation": "7/100", + "date_last_commission_reset": "0", + "prev_bonded_shares": "0" + }, + "params": { + "inflation_rate_change": "13/100", + "inflation_max": "1/5", + "inflation_min": "7/100", + "goal_bonded": "67/100", + "unbonding_time": "259200", + "max_validators": 100, + "bond_denom": "KVA" + }, + "validators": [ + { + "owner": "cosmosaccaddr10fa3g29glhkekp6nhsqq4njwrpv69kl9zt4a7q", + "pub_key": { + "type": "tendermint/PubKeyEd25519", + "value": "dnl/bkhWxCMuq5ia4AWwU4r2HRl+MJjU4bSS0qsmI/0=" + }, + "revoked": false, + "status": 0, + "tokens": "500000", + "delegator_shares": "500000", + "description": { + "moniker": "kava-validator", + "identity": "", + "website": "", + "details": "" + }, + "bond_height": "0", + "bond_intra_tx_counter": 0, + "proposer_reward_pool": [], + "commission": "0", + "commission_max": "0", + "commission_change_rate": "0", + "commission_change_today": "0", + "prev_bonded_tokens": "0" + } + ], + "bonds": [ + { + "delegator_addr": "cosmosaccaddr10fa3g29glhkekp6nhsqq4njwrpv69kl9zt4a7q", + "validator_addr": "cosmosaccaddr10fa3g29glhkekp6nhsqq4njwrpv69kl9zt4a7q", + "shares": "500000", + "height": "0" + } + ] + } + } +} \ No newline at end of file