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.

75 lines
2.2 KiB

  1. Genesis
  2. =======
  3. The genesis.json file in ``$TMROOT`` 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. - ``amount``: 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. This example is from the Basecoin mintnet example:
  28. .. code:: json
  29. {
  30. "genesis_time": "2016-02-05T06:02:31.526Z",
  31. "chain_id": "chain-tTH4mi",
  32. "validators": [
  33. {
  34. "pub_key": [
  35. 1,
  36. "9BC5112CB9614D91CE423FA8744885126CD9D08D9FC9D1F42E552D662BAA411E"
  37. ],
  38. "amount": 1,
  39. "name": "mach1"
  40. },
  41. {
  42. "pub_key": [
  43. 1,
  44. "F46A5543D51F31660D9F59653B4F96061A740FF7433E0DC1ECBC30BE8494DE06"
  45. ],
  46. "amount": 1,
  47. "name": "mach2"
  48. },
  49. {
  50. "pub_key": [
  51. 1,
  52. "0E7B423C1635FD07C0FC3603B736D5D27953C1C6CA865BB9392CD79DE1A682BB"
  53. ],
  54. "amount": 1,
  55. "name": "mach3"
  56. },
  57. {
  58. "pub_key": [
  59. 1,
  60. "4F49237B9A32EB50682EDD83C48CE9CDB1D02A7CFDADCFF6EC8C1FAADB358879"
  61. ],
  62. "amount": 1,
  63. "name": "mach4"
  64. }
  65. ],
  66. "app_hash": "15005165891224E721CB664D15CB972240F5703F"
  67. }