You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
2.0 KiB

  1. Genesis
  2. =======
  3. The genesis.json file in ``$TMHOME/config`` defines the initial TendermintCore
  4. state upon genesis of the blockchain (`see
  5. definition <https://github.com/tendermint/tendermint/blob/master/types/genesis.go>`__).
  6. Fields
  7. ~~~~~~
  8. - ``genesis_time``: Official time of blockchain start.
  9. - ``chain_id``: ID of the blockchain. This must be unique for every
  10. blockchain. If your testnet blockchains do not have unique chain IDs,
  11. you will have a bad time.
  12. - ``validators``:
  13. - ``pub_key``: The first element specifies the pub\_key type. 1 ==
  14. Ed25519. The second element are the pubkey bytes.
  15. - ``power``: The validator's voting power.
  16. - ``name``: Name of the validator (optional).
  17. - ``app_hash``: The expected application hash (as returned by the
  18. ``Commit`` ABCI message) upon genesis. If the app's hash does not
  19. match, a warning message is printed.
  20. - ``app_state``: The application state (e.g. initial distribution of tokens).
  21. Sample genesis.json
  22. ~~~~~~~~~~~~~~~~~~~
  23. .. code:: json
  24. {
  25. "genesis_time": "2016-02-05T06:02:31.526Z",
  26. "chain_id": "chain-tTH4mi",
  27. "validators": [
  28. {
  29. "pub_key": [
  30. 1,
  31. "9BC5112CB9614D91CE423FA8744885126CD9D08D9FC9D1F42E552D662BAA411E"
  32. ],
  33. "power": 1,
  34. "name": "mach1"
  35. },
  36. {
  37. "pub_key": [
  38. 1,
  39. "F46A5543D51F31660D9F59653B4F96061A740FF7433E0DC1ECBC30BE8494DE06"
  40. ],
  41. "power": 1,
  42. "name": "mach2"
  43. },
  44. {
  45. "pub_key": [
  46. 1,
  47. "0E7B423C1635FD07C0FC3603B736D5D27953C1C6CA865BB9392CD79DE1A682BB"
  48. ],
  49. "power": 1,
  50. "name": "mach3"
  51. },
  52. {
  53. "pub_key": [
  54. 1,
  55. "4F49237B9A32EB50682EDD83C48CE9CDB1D02A7CFDADCFF6EC8C1FAADB358879"
  56. ],
  57. "power": 1,
  58. "name": "mach4"
  59. }
  60. ],
  61. "app_hash": "15005165891224E721CB664D15CB972240F5703F",
  62. "app_state": {
  63. {"account": "Bob", "coins": 5000}
  64. }
  65. }