Skip to content

Configuration File

nodar-chkuaselidze edited this page Apr 19, 2017 · 1 revision

This is example configuration file for Ethermint:

name: test-1
nodes: 5
serverRoot: /tmroot
env:
  - name: TMROOT
    value: /tmroot
ports:
  ethermint: 8545 
  tendermintP2P: 46656
  tendermintRPC: 46657

executable:
  - name: ethermint # will be used for docker entrypoint too
    args: [ "--rpc",
      "--rpcapi",
      "personal,eth,net,web3",
      "--rpcaddr",
      "$IP",
      "--rpccorsdomain",
      "'*'",
      "--datadir",
      "$TMROOT",
      "--seeds",
      "$MACHINE_0:46656"
    ]
aws:
  regions: [ "us-west-1" ]

docker:
  dataDir: ./data
  image: ethermint:vulcan
  network:
    name: ethermint
  ports:
    ethermint: 4000      # This ports will be mapped on local machine
    tendermintP2P: 5000
    tendermintRPC: 6000
commands:
  machineSetup: [
    'ethermint --datadir $DATADIR init $DATADIR/ethgenesis.json'
  ]

artifacts:
  - filename: keystore/key-2a586fe9f99f92cf6e3ab868ad68b7d5e1a5ac31
    contents: |
      {"address":"2a586fe9f99f92cf6e3ab868ad68b7d5e1a5ac31","crypto":{"cipher":"aes-128-ctr","ciphertext":"d4f4571881b547816936e1a9b73b43b3148c6bc765f5b9d624bd59e3d629d5af","cipherparams":{"iv":"2b2cb4f5d82997f0de286e0f24a9053b"},"mac":"5e16b1e451460ae50cb5d5228e160a6d55b0115d014d6fc890d04d6c4923fa63","kdf":"pbkdf2","kdfparams":{"c":65536,"dklen":32,"prf":"hmac-sha256","salt":"264a1613221ce0bbb7455015aabfbcf7db2891bcf953507b5a2532dc6529e254"}},"id":"659f1972-4870-4bc6-b355-23c6f2c8e926","version":3}
  - filename: keystore/key-dec199dd9197f37b893e11aaf8d8c39a7727e649
    contents: |
      {"address":"dec199dd9197f37b893e11aaf8d8c39a7727e649","crypto":{"cipher":"aes-128-ctr","ciphertext":"9f46c6dba33cbb06d0e11f5d038b954a44a84c367d8d2ef84cfce29fdd99ab38","cipherparams":{"iv":"729ed15424c96ee2f009ff2f775fe600"},"mac":"a5f51c08a321109d43b90a8889eaf95f79534957bf0956422beae111f2eeb707","kdf":"pbkdf2","kdfparams":{"c":65536,"dklen":32,"prf":"hmac-sha256","salt":"d394df494bea43ffbadcfa88502c21bd323378138f0d2503dd6d89aa22d4cc99"}},"id":"c621dca5-d43f-4188-ab7c-4e244ba6e838","version":3}
  - filename: ethgenesis.json
    contents: |
      {
        "nonce": "0xdeadbeefdeadbeef",
        "timestamp": "0x0",
        "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
        "extraData": "0x0",
        "gasLimit": "0x8000000",
        "difficulty": "0x400",
        "mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
        "coinbase": "0x3333333333333333333333333333333333333333",
        "alloc": {
          "0x2a586fe9f99f92cf6e3ab868ad68b7d5e1a5ac31" : {
            "balance" : "10000000000"
          },
          "0xdec199dd9197f37b893e11aaf8d8c39a7727e649" : {
            "balance" : "10000000000"
          }
        }
      }

Docs

  • name - Name of the network
  • nodes - number of Nodes to launch
  • serverRoot - This will be used as Data directory on the server/container
  • env - This is array of simple environment variables
  • ports - port name:port number, will be exposed from machine
  • executable - This command will be executed on network start after it's setup, This will be executed as shell command in serverRoot directory, so be aware to escape special chars (Shell will expand)
  • aws - AWS specific configurations, regions array so far
  • docker - Docker specific configurations
    • dataDir - This is local directory that will be used to mount local folders to docker containers
    • image - Right now docker only accepts Image from where to run everything
    • connect - You can specify docker API connection params.
    • network(optional) - Docker network configs
      • name - this will overwrite Name on top
      • subnet - here you can specify subnet configs, default: 172.58.0.0/16
      • driver - default bridge
    • ports - same format as top level ports config, this will map ports by name to be exposed on localhost, it will bind to ports incrementally on machine IDs. (machine-0 - 4000, machine-1 - 4001..)
    • entrypoint - same format as executable, overwrites executable for docker.
  • commands - Commands to execute on events
    • machineSetup - array of commands to run when Tendermint keys and genesis are ready. You can run specific commands to your network. For docker deployment this runs on local machine instead of containers, so you won't have env variables available. DATADIR env variables is provided for this command (this might change in the future)
  • artifacts - Array of files to upload to container/machine
    • filename - name of file on container/machine
    • contents - Contents of the file, right now JSON and string are supported (other formats haven't been tested)
Clone this wiki locally