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.

73 lines
2.2 KiB

  1. Genesis
  2. =======
  3. The genesis.json file in ``$TMHOME`` 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. NOTE: This does not (yet) specify the application state (e.g. initial
  7. distribution of tokens). Currently we leave it up to the application to
  8. load the initial application genesis state. In the future, we may
  9. include genesis SetOption messages that get passed from TendermintCore
  10. to the app upon genesis.
  11. Fields
  12. ~~~~~~
  13. - ``genesis_time``: Official time of blockchain start.
  14. - ``chain_id``: ID of the blockchain. This must be unique for every
  15. blockchain. If your testnet blockchains do not have unique chain IDs,
  16. you will have a bad time.
  17. - ``validators``:
  18. - ``pub_key``: The first element specifies the pub\_key type. 1 ==
  19. Ed25519. The second element are the pubkey bytes.
  20. - ``power``: The validator's voting power.
  21. - ``name``: Name of the validator (optional).
  22. - ``app_hash``: The expected application hash (as returned by the
  23. ``Commit`` ABCI message) upon genesis. If the app's hash does not
  24. match, a warning message is printed.
  25. Sample genesis.json
  26. ~~~~~~~~~~~~~~~~~~~
  27. .. code:: json
  28. {
  29. "genesis_time": "2016-02-05T06:02:31.526Z",
  30. "chain_id": "chain-tTH4mi",
  31. "validators": [
  32. {
  33. "pub_key": [
  34. 1,
  35. "9BC5112CB9614D91CE423FA8744885126CD9D08D9FC9D1F42E552D662BAA411E"
  36. ],
  37. "power": 1,
  38. "name": "mach1"
  39. },
  40. {
  41. "pub_key": [
  42. 1,
  43. "F46A5543D51F31660D9F59653B4F96061A740FF7433E0DC1ECBC30BE8494DE06"
  44. ],
  45. "power": 1,
  46. "name": "mach2"
  47. },
  48. {
  49. "pub_key": [
  50. 1,
  51. "0E7B423C1635FD07C0FC3603B736D5D27953C1C6CA865BB9392CD79DE1A682BB"
  52. ],
  53. "power": 1,
  54. "name": "mach3"
  55. },
  56. {
  57. "pub_key": [
  58. 1,
  59. "4F49237B9A32EB50682EDD83C48CE9CDB1D02A7CFDADCFF6EC8C1FAADB358879"
  60. ],
  61. "power": 1,
  62. "name": "mach4"
  63. }
  64. ],
  65. "app_hash": "15005165891224E721CB664D15CB972240F5703F"
  66. }