Merge branch 'develop' into jae/literefactor4
This commit is contained in:
commit
5453aa6169
|
@ -33,7 +33,7 @@ in a case of bug.
|
|||
|
||||
**How to reproduce it** (as minimally and precisely as possible):
|
||||
|
||||
**Logs (you can paste a part showing an error or attach the whole file)**:
|
||||
**Logs (you can paste a small part showing an error or link a pastebin, gist, etc. containing more of the log file)**:
|
||||
|
||||
**Config (you can paste only the changes you've made)**:
|
||||
|
||||
|
|
58
CHANGELOG.md
58
CHANGELOG.md
|
@ -1,14 +1,53 @@
|
|||
# Changelog
|
||||
|
||||
## TBD
|
||||
## 0.23.0
|
||||
|
||||
*TBD*
|
||||
|
||||
## 0.22.0
|
||||
|
||||
*July 2nd, 2018*
|
||||
|
||||
BREAKING CHANGES:
|
||||
- [config] Rename `skip_upnp` to `upnp`, and turn it off by default.
|
||||
- [types] Update Amino to v0.10.1
|
||||
* Amino is now fully proto3 compatible for the basic types
|
||||
* JSON-encoded types now use the type name instead of the prefix bytes
|
||||
* Integers are encoded as strings
|
||||
- [crypto] Update go-crypto to v0.10.0 and merge into `crypto`
|
||||
* privKey.Sign returns error.
|
||||
* ed25519 address changed to the first 20-bytes of the SHA256 of the raw pubkey bytes
|
||||
* `tmlibs/merkle` -> `crypto/merkle`. Uses SHA256 instead of RIPEMD160
|
||||
- [tmlibs] Update to v0.9.0 and merge into `libs`
|
||||
* remove `merkle` package (moved to `crypto/merkle`)
|
||||
- [rpc] `syncing` is now called `catching_up`.
|
||||
|
||||
FEATURES
|
||||
- [cmd] Added metrics (served under `/metrics` using a Prometheus client;
|
||||
disabled by default). See the new `instrumentation` section in the config and
|
||||
[metrics](https://tendermint.readthedocs.io/projects/tools/en/develop/metrics.html)
|
||||
guide.
|
||||
- [p2p] Add IPv6 support to peering.
|
||||
- [p2p] Add `external_address` to config to allow specifying the address for
|
||||
peers to dial
|
||||
|
||||
IMPROVEMENT
|
||||
- [rpc/client] Supports https and wss now.
|
||||
- [crypto] Make public key size into public constants
|
||||
- [mempool] Log tx hash, not entire tx
|
||||
- [abci] Merged in github.com/tendermint/abci
|
||||
- [crypto] Merged in github.com/tendermint/go-crypto
|
||||
- [libs] Merged in github.com/tendermint/tmlibs
|
||||
- [docs] Move from .rst to .md
|
||||
|
||||
BUG FIXES:
|
||||
|
||||
- [rpc] limited number of HTTP/WebSocket connections
|
||||
- [rpc] Limit maximum number of HTTP/WebSocket connections
|
||||
(`rpc.max_open_connections`) and gRPC connections
|
||||
(`rpc.grpc_max_open_connections`). Check out [Running In
|
||||
Production](https://tendermint.readthedocs.io/en/master/running-in-production.html)
|
||||
guide if you want to increase them.
|
||||
(`rpc.grpc_max_open_connections`). Check out "Running In Production" guide if
|
||||
you want to increase them.
|
||||
- [rpc] Limit maximum request body size to 1MB (header is limited to 1MB).
|
||||
- [consensus] Fix a halting bug where `create_empty_blocks=false`
|
||||
- [p2p] Fix panic in seed mode
|
||||
|
||||
## 0.21.0
|
||||
|
||||
|
@ -25,13 +64,6 @@ IMPROVEMENT
|
|||
- [pubsub] Set default capacity to 0
|
||||
- [docs] Various improvements
|
||||
|
||||
FEATURES
|
||||
|
||||
- [main] added metrics (served under `/metrics` using a Prometheus client;
|
||||
disabled by default). See the new `instrumentation` section in the config and
|
||||
[metrics](https://tendermint.readthedocs.io/projects/tools/en/v0.21.0/metrics.html)
|
||||
guide.
|
||||
|
||||
BUG FIXES
|
||||
|
||||
- [consensus] Fix an issue where we don't make blocks after `fast_sync` when `create_empty_blocks=false`
|
||||
|
|
|
@ -17,7 +17,7 @@ Instead, we use `git remote` to add the fork as a new remote for the original re
|
|||
For instance, to create a fork and work on a branch of it, I would:
|
||||
|
||||
* Create the fork on github, using the fork button.
|
||||
* Go to the original repo checked out locally (ie. `$GOPATH/src/github.com/tendermint/tendermint`)
|
||||
* Go to the original repo checked out locally (i.e. `$GOPATH/src/github.com/tendermint/tendermint`)
|
||||
* `git remote rename origin upstream`
|
||||
* `git remote add origin git@github.com:ebuchman/basecoin.git`
|
||||
|
||||
|
@ -47,7 +47,7 @@ get_vendor_deps`). Even for dependencies under our control, dep helps us to
|
|||
keep multiple repos in sync as they evolve. Anything with an executable, such
|
||||
as apps, tools, and the core, should use dep.
|
||||
|
||||
Run `dep status` to get a list of vendored dependencies that may not be
|
||||
Run `dep status` to get a list of vendor dependencies that may not be
|
||||
up-to-date.
|
||||
|
||||
## Vagrant
|
||||
|
@ -85,7 +85,7 @@ especially `go-p2p` and `go-rpc`, as their versions are referenced in tendermint
|
|||
- the latest state of development is on `develop`
|
||||
- `develop` must never fail `make test`
|
||||
- no --force onto `develop` (except when reverting a broken commit, which should seldom happen)
|
||||
- create a development branch either on github.com/tendermint/tendermint, or your fork (using `git add origin`)
|
||||
- create a development branch either on github.com/tendermint/tendermint, or your fork (using `git remote add origin`)
|
||||
- before submitting a pull request, begin `git rebase` on top of `develop`
|
||||
|
||||
### Pull Merge Procedure:
|
||||
|
@ -110,7 +110,7 @@ especially `go-p2p` and `go-rpc`, as their versions are referenced in tendermint
|
|||
- make the required changes
|
||||
- these changes should be small and an absolute necessity
|
||||
- add a note to CHANGELOG.md
|
||||
- bumb versions
|
||||
- bump versions
|
||||
- push to hotfix-vX.X.X to run the extended integration tests on the CI
|
||||
- merge hotfix-vX.X.X to master
|
||||
- merge hotfix-vX.X.X to develop
|
||||
|
|
|
@ -16,7 +16,10 @@
|
|||
[[projects]]
|
||||
branch = "master"
|
||||
name = "github.com/btcsuite/btcutil"
|
||||
packages = ["base58"]
|
||||
packages = [
|
||||
"base58",
|
||||
"bech32"
|
||||
]
|
||||
revision = "d4cc87b860166d00d6b5b9e0d3b3d71d6088d4d4"
|
||||
|
||||
[[projects]]
|
||||
|
@ -113,7 +116,6 @@
|
|||
".",
|
||||
"hcl/ast",
|
||||
"hcl/parser",
|
||||
"hcl/printer",
|
||||
"hcl/scanner",
|
||||
"hcl/strconv",
|
||||
"hcl/token",
|
||||
|
@ -211,7 +213,7 @@
|
|||
"nfs",
|
||||
"xfs"
|
||||
]
|
||||
revision = "94663424ae5ae9856b40a9f170762b4197024661"
|
||||
revision = "40f013a808ec4fa79def444a1a56de4d1727efcb"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
|
@ -237,8 +239,8 @@
|
|||
[[projects]]
|
||||
name = "github.com/spf13/cobra"
|
||||
packages = ["."]
|
||||
revision = "ef82de70bb3f60c65fb8eebacbb2d122ef517385"
|
||||
version = "v0.0.3"
|
||||
revision = "7b2c5ac9fc04fc5efafb60700713d4fa609b777b"
|
||||
version = "v0.0.1"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
|
@ -255,8 +257,8 @@
|
|||
[[projects]]
|
||||
name = "github.com/spf13/viper"
|
||||
packages = ["."]
|
||||
revision = "b5e8006cbee93ec955a89ab31e0e3ce3204f3736"
|
||||
version = "v1.0.2"
|
||||
revision = "25b30aa063fc18e48662b86996252eabdcf2f0c7"
|
||||
version = "v1.0.0"
|
||||
|
||||
[[projects]]
|
||||
name = "github.com/stretchr/testify"
|
||||
|
@ -305,17 +307,9 @@
|
|||
[[projects]]
|
||||
name = "github.com/tendermint/tmlibs"
|
||||
packages = [
|
||||
"autofile",
|
||||
"cli",
|
||||
"cli/flags",
|
||||
"clist",
|
||||
"common",
|
||||
"db",
|
||||
"flowrate",
|
||||
"log",
|
||||
"merkle",
|
||||
"merkle/tmhash",
|
||||
"test"
|
||||
"log"
|
||||
]
|
||||
revision = "49596e0a1f48866603813df843c9409fc19805c6"
|
||||
version = "v0.9.0"
|
||||
|
@ -330,6 +324,7 @@
|
|||
"curve25519",
|
||||
"hkdf",
|
||||
"internal/chacha20",
|
||||
"internal/subtle",
|
||||
"nacl/box",
|
||||
"nacl/secretbox",
|
||||
"openpgp/armor",
|
||||
|
@ -338,7 +333,7 @@
|
|||
"ripemd160",
|
||||
"salsa20/salsa"
|
||||
]
|
||||
revision = "8ac0e0d97ce45cd83d1d7243c060cb8461dda5e9"
|
||||
revision = "a49355c7e3f8fe157a85be2f77e6e269a0f89602"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
|
@ -362,7 +357,7 @@
|
|||
"cpu",
|
||||
"unix"
|
||||
]
|
||||
revision = "a9e25c09b96b8870693763211309e213c6ef299d"
|
||||
revision = "7138fd3d9dc8335c567ca206f4333fb75eb05d56"
|
||||
|
||||
[[projects]]
|
||||
name = "golang.org/x/text"
|
||||
|
@ -395,9 +390,13 @@
|
|||
packages = [
|
||||
".",
|
||||
"balancer",
|
||||
"balancer/base",
|
||||
"balancer/roundrobin",
|
||||
"codes",
|
||||
"connectivity",
|
||||
"credentials",
|
||||
"encoding",
|
||||
"encoding/proto",
|
||||
"grpclb/grpc_lb_v1/messages",
|
||||
"grpclog",
|
||||
"internal",
|
||||
|
@ -406,13 +405,15 @@
|
|||
"naming",
|
||||
"peer",
|
||||
"resolver",
|
||||
"resolver/dns",
|
||||
"resolver/passthrough",
|
||||
"stats",
|
||||
"status",
|
||||
"tap",
|
||||
"transport"
|
||||
]
|
||||
revision = "5b3c4e850e90a4cf6a20ebd46c8b32a0a3afcb9e"
|
||||
version = "v1.7.5"
|
||||
revision = "d11072e7ca9811b1100b80ca0269ac831f06d024"
|
||||
version = "v1.11.3"
|
||||
|
||||
[[projects]]
|
||||
name = "gopkg.in/yaml.v2"
|
||||
|
@ -423,6 +424,6 @@
|
|||
[solve-meta]
|
||||
analyzer-name = "dep"
|
||||
analyzer-version = 1
|
||||
inputs-digest = "c25289282b94abc7f0c390e592e5e1636b7f26cb4773863ac39cde7fdc7b5bdf"
|
||||
inputs-digest = "304d47a4914b47a821cc79c2186e198a98321a52d5932a2df988f02849f1924d"
|
||||
solver-name = "gps-cdcl"
|
||||
solver-version = 1
|
||||
|
|
18
Gopkg.toml
18
Gopkg.toml
|
@ -35,15 +35,15 @@
|
|||
|
||||
[[constraint]]
|
||||
name = "github.com/go-kit/kit"
|
||||
version = "~0.6.0"
|
||||
version = "=0.6.0"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/gogo/protobuf"
|
||||
version = "~1.0.0"
|
||||
version = "=1.0.0"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/golang/protobuf"
|
||||
version = "~1.0.0"
|
||||
version = "=1.0.0"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/gorilla/websocket"
|
||||
|
@ -51,7 +51,7 @@
|
|||
|
||||
[[constraint]]
|
||||
name = "github.com/pkg/errors"
|
||||
version = "~0.8.0"
|
||||
version = "=0.8.0"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/rcrowley/go-metrics"
|
||||
|
@ -59,11 +59,11 @@
|
|||
|
||||
[[constraint]]
|
||||
name = "github.com/spf13/cobra"
|
||||
version = "~0.0.1"
|
||||
version = "=0.0.1"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/spf13/viper"
|
||||
version = "~1.0.0"
|
||||
version = "=1.0.0"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/stretchr/testify"
|
||||
|
@ -73,13 +73,9 @@
|
|||
name = "github.com/tendermint/go-amino"
|
||||
version = "~0.10.1"
|
||||
|
||||
[[override]]
|
||||
name = "github.com/tendermint/tmlibs"
|
||||
version = "~0.9.0"
|
||||
|
||||
[[constraint]]
|
||||
name = "google.golang.org/grpc"
|
||||
version = "~1.7.3"
|
||||
version = "~1.11.3"
|
||||
|
||||
# this got updated and broke, so locked to an old working commit ...
|
||||
[[override]]
|
||||
|
|
15
README.md
15
README.md
|
@ -50,13 +50,13 @@ Go version | Go1.9 or higher
|
|||
|
||||
## Install
|
||||
|
||||
See the [install instructions](/docs/install.rst)
|
||||
See the [install instructions](/docs/install.md)
|
||||
|
||||
## Quick Start
|
||||
|
||||
- [Single node](/docs/using-tendermint.rst)
|
||||
- [Single node](/docs/using-tendermint.md)
|
||||
- [Local cluster using docker-compose](/networks/local)
|
||||
- [Remote cluster using terraform and ansible](/docs/terraform-and-ansible.rst)
|
||||
- [Remote cluster using terraform and ansible](/docs/terraform-and-ansible.md)
|
||||
- [Join the public testnet](https://cosmos.network/testnet)
|
||||
|
||||
## Resources
|
||||
|
@ -72,10 +72,7 @@ Additional information about some - and eventually all - of the sub-projects bel
|
|||
|
||||
### Sub-projects
|
||||
|
||||
* [ABCI](http://github.com/tendermint/abci), the Application Blockchain Interface
|
||||
* [Go-Wire](http://github.com/tendermint/go-wire), a deterministic serialization library
|
||||
* [Go-Crypto](http://github.com/tendermint/tendermint/crypto), an elliptic curve cryptography library
|
||||
* [TmLibs](http://github.com/tendermint/tmlibs), an assortment of Go libraries used internally
|
||||
* [Amino](http://github.com/tendermint/go-amino), a reflection-based improvement on proto3
|
||||
* [IAVL](http://github.com/tendermint/iavl), Merkleized IAVL+ Tree implementation
|
||||
|
||||
### Tools
|
||||
|
@ -119,8 +116,8 @@ CHANGELOG even if they don't lead to MINOR version bumps:
|
|||
- node
|
||||
|
||||
Exported objects in these packages that are not covered by the versioning scheme
|
||||
are explicitly marked by `// UNSTABLE` in their go doc comment and may change at any time.
|
||||
Functions, types, and values in any other package may also change at any time.
|
||||
are explicitly marked by `// UNSTABLE` in their go doc comment and may change at any
|
||||
time without notice. Functions, types, and values in any other package may also change at any time.
|
||||
|
||||
### Upgrades
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"sync"
|
||||
|
||||
"github.com/tendermint/tendermint/abci/types"
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
grpc "google.golang.org/grpc"
|
||||
|
||||
"github.com/tendermint/tendermint/abci/types"
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
)
|
||||
|
||||
var _ Client = (*grpcClient)(nil)
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"sync"
|
||||
|
||||
types "github.com/tendermint/tendermint/abci/types"
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
)
|
||||
|
||||
var _ Client = (*localClient)(nil)
|
||||
|
|
|
@ -11,7 +11,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/tendermint/tendermint/abci/types"
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
)
|
||||
|
||||
const reqQueueSize = 256 // TODO make configurable
|
||||
|
|
|
@ -11,8 +11,8 @@ import (
|
|||
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
"github.com/tendermint/tmlibs/log"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
"github.com/tendermint/tendermint/libs/log"
|
||||
|
||||
abcicli "github.com/tendermint/tendermint/abci/client"
|
||||
"github.com/tendermint/tendermint/abci/example/code"
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
|
||||
"github.com/tendermint/tendermint/abci/example/code"
|
||||
"github.com/tendermint/tendermint/abci/types"
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
)
|
||||
|
||||
type CounterApplication struct {
|
||||
|
|
|
@ -11,8 +11,8 @@ import (
|
|||
|
||||
"golang.org/x/net/context"
|
||||
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
"github.com/tendermint/tmlibs/log"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
"github.com/tendermint/tendermint/libs/log"
|
||||
|
||||
abcicli "github.com/tendermint/tendermint/abci/client"
|
||||
"github.com/tendermint/tendermint/abci/example/code"
|
||||
|
|
|
@ -2,7 +2,7 @@ package kvstore
|
|||
|
||||
import (
|
||||
"github.com/tendermint/tendermint/abci/types"
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
)
|
||||
|
||||
// RandVal creates one random validator, with a key derived
|
||||
|
|
|
@ -8,8 +8,8 @@ import (
|
|||
|
||||
"github.com/tendermint/tendermint/abci/example/code"
|
||||
"github.com/tendermint/tendermint/abci/types"
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
dbm "github.com/tendermint/tmlibs/db"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
dbm "github.com/tendermint/tendermint/libs/db"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -8,8 +8,8 @@ import (
|
|||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
"github.com/tendermint/tmlibs/log"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
"github.com/tendermint/tendermint/libs/log"
|
||||
|
||||
abcicli "github.com/tendermint/tendermint/abci/client"
|
||||
"github.com/tendermint/tendermint/abci/example/code"
|
||||
|
|
|
@ -9,9 +9,9 @@ import (
|
|||
|
||||
"github.com/tendermint/tendermint/abci/example/code"
|
||||
"github.com/tendermint/tendermint/abci/types"
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
dbm "github.com/tendermint/tmlibs/db"
|
||||
"github.com/tendermint/tmlibs/log"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
dbm "github.com/tendermint/tendermint/libs/db"
|
||||
"github.com/tendermint/tendermint/libs/log"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
"google.golang.org/grpc"
|
||||
|
||||
"github.com/tendermint/tendermint/abci/types"
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
)
|
||||
|
||||
type GRPCServer struct {
|
||||
|
|
|
@ -13,7 +13,7 @@ import (
|
|||
"fmt"
|
||||
|
||||
"github.com/tendermint/tendermint/abci/types"
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
)
|
||||
|
||||
func NewServer(protoAddr, transport string, app types.Application) (cmn.Service, error) {
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
"sync"
|
||||
|
||||
"github.com/tendermint/tendermint/abci/types"
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
)
|
||||
|
||||
// var maxNumberConnections = 2
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
"log"
|
||||
|
||||
"github.com/tendermint/tendermint/abci/types"
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
"reflect"
|
||||
|
||||
"github.com/tendermint/tendermint/abci/types"
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
|
||||
abcicli "github.com/tendermint/tendermint/abci/client"
|
||||
"github.com/tendermint/tendermint/abci/types"
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
)
|
||||
|
||||
func InitChain(client abcicli.Client) error {
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
|
||||
abcicli "github.com/tendermint/tendermint/abci/client"
|
||||
"github.com/tendermint/tendermint/abci/types"
|
||||
"github.com/tendermint/tmlibs/log"
|
||||
"github.com/tendermint/tendermint/libs/log"
|
||||
)
|
||||
|
||||
func startClient(abciType string) abcicli.Client {
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
|
||||
"github.com/gogo/protobuf/proto"
|
||||
"github.com/stretchr/testify/assert"
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
)
|
||||
|
||||
func TestMarshalJSON(t *testing.T) {
|
||||
|
|
|
@ -50,7 +50,7 @@ import proto "github.com/gogo/protobuf/proto"
|
|||
import fmt "fmt"
|
||||
import math "math"
|
||||
import _ "github.com/gogo/protobuf/gogoproto"
|
||||
import common "github.com/tendermint/tmlibs/common"
|
||||
import common "github.com/tendermint/tendermint/libs/common"
|
||||
|
||||
import context "golang.org/x/net/context"
|
||||
import grpc "google.golang.org/grpc"
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"encoding/json"
|
||||
"sort"
|
||||
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
)
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
|
|
@ -6,8 +6,8 @@ import (
|
|||
|
||||
"github.com/tendermint/go-amino"
|
||||
|
||||
"github.com/tendermint/tendermint/crypto"
|
||||
proto "github.com/tendermint/tendermint/benchmarks/proto"
|
||||
"github.com/tendermint/tendermint/crypto"
|
||||
"github.com/tendermint/tendermint/p2p"
|
||||
ctypes "github.com/tendermint/tendermint/rpc/core/types"
|
||||
)
|
||||
|
|
|
@ -3,7 +3,7 @@ package benchmarks
|
|||
import (
|
||||
"testing"
|
||||
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
)
|
||||
|
||||
func BenchmarkSomething(b *testing.B) {
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"os"
|
||||
"testing"
|
||||
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
)
|
||||
|
||||
func BenchmarkFileWrite(b *testing.B) {
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
"time"
|
||||
|
||||
rpcclient "github.com/tendermint/tendermint/rpc/lib/client"
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -8,9 +8,9 @@ import (
|
|||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
flow "github.com/tendermint/tmlibs/flowrate"
|
||||
"github.com/tendermint/tmlibs/log"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
flow "github.com/tendermint/tendermint/libs/flowrate"
|
||||
"github.com/tendermint/tendermint/libs/log"
|
||||
|
||||
"github.com/tendermint/tendermint/p2p"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
|
|
|
@ -5,8 +5,8 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
"github.com/tendermint/tmlibs/log"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
"github.com/tendermint/tendermint/libs/log"
|
||||
|
||||
"github.com/tendermint/tendermint/p2p"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
|
|
|
@ -9,8 +9,8 @@ import (
|
|||
"github.com/tendermint/tendermint/p2p"
|
||||
sm "github.com/tendermint/tendermint/state"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
"github.com/tendermint/tmlibs/log"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
"github.com/tendermint/tendermint/libs/log"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -4,9 +4,9 @@ import (
|
|||
"net"
|
||||
"testing"
|
||||
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
dbm "github.com/tendermint/tmlibs/db"
|
||||
"github.com/tendermint/tmlibs/log"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
dbm "github.com/tendermint/tendermint/libs/db"
|
||||
"github.com/tendermint/tendermint/libs/log"
|
||||
|
||||
cfg "github.com/tendermint/tendermint/config"
|
||||
"github.com/tendermint/tendermint/p2p"
|
||||
|
|
|
@ -4,8 +4,8 @@ import (
|
|||
"fmt"
|
||||
"sync"
|
||||
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
dbm "github.com/tendermint/tmlibs/db"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
dbm "github.com/tendermint/tendermint/libs/db"
|
||||
|
||||
"github.com/tendermint/tendermint/types"
|
||||
)
|
||||
|
|
|
@ -10,8 +10,8 @@ import (
|
|||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/tendermint/tmlibs/db"
|
||||
"github.com/tendermint/tmlibs/log"
|
||||
"github.com/tendermint/tendermint/libs/db"
|
||||
"github.com/tendermint/tendermint/libs/log"
|
||||
|
||||
"github.com/tendermint/tendermint/types"
|
||||
)
|
||||
|
@ -153,14 +153,14 @@ func TestBlockStoreSaveLoadBlock(t *testing.T) {
|
|||
parts: validPartSet,
|
||||
seenCommit: seenCommit1,
|
||||
corruptCommitInDB: true, // Corrupt the DB's commit entry
|
||||
wantPanic: "Error reading block commit",
|
||||
wantPanic: "unmarshal to types.Commit failed",
|
||||
},
|
||||
|
||||
{
|
||||
block: newBlock(&header1, commitAtH10),
|
||||
parts: validPartSet,
|
||||
seenCommit: seenCommit1,
|
||||
wantPanic: "Error reading block",
|
||||
wantPanic: "unmarshal to types.BlockMeta failed",
|
||||
corruptBlockInDB: true, // Corrupt the DB's block entry
|
||||
},
|
||||
|
||||
|
@ -179,7 +179,7 @@ func TestBlockStoreSaveLoadBlock(t *testing.T) {
|
|||
seenCommit: seenCommit1,
|
||||
|
||||
corruptSeenCommitInDB: true,
|
||||
wantPanic: "Error reading block seen commit",
|
||||
wantPanic: "unmarshal to types.Commit failed",
|
||||
},
|
||||
|
||||
{
|
||||
|
@ -287,7 +287,7 @@ func TestLoadBlockPart(t *testing.T) {
|
|||
db.Set(calcBlockPartKey(height, index), []byte("Tendermint"))
|
||||
res, _, panicErr = doFn(loadPart)
|
||||
require.NotNil(t, panicErr, "expecting a non-nil panic")
|
||||
require.Contains(t, fmt.Sprintf("%#v", panicErr), "Error reading block part")
|
||||
require.Contains(t, panicErr.Error(), "unmarshal to types.Part failed")
|
||||
|
||||
// 3. A good block serialized and saved to the DB should be retrievable
|
||||
db.Set(calcBlockPartKey(height, index), cdc.MustMarshalBinaryBare(part1))
|
||||
|
@ -316,7 +316,7 @@ func TestLoadBlockMeta(t *testing.T) {
|
|||
db.Set(calcBlockMetaKey(height), []byte("Tendermint-Meta"))
|
||||
res, _, panicErr = doFn(loadMeta)
|
||||
require.NotNil(t, panicErr, "expecting a non-nil panic")
|
||||
require.Contains(t, fmt.Sprintf("%#v", panicErr), "Error reading block meta")
|
||||
require.Contains(t, panicErr.Error(), "unmarshal to types.BlockMeta")
|
||||
|
||||
// 3. A good blockMeta serialized and saved to the DB should be retrievable
|
||||
meta := &types.BlockMeta{}
|
||||
|
|
|
@ -5,8 +5,8 @@ import (
|
|||
"os"
|
||||
|
||||
crypto "github.com/tendermint/tendermint/crypto"
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
"github.com/tendermint/tmlibs/log"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
"github.com/tendermint/tendermint/libs/log"
|
||||
|
||||
"github.com/tendermint/tendermint/privval"
|
||||
)
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/tendermint/tendermint/p2p"
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
)
|
||||
|
||||
// GenNodeKeyCmd allows the generation of a node key. It prints node's ID to
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
"github.com/tendermint/tendermint/p2p"
|
||||
"github.com/tendermint/tendermint/privval"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
)
|
||||
|
||||
// InitFilesCmd initialises a fresh Tendermint Core instance.
|
||||
|
@ -52,8 +52,9 @@ func initFilesWithConfig(config *cfg.Config) error {
|
|||
logger.Info("Found genesis file", "path", genFile)
|
||||
} else {
|
||||
genDoc := types.GenesisDoc{
|
||||
ChainID: cmn.Fmt("test-chain-%v", cmn.RandStr(6)),
|
||||
GenesisTime: time.Now(),
|
||||
ChainID: cmn.Fmt("test-chain-%v", cmn.RandStr(6)),
|
||||
GenesisTime: time.Now(),
|
||||
ConsensusParams: types.DefaultConsensusParams(),
|
||||
}
|
||||
genDoc.Validators = []types.GenesisValidator{{
|
||||
PubKey: pv.GetPubKey(),
|
||||
|
|
|
@ -6,9 +6,9 @@ import (
|
|||
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
"github.com/tendermint/tendermint/lite/proxy"
|
||||
rpcclient "github.com/tendermint/tendermint/rpc/client"
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
)
|
||||
|
||||
// LiteCmd represents the base command when called without any subcommands
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/tendermint/tendermint/privval"
|
||||
"github.com/tendermint/tmlibs/log"
|
||||
"github.com/tendermint/tendermint/libs/log"
|
||||
)
|
||||
|
||||
// ResetAllCmd removes the database of this Tendermint core
|
||||
|
|
|
@ -7,9 +7,9 @@ import (
|
|||
"github.com/spf13/viper"
|
||||
|
||||
cfg "github.com/tendermint/tendermint/config"
|
||||
"github.com/tendermint/tmlibs/cli"
|
||||
tmflags "github.com/tendermint/tmlibs/cli/flags"
|
||||
"github.com/tendermint/tmlibs/log"
|
||||
"github.com/tendermint/tendermint/libs/cli"
|
||||
tmflags "github.com/tendermint/tendermint/libs/cli/flags"
|
||||
"github.com/tendermint/tendermint/libs/log"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -14,8 +14,8 @@ import (
|
|||
"github.com/stretchr/testify/require"
|
||||
|
||||
cfg "github.com/tendermint/tendermint/config"
|
||||
"github.com/tendermint/tmlibs/cli"
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
"github.com/tendermint/tendermint/libs/cli"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -33,7 +33,7 @@ func AddNodeFlags(cmd *cobra.Command) {
|
|||
cmd.Flags().String("p2p.laddr", config.P2P.ListenAddress, "Node listen address. (0.0.0.0:0 means any interface, any port)")
|
||||
cmd.Flags().String("p2p.seeds", config.P2P.Seeds, "Comma-delimited ID@host:port seed nodes")
|
||||
cmd.Flags().String("p2p.persistent_peers", config.P2P.PersistentPeers, "Comma-delimited ID@host:port persistent peers")
|
||||
cmd.Flags().Bool("p2p.skip_upnp", config.P2P.SkipUPNP, "Skip UPNP configuration")
|
||||
cmd.Flags().Bool("p2p.upnp", config.P2P.UPNP, "Enable/disable UPNP port forwarding")
|
||||
cmd.Flags().Bool("p2p.pex", config.P2P.PexReactor, "Enable/disable Peer-Exchange")
|
||||
cmd.Flags().Bool("p2p.seed_mode", config.P2P.SeedMode, "Enable/disable seed mode")
|
||||
cmd.Flags().String("p2p.private_peer_ids", config.P2P.PrivatePeerIDs, "Comma-delimited private peer IDs")
|
||||
|
|
|
@ -14,7 +14,7 @@ import (
|
|||
"github.com/tendermint/tendermint/p2p"
|
||||
"github.com/tendermint/tendermint/privval"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/tendermint/tmlibs/cli"
|
||||
"github.com/tendermint/tendermint/libs/cli"
|
||||
|
||||
cmd "github.com/tendermint/tendermint/cmd/tendermint/commands"
|
||||
cfg "github.com/tendermint/tendermint/config"
|
||||
|
|
|
@ -276,6 +276,9 @@ type P2PConfig struct {
|
|||
// Address to listen for incoming connections
|
||||
ListenAddress string `mapstructure:"laddr"`
|
||||
|
||||
// Address to advertise to peers for them to dial
|
||||
ExternalAddress string `mapstructure:"external_address"`
|
||||
|
||||
// Comma separated list of seed nodes to connect to
|
||||
// We only use these if we can’t connect to peers in the addrbook
|
||||
Seeds string `mapstructure:"seeds"`
|
||||
|
@ -284,8 +287,8 @@ type P2PConfig struct {
|
|||
// Do not add private peers to this list if you don't want them advertised
|
||||
PersistentPeers string `mapstructure:"persistent_peers"`
|
||||
|
||||
// Skip UPNP port forwarding
|
||||
SkipUPNP bool `mapstructure:"skip_upnp"`
|
||||
// UPNP port forwarding
|
||||
UPNP bool `mapstructure:"upnp"`
|
||||
|
||||
// Path to address book
|
||||
AddrBook string `mapstructure:"addr_book_file"`
|
||||
|
@ -299,9 +302,8 @@ type P2PConfig struct {
|
|||
// Time to wait before flushing messages out on the connection, in ms
|
||||
FlushThrottleTimeout int `mapstructure:"flush_throttle_timeout"`
|
||||
|
||||
// Maximum size of a message packet, in bytes
|
||||
// Includes a header, which is ~13 bytes
|
||||
MaxPacketMsgSize int `mapstructure:"max_packet_msg_size"`
|
||||
// Maximum size of a message packet payload, in bytes
|
||||
MaxPacketMsgPayloadSize int `mapstructure:"max_packet_msg_payload_size"`
|
||||
|
||||
// Rate at which packets can be sent, in bytes/second
|
||||
SendRate int64 `mapstructure:"send_rate"`
|
||||
|
@ -340,22 +342,24 @@ type P2PConfig struct {
|
|||
// DefaultP2PConfig returns a default configuration for the peer-to-peer layer
|
||||
func DefaultP2PConfig() *P2PConfig {
|
||||
return &P2PConfig{
|
||||
ListenAddress: "tcp://0.0.0.0:26656",
|
||||
AddrBook: defaultAddrBookPath,
|
||||
AddrBookStrict: true,
|
||||
MaxNumPeers: 50,
|
||||
FlushThrottleTimeout: 100,
|
||||
MaxPacketMsgSize: 1024, // 1 kB
|
||||
SendRate: 512000, // 500 kB/s
|
||||
RecvRate: 512000, // 500 kB/s
|
||||
PexReactor: true,
|
||||
SeedMode: false,
|
||||
AllowDuplicateIP: true, // so non-breaking yet
|
||||
HandshakeTimeout: 20 * time.Second,
|
||||
DialTimeout: 3 * time.Second,
|
||||
TestDialFail: false,
|
||||
TestFuzz: false,
|
||||
TestFuzzConfig: DefaultFuzzConnConfig(),
|
||||
ListenAddress: "tcp://0.0.0.0:26656",
|
||||
ExternalAddress: "",
|
||||
UPNP: false,
|
||||
AddrBook: defaultAddrBookPath,
|
||||
AddrBookStrict: true,
|
||||
MaxNumPeers: 50,
|
||||
FlushThrottleTimeout: 100,
|
||||
MaxPacketMsgPayloadSize: 1024, // 1 kB
|
||||
SendRate: 512000, // 500 kB/s
|
||||
RecvRate: 512000, // 500 kB/s
|
||||
PexReactor: true,
|
||||
SeedMode: false,
|
||||
AllowDuplicateIP: true, // so non-breaking yet
|
||||
HandshakeTimeout: 20 * time.Second,
|
||||
DialTimeout: 3 * time.Second,
|
||||
TestDialFail: false,
|
||||
TestFuzz: false,
|
||||
TestFuzzConfig: DefaultFuzzConnConfig(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -363,7 +367,6 @@ func DefaultP2PConfig() *P2PConfig {
|
|||
func TestP2PConfig() *P2PConfig {
|
||||
cfg := DefaultP2PConfig()
|
||||
cfg.ListenAddress = "tcp://0.0.0.0:36656"
|
||||
cfg.SkipUPNP = true
|
||||
cfg.FlushThrottleTimeout = 10
|
||||
cfg.AllowDuplicateIP = true
|
||||
return cfg
|
||||
|
@ -454,10 +457,6 @@ type ConsensusConfig struct {
|
|||
// Make progress as soon as we have all the precommits (as if TimeoutCommit = 0)
|
||||
SkipTimeoutCommit bool `mapstructure:"skip_timeout_commit"`
|
||||
|
||||
// BlockSize
|
||||
MaxBlockSizeTxs int `mapstructure:"max_block_size_txs"`
|
||||
MaxBlockSizeBytes int `mapstructure:"max_block_size_bytes"`
|
||||
|
||||
// EmptyBlocks mode and possible interval between empty blocks in seconds
|
||||
CreateEmptyBlocks bool `mapstructure:"create_empty_blocks"`
|
||||
CreateEmptyBlocksInterval int `mapstructure:"create_empty_blocks_interval"`
|
||||
|
@ -479,8 +478,6 @@ func DefaultConsensusConfig() *ConsensusConfig {
|
|||
TimeoutPrecommitDelta: 500,
|
||||
TimeoutCommit: 1000,
|
||||
SkipTimeoutCommit: false,
|
||||
MaxBlockSizeTxs: 10000,
|
||||
MaxBlockSizeBytes: 1, // TODO
|
||||
CreateEmptyBlocks: true,
|
||||
CreateEmptyBlocksInterval: 0,
|
||||
PeerGossipSleepDuration: 100,
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
"path/filepath"
|
||||
"text/template"
|
||||
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
)
|
||||
|
||||
var configTemplate *template.Template
|
||||
|
@ -142,6 +142,12 @@ max_open_connections = {{ .RPC.MaxOpenConnections }}
|
|||
# Address to listen for incoming connections
|
||||
laddr = "{{ .P2P.ListenAddress }}"
|
||||
|
||||
# Address to advertise to peers for them to dial
|
||||
# If empty, will use the same port as the laddr,
|
||||
# and will introspect on the listener or use UPnP
|
||||
# to figure out the address.
|
||||
external_address = "{{ .P2P.ExternalAddress }}"
|
||||
|
||||
# Comma separated list of seed nodes to connect to
|
||||
seeds = "{{ .P2P.Seeds }}"
|
||||
|
||||
|
@ -149,6 +155,9 @@ seeds = "{{ .P2P.Seeds }}"
|
|||
# Do not add private peers to this list if you don't want them advertised
|
||||
persistent_peers = "{{ .P2P.PersistentPeers }}"
|
||||
|
||||
# UPNP port forwarding
|
||||
upnp = {{ .P2P.UPNP }}
|
||||
|
||||
# Path to address book
|
||||
addr_book_file = "{{ js .P2P.AddrBook }}"
|
||||
|
||||
|
@ -161,9 +170,8 @@ flush_throttle_timeout = {{ .P2P.FlushThrottleTimeout }}
|
|||
# Maximum number of peers to connect to
|
||||
max_num_peers = {{ .P2P.MaxNumPeers }}
|
||||
|
||||
# Maximum size of a message packet, in bytes
|
||||
# Includes a header, which is ~13 bytes
|
||||
max_packet_msg_size = {{ .P2P.MaxPacketMsgSize }}
|
||||
# Maximum size of a message packet payload, in bytes
|
||||
max_packet_msg_payload_size = {{ .P2P.MaxPacketMsgPayloadSize }}
|
||||
|
||||
# Rate at which packets can be sent, in bytes/second
|
||||
send_rate = {{ .P2P.SendRate }}
|
||||
|
@ -214,10 +222,6 @@ timeout_commit = {{ .Consensus.TimeoutCommit }}
|
|||
# Make progress as soon as we have all the precommits (as if TimeoutCommit = 0)
|
||||
skip_timeout_commit = {{ .Consensus.SkipTimeoutCommit }}
|
||||
|
||||
# BlockSize
|
||||
max_block_size_txs = {{ .Consensus.MaxBlockSizeTxs }}
|
||||
max_block_size_bytes = {{ .Consensus.MaxBlockSizeBytes }}
|
||||
|
||||
# EmptyBlocks mode and possible interval between empty blocks in seconds
|
||||
create_empty_blocks = {{ .Consensus.CreateEmptyBlocks }}
|
||||
create_empty_blocks_interval = {{ .Consensus.CreateEmptyBlocksInterval }}
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
"github.com/stretchr/testify/require"
|
||||
"github.com/tendermint/tendermint/p2p"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
|
|
@ -23,9 +23,9 @@ import (
|
|||
"github.com/tendermint/tendermint/privval"
|
||||
sm "github.com/tendermint/tendermint/state"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
dbm "github.com/tendermint/tmlibs/db"
|
||||
"github.com/tendermint/tmlibs/log"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
dbm "github.com/tendermint/tendermint/libs/db"
|
||||
"github.com/tendermint/tendermint/libs/log"
|
||||
|
||||
"github.com/tendermint/tendermint/abci/example/counter"
|
||||
"github.com/tendermint/tendermint/abci/example/kvstore"
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
|
||||
"github.com/tendermint/tendermint/abci/example/code"
|
||||
abci "github.com/tendermint/tendermint/abci/types"
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
|
||||
"github.com/tendermint/tendermint/types"
|
||||
)
|
||||
|
|
|
@ -9,8 +9,8 @@ import (
|
|||
"github.com/pkg/errors"
|
||||
|
||||
amino "github.com/tendermint/go-amino"
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
"github.com/tendermint/tmlibs/log"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
"github.com/tendermint/tendermint/libs/log"
|
||||
|
||||
cstypes "github.com/tendermint/tendermint/consensus/types"
|
||||
tmevents "github.com/tendermint/tendermint/libs/events"
|
||||
|
|
|
@ -11,8 +11,8 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/tendermint/tendermint/abci/example/kvstore"
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
"github.com/tendermint/tmlibs/log"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
"github.com/tendermint/tendermint/libs/log"
|
||||
|
||||
cfg "github.com/tendermint/tendermint/config"
|
||||
"github.com/tendermint/tendermint/p2p"
|
||||
|
|
|
@ -11,10 +11,10 @@ import (
|
|||
"time"
|
||||
|
||||
abci "github.com/tendermint/tendermint/abci/types"
|
||||
//auto "github.com/tendermint/tmlibs/autofile"
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
dbm "github.com/tendermint/tmlibs/db"
|
||||
"github.com/tendermint/tmlibs/log"
|
||||
//auto "github.com/tendermint/tendermint/libs/autofile"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
dbm "github.com/tendermint/tendermint/libs/db"
|
||||
"github.com/tendermint/tendermint/libs/log"
|
||||
|
||||
"github.com/tendermint/tendermint/proxy"
|
||||
sm "github.com/tendermint/tendermint/state"
|
||||
|
|
|
@ -16,9 +16,9 @@ import (
|
|||
"github.com/tendermint/tendermint/proxy"
|
||||
sm "github.com/tendermint/tendermint/state"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
dbm "github.com/tendermint/tmlibs/db"
|
||||
"github.com/tendermint/tmlibs/log"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
dbm "github.com/tendermint/tendermint/libs/db"
|
||||
"github.com/tendermint/tendermint/libs/log"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -19,16 +19,16 @@ import (
|
|||
"github.com/tendermint/tendermint/abci/example/kvstore"
|
||||
abci "github.com/tendermint/tendermint/abci/types"
|
||||
crypto "github.com/tendermint/tendermint/crypto"
|
||||
auto "github.com/tendermint/tmlibs/autofile"
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
dbm "github.com/tendermint/tmlibs/db"
|
||||
auto "github.com/tendermint/tendermint/libs/autofile"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
dbm "github.com/tendermint/tendermint/libs/db"
|
||||
|
||||
cfg "github.com/tendermint/tendermint/config"
|
||||
"github.com/tendermint/tendermint/privval"
|
||||
"github.com/tendermint/tendermint/proxy"
|
||||
sm "github.com/tendermint/tendermint/state"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
"github.com/tendermint/tmlibs/log"
|
||||
"github.com/tendermint/tendermint/libs/log"
|
||||
)
|
||||
|
||||
var consensusReplayConfig *cfg.Config
|
||||
|
|
|
@ -10,8 +10,8 @@ import (
|
|||
"time"
|
||||
|
||||
fail "github.com/ebuchman/fail-test"
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
"github.com/tendermint/tmlibs/log"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
"github.com/tendermint/tendermint/libs/log"
|
||||
|
||||
cfg "github.com/tendermint/tendermint/config"
|
||||
cstypes "github.com/tendermint/tendermint/consensus/types"
|
||||
|
@ -328,10 +328,7 @@ func (cs *ConsensusState) OnStop() {
|
|||
|
||||
cs.timeoutTicker.Stop()
|
||||
|
||||
// Make BaseService.Wait() wait until cs.wal.Wait()
|
||||
if cs.IsRunning() {
|
||||
cs.wal.Wait()
|
||||
}
|
||||
cs.wal.Stop()
|
||||
}
|
||||
|
||||
// Wait waits for the the main routine to return.
|
||||
|
@ -632,7 +629,7 @@ func (cs *ConsensusState) handleMsg(mi msgInfo) {
|
|||
err = cs.setProposal(msg.Proposal)
|
||||
case *BlockPartMessage:
|
||||
// if the proposal is complete, we'll enterPrevote or tryFinalizeCommit
|
||||
_, err = cs.addProposalBlockPart(msg.Height, msg.Part)
|
||||
_, err = cs.addProposalBlockPart(msg, peerID)
|
||||
if err != nil && msg.Round != cs.Round {
|
||||
cs.Logger.Debug("Received block part from wrong round", "height", cs.Height, "csRound", cs.Round, "blockRound", msg.Round)
|
||||
err = nil
|
||||
|
@ -940,7 +937,7 @@ func (cs *ConsensusState) createProposalBlock() (block *types.Block, blockParts
|
|||
}
|
||||
|
||||
// Mempool validated transactions
|
||||
txs := cs.mempool.Reap(cs.config.MaxBlockSizeTxs)
|
||||
txs := cs.mempool.Reap(cs.state.ConsensusParams.BlockSize.MaxTxs)
|
||||
block, parts := cs.state.MakeBlock(cs.Height, txs, commit)
|
||||
evidence := cs.evpool.PendingEvidence()
|
||||
block.AddEvidence(evidence)
|
||||
|
@ -1409,17 +1406,22 @@ func (cs *ConsensusState) defaultSetProposal(proposal *types.Proposal) error {
|
|||
|
||||
// NOTE: block is not necessarily valid.
|
||||
// Asynchronously triggers either enterPrevote (before we timeout of propose) or tryFinalizeCommit, once we have the full block.
|
||||
func (cs *ConsensusState) addProposalBlockPart(height int64, part *types.Part) (added bool, err error) {
|
||||
func (cs *ConsensusState) addProposalBlockPart(msg *BlockPartMessage, peerID p2p.ID) (added bool, err error) {
|
||||
height, round, part := msg.Height, msg.Round, msg.Part
|
||||
|
||||
// Blocks might be reused, so round mismatch is OK
|
||||
if cs.Height != height {
|
||||
cs.Logger.Debug("Received block part from wrong height", "height", height)
|
||||
cs.Logger.Debug("Received block part from wrong height", "height", height, "round", round)
|
||||
return false, nil
|
||||
}
|
||||
|
||||
// We're not expecting a block part.
|
||||
if cs.ProposalBlockParts == nil {
|
||||
cs.Logger.Info("Received a block part when we're not expecting any", "height", height)
|
||||
return false, nil // TODO: bad peer? Return error?
|
||||
// NOTE: this can happen when we've gone to a higher round and
|
||||
// then receive parts from the previous round - not necessarily a bad peer.
|
||||
cs.Logger.Info("Received a block part when we're not expecting any",
|
||||
"height", height, "round", round, "index", part.Index, "peer", peerID)
|
||||
return false, nil
|
||||
}
|
||||
|
||||
added, err = cs.ProposalBlockParts.AddPart(part)
|
||||
|
@ -1453,7 +1455,7 @@ func (cs *ConsensusState) addProposalBlockPart(height int64, part *types.Part) (
|
|||
// procedure at this point.
|
||||
}
|
||||
|
||||
if cs.Step == cstypes.RoundStepPropose && cs.isProposalComplete() {
|
||||
if cs.Step <= cstypes.RoundStepPropose && cs.isProposalComplete() {
|
||||
// Move onto the next step
|
||||
cs.enterPrevote(height, cs.Round)
|
||||
} else if cs.Step == cstypes.RoundStepCommit {
|
||||
|
|
|
@ -10,8 +10,8 @@ import (
|
|||
cstypes "github.com/tendermint/tendermint/consensus/types"
|
||||
tmpubsub "github.com/tendermint/tendermint/libs/pubsub"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
"github.com/tendermint/tmlibs/log"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
"github.com/tendermint/tendermint/libs/log"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
|
|
@ -3,8 +3,8 @@ package consensus
|
|||
import (
|
||||
"time"
|
||||
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
"github.com/tendermint/tmlibs/log"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
"github.com/tendermint/tendermint/libs/log"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
|
||||
"github.com/tendermint/tendermint/p2p"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
)
|
||||
|
||||
type RoundVoteSet struct {
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
|
||||
cfg "github.com/tendermint/tendermint/config"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
)
|
||||
|
||||
var config *cfg.Config // NOTE: must be reset for each _test.go file
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/tendermint/tendermint/types"
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/tendermint/tendermint/types"
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
"github.com/tendermint/go-amino"
|
||||
"github.com/tendermint/tendermint/crypto"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
)
|
||||
|
||||
func BenchmarkRoundStateDeepCopy(b *testing.B) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package consensus
|
||||
|
||||
import (
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
)
|
||||
|
||||
// kind of arbitrary
|
||||
|
|
|
@ -12,8 +12,8 @@ import (
|
|||
|
||||
amino "github.com/tendermint/go-amino"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
auto "github.com/tendermint/tmlibs/autofile"
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
auto "github.com/tendermint/tendermint/libs/autofile"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -17,10 +17,10 @@ import (
|
|||
"github.com/tendermint/tendermint/proxy"
|
||||
sm "github.com/tendermint/tendermint/state"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
auto "github.com/tendermint/tmlibs/autofile"
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
"github.com/tendermint/tmlibs/db"
|
||||
"github.com/tendermint/tmlibs/log"
|
||||
auto "github.com/tendermint/tendermint/libs/autofile"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
"github.com/tendermint/tendermint/libs/db"
|
||||
"github.com/tendermint/tendermint/libs/log"
|
||||
)
|
||||
|
||||
// WALWithNBlocks generates a consensus WAL. It does this by spining up a
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
|
||||
"github.com/tendermint/tendermint/consensus/types"
|
||||
tmtypes "github.com/tendermint/tendermint/types"
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
|
|
@ -28,4 +28,4 @@ https://bitcointalk.org/?topic=102395
|
|||
TODO(ismail): add 2nd pre-image protection or clarify further on how we use this and why this secure.
|
||||
|
||||
*/
|
||||
package merkle
|
||||
package merkle
|
||||
|
|
|
@ -2,7 +2,7 @@ package merkle
|
|||
|
||||
import (
|
||||
"github.com/tendermint/tendermint/crypto/tmhash"
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
)
|
||||
|
||||
// Merkle tree from a map.
|
||||
|
|
|
@ -9,12 +9,12 @@ func SimpleHashFromTwoHashes(left, right []byte) []byte {
|
|||
var hasher = tmhash.New()
|
||||
err := encodeByteSlice(hasher, left)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
panic(err)
|
||||
}
|
||||
err = encodeByteSlice(hasher, right)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
panic(err)
|
||||
}
|
||||
return hasher.Sum(nil)
|
||||
}
|
||||
|
||||
|
|
|
@ -3,11 +3,11 @@ package merkle
|
|||
import (
|
||||
"bytes"
|
||||
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
. "github.com/tendermint/tmlibs/test"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
. "github.com/tendermint/tendermint/libs/test"
|
||||
|
||||
"testing"
|
||||
"github.com/tendermint/tendermint/crypto/tmhash"
|
||||
"testing"
|
||||
)
|
||||
|
||||
type testItem []byte
|
||||
|
|
|
@ -12,7 +12,7 @@ import (
|
|||
"github.com/tendermint/ed25519"
|
||||
"github.com/tendermint/ed25519/extra25519"
|
||||
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
|
||||
"github.com/tendermint/tendermint/crypto/tmhash"
|
||||
)
|
||||
|
@ -40,8 +40,10 @@ type PubKey interface {
|
|||
|
||||
var _ PubKey = PubKeyEd25519{}
|
||||
|
||||
const PubKeyEd25519Size = 32
|
||||
|
||||
// Implements PubKeyInner
|
||||
type PubKeyEd25519 [32]byte
|
||||
type PubKeyEd25519 [PubKeyEd25519Size]byte
|
||||
|
||||
// Address is the SHA256-20 of the raw pubkey bytes.
|
||||
func (pubKey PubKeyEd25519) Address() Address {
|
||||
|
@ -62,15 +64,15 @@ func (pubKey PubKeyEd25519) VerifyBytes(msg []byte, sig_ Signature) bool {
|
|||
if !ok {
|
||||
return false
|
||||
}
|
||||
pubKeyBytes := [32]byte(pubKey)
|
||||
sigBytes := [64]byte(sig)
|
||||
pubKeyBytes := [PubKeyEd25519Size]byte(pubKey)
|
||||
sigBytes := [SignatureEd25519Size]byte(sig)
|
||||
return ed25519.Verify(&pubKeyBytes, msg, &sigBytes)
|
||||
}
|
||||
|
||||
// For use with golang/crypto/nacl/box
|
||||
// If error, returns nil.
|
||||
func (pubKey PubKeyEd25519) ToCurve25519() *[32]byte {
|
||||
keyCurve25519, pubKeyBytes := new([32]byte), [32]byte(pubKey)
|
||||
func (pubKey PubKeyEd25519) ToCurve25519() *[PubKeyEd25519Size]byte {
|
||||
keyCurve25519, pubKeyBytes := new([PubKeyEd25519Size]byte), [PubKeyEd25519Size]byte(pubKey)
|
||||
ok := extra25519.PublicKeyToCurve25519(keyCurve25519, &pubKeyBytes)
|
||||
if !ok {
|
||||
return nil
|
||||
|
@ -94,10 +96,12 @@ func (pubKey PubKeyEd25519) Equals(other PubKey) bool {
|
|||
|
||||
var _ PubKey = PubKeySecp256k1{}
|
||||
|
||||
const PubKeySecp256k1Size = 33
|
||||
|
||||
// Implements PubKey.
|
||||
// Compressed pubkey (just the x-cord),
|
||||
// prefixed with 0x02 or 0x03, depending on the y-cord.
|
||||
type PubKeySecp256k1 [33]byte
|
||||
type PubKeySecp256k1 [PubKeySecp256k1Size]byte
|
||||
|
||||
// Implements Bitcoin style addresses: RIPEMD160(SHA256(pubkey))
|
||||
func (pubKey PubKeySecp256k1) Address() Address {
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
"io"
|
||||
"sync"
|
||||
|
||||
. "github.com/tendermint/tmlibs/common"
|
||||
. "github.com/tendermint/tendermint/libs/common"
|
||||
)
|
||||
|
||||
var gRandInfo *randInfo
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
|
||||
"crypto/subtle"
|
||||
|
||||
. "github.com/tendermint/tmlibs/common"
|
||||
. "github.com/tendermint/tendermint/libs/common"
|
||||
)
|
||||
|
||||
func SignatureFromBytes(pubKeyBytes []byte) (pubKey Signature, err error) {
|
||||
|
@ -25,8 +25,10 @@ type Signature interface {
|
|||
|
||||
var _ Signature = SignatureEd25519{}
|
||||
|
||||
const SignatureEd25519Size = 64
|
||||
|
||||
// Implements Signature
|
||||
type SignatureEd25519 [64]byte
|
||||
type SignatureEd25519 [SignatureEd25519Size]byte
|
||||
|
||||
func (sig SignatureEd25519) Bytes() []byte {
|
||||
bz, err := cdc.MarshalBinaryBare(sig)
|
||||
|
|
|
@ -3,7 +3,7 @@ package crypto
|
|||
import (
|
||||
"errors"
|
||||
|
||||
. "github.com/tendermint/tmlibs/common"
|
||||
. "github.com/tendermint/tendermint/libs/common"
|
||||
"golang.org/x/crypto/nacl/secretbox"
|
||||
)
|
||||
|
||||
|
|
|
@ -1,14 +1,28 @@
|
|||
Here lies our documentation. After making edits, run:
|
||||
# Tendermint
|
||||
|
||||
```
|
||||
pip install -r requirements.txt
|
||||
make html
|
||||
```
|
||||
Welcome to the Tendermint Core documentation! The introduction below provides
|
||||
an overview to help you navigate to your area of interest.
|
||||
|
||||
to build the docs locally then open the file `_build/html/index.html` in your browser.
|
||||
## Introduction
|
||||
|
||||
**WARNING:** This documentation is intended to be viewed at:
|
||||
Tendermint Core is Byzantine Fault Tolerant (BFT) middleware that takes a state
|
||||
transition machine - written in any programming language - and securely
|
||||
replicates it on many machines. In other words, a blockchain.
|
||||
|
||||
https://tendermint.readthedocs.io
|
||||
Tendermint requires an application running over the Application Blockchain
|
||||
Interface (ABCI) - and comes packaged with an example application to do so.
|
||||
Follow the [installation instructions](./install) to get up and running
|
||||
quickly. For more details on [using tendermint](./using-tendermint) see that
|
||||
and the following sections.
|
||||
|
||||
and may contain broken internal links when viewed from Github.
|
||||
## Networks
|
||||
|
||||
Testnets can be setup manually on one or more machines, or automatically on one
|
||||
or more machine, using a variety of methods described in the [deploy testnets
|
||||
section](./deploy-testnets). For more information (and to join) about the
|
||||
Cosmos Network testnets, see [here](/getting-started/full-node.md).
|
||||
|
||||
## Application Development
|
||||
|
||||
The first step to building application on Tendermint is to [install
|
||||
ABCI-CLI](./getting-started) and play with the example applications.
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
.toggle {
|
||||
padding-bottom: 1em ;
|
||||
}
|
||||
|
||||
.toggle .header {
|
||||
display: block;
|
||||
clear: both;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.toggle .header:after {
|
||||
content: " ▼";
|
||||
}
|
||||
|
||||
.toggle .header.open:after {
|
||||
content: " ▲";
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
let makeCodeBlocksCollapsible = function() {
|
||||
$(".toggle > *").hide();
|
||||
$(".toggle .header").show();
|
||||
$(".toggle .header").click(function() {
|
||||
$(this).parent().children().not(".header").toggle({"duration": 400});
|
||||
$(this).parent().children(".header").toggleClass("open");
|
||||
});
|
||||
};
|
||||
// we could use the }(); way if we would have access to jQuery in HEAD, i.e. we would need to force the theme
|
||||
// to load jQuery before our custom scripts
|
|
@ -1,20 +0,0 @@
|
|||
{% extends "!layout.html" %}
|
||||
|
||||
{% set css_files = css_files + ["_static/custom_collapsible_code.css"] %}
|
||||
|
||||
# sadly, I didn't find a css style way to add custom JS to a list that is automagically added to head like CSS (above) #}
|
||||
{% block extrahead %}
|
||||
<script type="text/javascript" src="_static/custom_collapsible_code.js"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block footer %}
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
// using this approach as we don't have access to the jQuery selectors
|
||||
// when executing the function on load in HEAD
|
||||
makeCodeBlocksCollapsible();
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
|
|
@ -323,6 +323,6 @@ connects to the app using three separate connections, each with its own
|
|||
pattern of messages.
|
||||
|
||||
For more information, see the [application developers
|
||||
guide](./app-development.html). For examples of running an ABCI app with
|
||||
Tendermint, see the [getting started guide](./getting-started.html).
|
||||
guide](./app-development.md). For examples of running an ABCI app with
|
||||
Tendermint, see the [getting started guide](./getting-started.md).
|
||||
Next is the ABCI specification.
|
||||
|
|
|
@ -394,13 +394,13 @@ serialize each query as a single byte array. Additionally, certain
|
|||
instance about which peers to connect to.
|
||||
|
||||
Tendermint Core currently uses the Query connection to filter peers upon
|
||||
connecting, according to IP address or public key. For instance,
|
||||
connecting, according to IP address or node ID. For instance,
|
||||
returning non-OK ABCI response to either of the following queries will
|
||||
cause Tendermint to not connect to the corresponding peer:
|
||||
|
||||
- `p2p/filter/addr/<addr>`, where `<addr>` is an IP address.
|
||||
- `p2p/filter/pubkey/<pubkey>`, where `<pubkey>` is the hex-encoded
|
||||
ED25519 key of the node (not it's validator key)
|
||||
- `p2p/filter/addr/<ip addr>`, where `<ip addr>` is an IP address.
|
||||
- `p2p/filter/id/<id>`, where `<is>` is the hex-encoded node ID (the hash of
|
||||
the node's p2p pubkey).
|
||||
|
||||
Note: these query formats are subject to change!
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ Here are the steps to setting up a testnet manually:
|
|||
|
||||
After a few seconds, all the nodes should connect to each other and
|
||||
start making blocks! For more information, see the Tendermint Networks
|
||||
section of [the guide to using Tendermint](using-tendermint.html).
|
||||
section of [the guide to using Tendermint](./using-tendermint.md).
|
||||
|
||||
But wait! Steps 3 and 4 are quite manual. Instead, use [this
|
||||
script](https://github.com/tendermint/tendermint/blob/develop/docs/examples/init_testnet.sh),
|
||||
|
|
|
@ -7,7 +7,7 @@ application you want to run. So, to run a complete blockchain that does
|
|||
something useful, you must start two programs: one is Tendermint Core,
|
||||
the other is your application, which can be written in any programming
|
||||
language. Recall from [the intro to
|
||||
ABCI](introduction.html#ABCI-Overview) that Tendermint Core handles all
|
||||
ABCI](./introduction.md#ABCI-Overview) that Tendermint Core handles all
|
||||
the p2p and consensus stuff, and just forwards transactions to the
|
||||
application when they need to be validated, or when they're ready to be
|
||||
committed to a block.
|
||||
|
@ -58,7 +58,7 @@ Tendermint before, use:
|
|||
If you have used Tendermint, you may want to reset the data for a new
|
||||
blockchain by running `tendermint unsafe_reset_all`. Then you can run
|
||||
`tendermint node` to start Tendermint, and connect to the app. For more
|
||||
details, see [the guide on using Tendermint](./using-tendermint.html).
|
||||
details, see [the guide on using Tendermint](./using-tendermint.md).
|
||||
|
||||
You should see Tendermint making blocks! We can get the status of our
|
||||
Tendermint node as follows:
|
||||
|
@ -125,8 +125,8 @@ The result should look like:
|
|||
|
||||
Note the `value` in the result (`YWJjZA==`); this is the base64-encoding
|
||||
of the ASCII of `abcd`. You can verify this in a python 2 shell by
|
||||
running `"61626364".decode('base64')` or in python 3 shell by running
|
||||
`import codecs; codecs.decode("61626364", 'base64').decode('ascii')`.
|
||||
running `"YWJjZA==".decode('base64')` or in python 3 shell by running
|
||||
`import codecs; codecs.decode("YWJjZA==", 'base64').decode('ascii')`.
|
||||
Stay tuned for a future release that [makes this output more
|
||||
human-readable](https://github.com/tendermint/tendermint/issues/1794).
|
||||
|
||||
|
@ -224,7 +224,7 @@ But if we send a `1`, it works again:
|
|||
}
|
||||
|
||||
For more details on the `broadcast_tx` API, see [the guide on using
|
||||
Tendermint](./using-tendermint.html).
|
||||
Tendermint](./using-tendermint.md).
|
||||
|
||||
## CounterJS - Example in Another Language
|
||||
|
||||
|
@ -243,7 +243,7 @@ devs, we keep all our code under the `$GOPATH`, so run:
|
|||
|
||||
Kill the previous `counter` and `tendermint` processes. Now run the app:
|
||||
|
||||
node example/app.js
|
||||
node example/counter.js
|
||||
|
||||
In another window, reset and start `tendermint`:
|
||||
|
||||
|
|
|
@ -53,8 +53,8 @@ Next follows a standard block creation cycle, where we enter a new
|
|||
round, propose a block, receive more than 2/3 of prevotes, then
|
||||
precommits and finally have a chance to commit a block. For details,
|
||||
please refer to [Consensus
|
||||
Overview](introduction.html#consensus-overview) or [Byzantine Consensus
|
||||
Algorithm](specification.html).
|
||||
Overview](./introduction.md#consensus-overview) or [Byzantine Consensus
|
||||
Algorithm](./spec/consensus).
|
||||
|
||||
I[10-04|13:54:30.393] enterNewRound(91/0). Current: 91/0/RoundStepNewHeight module=consensus
|
||||
I[10-04|13:54:30.393] enterPropose(91/0). Current: 91/0/RoundStepNewRound module=consensus
|
||||
|
@ -100,7 +100,7 @@ Algorithm](specification.html).
|
|||
Here is the list of modules you may encounter in Tendermint's log and a
|
||||
little overview what they do.
|
||||
|
||||
- `abci-client` As mentioned in [Application Development Guide](app-development.md#abci-design), Tendermint acts as an ABCI
|
||||
- `abci-client` As mentioned in [Application Development Guide](./app-development.md), Tendermint acts as an ABCI
|
||||
client with respect to the application and maintains 3 connections:
|
||||
mempool, consensus and query. The code used by Tendermint Core can
|
||||
be found [here](https://github.com/tendermint/tendermint/tree/develop/abci/client).
|
||||
|
@ -115,13 +115,13 @@ little overview what they do.
|
|||
found
|
||||
[here](https://github.com/tendermint/tendermint/blob/master/types/events.go).
|
||||
You can subscribe to them by calling `subscribe` RPC method. Refer
|
||||
to [RPC docs](specification/rpc.html) for additional information.
|
||||
to [RPC docs](./specification/rpc.md) for additional information.
|
||||
- `mempool` Mempool module handles all incoming transactions, whenever
|
||||
they are coming from peers or the application.
|
||||
- `p2p` Provides an abstraction around peer-to-peer communication. For
|
||||
more details, please check out the
|
||||
[README](https://github.com/tendermint/tendermint/blob/master/p2p/README.md).
|
||||
- `rpc` [Tendermint's RPC](specification/rpc.html).
|
||||
- `rpc` [Tendermint's RPC](./specification/rpc.md).
|
||||
- `rpc-server` RPC server. For implementation details, please read the
|
||||
[README](https://github.com/tendermint/tendermint/blob/master/rpc/lib/README.md).
|
||||
- `state` Represents the latest state and execution submodule, which
|
||||
|
|
|
@ -6,68 +6,10 @@
|
|||
Welcome to Tendermint!
|
||||
======================
|
||||
|
||||
This location for our documentation has been deprecated, please see:
|
||||
|
||||
.. image:: assets/tmint-logo-blue.png
|
||||
:height: 200px
|
||||
:width: 200px
|
||||
:align: center
|
||||
- https://tendermint.com/docs
|
||||
|
||||
Introduction
|
||||
------------
|
||||
The last version built by Read The Docs will still be available at:
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
introduction.md
|
||||
install.md
|
||||
getting-started.md
|
||||
using-tendermint.md
|
||||
deploy-testnets.md
|
||||
ecosystem.md
|
||||
|
||||
Tendermint Tools
|
||||
----------------
|
||||
|
||||
.. the tools/ files are pulled in from the tools repo
|
||||
.. see the bottom of conf.py
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
tools/docker.md
|
||||
terraform-and-ansible.md
|
||||
tools/benchmarking.md
|
||||
tools/monitoring.md
|
||||
|
||||
ABCI, Apps, Logging, Etc
|
||||
------------------------
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
abci-cli.md
|
||||
abci-spec.md
|
||||
app-architecture.md
|
||||
app-development.md
|
||||
subscribing-to-events-via-websocket.md
|
||||
indexing-transactions.md
|
||||
how-to-read-logs.md
|
||||
running-in-production.md
|
||||
metrics.md
|
||||
|
||||
Research & Specification
|
||||
------------------------
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
determinism.md
|
||||
transactional-semantics.md
|
||||
|
||||
.. specification.md ## keep this file for legacy purpose. needs to be fixed though
|
||||
|
||||
* For a deeper dive, see `this thesis <https://atrium.lib.uoguelph.ca/xmlui/handle/10214/9769>`__.
|
||||
* There is also the `original whitepaper <https://tendermint.com/static/docs/tendermint.pdf>`__, though it is now quite outdated.
|
||||
* Readers might also be interested in the `Cosmos Whitepaper <https://cosmos.network/whitepaper>`__ which describes Tendermint, ABCI, and how to build a scalable, heterogeneous, cryptocurrency network.
|
||||
* For example applications and related software built by the Tendermint team and other, see the `software ecosystem <https://tendermint.com/ecosystem>`__.
|
||||
|
||||
Join the `community <https://cosmos.network/community>`__ to ask questions and discuss projects.
|
||||
- https://tendermint.readthedocs.io/projects/tools/en/v0.21.0/
|
||||
|
|
|
@ -21,7 +21,7 @@ to prevent Denial-of-service attacks. You can read more about it
|
|||
### P2P
|
||||
|
||||
The core of the Tendermint peer-to-peer system is `MConnection`. Each
|
||||
connection has `MaxPacketMsgSize`, which is the maximum packet
|
||||
connection has `MaxPacketMsgPayloadSize`, which is the maximum packet
|
||||
size and bounded send & receive queues. One can impose restrictions on
|
||||
send & receive rate per connection (`SendRate`, `RecvRate`).
|
||||
|
||||
|
|
|
@ -54,17 +54,15 @@ familiar with amino encoding.
|
|||
You can simply use below table and concatenate Prefix || Length (of raw bytes) || raw bytes
|
||||
( while || stands for byte concatenation here).
|
||||
|
||||
| Type | Name | Prefix | Length |
|
||||
| ---- | ---- | ------ | ----- |
|
||||
| PubKeyEd25519 | tendermint/PubKeyEd25519 | 0x1624DE62 | 0x20 |
|
||||
| PubKeyLedgerEd25519 | tendermint/PubKeyLedgerEd25519 | 0x5C3453B2 | 0x20 |
|
||||
| PubKeySecp256k1 | tendermint/PubKeySecp256k1 | 0xEB5AE982 | 0x21 |
|
||||
| PrivKeyEd25519 | tendermint/PrivKeyEd25519 | 0xA3288912 | 0x40 |
|
||||
| PrivKeySecp256k1 | tendermint/PrivKeySecp256k1 | 0xE1B0F79A | 0x20 |
|
||||
| PrivKeyLedgerSecp256k1 | tendermint/PrivKeyLedgerSecp256k1 | 0x10CAB393 | variable |
|
||||
| PrivKeyLedgerEd25519 | tendermint/PrivKeyLedgerEd25519 | 0x0CFEEF9B | variable |
|
||||
| SignatureEd25519 | tendermint/SignatureKeyEd25519 | 0x3DA1DB2A | 0x40 |
|
||||
| SignatureSecp256k1 | tendermint/SignatureKeySecp256k1 | 0x16E1FEEA | variable |
|
||||
| Type | Name | Prefix | Length | Notes |
|
||||
| ---- | ---- | ------ | ----- | ------ |
|
||||
| PubKeyEd25519 | tendermint/PubKeyEd25519 | 0x1624DE64 | 0x20 | |
|
||||
| PubKeySecp256k1 | tendermint/PubKeySecp256k1 | 0xEB5AE987 | 0x21 | |
|
||||
| PrivKeyEd25519 | tendermint/PrivKeyEd25519 | 0xA3288910 | 0x40 | |
|
||||
| PrivKeySecp256k1 | tendermint/PrivKeySecp256k1 | 0xE1B0F79B | 0x20 | |
|
||||
| SignatureEd25519 | tendermint/SignatureEd25519 | 0x2031EA53 | 0x40 | |
|
||||
| SignatureSecp256k1 | tendermint/SignatureSecp256k1 | 0x7FC4A495 | variable |
|
||||
|
|
||||
|
||||
### Examples
|
||||
|
||||
|
@ -84,14 +82,13 @@ Addresses for each public key types are computed as follows:
|
|||
|
||||
#### Ed25519
|
||||
|
||||
RIPEMD160 hash of the Amino encoded public key:
|
||||
First 20-bytes of the SHA256 hash of the raw 32-byte public key:
|
||||
|
||||
```
|
||||
address = RIPEMD160(AMINO(pubkey))
|
||||
address = SHA256(pubkey)[:20]
|
||||
```
|
||||
|
||||
NOTE: this will soon change to the truncated 20-bytes of the SHA256 of the raw
|
||||
public key
|
||||
NOTE: before v0.22.0, this was the RIPEMD160 of the Amino encoded public key.
|
||||
|
||||
#### Secp256k1
|
||||
|
||||
|
@ -154,7 +151,15 @@ func MakeParts(obj interface{}, partSize int) []Part
|
|||
|
||||
Simple Merkle trees are used in numerous places in Tendermint to compute a cryptographic digest of a data structure.
|
||||
|
||||
RIPEMD160 is always used as the hashing function.
|
||||
Tendermint always uses the `TMHASH` hash function, which is the first 20-bytes
|
||||
of the SHA256:
|
||||
|
||||
```
|
||||
func TMHASH(bz []byte) []byte {
|
||||
shasum := SHA256(bz)
|
||||
return shasum[:20]
|
||||
}
|
||||
```
|
||||
|
||||
### Simple Merkle Root
|
||||
|
||||
|
@ -177,7 +182,7 @@ func SimpleMerkleRoot(hashes [][]byte) []byte{
|
|||
func SimpleConcatHash(left, right []byte) []byte{
|
||||
left = encodeByteSlice(left)
|
||||
right = encodeByteSlice(right)
|
||||
return RIPEMD160 (append(left, right))
|
||||
return TMHASH(append(left, right))
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -185,8 +190,8 @@ Note that the leaves are Amino encoded as byte-arrays (ie. simple Uvarint length
|
|||
prefix) before being concatenated together and hashed.
|
||||
|
||||
Note: we will abuse notion and invoke `SimpleMerkleRoot` with arguments of type `struct` or type `[]struct`.
|
||||
For `struct` arguments, we compute a `[][]byte` by sorting elements of the `struct` according to
|
||||
field name and then hashing them.
|
||||
For `struct` arguments, we compute a `[][]byte` containing the hash of each
|
||||
field in the struct sorted by the hash of the field name.
|
||||
For `[]struct` arguments, we compute a `[][]byte` by hashing the individual `struct` elements.
|
||||
|
||||
### Simple Merkle Proof
|
||||
|
|
|
@ -2,132 +2,15 @@ package main
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/tendermint/tendermint/crypto"
|
||||
amino "github.com/tendermint/go-amino"
|
||||
crypto "github.com/tendermint/tendermint/crypto"
|
||||
)
|
||||
|
||||
// SECRET
|
||||
var SECRET = []byte("some secret")
|
||||
|
||||
func printEd() {
|
||||
priv := crypto.GenPrivKeyEd25519FromSecret(SECRET)
|
||||
pub := priv.PubKey().(crypto.PubKeyEd25519)
|
||||
sigV, err := priv.Sign([]byte("hello"))
|
||||
if err != nil {
|
||||
fmt.Println("Unexpected error:", err)
|
||||
}
|
||||
sig := sigV.(crypto.SignatureEd25519)
|
||||
|
||||
name := "tendermint/PubKeyEd25519"
|
||||
length := len(pub[:])
|
||||
|
||||
fmt.Println("### PubKeyEd25519")
|
||||
fmt.Println("")
|
||||
fmt.Println("```")
|
||||
fmt.Printf("// Name: %s\n", name)
|
||||
fmt.Printf("// PrefixBytes: 0x%X \n", pub.Bytes()[:4])
|
||||
fmt.Printf("// Length: 0x%X \n", length)
|
||||
fmt.Println("// Notes: raw 32-byte Ed25519 pubkey")
|
||||
fmt.Println("type PubKeyEd25519 [32]byte")
|
||||
fmt.Println("")
|
||||
fmt.Println(`func (pubkey PubKeyEd25519) Address() []byte {
|
||||
// NOTE: hash of the Amino encoded bytes!
|
||||
return RIPEMD160(AminoEncode(pubkey))
|
||||
}`)
|
||||
fmt.Println("```")
|
||||
fmt.Println("")
|
||||
fmt.Printf("For example, the 32-byte Ed25519 pubkey `%X` would be encoded as `%X`.\n\n", pub[:], pub.Bytes())
|
||||
fmt.Printf("The address would then be `RIPEMD160(0x%X)` or `%X`\n", pub.Bytes(), pub.Address())
|
||||
fmt.Println("")
|
||||
|
||||
name = "tendermint/SignatureKeyEd25519"
|
||||
length = len(sig[:])
|
||||
|
||||
fmt.Println("### SignatureEd25519")
|
||||
fmt.Println("")
|
||||
fmt.Println("```")
|
||||
fmt.Printf("// Name: %s\n", name)
|
||||
fmt.Printf("// PrefixBytes: 0x%X \n", sig.Bytes()[:4])
|
||||
fmt.Printf("// Length: 0x%X \n", length)
|
||||
fmt.Println("// Notes: raw 64-byte Ed25519 signature")
|
||||
fmt.Println("type SignatureEd25519 [64]byte")
|
||||
fmt.Println("```")
|
||||
fmt.Println("")
|
||||
fmt.Printf("For example, the 64-byte Ed25519 signature `%X` would be encoded as `%X`\n", sig[:], sig.Bytes())
|
||||
fmt.Println("")
|
||||
|
||||
name = "tendermint/PrivKeyEd25519"
|
||||
|
||||
fmt.Println("### PrivKeyEd25519")
|
||||
fmt.Println("")
|
||||
fmt.Println("```")
|
||||
fmt.Println("// Name:", name)
|
||||
fmt.Println("// Notes: raw 32-byte priv key concatenated to raw 32-byte pub key")
|
||||
fmt.Println("type PrivKeyEd25519 [64]byte")
|
||||
fmt.Println("```")
|
||||
}
|
||||
|
||||
func printSecp() {
|
||||
priv := crypto.GenPrivKeySecp256k1FromSecret(SECRET)
|
||||
pub := priv.PubKey().(crypto.PubKeySecp256k1)
|
||||
sigV, err := priv.Sign([]byte("hello"))
|
||||
if err != nil {
|
||||
fmt.Println("Unexpected error:", err)
|
||||
}
|
||||
sig := sigV.(crypto.SignatureSecp256k1)
|
||||
|
||||
name := "tendermint/PubKeySecp256k1"
|
||||
length := len(pub[:])
|
||||
|
||||
fmt.Println("### PubKeySecp256k1")
|
||||
fmt.Println("")
|
||||
fmt.Println("```")
|
||||
fmt.Printf("// Name: %s\n", name)
|
||||
fmt.Printf("// PrefixBytes: 0x%X \n", pub.Bytes()[:4])
|
||||
fmt.Printf("// Length: 0x%X \n", length)
|
||||
fmt.Println("// Notes: OpenSSL compressed pubkey prefixed with 0x02 or 0x03")
|
||||
fmt.Println("type PubKeySecp256k1 [33]byte")
|
||||
fmt.Println("")
|
||||
fmt.Println(`func (pubkey PubKeySecp256k1) Address() []byte {
|
||||
// NOTE: hash of the raw pubkey bytes (not Amino encoded!).
|
||||
// Compatible with Bitcoin addresses.
|
||||
return RIPEMD160(SHA256(pubkey[:]))
|
||||
}`)
|
||||
fmt.Println("```")
|
||||
fmt.Println("")
|
||||
fmt.Printf("For example, the 33-byte Secp256k1 pubkey `%X` would be encoded as `%X`\n\n", pub[:], pub.Bytes())
|
||||
fmt.Printf("The address would then be `RIPEMD160(SHA256(0x%X))` or `%X`\n", pub[:], pub.Address())
|
||||
fmt.Println("")
|
||||
|
||||
name = "tendermint/SignatureKeySecp256k1"
|
||||
|
||||
fmt.Println("### SignatureSecp256k1")
|
||||
fmt.Println("")
|
||||
fmt.Println("```")
|
||||
fmt.Printf("// Name: %s\n", name)
|
||||
fmt.Printf("// PrefixBytes: 0x%X \n", sig.Bytes()[:4])
|
||||
fmt.Printf("// Length: Variable\n")
|
||||
fmt.Printf("// Encoding prefix: Variable\n")
|
||||
fmt.Println("// Notes: raw bytes of the Secp256k1 signature")
|
||||
fmt.Println("type SignatureSecp256k1 []byte")
|
||||
fmt.Println("```")
|
||||
fmt.Println("")
|
||||
fmt.Printf("For example, the Secp256k1 signature `%X` would be encoded as `%X`\n", []byte(sig[:]), sig.Bytes())
|
||||
fmt.Println("")
|
||||
|
||||
name = "tendermint/PrivKeySecp256k1"
|
||||
|
||||
fmt.Println("### PrivKeySecp256k1")
|
||||
fmt.Println("")
|
||||
fmt.Println("```")
|
||||
fmt.Println("// Name:", name)
|
||||
fmt.Println("// Notes: raw 32-byte priv key")
|
||||
fmt.Println("type PrivKeySecp256k1 [32]byte")
|
||||
fmt.Println("```")
|
||||
}
|
||||
|
||||
func main() {
|
||||
printEd()
|
||||
cdc := amino.NewCodec()
|
||||
crypto.RegisterAmino(cdc)
|
||||
cdc.PrintTypes(os.Stdout)
|
||||
fmt.Println("")
|
||||
printSecp()
|
||||
}
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
#############
|
||||
Specification
|
||||
#############
|
||||
|
||||
Here you'll find details of the Tendermint specification. Tendermint's types are produced by `godoc <https://godoc.org/github.com/tendermint/tendermint/types>`__.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
specification/block-structure.rst
|
||||
specification/byzantine-consensus-algorithm.rst
|
||||
specification/configuration.rst
|
||||
specification/corruption.rst
|
||||
specification/fast-sync.rst
|
||||
specification/genesis.rst
|
||||
specification/light-client-protocol.rst
|
||||
specification/merkle.rst
|
||||
specification/rpc.rst
|
||||
specification/secure-p2p.rst
|
||||
specification/validators.rst
|
||||
specification/wire-protocol.rst
|
|
@ -103,6 +103,9 @@ seeds = ""
|
|||
# Do not add private peers to this list if you don't want them advertised
|
||||
persistent_peers = ""
|
||||
|
||||
# UPNP port forwarding
|
||||
upnp = false
|
||||
|
||||
# Path to address book
|
||||
addr_book_file = "addrbook.json"
|
||||
|
||||
|
@ -116,7 +119,7 @@ flush_throttle_timeout = 100
|
|||
max_num_peers = 50
|
||||
|
||||
# Maximum size of a message packet payload, in bytes
|
||||
max_msg_packet_payload_size = 1024
|
||||
max_packet_msg_payload_size = 1024
|
||||
|
||||
# Rate at which packets can be sent, in bytes/second
|
||||
send_rate = 512000
|
||||
|
@ -167,10 +170,6 @@ timeout_commit = 1000
|
|||
# Make progress as soon as we have all the precommits (as if TimeoutCommit = 0)
|
||||
skip_timeout_commit = false
|
||||
|
||||
# BlockSize
|
||||
max_block_size_txs = 10000
|
||||
max_block_size_bytes = 1
|
||||
|
||||
# EmptyBlocks mode and possible interval between empty blocks in seconds
|
||||
create_empty_blocks = true
|
||||
create_empty_blocks_interval = 0
|
||||
|
|
|
@ -129,7 +129,7 @@ new blockchain will not make any blocks.
|
|||
## Configuration
|
||||
|
||||
Tendermint uses a `config.toml` for configuration. For details, see [the
|
||||
config specification](./specification/configuration.html).
|
||||
config specification](./specification/configuration.md).
|
||||
|
||||
Notable options include the socket address of the application
|
||||
(`proxy_app`), the listening address of the Tendermint peer
|
||||
|
@ -260,7 +260,7 @@ but must be positive, thus the range is: 0 through 9223372036854775807.
|
|||
Because of how the current proposer selection algorithm works, we do not
|
||||
recommend having voting powers greater than 10\^12 (ie. 1 trillion) (see
|
||||
[Proposals section of Byzantine Consensus
|
||||
Algorithm](./specification/byzantine-consensus-algorithm.html#proposals)
|
||||
Algorithm](./specification/byzantine-consensus-algorithm.md#proposals)
|
||||
for details).
|
||||
|
||||
If we want to add more nodes to the network, we have two choices: we can
|
||||
|
@ -398,7 +398,7 @@ failing, you need at least four validator nodes (e.g., 2/3).
|
|||
|
||||
Updating validators in a live network is supported but must be
|
||||
explicitly programmed by the application developer. See the [application
|
||||
developers guide](./app-development.html) for more details.
|
||||
developers guide](./app-development.md) for more details.
|
||||
|
||||
### Local Network
|
||||
|
||||
|
|
|
@ -4,9 +4,9 @@ import (
|
|||
"fmt"
|
||||
"sync"
|
||||
|
||||
clist "github.com/tendermint/tmlibs/clist"
|
||||
dbm "github.com/tendermint/tmlibs/db"
|
||||
"github.com/tendermint/tmlibs/log"
|
||||
clist "github.com/tendermint/tendermint/libs/clist"
|
||||
dbm "github.com/tendermint/tendermint/libs/db"
|
||||
"github.com/tendermint/tendermint/libs/log"
|
||||
|
||||
sm "github.com/tendermint/tendermint/state"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
|
||||
sm "github.com/tendermint/tendermint/state"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
dbm "github.com/tendermint/tmlibs/db"
|
||||
dbm "github.com/tendermint/tendermint/libs/db"
|
||||
)
|
||||
|
||||
var mockState = sm.State{}
|
||||
|
|
|
@ -6,8 +6,8 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/tendermint/go-amino"
|
||||
clist "github.com/tendermint/tmlibs/clist"
|
||||
"github.com/tendermint/tmlibs/log"
|
||||
clist "github.com/tendermint/tendermint/libs/clist"
|
||||
"github.com/tendermint/tendermint/libs/log"
|
||||
|
||||
"github.com/tendermint/tendermint/p2p"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
|
|
|
@ -10,8 +10,8 @@ import (
|
|||
|
||||
"github.com/go-kit/kit/log/term"
|
||||
|
||||
dbm "github.com/tendermint/tmlibs/db"
|
||||
"github.com/tendermint/tmlibs/log"
|
||||
dbm "github.com/tendermint/tendermint/libs/db"
|
||||
"github.com/tendermint/tendermint/libs/log"
|
||||
|
||||
cfg "github.com/tendermint/tendermint/config"
|
||||
"github.com/tendermint/tendermint/p2p"
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"fmt"
|
||||
|
||||
"github.com/tendermint/tendermint/types"
|
||||
dbm "github.com/tendermint/tmlibs/db"
|
||||
dbm "github.com/tendermint/tendermint/libs/db"
|
||||
)
|
||||
|
||||
/*
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
dbm "github.com/tendermint/tmlibs/db"
|
||||
dbm "github.com/tendermint/tendermint/libs/db"
|
||||
)
|
||||
|
||||
//-------------------------------------------
|
||||
|
|
|
@ -2,8 +2,8 @@ package evidence
|
|||
|
||||
import (
|
||||
"github.com/tendermint/go-amino"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
"github.com/tendermint/tendermint/crypto"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
)
|
||||
|
||||
var cdc = amino.NewCodec()
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue