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.

114 lines
3.1 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
  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](https://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": "6070ff17c39b2b0a64ca2bc431328037fa0f4760",
  64. "Amount": 200000000
  65. }
  66. ],
  67. "Validators": [
  68. {
  69. "PubKey": [1, "6bd490c212e701a2136eeea04f06fa4f287ee47e2b7a9b5d62edd84cd6ad9753"],
  70. "Amount": 100000000,
  71. "UnbondTo": [
  72. {
  73. "Address": "6070ff17c39b2b0a64ca2bc431328037fa0f4760",
  74. "Amount": 100000000
  75. }
  76. ]
  77. }
  78. ]
  79. }
  80. ```
  81. ## Resources
  82. IRC Channel: #tendermint on freenode