Skip to content
This repository was archived by the owner on Nov 30, 2021. It is now read-only.

Conversation

@austinabell
Copy link

Current workflow to set up the chain using the daemon (and cli):

$  emintd init test --chain-id ethermint
{
  "moniker": "test",
  "chain_id": "ethermint",
  "node_id": "7df2f2687ad8690792076f366828d0bc8833b98e",
  "gentxs_dir": "",
  "app_message": {
    "ethermint": {
      "accounts": []
    },
    "staking": {
      "params": {
        "unbonding_time": "259200000000000",
        "max_validators": 100,
        "max_entries": 7,
        "bond_denom": "stake"
      },
      "last_total_power": "0",
      "last_validator_powers": null,
      "validators": null,
      "delegations": null,
      "unbonding_delegations": null,
      "redelegations": null,
      "exported": false
    },
    "slashing": {
      "params": {
        "max_evidence_age": "120000000000",
        "signed_blocks_window": "100",
        "min_signed_per_window": "0.500000000000000000",
        "downtime_jail_duration": "600000000000",
        "slash_fraction_double_sign": "0.050000000000000000",
        "slash_fraction_downtime": "0.010000000000000000"
      },
      "signing_infos": {},
      "missed_blocks": {}
    },
    "distribution": {
      "fee_pool": {
        "community_pool": []
      },
      "community_tax": "0.020000000000000000",
      "base_proposer_reward": "0.010000000000000000",
      "bonus_proposer_reward": "0.040000000000000000",
      "withdraw_addr_enabled": true,
      "delegator_withdraw_infos": [],
      "previous_proposer": "",
      "outstanding_rewards": [],
      "validator_accumulated_commissions": [],
      "validator_historical_rewards": [],
      "validator_current_rewards": [],
      "delegator_starting_infos": [],
      "validator_slash_events": []
    },
    "accounts": [],
    "genutil": {
      "gentxs": null
    },
    "bank": {
      "send_enabled": true
    },
    "params": null,
    "auth": {
      "params": {
        "max_memo_characters": "256",
        "tx_sig_limit": "7",
        "tx_size_cost_per_byte": "10",
        "sig_verify_cost_ed25519": "590",
        "sig_verify_cost_secp256k1": "1000"
      }
    }
  }
}
$  emintcli keys add austin
override the existing name austin [y/N]: y
Enter a passphrase to encrypt your key to disk:
Repeat the passphrase:

- name: austin
  type: local
  address: cosmos1w94eq0mmdxnc820ucapesyxm3upzgdd3f46qxm
  pubkey: cosmospub1addwnpepq22djc2ujh7yj40t0e36vufp89w5a7yfq9cd99sy3y2c0ed4xsht22ut52k
  mnemonic: ""
  threshold: 0
  pubkeys: []

$  emintd add-genesis-account $(emintcli keys show austin -a) 1000photon,100000000stake
$  emintd gentx --name austin
Password to sign with 'austin':
Genesis transaction written to "/Users/austinabell/.emintd/config/gentx/gentx-7df2f2687ad8690792076f366828d0bc8833b98e.json"
$  emintd validate-genesis
validating genesis file at /Users/austinabell/.emintd/config/genesis.json
File at /Users/austinabell/.emintd/config/genesis.json is a valid genesis file

Commands include:

Ethermint App Daemon (server)

Usage:
  emintd [command]

Available Commands:
  init                Initialize private validator, p2p, genesis, and application configuration files
  collect-gentxs      Collect genesis txs and output a genesis.json file
  gentx               Generate a genesis tx carrying a self delegation
  validate-genesis    validates the genesis file at the default location or at the location passed as an arg
  add-genesis-account Add genesis account to genesis.json
  help                Help about any command

Flags:
  -h, --help          help for emintd
      --home string   directory for config and data (default "/Users/austinabell/.emintd")
      --trace         print out full stack trace on errors

Which the final daemon cobra commands for:

  start               Run the full node
  unsafe-reset-all    Resets the blockchain database, removes address book files, and resets priv_validator.json to the genesis state

  tendermint          Tendermint subcommands
  export              Export state to JSON

  version             Print the app version

will come from:

	// TODO: Add export app state and TM validators commands
	// server.AddCommands(ctx, cdc, rootCmd, newApp, exportAppStateAndTMValidators)

When #64 is completed and the ethermint app framework is finished to make the exportAppStateAndTMValidators function that is commented out implementable

@austinabell austinabell changed the title Implements daemon framework with basic functionality Daemon framework Jul 8, 2019
@austinabell austinabell merged commit d982e09 into development Jul 8, 2019
@austinabell austinabell deleted the austin/daemon branch July 9, 2019 22:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants