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.

118 lines
3.2 KiB

10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
  1. [**Website**](http://tendermint.com) **|**
  2. [**Blog**](http://tendermint.com/posts/) **|**
  3. [**Forum**] (http://forum.tendermint.com) **|**
  4. [**IRC**] (http://webchat.freenode.net/?randomnick=1&channels=%23tendermint)
  5. Tendermint in Golang
  6. Tendermint is a completely decentralized byzantine consensus protocol suitable for use in cryptocurrencies.
  7. This project is a reference implementation of the protocol.
  8. ## Submodules
  9. * **[consensus](https://github.com/tendermint/tendermint/blob/master/consensus):** core consensus algorithm
  10. * **[state](https://github.com/tendermint/tendermint/blob/master/state):** application state; mutated by transactions
  11. * **[blocks](https://github.com/tendermint/tendermint/blob/master/blocks):** structures of the blockchain
  12. * **[mempool](https://github.com/tendermint/tendermint/blob/master/mempool):** gossip of new transactions
  13. * **[merkle](https://github.com/tendermint/tendermint/blob/master/merkle):** merkle hash trees
  14. * **[p2p](https://github.com/tendermint/tendermint/blob/master/p2p):** extensible P2P networking
  15. ## Requirements
  16. [Go](http://golang.org) 1.2 or newer.
  17. OpenSSL header files. `sudo apt-get install libssl-dev` on Debian/Ubuntu
  18. //TODO OpenSSL header files for other platforms
  19. ###Setting up Golang
  20. [Install Go for your platform](https://golang.org/doc/install)
  21. Set up environment variables. Go requires certain environment variables to compile code. Set these in your terminal, .profile or .zshrc as appropiate.
  22. ```
  23. export GOROOT=$HOME/go
  24. export PATH=$PATH:$GOROOT/bin
  25. export GOPATH=$HOME/gopkg
  26. ```
  27. ## Build
  28. [![Build Status](http://drone.io/github.com/tendermint/tendermint/status.png)](https://drone.io/github.com/tendermint/tendermint/latest)
  29. ```
  30. make get_deps
  31. make
  32. ```
  33. ## Run
  34. `./tendermint daemon --help`
  35. ### Editing your config file
  36. When `./tendermint daemon` is first run, a file will be create in ~/.tendermint/config.toml
  37. //TODO Explanation of other config.toml fields
  38. ```toml
  39. # This is a TOML config file.
  40. # For more information, see https://github.com/toml-lang/toml
  41. Network = "tendermint_testnet0"
  42. ListenAddr = "0.0.0.0:0"
  43. # First node to connect to. Command-line overridable.
  44. SeedNode = "23.239.22.253:8080"
  45. [DB]
  46. # The only other available backend is "memdb"
  47. Backend = "leveldb"
  48. # The leveldb data directory.
  49. # Dir = "<YOUR_HOME_DIRECTORY>/.tendermint/data"
  50. [RPC]
  51. # For the RPC API HTTP server. Port required.
  52. HTTP.ListenAddr = "0.0.0.0:8081"
  53. [Alert]
  54. # TODO: Document options
  55. [SMTP]
  56. # TODO: Document options
  57. ```
  58. You will also to need to have a genesis.json in ~/.tendermint/. This must be the common genesis.json as the network you are joining from the Seed Node
  59. ```
  60. {
  61. "Accounts": [
  62. {
  63. "Address": "553722287BF1230C081C270908C1F453E7D1C397",
  64. "Amount": 200000000
  65. },
  66. {
  67. "Address": "AC89A6DDF4C309A89A2C4078CE409A5A7B282270",
  68. "Amount": 200000000
  69. }
  70. ],
  71. "Validators": [
  72. {
  73. "PubKey": [1, "932A857D334BA5A38DD8E0D9CDE9C84687C21D0E5BEE64A1EDAB9C6C32344F1A"],
  74. "Amount": 100000000,
  75. "UnbondTo": [
  76. {
  77. "Address": "553722287BF1230C081C270908C1F453E7D1C397",
  78. "Amount": 100000000
  79. }
  80. ]
  81. }
  82. ]
  83. }
  84. ```
  85. ## Resources
  86. IRC Channel: #tendermint on freenode