404
Looks like we've got some broken links.Take me home.
diff --git a/.gitignore b/.gitignore index 193a42894..1cf9cdb90 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,7 @@ test/p2p/data/ test/logs coverage.txt docs/_build +docs/dist *.log abci-cli docs/node_modules/ @@ -25,6 +26,8 @@ scripts/cutWALUntil/cutWALUntil .idea/ *.iml +.vscode/ + libs/pubsub/query/fuzz_test/output shunit2 @@ -38,4 +41,4 @@ terraform.tfstate terraform.tfstate.backup terraform.tfstate.d -.vscode \ No newline at end of file +.vscode diff --git a/CHANGELOG.md b/CHANGELOG.md index 726ca9aed..6032fc204 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,60 @@ # Changelog +## v0.25.0 + +*September 22, 2018* + +Special thanks to external contributors on this release: +@scriptionist, @bradyjoestar, @WALL-E + +This release is mostly about the ConsensusParams - removing fields and enforcing MaxGas. +It also addresses some issues found via security audit, removes various unused +functions from `libs/common`, and implements +[ADR-012](https://github.com/tendermint/tendermint/blob/develop/docs/architecture/adr-012-peer-transport.md). + +Friendly reminder, we have a [bug bounty program](https://hackerone.com/tendermint). + +BREAKING CHANGES: + +* CLI/RPC/Config + * [rpc] [\#2391](https://github.com/tendermint/tendermint/issues/2391) /status `result.node_info.other` became a map + * [types] [\#2364](https://github.com/tendermint/tendermint/issues/2364) Remove `TxSize` and `BlockGossip` from `ConsensusParams` + * Maximum tx size is now set implicitly via the `BlockSize.MaxBytes` + * The size of block parts in the consensus is now fixed to 64kB + +* Apps + * [mempool] [\#2360](https://github.com/tendermint/tendermint/issues/2360) Mempool tracks the `ResponseCheckTx.GasWanted` and + `ConsensusParams.BlockSize.MaxGas` and enforces: + - `GasWanted <= MaxGas` for every tx + - `(sum of GasWanted in block) <= MaxGas` for block proposal + +* Go API + * [libs/common] [\#2431](https://github.com/tendermint/tendermint/issues/2431) Remove Word256 due to lack of use + * [libs/common] [\#2452](https://github.com/tendermint/tendermint/issues/2452) Remove the following functions due to lack of use: + * byteslice.go: cmn.IsZeros, cmn.RightPadBytes, cmn.LeftPadBytes, cmn.PrefixEndBytes + * strings.go: cmn.IsHex, cmn.StripHex + * int.go: Uint64Slice, all put/get int64 methods + +FEATURES: +- [rpc] [\#2415](https://github.com/tendermint/tendermint/issues/2415) New `/consensus_params?height=X` endpoint to query the consensus + params at any height (@scriptonist) +- [types] [\#1714](https://github.com/tendermint/tendermint/issues/1714) Add Address to GenesisValidator +- [metrics] [\#2337](https://github.com/tendermint/tendermint/issues/2337) `consensus.block_interval_metrics` is now gauge, not histogram (you will be able to see spikes, if any) +- [libs] [\#2286](https://github.com/tendermint/tendermint/issues/2286) Panic if `autofile` or `db/fsdb` permissions change from 0600. + +IMPROVEMENTS: +- [libs/db] [\#2371](https://github.com/tendermint/tendermint/issues/2371) Output error instead of panic when the given `db_backend` is not initialised (@bradyjoestar) +- [mempool] [\#2399](https://github.com/tendermint/tendermint/issues/2399) Make mempool cache a proper LRU (@bradyjoestar) +- [p2p] [\#2126](https://github.com/tendermint/tendermint/issues/2126) Introduce PeerTransport interface to improve isolation of concerns +- [libs/common] [\#2326](https://github.com/tendermint/tendermint/issues/2326) Service returns ErrNotStarted + +BUG FIXES: +- [node] [\#2294](https://github.com/tendermint/tendermint/issues/2294) Delay starting node until Genesis time +- [consensus] [\#2048](https://github.com/tendermint/tendermint/issues/2048) Correct peer statistics for marking peer as good +- [rpc] [\#2460](https://github.com/tendermint/tendermint/issues/2460) StartHTTPAndTLSServer() now passes StartTLS() errors back to the caller rather than hanging forever. +- [p2p] [\#2047](https://github.com/tendermint/tendermint/issues/2047) Accept new connections asynchronously +- [tm-bench] [\#2410](https://github.com/tendermint/tendermint/issues/2410) Enforce minimum transaction size (@WALL-E) + ## 0.24.0 *September 6th, 2018* diff --git a/CHANGELOG_PENDING.md b/CHANGELOG_PENDING.md index cd5dc06d6..81c7a3a29 100644 --- a/CHANGELOG_PENDING.md +++ b/CHANGELOG_PENDING.md @@ -1,6 +1,6 @@ # Pending -Special thanks to external contributors with PRs included in this release: +Special thanks to external contributors on this release: BREAKING CHANGES: @@ -10,11 +10,6 @@ BREAKING CHANGES: * Go API -* Blockchain Protocol - -* P2P Protocol - - FEATURES: IMPROVEMENTS: diff --git a/Makefile b/Makefile index 1fb3eacb3..ffc72c465 100644 --- a/Makefile +++ b/Makefile @@ -23,11 +23,14 @@ check: check_tools get_vendor_deps build: CGO_ENABLED=0 go build $(BUILD_FLAGS) -tags $(BUILD_TAGS) -o build/tendermint ./cmd/tendermint/ +build_c: + CGO_ENABLED=1 go build $(BUILD_FLAGS) -tags "$(BUILD_TAGS) gcc" -o build/tendermint ./cmd/tendermint/ + build_race: CGO_ENABLED=0 go build -race $(BUILD_FLAGS) -tags $(BUILD_TAGS) -o build/tendermint ./cmd/tendermint install: - CGO_ENABLED=0 go install $(BUILD_FLAGS) -tags $(BUILD_TAGS) ./cmd/tendermint + CGO_ENABLED=0 go install $(BUILD_FLAGS) -tags $(BUILD_TAGS) ./cmd/tendermint ######################################## ### Protobuf diff --git a/README.md b/README.md index 94d8d7f01..2e4146f40 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Or [Blockchain](https://en.wikipedia.org/wiki/Blockchain_(database)) for short. [![API Reference]( https://camo.githubusercontent.com/915b7be44ada53c290eb157634330494ebe3e30a/68747470733a2f2f676f646f632e6f72672f6769746875622e636f6d2f676f6c616e672f6764646f3f7374617475732e737667 )](https://godoc.org/github.com/tendermint/tendermint) -[![Go version](https://img.shields.io/badge/go-1.9.2-blue.svg)](https://github.com/moovweb/gvm) +[![Go version](https://img.shields.io/badge/go-1.10.4-blue.svg)](https://github.com/moovweb/gvm) [![riot.im](https://img.shields.io/badge/riot.im-JOIN%20CHAT-green.svg)](https://riot.im/app/#/room/#tendermint:matrix.org) [![license](https://img.shields.io/github/license/tendermint/tendermint.svg)](https://github.com/tendermint/tendermint/blob/master/LICENSE) [![](https://tokei.rs/b1/github/tendermint/tendermint?category=lines)](https://github.com/tendermint/tendermint) @@ -22,7 +22,10 @@ develop | [![CircleCI](https://circleci.com/gh/tendermint/tendermint/tree/deve 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. -For protocol details, see [the specification](/docs/spec). For a consensus proof and detailed protocol analysis checkout our recent paper, "[The latest gossip on BFT consensus](https://arxiv.org/abs/1807.04938)". +For protocol details, see [the specification](/docs/spec). + +For detailed analysis of the consensus protocol, including safety and liveness proofs, +see our recent paper, "[The latest gossip on BFT consensus](https://arxiv.org/abs/1807.04938)". ## A Note on Production Readiness @@ -30,7 +33,7 @@ While Tendermint is being used in production in private, permissioned environments, we are still working actively to harden and audit it in preparation for use in public blockchains, such as the [Cosmos Network](https://cosmos.network/). We are also still making breaking changes to the protocol and the APIs. -Thus we tag the releases as *alpha software*. +Thus, we tag the releases as *alpha software*. In any case, if you intend to run Tendermint in production, please [contact us](https://riot.im/app/#/room/#tendermint:matrix.org) :) @@ -46,7 +49,7 @@ For examples of the kinds of bugs we're looking for, see [SECURITY.md](SECURITY. Requirement|Notes ---|--- -Go version | Go1.9 or higher +Go version | Go1.10 or higher ## Install @@ -54,10 +57,10 @@ See the [install instructions](/docs/introduction/install.md) ## Quick Start -- [Single node](/docs/using-tendermint.md) +- [Single node](/docs/tendermint-core/using-tendermint.md) - [Local cluster using docker-compose](/networks/local) - [Remote cluster using terraform and ansible](/docs/networks/terraform-and-ansible.md) -- [Join the public testnet](https://cosmos.network/testnet) +- [Join the Cosmos testnet](https://cosmos.network/testnet) ## Resources @@ -66,30 +69,31 @@ See the [install instructions](/docs/introduction/install.md) For details about the blockchain data structures and the p2p protocols, see the the [Tendermint specification](/docs/spec). -For details on using the software, [Read The Docs](https://tendermint.readthedocs.io/en/master/). -Additional information about some - and eventually all - of the sub-projects below, can be found at Read The Docs. +For details on using the software, see the [documentation](/docs/) which is also +hosted at: https://tendermint.com/docs/ + +### Tools +Benchmarking and monitoring is provided by `tm-bench` and `tm-monitor`, respectively. +Their code is found [here](/tools) and these binaries need to be built seperately. +Additional documentation is found [here](/docs/tools). ### Sub-projects * [Amino](http://github.com/tendermint/go-amino), a reflection-based improvement on proto3 * [IAVL](http://github.com/tendermint/iavl), Merkleized IAVL+ Tree implementation -### Tools -* [Deployment, Benchmarking, and Monitoring](http://tendermint.readthedocs.io/projects/tools/en/develop/index.html#tendermint-tools) - ### Applications * [Cosmos SDK](http://github.com/cosmos/cosmos-sdk); a cryptocurrency application framework -* [Ethermint](http://github.com/tendermint/ethermint); Ethereum on Tendermint -* [Many more](https://tendermint.readthedocs.io/en/master/ecosystem.html#abci-applications) +* [Ethermint](http://github.com/cosmos/ethermint); Ethereum on Tendermint +* [Many more](https://tendermint.com/ecosystem) -### More +### Research * [Master's Thesis on Tendermint](https://atrium.lib.uoguelph.ca/xmlui/handle/10214/9769) * [Original Whitepaper](https://tendermint.com/static/docs/tendermint.pdf) -* [Tendermint Blog](https://blog.cosmos.network/tendermint/home) -* [Cosmos Blog](https://blog.cosmos.network) +* [Blog](https://blog.cosmos.network/tendermint/home) ## Contributing @@ -114,6 +118,11 @@ CHANGELOG even if they don't lead to MINOR version bumps: - rpc/client - config - node +- libs/bech32 +- libs/common +- libs/db +- libs/errors +- libs/log 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 @@ -130,6 +139,8 @@ data into the new chain. However, any bump in the PATCH version should be compatible with existing histories (if not please open an [issue](https://github.com/tendermint/tendermint/issues)). +For more information on upgrading, see [here](./UPGRADING.md) + ## Code of Conduct Please read, understand and adhere to our [code of conduct](CODE_OF_CONDUCT.md). diff --git a/UPGRADING.md b/UPGRADING.md index 16e397b22..81e56e588 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -3,6 +3,12 @@ This guide provides steps to be followed when you upgrade your applications to a newer version of Tendermint Core. +## v0.25.0 + +This release has minimal impact. + +If you use GasWanted in ABCI and want to enforce it, set the MaxGas in the genesis file (default is no max). + ## v0.24.0 New 0.24.0 release contains a lot of changes to the state and types. It's not diff --git a/Vagrantfile b/Vagrantfile index 095a6b061..320f3b1c3 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -29,10 +29,10 @@ Vagrant.configure("2") do |config| usermod -a -G docker vagrant # install go - wget -q https://dl.google.com/go/go1.10.1.linux-amd64.tar.gz - tar -xvf go1.10.1.linux-amd64.tar.gz + wget -q https://dl.google.com/go/go1.11.linux-amd64.tar.gz + tar -xvf go1.11.linux-amd64.tar.gz mv go /usr/local - rm -f go1.10.1.linux-amd64.tar.gz + rm -f go1.11.linux-amd64.tar.gz # cleanup apt-get autoremove -y diff --git a/abci/example/kvstore/kvstore.go b/abci/example/kvstore/kvstore.go index d8d18d5e2..c1554cc57 100644 --- a/abci/example/kvstore/kvstore.go +++ b/abci/example/kvstore/kvstore.go @@ -88,7 +88,7 @@ func (app *KVStoreApplication) DeliverTx(tx []byte) types.ResponseDeliverTx { } func (app *KVStoreApplication) CheckTx(tx []byte) types.ResponseCheckTx { - return types.ResponseCheckTx{Code: code.CodeTypeOK} + return types.ResponseCheckTx{Code: code.CodeTypeOK, GasWanted: 1} } func (app *KVStoreApplication) Commit() types.ResponseCommit { diff --git a/abci/types/types.pb.go b/abci/types/types.pb.go index 7873f0975..3c7f81ab6 100644 --- a/abci/types/types.pb.go +++ b/abci/types/types.pb.go @@ -60,7 +60,7 @@ func (m *Request) Reset() { *m = Request{} } func (m *Request) String() string { return proto.CompactTextString(m) } func (*Request) ProtoMessage() {} func (*Request) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{0} + return fileDescriptor_types_8495fed925debe52, []int{0} } func (m *Request) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -482,7 +482,7 @@ func (m *RequestEcho) Reset() { *m = RequestEcho{} } func (m *RequestEcho) String() string { return proto.CompactTextString(m) } func (*RequestEcho) ProtoMessage() {} func (*RequestEcho) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{1} + return fileDescriptor_types_8495fed925debe52, []int{1} } func (m *RequestEcho) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -528,7 +528,7 @@ func (m *RequestFlush) Reset() { *m = RequestFlush{} } func (m *RequestFlush) String() string { return proto.CompactTextString(m) } func (*RequestFlush) ProtoMessage() {} func (*RequestFlush) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{2} + return fileDescriptor_types_8495fed925debe52, []int{2} } func (m *RequestFlush) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -568,7 +568,7 @@ func (m *RequestInfo) Reset() { *m = RequestInfo{} } func (m *RequestInfo) String() string { return proto.CompactTextString(m) } func (*RequestInfo) ProtoMessage() {} func (*RequestInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{3} + return fileDescriptor_types_8495fed925debe52, []int{3} } func (m *RequestInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -617,7 +617,7 @@ func (m *RequestSetOption) Reset() { *m = RequestSetOption{} } func (m *RequestSetOption) String() string { return proto.CompactTextString(m) } func (*RequestSetOption) ProtoMessage() {} func (*RequestSetOption) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{4} + return fileDescriptor_types_8495fed925debe52, []int{4} } func (m *RequestSetOption) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -675,7 +675,7 @@ func (m *RequestInitChain) Reset() { *m = RequestInitChain{} } func (m *RequestInitChain) String() string { return proto.CompactTextString(m) } func (*RequestInitChain) ProtoMessage() {} func (*RequestInitChain) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{5} + return fileDescriptor_types_8495fed925debe52, []int{5} } func (m *RequestInitChain) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -753,7 +753,7 @@ func (m *RequestQuery) Reset() { *m = RequestQuery{} } func (m *RequestQuery) String() string { return proto.CompactTextString(m) } func (*RequestQuery) ProtoMessage() {} func (*RequestQuery) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{6} + return fileDescriptor_types_8495fed925debe52, []int{6} } func (m *RequestQuery) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -825,7 +825,7 @@ func (m *RequestBeginBlock) Reset() { *m = RequestBeginBlock{} } func (m *RequestBeginBlock) String() string { return proto.CompactTextString(m) } func (*RequestBeginBlock) ProtoMessage() {} func (*RequestBeginBlock) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{7} + return fileDescriptor_types_8495fed925debe52, []int{7} } func (m *RequestBeginBlock) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -893,7 +893,7 @@ func (m *RequestCheckTx) Reset() { *m = RequestCheckTx{} } func (m *RequestCheckTx) String() string { return proto.CompactTextString(m) } func (*RequestCheckTx) ProtoMessage() {} func (*RequestCheckTx) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{8} + return fileDescriptor_types_8495fed925debe52, []int{8} } func (m *RequestCheckTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -940,7 +940,7 @@ func (m *RequestDeliverTx) Reset() { *m = RequestDeliverTx{} } func (m *RequestDeliverTx) String() string { return proto.CompactTextString(m) } func (*RequestDeliverTx) ProtoMessage() {} func (*RequestDeliverTx) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{9} + return fileDescriptor_types_8495fed925debe52, []int{9} } func (m *RequestDeliverTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -987,7 +987,7 @@ func (m *RequestEndBlock) Reset() { *m = RequestEndBlock{} } func (m *RequestEndBlock) String() string { return proto.CompactTextString(m) } func (*RequestEndBlock) ProtoMessage() {} func (*RequestEndBlock) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{10} + return fileDescriptor_types_8495fed925debe52, []int{10} } func (m *RequestEndBlock) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1033,7 +1033,7 @@ func (m *RequestCommit) Reset() { *m = RequestCommit{} } func (m *RequestCommit) String() string { return proto.CompactTextString(m) } func (*RequestCommit) ProtoMessage() {} func (*RequestCommit) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{11} + return fileDescriptor_types_8495fed925debe52, []int{11} } func (m *RequestCommit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1086,7 +1086,7 @@ func (m *Response) Reset() { *m = Response{} } func (m *Response) String() string { return proto.CompactTextString(m) } func (*Response) ProtoMessage() {} func (*Response) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{12} + return fileDescriptor_types_8495fed925debe52, []int{12} } func (m *Response) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1539,7 +1539,7 @@ func (m *ResponseException) Reset() { *m = ResponseException{} } func (m *ResponseException) String() string { return proto.CompactTextString(m) } func (*ResponseException) ProtoMessage() {} func (*ResponseException) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{13} + return fileDescriptor_types_8495fed925debe52, []int{13} } func (m *ResponseException) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1586,7 +1586,7 @@ func (m *ResponseEcho) Reset() { *m = ResponseEcho{} } func (m *ResponseEcho) String() string { return proto.CompactTextString(m) } func (*ResponseEcho) ProtoMessage() {} func (*ResponseEcho) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{14} + return fileDescriptor_types_8495fed925debe52, []int{14} } func (m *ResponseEcho) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1632,7 +1632,7 @@ func (m *ResponseFlush) Reset() { *m = ResponseFlush{} } func (m *ResponseFlush) String() string { return proto.CompactTextString(m) } func (*ResponseFlush) ProtoMessage() {} func (*ResponseFlush) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{15} + return fileDescriptor_types_8495fed925debe52, []int{15} } func (m *ResponseFlush) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1675,7 +1675,7 @@ func (m *ResponseInfo) Reset() { *m = ResponseInfo{} } func (m *ResponseInfo) String() string { return proto.CompactTextString(m) } func (*ResponseInfo) ProtoMessage() {} func (*ResponseInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{16} + return fileDescriptor_types_8495fed925debe52, []int{16} } func (m *ResponseInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1747,7 +1747,7 @@ func (m *ResponseSetOption) Reset() { *m = ResponseSetOption{} } func (m *ResponseSetOption) String() string { return proto.CompactTextString(m) } func (*ResponseSetOption) ProtoMessage() {} func (*ResponseSetOption) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{17} + return fileDescriptor_types_8495fed925debe52, []int{17} } func (m *ResponseSetOption) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1809,7 +1809,7 @@ func (m *ResponseInitChain) Reset() { *m = ResponseInitChain{} } func (m *ResponseInitChain) String() string { return proto.CompactTextString(m) } func (*ResponseInitChain) ProtoMessage() {} func (*ResponseInitChain) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{18} + return fileDescriptor_types_8495fed925debe52, []int{18} } func (m *ResponseInitChain) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1871,7 +1871,7 @@ func (m *ResponseQuery) Reset() { *m = ResponseQuery{} } func (m *ResponseQuery) String() string { return proto.CompactTextString(m) } func (*ResponseQuery) ProtoMessage() {} func (*ResponseQuery) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{19} + return fileDescriptor_types_8495fed925debe52, []int{19} } func (m *ResponseQuery) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1967,7 +1967,7 @@ func (m *ResponseBeginBlock) Reset() { *m = ResponseBeginBlock{} } func (m *ResponseBeginBlock) String() string { return proto.CompactTextString(m) } func (*ResponseBeginBlock) ProtoMessage() {} func (*ResponseBeginBlock) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{20} + return fileDescriptor_types_8495fed925debe52, []int{20} } func (m *ResponseBeginBlock) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2020,7 +2020,7 @@ func (m *ResponseCheckTx) Reset() { *m = ResponseCheckTx{} } func (m *ResponseCheckTx) String() string { return proto.CompactTextString(m) } func (*ResponseCheckTx) ProtoMessage() {} func (*ResponseCheckTx) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{21} + return fileDescriptor_types_8495fed925debe52, []int{21} } func (m *ResponseCheckTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2115,7 +2115,7 @@ func (m *ResponseDeliverTx) Reset() { *m = ResponseDeliverTx{} } func (m *ResponseDeliverTx) String() string { return proto.CompactTextString(m) } func (*ResponseDeliverTx) ProtoMessage() {} func (*ResponseDeliverTx) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{22} + return fileDescriptor_types_8495fed925debe52, []int{22} } func (m *ResponseDeliverTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2206,7 +2206,7 @@ func (m *ResponseEndBlock) Reset() { *m = ResponseEndBlock{} } func (m *ResponseEndBlock) String() string { return proto.CompactTextString(m) } func (*ResponseEndBlock) ProtoMessage() {} func (*ResponseEndBlock) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{23} + return fileDescriptor_types_8495fed925debe52, []int{23} } func (m *ResponseEndBlock) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2268,7 +2268,7 @@ func (m *ResponseCommit) Reset() { *m = ResponseCommit{} } func (m *ResponseCommit) String() string { return proto.CompactTextString(m) } func (*ResponseCommit) ProtoMessage() {} func (*ResponseCommit) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{24} + return fileDescriptor_types_8495fed925debe52, []int{24} } func (m *ResponseCommit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2307,19 +2307,18 @@ func (m *ResponseCommit) GetData() []byte { // ConsensusParams contains all consensus-relevant parameters // that can be adjusted by the abci app type ConsensusParams struct { - BlockSize *BlockSize `protobuf:"bytes,1,opt,name=block_size,json=blockSize" json:"block_size,omitempty"` - TxSize *TxSize `protobuf:"bytes,2,opt,name=tx_size,json=txSize" json:"tx_size,omitempty"` - BlockGossip *BlockGossip `protobuf:"bytes,3,opt,name=block_gossip,json=blockGossip" json:"block_gossip,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + BlockSize *BlockSize `protobuf:"bytes,1,opt,name=block_size,json=blockSize" json:"block_size,omitempty"` + EvidenceParams *EvidenceParams `protobuf:"bytes,2,opt,name=evidence_params,json=evidenceParams" json:"evidence_params,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *ConsensusParams) Reset() { *m = ConsensusParams{} } func (m *ConsensusParams) String() string { return proto.CompactTextString(m) } func (*ConsensusParams) ProtoMessage() {} func (*ConsensusParams) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{25} + return fileDescriptor_types_8495fed925debe52, []int{25} } func (m *ConsensusParams) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2355,23 +2354,18 @@ func (m *ConsensusParams) GetBlockSize() *BlockSize { return nil } -func (m *ConsensusParams) GetTxSize() *TxSize { +func (m *ConsensusParams) GetEvidenceParams() *EvidenceParams { if m != nil { - return m.TxSize - } - return nil -} - -func (m *ConsensusParams) GetBlockGossip() *BlockGossip { - if m != nil { - return m.BlockGossip + return m.EvidenceParams } return nil } // BlockSize contains limits on the block size. type BlockSize struct { - MaxBytes int32 `protobuf:"varint,1,opt,name=max_bytes,json=maxBytes,proto3" json:"max_bytes,omitempty"` + // Note: must be greater than 0 + MaxBytes int64 `protobuf:"varint,1,opt,name=max_bytes,json=maxBytes,proto3" json:"max_bytes,omitempty"` + // Note: must be greater or equal to -1 MaxGas int64 `protobuf:"varint,2,opt,name=max_gas,json=maxGas,proto3" json:"max_gas,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -2382,7 +2376,7 @@ func (m *BlockSize) Reset() { *m = BlockSize{} } func (m *BlockSize) String() string { return proto.CompactTextString(m) } func (*BlockSize) ProtoMessage() {} func (*BlockSize) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{26} + return fileDescriptor_types_8495fed925debe52, []int{26} } func (m *BlockSize) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2411,7 +2405,7 @@ func (m *BlockSize) XXX_DiscardUnknown() { var xxx_messageInfo_BlockSize proto.InternalMessageInfo -func (m *BlockSize) GetMaxBytes() int32 { +func (m *BlockSize) GetMaxBytes() int64 { if m != nil { return m.MaxBytes } @@ -2425,27 +2419,27 @@ func (m *BlockSize) GetMaxGas() int64 { return 0 } -// TxSize contains limits on the tx size. -type TxSize struct { - MaxBytes int32 `protobuf:"varint,1,opt,name=max_bytes,json=maxBytes,proto3" json:"max_bytes,omitempty"` - MaxGas int64 `protobuf:"varint,2,opt,name=max_gas,json=maxGas,proto3" json:"max_gas,omitempty"` +// EvidenceParams contains limits on the evidence. +type EvidenceParams struct { + // Note: must be greater than 0 + MaxAge int64 `protobuf:"varint,1,opt,name=max_age,json=maxAge,proto3" json:"max_age,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *TxSize) Reset() { *m = TxSize{} } -func (m *TxSize) String() string { return proto.CompactTextString(m) } -func (*TxSize) ProtoMessage() {} -func (*TxSize) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{27} +func (m *EvidenceParams) Reset() { *m = EvidenceParams{} } +func (m *EvidenceParams) String() string { return proto.CompactTextString(m) } +func (*EvidenceParams) ProtoMessage() {} +func (*EvidenceParams) Descriptor() ([]byte, []int) { + return fileDescriptor_types_8495fed925debe52, []int{27} } -func (m *TxSize) XXX_Unmarshal(b []byte) error { +func (m *EvidenceParams) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *TxSize) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *EvidenceParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_TxSize.Marshal(b, m, deterministic) + return xxx_messageInfo_EvidenceParams.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalTo(b) @@ -2455,78 +2449,21 @@ func (m *TxSize) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (dst *TxSize) XXX_Merge(src proto.Message) { - xxx_messageInfo_TxSize.Merge(dst, src) +func (dst *EvidenceParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_EvidenceParams.Merge(dst, src) } -func (m *TxSize) XXX_Size() int { +func (m *EvidenceParams) XXX_Size() int { return m.Size() } -func (m *TxSize) XXX_DiscardUnknown() { - xxx_messageInfo_TxSize.DiscardUnknown(m) +func (m *EvidenceParams) XXX_DiscardUnknown() { + xxx_messageInfo_EvidenceParams.DiscardUnknown(m) } -var xxx_messageInfo_TxSize proto.InternalMessageInfo +var xxx_messageInfo_EvidenceParams proto.InternalMessageInfo -func (m *TxSize) GetMaxBytes() int32 { +func (m *EvidenceParams) GetMaxAge() int64 { if m != nil { - return m.MaxBytes - } - return 0 -} - -func (m *TxSize) GetMaxGas() int64 { - if m != nil { - return m.MaxGas - } - return 0 -} - -// BlockGossip determine consensus critical -// elements of how blocks are gossiped -type BlockGossip struct { - // Note: must not be 0 - BlockPartSizeBytes int32 `protobuf:"varint,1,opt,name=block_part_size_bytes,json=blockPartSizeBytes,proto3" json:"block_part_size_bytes,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *BlockGossip) Reset() { *m = BlockGossip{} } -func (m *BlockGossip) String() string { return proto.CompactTextString(m) } -func (*BlockGossip) ProtoMessage() {} -func (*BlockGossip) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{28} -} -func (m *BlockGossip) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlockGossip) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlockGossip.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *BlockGossip) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockGossip.Merge(dst, src) -} -func (m *BlockGossip) XXX_Size() int { - return m.Size() -} -func (m *BlockGossip) XXX_DiscardUnknown() { - xxx_messageInfo_BlockGossip.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockGossip proto.InternalMessageInfo - -func (m *BlockGossip) GetBlockPartSizeBytes() int32 { - if m != nil { - return m.BlockPartSizeBytes + return m.MaxAge } return 0 } @@ -2543,7 +2480,7 @@ func (m *LastCommitInfo) Reset() { *m = LastCommitInfo{} } func (m *LastCommitInfo) String() string { return proto.CompactTextString(m) } func (*LastCommitInfo) ProtoMessage() {} func (*LastCommitInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{29} + return fileDescriptor_types_8495fed925debe52, []int{28} } func (m *LastCommitInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2616,7 +2553,7 @@ func (m *Header) Reset() { *m = Header{} } func (m *Header) String() string { return proto.CompactTextString(m) } func (*Header) ProtoMessage() {} func (*Header) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{30} + return fileDescriptor_types_8495fed925debe52, []int{29} } func (m *Header) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2762,7 +2699,7 @@ func (m *BlockID) Reset() { *m = BlockID{} } func (m *BlockID) String() string { return proto.CompactTextString(m) } func (*BlockID) ProtoMessage() {} func (*BlockID) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{31} + return fileDescriptor_types_8495fed925debe52, []int{30} } func (m *BlockID) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2817,7 +2754,7 @@ func (m *PartSetHeader) Reset() { *m = PartSetHeader{} } func (m *PartSetHeader) String() string { return proto.CompactTextString(m) } func (*PartSetHeader) ProtoMessage() {} func (*PartSetHeader) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{32} + return fileDescriptor_types_8495fed925debe52, []int{31} } func (m *PartSetHeader) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2874,7 +2811,7 @@ func (m *Validator) Reset() { *m = Validator{} } func (m *Validator) String() string { return proto.CompactTextString(m) } func (*Validator) ProtoMessage() {} func (*Validator) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{33} + return fileDescriptor_types_8495fed925debe52, []int{32} } func (m *Validator) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2930,7 +2867,7 @@ func (m *ValidatorUpdate) Reset() { *m = ValidatorUpdate{} } func (m *ValidatorUpdate) String() string { return proto.CompactTextString(m) } func (*ValidatorUpdate) ProtoMessage() {} func (*ValidatorUpdate) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{34} + return fileDescriptor_types_8495fed925debe52, []int{33} } func (m *ValidatorUpdate) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2986,7 +2923,7 @@ func (m *VoteInfo) Reset() { *m = VoteInfo{} } func (m *VoteInfo) String() string { return proto.CompactTextString(m) } func (*VoteInfo) ProtoMessage() {} func (*VoteInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{35} + return fileDescriptor_types_8495fed925debe52, []int{34} } func (m *VoteInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3041,7 +2978,7 @@ func (m *PubKey) Reset() { *m = PubKey{} } func (m *PubKey) String() string { return proto.CompactTextString(m) } func (*PubKey) ProtoMessage() {} func (*PubKey) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{36} + return fileDescriptor_types_8495fed925debe52, []int{35} } func (m *PubKey) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3099,7 +3036,7 @@ func (m *Evidence) Reset() { *m = Evidence{} } func (m *Evidence) String() string { return proto.CompactTextString(m) } func (*Evidence) ProtoMessage() {} func (*Evidence) Descriptor() ([]byte, []int) { - return fileDescriptor_types_c68d3007ea320b94, []int{37} + return fileDescriptor_types_8495fed925debe52, []int{36} } func (m *Evidence) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3218,10 +3155,8 @@ func init() { golang_proto.RegisterType((*ConsensusParams)(nil), "types.ConsensusParams") proto.RegisterType((*BlockSize)(nil), "types.BlockSize") golang_proto.RegisterType((*BlockSize)(nil), "types.BlockSize") - proto.RegisterType((*TxSize)(nil), "types.TxSize") - golang_proto.RegisterType((*TxSize)(nil), "types.TxSize") - proto.RegisterType((*BlockGossip)(nil), "types.BlockGossip") - golang_proto.RegisterType((*BlockGossip)(nil), "types.BlockGossip") + proto.RegisterType((*EvidenceParams)(nil), "types.EvidenceParams") + golang_proto.RegisterType((*EvidenceParams)(nil), "types.EvidenceParams") proto.RegisterType((*LastCommitInfo)(nil), "types.LastCommitInfo") golang_proto.RegisterType((*LastCommitInfo)(nil), "types.LastCommitInfo") proto.RegisterType((*Header)(nil), "types.Header") @@ -4647,10 +4582,7 @@ func (this *ConsensusParams) Equal(that interface{}) bool { if !this.BlockSize.Equal(that1.BlockSize) { return false } - if !this.TxSize.Equal(that1.TxSize) { - return false - } - if !this.BlockGossip.Equal(that1.BlockGossip) { + if !this.EvidenceParams.Equal(that1.EvidenceParams) { return false } if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { @@ -4688,14 +4620,14 @@ func (this *BlockSize) Equal(that interface{}) bool { } return true } -func (this *TxSize) Equal(that interface{}) bool { +func (this *EvidenceParams) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*TxSize) + that1, ok := that.(*EvidenceParams) if !ok { - that2, ok := that.(TxSize) + that2, ok := that.(EvidenceParams) if ok { that1 = &that2 } else { @@ -4707,37 +4639,7 @@ func (this *TxSize) Equal(that interface{}) bool { } else if this == nil { return false } - if this.MaxBytes != that1.MaxBytes { - return false - } - if this.MaxGas != that1.MaxGas { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *BlockGossip) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*BlockGossip) - if !ok { - that2, ok := that.(BlockGossip) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.BlockPartSizeBytes != that1.BlockPartSizeBytes { + if this.MaxAge != that1.MaxAge { return false } if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { @@ -5201,8 +5103,7 @@ func (c *aBCIApplicationClient) EndBlock(ctx context.Context, in *RequestEndBloc return out, nil } -// Server API for ABCIApplication service - +// ABCIApplicationServer is the server API for ABCIApplication service. type ABCIApplicationServer interface { Echo(context.Context, *RequestEcho) (*ResponseEcho, error) Flush(context.Context, *RequestFlush) (*ResponseFlush, error) @@ -6765,26 +6666,16 @@ func (m *ConsensusParams) MarshalTo(dAtA []byte) (int, error) { } i += n32 } - if m.TxSize != nil { + if m.EvidenceParams != nil { dAtA[i] = 0x12 i++ - i = encodeVarintTypes(dAtA, i, uint64(m.TxSize.Size())) - n33, err := m.TxSize.MarshalTo(dAtA[i:]) + i = encodeVarintTypes(dAtA, i, uint64(m.EvidenceParams.Size())) + n33, err := m.EvidenceParams.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n33 } - if m.BlockGossip != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintTypes(dAtA, i, uint64(m.BlockGossip.Size())) - n34, err := m.BlockGossip.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n34 - } if m.XXX_unrecognized != nil { i += copy(dAtA[i:], m.XXX_unrecognized) } @@ -6822,7 +6713,7 @@ func (m *BlockSize) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func (m *TxSize) Marshal() (dAtA []byte, err error) { +func (m *EvidenceParams) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -6832,46 +6723,15 @@ func (m *TxSize) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *TxSize) MarshalTo(dAtA []byte) (int, error) { +func (m *EvidenceParams) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l - if m.MaxBytes != 0 { + if m.MaxAge != 0 { dAtA[i] = 0x8 i++ - i = encodeVarintTypes(dAtA, i, uint64(m.MaxBytes)) - } - if m.MaxGas != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintTypes(dAtA, i, uint64(m.MaxGas)) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *BlockGossip) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BlockGossip) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.BlockPartSizeBytes != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintTypes(dAtA, i, uint64(m.BlockPartSizeBytes)) + i = encodeVarintTypes(dAtA, i, uint64(m.MaxAge)) } if m.XXX_unrecognized != nil { i += copy(dAtA[i:], m.XXX_unrecognized) @@ -6946,11 +6806,11 @@ func (m *Header) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1a i++ i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.Time))) - n35, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i:]) + n34, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i:]) if err != nil { return 0, err } - i += n35 + i += n34 if m.NumTxs != 0 { dAtA[i] = 0x20 i++ @@ -6964,11 +6824,11 @@ func (m *Header) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x32 i++ i = encodeVarintTypes(dAtA, i, uint64(m.LastBlockId.Size())) - n36, err := m.LastBlockId.MarshalTo(dAtA[i:]) + n35, err := m.LastBlockId.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n36 + i += n35 if len(m.LastCommitHash) > 0 { dAtA[i] = 0x3a i++ @@ -7053,11 +6913,11 @@ func (m *BlockID) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintTypes(dAtA, i, uint64(m.PartsHeader.Size())) - n37, err := m.PartsHeader.MarshalTo(dAtA[i:]) + n36, err := m.PartsHeader.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n37 + i += n36 if m.XXX_unrecognized != nil { i += copy(dAtA[i:], m.XXX_unrecognized) } @@ -7146,11 +7006,11 @@ func (m *ValidatorUpdate) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintTypes(dAtA, i, uint64(m.PubKey.Size())) - n38, err := m.PubKey.MarshalTo(dAtA[i:]) + n37, err := m.PubKey.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n38 + i += n37 if m.Power != 0 { dAtA[i] = 0x10 i++ @@ -7180,11 +7040,11 @@ func (m *VoteInfo) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintTypes(dAtA, i, uint64(m.Validator.Size())) - n39, err := m.Validator.MarshalTo(dAtA[i:]) + n38, err := m.Validator.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n39 + i += n38 if m.SignedLastBlock { dAtA[i] = 0x10 i++ @@ -7258,11 +7118,11 @@ func (m *Evidence) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintTypes(dAtA, i, uint64(m.Validator.Size())) - n40, err := m.Validator.MarshalTo(dAtA[i:]) + n39, err := m.Validator.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n40 + i += n39 if m.Height != 0 { dAtA[i] = 0x18 i++ @@ -7271,11 +7131,11 @@ func (m *Evidence) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x22 i++ i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.Time))) - n41, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i:]) + n40, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i:]) if err != nil { return 0, err } - i += n41 + i += n40 if m.TotalVotingPower != 0 { dAtA[i] = 0x28 i++ @@ -7867,20 +7727,17 @@ func NewPopulatedConsensusParams(r randyTypes, easy bool) *ConsensusParams { this.BlockSize = NewPopulatedBlockSize(r, easy) } if r.Intn(10) != 0 { - this.TxSize = NewPopulatedTxSize(r, easy) - } - if r.Intn(10) != 0 { - this.BlockGossip = NewPopulatedBlockGossip(r, easy) + this.EvidenceParams = NewPopulatedEvidenceParams(r, easy) } if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedTypes(r, 4) + this.XXX_unrecognized = randUnrecognizedTypes(r, 3) } return this } func NewPopulatedBlockSize(r randyTypes, easy bool) *BlockSize { this := &BlockSize{} - this.MaxBytes = int32(r.Int31()) + this.MaxBytes = int64(r.Int63()) if r.Intn(2) == 0 { this.MaxBytes *= -1 } @@ -7894,27 +7751,11 @@ func NewPopulatedBlockSize(r randyTypes, easy bool) *BlockSize { return this } -func NewPopulatedTxSize(r randyTypes, easy bool) *TxSize { - this := &TxSize{} - this.MaxBytes = int32(r.Int31()) +func NewPopulatedEvidenceParams(r randyTypes, easy bool) *EvidenceParams { + this := &EvidenceParams{} + this.MaxAge = int64(r.Int63()) if r.Intn(2) == 0 { - this.MaxBytes *= -1 - } - this.MaxGas = int64(r.Int63()) - if r.Intn(2) == 0 { - this.MaxGas *= -1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedTypes(r, 3) - } - return this -} - -func NewPopulatedBlockGossip(r randyTypes, easy bool) *BlockGossip { - this := &BlockGossip{} - this.BlockPartSizeBytes = int32(r.Int31()) - if r.Intn(2) == 0 { - this.BlockPartSizeBytes *= -1 + this.MaxAge *= -1 } if !easy && r.Intn(10) != 0 { this.XXX_unrecognized = randUnrecognizedTypes(r, 2) @@ -8194,6 +8035,9 @@ func encodeVarintPopulateTypes(dAtA []byte, v uint64) []byte { return dAtA } func (m *Request) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Value != nil { @@ -8206,6 +8050,9 @@ func (m *Request) Size() (n int) { } func (m *Request_Echo) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Echo != nil { @@ -8215,6 +8062,9 @@ func (m *Request_Echo) Size() (n int) { return n } func (m *Request_Flush) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Flush != nil { @@ -8224,6 +8074,9 @@ func (m *Request_Flush) Size() (n int) { return n } func (m *Request_Info) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Info != nil { @@ -8233,6 +8086,9 @@ func (m *Request_Info) Size() (n int) { return n } func (m *Request_SetOption) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.SetOption != nil { @@ -8242,6 +8098,9 @@ func (m *Request_SetOption) Size() (n int) { return n } func (m *Request_InitChain) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.InitChain != nil { @@ -8251,6 +8110,9 @@ func (m *Request_InitChain) Size() (n int) { return n } func (m *Request_Query) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Query != nil { @@ -8260,6 +8122,9 @@ func (m *Request_Query) Size() (n int) { return n } func (m *Request_BeginBlock) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.BeginBlock != nil { @@ -8269,6 +8134,9 @@ func (m *Request_BeginBlock) Size() (n int) { return n } func (m *Request_CheckTx) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.CheckTx != nil { @@ -8278,6 +8146,9 @@ func (m *Request_CheckTx) Size() (n int) { return n } func (m *Request_EndBlock) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.EndBlock != nil { @@ -8287,6 +8158,9 @@ func (m *Request_EndBlock) Size() (n int) { return n } func (m *Request_Commit) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Commit != nil { @@ -8296,6 +8170,9 @@ func (m *Request_Commit) Size() (n int) { return n } func (m *Request_DeliverTx) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.DeliverTx != nil { @@ -8305,6 +8182,9 @@ func (m *Request_DeliverTx) Size() (n int) { return n } func (m *RequestEcho) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Message) @@ -8318,6 +8198,9 @@ func (m *RequestEcho) Size() (n int) { } func (m *RequestFlush) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.XXX_unrecognized != nil { @@ -8327,6 +8210,9 @@ func (m *RequestFlush) Size() (n int) { } func (m *RequestInfo) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Version) @@ -8340,6 +8226,9 @@ func (m *RequestInfo) Size() (n int) { } func (m *RequestSetOption) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Key) @@ -8357,6 +8246,9 @@ func (m *RequestSetOption) Size() (n int) { } func (m *RequestInitChain) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time) @@ -8386,6 +8278,9 @@ func (m *RequestInitChain) Size() (n int) { } func (m *RequestQuery) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Data) @@ -8409,6 +8304,9 @@ func (m *RequestQuery) Size() (n int) { } func (m *RequestBeginBlock) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Hash) @@ -8432,6 +8330,9 @@ func (m *RequestBeginBlock) Size() (n int) { } func (m *RequestCheckTx) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Tx) @@ -8445,6 +8346,9 @@ func (m *RequestCheckTx) Size() (n int) { } func (m *RequestDeliverTx) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Tx) @@ -8458,6 +8362,9 @@ func (m *RequestDeliverTx) Size() (n int) { } func (m *RequestEndBlock) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Height != 0 { @@ -8470,6 +8377,9 @@ func (m *RequestEndBlock) Size() (n int) { } func (m *RequestCommit) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.XXX_unrecognized != nil { @@ -8479,6 +8389,9 @@ func (m *RequestCommit) Size() (n int) { } func (m *Response) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Value != nil { @@ -8491,6 +8404,9 @@ func (m *Response) Size() (n int) { } func (m *Response_Exception) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Exception != nil { @@ -8500,6 +8416,9 @@ func (m *Response_Exception) Size() (n int) { return n } func (m *Response_Echo) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Echo != nil { @@ -8509,6 +8428,9 @@ func (m *Response_Echo) Size() (n int) { return n } func (m *Response_Flush) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Flush != nil { @@ -8518,6 +8440,9 @@ func (m *Response_Flush) Size() (n int) { return n } func (m *Response_Info) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Info != nil { @@ -8527,6 +8452,9 @@ func (m *Response_Info) Size() (n int) { return n } func (m *Response_SetOption) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.SetOption != nil { @@ -8536,6 +8464,9 @@ func (m *Response_SetOption) Size() (n int) { return n } func (m *Response_InitChain) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.InitChain != nil { @@ -8545,6 +8476,9 @@ func (m *Response_InitChain) Size() (n int) { return n } func (m *Response_Query) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Query != nil { @@ -8554,6 +8488,9 @@ func (m *Response_Query) Size() (n int) { return n } func (m *Response_BeginBlock) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.BeginBlock != nil { @@ -8563,6 +8500,9 @@ func (m *Response_BeginBlock) Size() (n int) { return n } func (m *Response_CheckTx) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.CheckTx != nil { @@ -8572,6 +8512,9 @@ func (m *Response_CheckTx) Size() (n int) { return n } func (m *Response_DeliverTx) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.DeliverTx != nil { @@ -8581,6 +8524,9 @@ func (m *Response_DeliverTx) Size() (n int) { return n } func (m *Response_EndBlock) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.EndBlock != nil { @@ -8590,6 +8536,9 @@ func (m *Response_EndBlock) Size() (n int) { return n } func (m *Response_Commit) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Commit != nil { @@ -8599,6 +8548,9 @@ func (m *Response_Commit) Size() (n int) { return n } func (m *ResponseException) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Error) @@ -8612,6 +8564,9 @@ func (m *ResponseException) Size() (n int) { } func (m *ResponseEcho) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Message) @@ -8625,6 +8580,9 @@ func (m *ResponseEcho) Size() (n int) { } func (m *ResponseFlush) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.XXX_unrecognized != nil { @@ -8634,6 +8592,9 @@ func (m *ResponseFlush) Size() (n int) { } func (m *ResponseInfo) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Data) @@ -8658,6 +8619,9 @@ func (m *ResponseInfo) Size() (n int) { } func (m *ResponseSetOption) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Code != 0 { @@ -8678,6 +8642,9 @@ func (m *ResponseSetOption) Size() (n int) { } func (m *ResponseInitChain) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.ConsensusParams != nil { @@ -8697,6 +8664,9 @@ func (m *ResponseInitChain) Size() (n int) { } func (m *ResponseQuery) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Code != 0 { @@ -8735,6 +8705,9 @@ func (m *ResponseQuery) Size() (n int) { } func (m *ResponseBeginBlock) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.Tags) > 0 { @@ -8750,6 +8723,9 @@ func (m *ResponseBeginBlock) Size() (n int) { } func (m *ResponseCheckTx) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Code != 0 { @@ -8786,6 +8762,9 @@ func (m *ResponseCheckTx) Size() (n int) { } func (m *ResponseDeliverTx) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Code != 0 { @@ -8822,6 +8801,9 @@ func (m *ResponseDeliverTx) Size() (n int) { } func (m *ResponseEndBlock) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.ValidatorUpdates) > 0 { @@ -8847,6 +8829,9 @@ func (m *ResponseEndBlock) Size() (n int) { } func (m *ResponseCommit) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Data) @@ -8860,18 +8845,17 @@ func (m *ResponseCommit) Size() (n int) { } func (m *ConsensusParams) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.BlockSize != nil { l = m.BlockSize.Size() n += 1 + l + sovTypes(uint64(l)) } - if m.TxSize != nil { - l = m.TxSize.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.BlockGossip != nil { - l = m.BlockGossip.Size() + if m.EvidenceParams != nil { + l = m.EvidenceParams.Size() n += 1 + l + sovTypes(uint64(l)) } if m.XXX_unrecognized != nil { @@ -8881,21 +8865,9 @@ func (m *ConsensusParams) Size() (n int) { } func (m *BlockSize) Size() (n int) { - var l int - _ = l - if m.MaxBytes != 0 { - n += 1 + sovTypes(uint64(m.MaxBytes)) + if m == nil { + return 0 } - if m.MaxGas != 0 { - n += 1 + sovTypes(uint64(m.MaxGas)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *TxSize) Size() (n int) { var l int _ = l if m.MaxBytes != 0 { @@ -8910,11 +8882,14 @@ func (m *TxSize) Size() (n int) { return n } -func (m *BlockGossip) Size() (n int) { +func (m *EvidenceParams) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l - if m.BlockPartSizeBytes != 0 { - n += 1 + sovTypes(uint64(m.BlockPartSizeBytes)) + if m.MaxAge != 0 { + n += 1 + sovTypes(uint64(m.MaxAge)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -8923,6 +8898,9 @@ func (m *BlockGossip) Size() (n int) { } func (m *LastCommitInfo) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Round != 0 { @@ -8941,6 +8919,9 @@ func (m *LastCommitInfo) Size() (n int) { } func (m *Header) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.ChainID) @@ -9003,6 +8984,9 @@ func (m *Header) Size() (n int) { } func (m *BlockID) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Hash) @@ -9018,6 +9002,9 @@ func (m *BlockID) Size() (n int) { } func (m *PartSetHeader) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Total != 0 { @@ -9034,6 +9021,9 @@ func (m *PartSetHeader) Size() (n int) { } func (m *Validator) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Address) @@ -9050,6 +9040,9 @@ func (m *Validator) Size() (n int) { } func (m *ValidatorUpdate) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.PubKey.Size() @@ -9064,6 +9057,9 @@ func (m *ValidatorUpdate) Size() (n int) { } func (m *VoteInfo) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Validator.Size() @@ -9078,6 +9074,9 @@ func (m *VoteInfo) Size() (n int) { } func (m *PubKey) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Type) @@ -9095,6 +9094,9 @@ func (m *PubKey) Size() (n int) { } func (m *Evidence) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Type) @@ -12803,7 +12805,7 @@ func (m *ConsensusParams) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TxSize", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field EvidenceParams", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -12827,43 +12829,10 @@ func (m *ConsensusParams) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.TxSize == nil { - m.TxSize = &TxSize{} + if m.EvidenceParams == nil { + m.EvidenceParams = &EvidenceParams{} } - if err := m.TxSize.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockGossip", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.BlockGossip == nil { - m.BlockGossip = &BlockGossip{} - } - if err := m.BlockGossip.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.EvidenceParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -12932,96 +12901,7 @@ func (m *BlockSize) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.MaxBytes |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxGas", wireType) - } - m.MaxGas = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxGas |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TxSize) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TxSize: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TxSize: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxBytes", wireType) - } - m.MaxBytes = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxBytes |= (int32(b) & 0x7F) << shift + m.MaxBytes |= (int64(b) & 0x7F) << shift if b < 0x80 { break } @@ -13067,7 +12947,7 @@ func (m *TxSize) Unmarshal(dAtA []byte) error { } return nil } -func (m *BlockGossip) Unmarshal(dAtA []byte) error { +func (m *EvidenceParams) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -13090,17 +12970,17 @@ func (m *BlockGossip) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: BlockGossip: wiretype end group for non-group") + return fmt.Errorf("proto: EvidenceParams: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: BlockGossip: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: EvidenceParams: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockPartSizeBytes", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MaxAge", wireType) } - m.BlockPartSizeBytes = 0 + m.MaxAge = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -13110,7 +12990,7 @@ func (m *BlockGossip) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.BlockPartSizeBytes |= (int32(b) & 0x7F) << shift + m.MaxAge |= (int64(b) & 0x7F) << shift if b < 0x80 { break } @@ -14623,143 +14503,140 @@ var ( ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") ) -func init() { proto.RegisterFile("abci/types/types.proto", fileDescriptor_types_c68d3007ea320b94) } +func init() { proto.RegisterFile("abci/types/types.proto", fileDescriptor_types_8495fed925debe52) } func init() { - golang_proto.RegisterFile("abci/types/types.proto", fileDescriptor_types_c68d3007ea320b94) -} - -var fileDescriptor_types_c68d3007ea320b94 = []byte{ - // 2099 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x58, 0x4f, 0x73, 0x1b, 0x49, - 0x15, 0xf7, 0x48, 0xb2, 0xfe, 0x3c, 0xd9, 0x92, 0xd3, 0x76, 0x6c, 0x45, 0x80, 0x9d, 0x1a, 0x20, - 0x6b, 0xb3, 0x5e, 0x7b, 0xf1, 0x12, 0xca, 0xd9, 0x2c, 0x5b, 0x58, 0x49, 0x58, 0xbb, 0x76, 0x01, - 0x33, 0x49, 0xcc, 0x85, 0xaa, 0xa9, 0x96, 0xa6, 0x2d, 0x4d, 0x45, 0x9a, 0x99, 0x9d, 0x6e, 0x79, - 0xe5, 0x7c, 0x86, 0x3d, 0xec, 0x81, 0x2a, 0xce, 0xdc, 0xf8, 0x02, 0x54, 0x71, 0xe4, 0x44, 0xed, - 0x91, 0xa2, 0xa0, 0xb8, 0x05, 0x30, 0xc5, 0x01, 0x3e, 0x01, 0x47, 0xaa, 0x5f, 0xf7, 0xfc, 0xf5, - 0x28, 0x95, 0x84, 0xdb, 0x5e, 0xa4, 0xee, 0x7e, 0xef, 0x75, 0xf7, 0x7b, 0xf3, 0xde, 0xfb, 0xbd, - 0xd7, 0xb0, 0x4e, 0xfb, 0x03, 0x77, 0x5f, 0x5c, 0x06, 0x8c, 0xab, 0xdf, 0xbd, 0x20, 0xf4, 0x85, - 0x4f, 0x16, 0x71, 0xd2, 0x7d, 0x67, 0xe8, 0x8a, 0xd1, 0xb4, 0xbf, 0x37, 0xf0, 0x27, 0xfb, 0x43, - 0x7f, 0xe8, 0xef, 0x23, 0xb5, 0x3f, 0x3d, 0xc7, 0x19, 0x4e, 0x70, 0xa4, 0xa4, 0xba, 0x5b, 0x43, - 0xdf, 0x1f, 0x8e, 0x59, 0xc2, 0x25, 0xdc, 0x09, 0xe3, 0x82, 0x4e, 0x02, 0xcd, 0x70, 0x98, 0xda, - 0x4f, 0x30, 0xcf,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 0x44, 0x51, 0xd6, 0xab, 0x7f, 0xf9, 0x62, 0x6b, 0xe1, 0x8b, 0xbf, 0x6d, 0x19, 0x16, 0x4a, 0x90, - 0x5b, 0xf2, 0x53, 0x52, 0xd7, 0xb3, 0x5d, 0x47, 0x9f, 0x53, 0xc3, 0xf9, 0x89, 0x43, 0x8e, 0x60, - 0x65, 0xe0, 0x7b, 0x9c, 0x79, 0x7c, 0xca, 0xed, 0x80, 0x86, 0x74, 0xc2, 0x75, 0x94, 0x44, 0x1f, - 0xee, 0x41, 0x44, 0x3e, 0x45, 0xaa, 0xd5, 0x1e, 0x64, 0x17, 0xc8, 0x07, 0x00, 0x17, 0x74, 0xec, - 0x3a, 0x54, 0xf8, 0x21, 0xef, 0x54, 0x6e, 0x97, 0x53, 0xc2, 0x67, 0x11, 0xe1, 0x69, 0xe0, 0x50, - 0xc1, 0x7a, 0x15, 0x79, 0x33, 0x2b, 0xc5, 0x4f, 0xee, 0x40, 0x9b, 0x06, 0x81, 0xcd, 0x05, 0x15, - 0xcc, 0xee, 0x5f, 0x0a, 0xc6, 0x31, 0x92, 0x96, 0xac, 0x65, 0x1a, 0x04, 0x8f, 0xe5, 0x6a, 0x4f, - 0x2e, 0x9a, 0x4e, 0xfc, 0x1d, 0xd0, 0xc9, 0x09, 0x81, 0x8a, 0x43, 0x05, 0x45, 0x6b, 0x2c, 0x59, - 0x38, 0x96, 0x6b, 0x01, 0x15, 0x23, 0xad, 0x23, 0x8e, 0xc9, 0x3a, 0x54, 0x47, 0xcc, 0x1d, 0x8e, - 0x04, 0xaa, 0x55, 0xb6, 0xf4, 0x4c, 0x1a, 0x3e, 0x08, 0xfd, 0x0b, 0x86, 0x71, 0x5e, 0xb7, 0xd4, - 0xc4, 0xfc, 0x97, 0x01, 0x37, 0xae, 0x05, 0x86, 0xdc, 0x77, 0x44, 0xf9, 0x28, 0x3a, 0x4b, 0x8e, - 0xc9, 0xdb, 0x72, 0x5f, 0xea, 0xb0, 0x50, 0xe7, 0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0, - 0xe0, 0x83, 0x22, 0x28, 0xb8, 0x95, 0x93, 0x99, 0x8b, 0x05, 0xef, 0x5d, 0xc3, 0x82, 0xf5, 0x9c, - 0x68, 0x01, 0x18, 0xdc, 0xcb, 0x64, 0x69, 0x28, 0xd4, 0xad, 0x38, 0x4d, 0x93, 0xef, 0x5f, 0xc7, - 0x91, 0x8d, 0xfc, 0xa7, 0x2d, 0x02, 0x92, 0xfd, 0x1c, 0x90, 0xdc, 0xcc, 0xdf, 0x32, 0x87, 0x24, - 0x09, 0x1e, 0xec, 0xc8, 0xb8, 0xcf, 0x79, 0x9a, 0xcc, 0x11, 0x2c, 0x0c, 0xfd, 0x50, 0x27, 0x6c, - 0x35, 0x31, 0xb7, 0x65, 0x26, 0x4a, 0xfc, 0xeb, 0x25, 0xd8, 0x81, 0x4e, 0x9f, 0xf2, 0x2e, 0xf3, - 0x57, 0x46, 0x22, 0x8b, 0x11, 0x9d, 0xce, 0x62, 0x0d, 0x9d, 0xc5, 0x52, 0x90, 0x52, 0xca, 0x40, - 0x0a, 0xf9, 0x0e, 0xdc, 0xc0, 0x34, 0x82, 0x76, 0xb1, 0x33, 0x69, 0xad, 0x2d, 0x09, 0xca, 0x20, - 0x2a, 0xbf, 0xbd, 0x03, 0xab, 0x29, 0x5e, 0x99, 0x62, 0x31, 0x85, 0x55, 0x30, 0x78, 0x57, 0x62, - 0xee, 0xa3, 0x20, 0x38, 0xa6, 0x7c, 0x64, 0xfe, 0x38, 0xd1, 0x3f, 0x81, 0x2b, 0x02, 0x95, 0x81, - 0xef, 0x28, 0xb5, 0x96, 0x2d, 0x1c, 0x4b, 0x08, 0x1b, 0xfb, 0x43, 0x3c, 0xb5, 0x61, 0xc9, 0xa1, - 0xe4, 0x8a, 0x23, 0xa5, 0xa1, 0x42, 0xc2, 0xfc, 0xa5, 0x91, 0xec, 0x97, 0x20, 0x58, 0x11, 0xd8, - 0x18, 0xff, 0x0f, 0xd8, 0x94, 0x5e, 0x0f, 0x6c, 0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e, 0xd8, 0x2d, 0x6e, 0x26, 0xa5, 0x92, 0x49, 0x87, - 0x33, 0xef, 0x11, 0xb7, 0x3b, 0xb7, 0xa9, 0x27, 0x47, 0x00, 0xa9, 0x9a, 0x7e, 0xee, 0xeb, 0x6c, - 0x77, 0x7e, 0xb3, 0x4e, 0xee, 0x43, 0x3d, 0x79, 0x80, 0x29, 0x7e, 0x6f, 0xed, 0xce, 0xeb, 0x9f, - 0x7b, 0x5f, 0xff, 0xef, 0x3f, 0x36, 0x8d, 0xdf, 0x5c, 0x6d, 0x1a, 0xbf, 0xbb, 0xda, 0x34, 0xbe, - 0xbc, 0xda, 0x34, 0xfe, 0x78, 0xb5, 0x69, 0xfc, 0xfd, 0x6a, 0xd3, 0xf8, 0xfd, 0x3f, 0x37, 0x8d, - 0x7e, 0x15, 0xdd, 0xff, 0xbd, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0x48, 0x26, 0x13, 0xca, 0x22, - 0x18, 0x00, 0x00, + golang_proto.RegisterFile("abci/types/types.proto", fileDescriptor_types_8495fed925debe52) +} + +var fileDescriptor_types_8495fed925debe52 = []byte{ + // 2062 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x58, 0x4f, 0x6f, 0x23, 0x49, + 0x15, 0x4f, 0xdb, 0x8e, 0xed, 0x7e, 0x49, 0xec, 0x4c, 0x25, 0x93, 0x78, 0x0c, 0x24, 0xa3, 0x06, + 0x76, 0x13, 0x36, 0x9b, 0xac, 0xb2, 0x2c, 0xca, 0xec, 0x2c, 0x2b, 0xc5, 0x33, 0x03, 0x89, 0x76, + 0x81, 0xd0, 0x33, 0x13, 0x2e, 0x48, 0xad, 0xb2, 0xbb, 0x62, 0xb7, 0xc6, 0xee, 0xee, 0xed, 0x2e, + 0x67, 0x9d, 0x39, 0x72, 0xde, 0xc3, 0x1e, 0x90, 0xf8, 0x0a, 0x7c, 0x01, 0x24, 0x8e, 0x9c, 0xd0, + 0x1e, 0x11, 0x02, 0x71, 0x1b, 0x20, 0x88, 0x03, 0x7c, 0x02, 0x8e, 0xa8, 0x5e, 0x55, 0xf5, 0xbf, + 0xb4, 0x47, 0x33, 0xc3, 0x8d, 0x4b, 0xab, 0xab, 0xde, 0x7b, 0x55, 0xf5, 0x5e, 0xbd, 0xf7, 0x7e, + 0xef, 0x15, 0x6c, 0xd0, 0xfe, 0xc0, 0x3b, 0xe0, 0x57, 0x21, 0x8b, 0xe5, 0x77, 0x3f, 0x8c, 0x02, + 0x1e, 0x90, 0x45, 0x1c, 0x74, 0xdf, 0x1d, 0x7a, 0x7c, 0x34, 0xed, 0xef, 0x0f, 0x82, 0xc9, 0xc1, + 0x30, 0x18, 0x06, 0x07, 0x48, 0xed, 0x4f, 0x2f, 0x70, 0x84, 0x03, 0xfc, 0x93, 0x52, 0xdd, 0xed, + 0x61, 0x10, 0x0c, 0xc7, 0x2c, 0xe5, 0xe2, 0xde, 0x84, 0xc5, 0x9c, 0x4e, 0x42, 0xc5, 0x70, 0x94, + 0x59, 0x8f, 0x33, 0xdf, 0x65, 0xd1, 0xc4, 0xf3, 0x79, 0xf6, 0x77, 0xec, 0xf5, 0xe3, 0x83, 0x41, + 0x30, 0x99, 0x04, 0x7e, 0xf6, 0x40, 0xd6, 0xef, 0x6b, 0xd0, 0xb0, 0xd9, 0x67, 0x53, 0x16, 0x73, + 0xb2, 0x03, 0x35, 0x36, 0x18, 0x05, 0x9d, 0xca, 0x5d, 0x63, 0x67, 0xe9, 0x90, 0xec, 0x4b, 0x3e, + 0x45, 0x7d, 0x34, 0x18, 0x05, 0x27, 0x0b, 0x36, 0x72, 0x90, 0x77, 0x60, 0xf1, 0x62, 0x3c, 0x8d, + 0x47, 0x9d, 0x2a, 0xb2, 0xae, 0xe5, 0x59, 0x7f, 0x20, 0x48, 0x27, 0x0b, 0xb6, 0xe4, 0x11, 0xcb, + 0x7a, 0xfe, 0x45, 0xd0, 0x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0xb3, 0xac, 0xc4, 0x03, 0x93, 0x50, + 0xba, 0xc1, 0xb3, 0x0b, 0xed, 0x42, 0x58, 0x67, 0xcc, 0x6d, 0x64, 0xcd, 0x6d, 0xb5, 0x61, 0x25, + 0x17, 0xcd, 0xd6, 0x17, 0x8b, 0xd0, 0xb4, 0x59, 0x1c, 0x0a, 0x67, 0x22, 0x47, 0x60, 0xb2, 0xd9, + 0x80, 0xc9, 0x44, 0x6a, 0x14, 0xd2, 0x94, 0xe4, 0x79, 0xa4, 0xe9, 0x22, 0xa0, 0x13, 0x66, 0xb2, + 0x9b, 0x03, 0x81, 0xb5, 0xa2, 0x50, 0x16, 0x05, 0xf6, 0xf2, 0x28, 0xb0, 0x5e, 0xe0, 0x2d, 0xc0, + 0xc0, 0x6e, 0x0e, 0x06, 0x8a, 0x0b, 0xe7, 0x70, 0xe0, 0x5e, 0x09, 0x0e, 0x14, 0x8f, 0x3f, 0x07, + 0x08, 0xee, 0x95, 0x00, 0x41, 0xe7, 0xc6, 0x5e, 0xa5, 0x48, 0xb0, 0x97, 0x47, 0x82, 0xa2, 0x3a, + 0x05, 0x28, 0xf8, 0xa8, 0x0c, 0x0a, 0xee, 0x14, 0x64, 0xe6, 0x62, 0xc1, 0xfb, 0x37, 0xb0, 0x60, + 0xa3, 0x20, 0x5a, 0x02, 0x06, 0xf7, 0x72, 0x59, 0x1a, 0x4a, 0x75, 0x2b, 0x4f, 0xd3, 0xe4, 0x7b, + 0x37, 0x71, 0x64, 0xb3, 0x78, 0xb5, 0x65, 0x40, 0x72, 0x50, 0x00, 0x92, 0xdb, 0xc5, 0x53, 0x16, + 0x90, 0x24, 0xc5, 0x83, 0x5d, 0x11, 0xf7, 0x05, 0x4f, 0x13, 0x39, 0x82, 0x45, 0x51, 0x10, 0xa9, + 0x84, 0x2d, 0x07, 0xd6, 0x8e, 0xc8, 0x44, 0xa9, 0x7f, 0xbd, 0x04, 0x3b, 0xd0, 0xe9, 0x33, 0xde, + 0x65, 0xfd, 0xca, 0x48, 0x65, 0x31, 0xa2, 0xb3, 0x59, 0xcc, 0x54, 0x59, 0x2c, 0x03, 0x29, 0x95, + 0x1c, 0xa4, 0x90, 0xef, 0xc0, 0x2d, 0x4c, 0x23, 0x68, 0x17, 0x27, 0x97, 0xd6, 0xda, 0x82, 0x20, + 0x0d, 0x22, 0xf3, 0xdb, 0xbb, 0xb0, 0x96, 0xe1, 0x15, 0x29, 0x16, 0x53, 0x58, 0x0d, 0x83, 0x77, + 0x35, 0xe1, 0x3e, 0x0e, 0xc3, 0x13, 0x1a, 0x8f, 0xac, 0x1f, 0xa5, 0xfa, 0xa7, 0x70, 0x45, 0xa0, + 0x36, 0x08, 0x5c, 0xa9, 0xd6, 0x8a, 0x8d, 0xff, 0x02, 0xc2, 0xc6, 0xc1, 0x10, 0x77, 0x35, 0x6d, + 0xf1, 0x2b, 0xb8, 0x92, 0x48, 0x31, 0x65, 0x48, 0x58, 0xbf, 0x34, 0xd2, 0xf5, 0x52, 0x04, 0x2b, + 0x03, 0x1b, 0xe3, 0x7f, 0x01, 0x9b, 0xca, 0xeb, 0x81, 0x8d, 0xf5, 0x1b, 0x23, 0xbd, 0x91, 0x04, + 0x46, 0xde, 0x4c, 0x45, 0xe1, 0x1c, 0x9e, 0xef, 0xb2, 0x19, 0x06, 0x7c, 0xd5, 0x96, 0x03, 0x8d, + 0xf0, 0x75, 0x34, 0x73, 0x1e, 0xe1, 0x1b, 0x38, 0x27, 0x07, 0x0a, 0x7e, 0x82, 0x0b, 0x8c, 0xc4, + 0x65, 0x5b, 0x0e, 0x32, 0xd9, 0xd3, 0xcc, 0x65, 0xcf, 0x33, 0x20, 0x37, 0x63, 0x94, 0x7c, 0x08, + 0x35, 0x4e, 0x87, 0xc2, 0x84, 0xc2, 0x0a, 0xad, 0x7d, 0x59, 0x2f, 0xef, 0x7f, 0x72, 0x7e, 0x46, + 0xbd, 0xa8, 0xb7, 0x21, 0xb4, 0xff, 0xf7, 0x8b, 0xed, 0x96, 0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02, + 0x74, 0xf0, 0x39, 0x8b, 0x54, 0x7d, 0x25, 0x07, 0xd6, 0x53, 0x68, 0x17, 0xf2, 0x29, 0xd9, 0x83, + 0x46, 0x38, 0xed, 0x3b, 0xba, 0xaf, 0x4f, 0x3b, 0xc1, 0xb3, 0x69, 0xff, 0x13, 0x76, 0xa5, 0x3b, + 0xc1, 0x10, 0x47, 0xe9, 0xb2, 0x95, 0xec, 0xb2, 0x63, 0x68, 0xea, 0xd0, 0x24, 0xdf, 0x05, 0x33, + 0xf1, 0x91, 0x42, 0x02, 0x4b, 0xb6, 0x56, 0x8b, 0xa6, 0x8c, 0xe2, 0xaa, 0x63, 0x6f, 0xe8, 0x33, + 0xd7, 0x49, 0xe3, 0x01, 0xf7, 0x68, 0xda, 0x6d, 0x49, 0xf8, 0x54, 0x3b, 0xbf, 0xf5, 0x1e, 0xd4, + 0xe5, 0xd9, 0x84, 0x7d, 0xc4, 0xca, 0xba, 0xfc, 0x14, 0xff, 0xa5, 0x99, 0xf6, 0x4f, 0x06, 0x34, + 0x75, 0x8a, 0x2a, 0x15, 0xca, 0x1d, 0xba, 0xf2, 0xaa, 0x87, 0x9e, 0xd7, 0x9b, 0xeb, 0x2c, 0x52, + 0x7b, 0xed, 0x2c, 0xb2, 0x07, 0x44, 0x26, 0x8b, 0xcb, 0x80, 0x7b, 0xfe, 0xd0, 0x91, 0xb6, 0x96, + 0x59, 0x63, 0x15, 0x29, 0xe7, 0x48, 0x38, 0x13, 0xf3, 0x87, 0x5f, 0x2c, 0x42, 0xfb, 0xb8, 0xf7, + 0xe0, 0xf4, 0x38, 0x0c, 0xc7, 0xde, 0x80, 0x62, 0xcd, 0x7b, 0x00, 0x35, 0xac, 0xea, 0x4b, 0xde, + 0x13, 0xbb, 0x65, 0xed, 0x25, 0x39, 0x84, 0x45, 0x2c, 0xee, 0x49, 0xd9, 0xb3, 0x62, 0xb7, 0xb4, + 0xcb, 0x14, 0x9b, 0xc8, 0xf2, 0xff, 0xe6, 0xeb, 0x62, 0xb7, 0xac, 0xd5, 0x24, 0x1f, 0x83, 0x99, + 0x96, 0xe5, 0xf3, 0xde, 0x18, 0xbb, 0x73, 0x9b, 0x4e, 0x21, 0x9f, 0x56, 0x43, 0xf3, 0x9e, 0xca, + 0xba, 0x73, 0xbb, 0x33, 0x72, 0x04, 0x0d, 0x5d, 0x25, 0x96, 0xbf, 0x02, 0x76, 0xe7, 0x34, 0x84, + 0xc2, 0x3c, 0xb2, 0xd2, 0x2e, 0x7b, 0xaa, 0xec, 0x96, 0x76, 0xad, 0xe4, 0x03, 0xa8, 0x2b, 0xd8, + 0x2f, 0x7d, 0x09, 0xec, 0x96, 0xb7, 0x75, 0x42, 0xc9, 0xb4, 0xd7, 0x98, 0xf7, 0x9c, 0xda, 0x9d, + 0xdb, 0x5e, 0x93, 0x63, 0x80, 0x4c, 0x75, 0x3d, 0xf7, 0x9d, 0xb4, 0x3b, 0xbf, 0x6d, 0x26, 0xf7, + 0xa1, 0x99, 0x3e, 0x85, 0x94, 0xbf, 0x7c, 0x76, 0xe7, 0x75, 0xb2, 0xbd, 0xaf, 0xff, 0xe7, 0xef, + 0x5b, 0xc6, 0xaf, 0xaf, 0xb7, 0x8c, 0xdf, 0x5e, 0x6f, 0x19, 0x5f, 0x5d, 0x6f, 0x19, 0x7f, 0xb8, + 0xde, 0x32, 0xfe, 0x76, 0xbd, 0x65, 0xfc, 0xee, 0x1f, 0x5b, 0x46, 0xbf, 0x8e, 0xee, 0xff, 0xfe, + 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xef, 0x95, 0x6c, 0x08, 0xac, 0x17, 0x00, 0x00, } diff --git a/abci/types/types.proto b/abci/types/types.proto index 75a53ac46..d23ac513e 100644 --- a/abci/types/types.proto +++ b/abci/types/types.proto @@ -200,27 +200,21 @@ message ResponseCommit { // that can be adjusted by the abci app message ConsensusParams { BlockSize block_size = 1; - TxSize tx_size = 2; - BlockGossip block_gossip = 3; + EvidenceParams evidence_params = 2; } // BlockSize contains limits on the block size. message BlockSize { - int32 max_bytes = 1; + // Note: must be greater than 0 + int64 max_bytes = 1; + // Note: must be greater or equal to -1 int64 max_gas = 2; } -// TxSize contains limits on the tx size. -message TxSize { - int32 max_bytes = 1; - int64 max_gas = 2; -} - -// BlockGossip determine consensus critical -// elements of how blocks are gossiped -message BlockGossip { - // Note: must not be 0 - int32 block_part_size_bytes = 1; +// EvidenceParams contains limits on the evidence. +message EvidenceParams { + // Note: must be greater than 0 + int64 max_age = 1; } message LastCommitInfo { diff --git a/abci/types/typespb_test.go b/abci/types/typespb_test.go index 0411afc84..5da925e17 100644 --- a/abci/types/typespb_test.go +++ b/abci/types/typespb_test.go @@ -1534,15 +1534,15 @@ func TestBlockSizeMarshalTo(t *testing.T) { } } -func TestTxSizeProto(t *testing.T) { +func TestEvidenceParamsProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTxSize(popr, false) + p := NewPopulatedEvidenceParams(popr, false) dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &TxSize{} + msg := &EvidenceParams{} if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -1565,10 +1565,10 @@ func TestTxSizeProto(t *testing.T) { } } -func TestTxSizeMarshalTo(t *testing.T) { +func TestEvidenceParamsMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTxSize(popr, false) + p := NewPopulatedEvidenceParams(popr, false) size := p.Size() dAtA := make([]byte, size) for i := range dAtA { @@ -1578,63 +1578,7 @@ func TestTxSizeMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &TxSize{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestBlockGossipProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBlockGossip(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &BlockGossip{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestBlockGossipMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBlockGossip(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &BlockGossip{} + msg := &EvidenceParams{} if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2636,34 +2580,16 @@ func TestBlockSizeJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestTxSizeJSON(t *testing.T) { +func TestEvidenceParamsJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTxSize(popr, true) + p := NewPopulatedEvidenceParams(popr, true) marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &TxSize{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestBlockGossipJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBlockGossip(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &BlockGossip{} + msg := &EvidenceParams{} err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) @@ -3590,12 +3516,12 @@ func TestBlockSizeProtoCompactText(t *testing.T) { } } -func TestTxSizeProtoText(t *testing.T) { +func TestEvidenceParamsProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTxSize(popr, true) + p := NewPopulatedEvidenceParams(popr, true) dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &TxSize{} + msg := &EvidenceParams{} if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -3604,40 +3530,12 @@ func TestTxSizeProtoText(t *testing.T) { } } -func TestTxSizeProtoCompactText(t *testing.T) { +func TestEvidenceParamsProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTxSize(popr, true) + p := NewPopulatedEvidenceParams(popr, true) dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &TxSize{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestBlockGossipProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBlockGossip(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &BlockGossip{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestBlockGossipProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBlockGossip(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &BlockGossip{} + msg := &EvidenceParams{} if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -4492,32 +4390,10 @@ func TestBlockSizeSize(t *testing.T) { } } -func TestTxSizeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTxSize(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestBlockGossipSize(t *testing.T) { +func TestEvidenceParamsSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBlockGossip(popr, true) + p := NewPopulatedEvidenceParams(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { diff --git a/benchmarks/codec_test.go b/benchmarks/codec_test.go index 09487563a..c0e13d168 100644 --- a/benchmarks/codec_test.go +++ b/benchmarks/codec_test.go @@ -24,7 +24,10 @@ func BenchmarkEncodeStatusWire(b *testing.B) { Network: "SOMENAME", ListenAddr: "SOMEADDR", Version: "SOMEVER", - Other: []string{"SOMESTRING", "OTHERSTRING"}, + Other: p2p.NodeInfoOther{ + AminoVersion: "SOMESTRING", + P2PVersion: "OTHERSTRING", + }, }, SyncInfo: ctypes.SyncInfo{ LatestBlockHash: []byte("SOMEBYTES"), @@ -59,7 +62,10 @@ func BenchmarkEncodeNodeInfoWire(b *testing.B) { Network: "SOMENAME", ListenAddr: "SOMEADDR", Version: "SOMEVER", - Other: []string{"SOMESTRING", "OTHERSTRING"}, + Other: p2p.NodeInfoOther{ + AminoVersion: "SOMESTRING", + P2PVersion: "OTHERSTRING", + }, } b.StartTimer() @@ -84,7 +90,10 @@ func BenchmarkEncodeNodeInfoBinary(b *testing.B) { Network: "SOMENAME", ListenAddr: "SOMEADDR", Version: "SOMEVER", - Other: []string{"SOMESTRING", "OTHERSTRING"}, + Other: p2p.NodeInfoOther{ + AminoVersion: "SOMESTRING", + P2PVersion: "OTHERSTRING", + }, } b.StartTimer() diff --git a/blockchain/reactor.go b/blockchain/reactor.go index f975737c6..fc1b1f4d3 100644 --- a/blockchain/reactor.go +++ b/blockchain/reactor.go @@ -290,7 +290,7 @@ FOR_LOOP: didProcessCh <- struct{}{} } - firstParts := first.MakePartSet(state.ConsensusParams.BlockPartSizeBytes) + firstParts := first.MakePartSet(types.BlockPartSizeBytes) firstPartsHeader := firstParts.Header() firstID := types.BlockID{first.Hash(), firstPartsHeader} // Finally, verify the first block using the second's commit diff --git a/blockchain/reactor_test.go b/blockchain/reactor_test.go index f590fd52e..b63a057e1 100644 --- a/blockchain/reactor_test.go +++ b/blockchain/reactor_test.go @@ -42,13 +42,13 @@ func newBlockchainReactor(logger log.Logger, maxBlockHeight int64) *BlockchainRe bcReactor.SetLogger(logger.With("module", "blockchain")) // Next: we need to set a switch in order for peers to be added in - bcReactor.Switch = p2p.NewSwitch(cfg.DefaultP2PConfig()) + bcReactor.Switch = p2p.NewSwitch(cfg.DefaultP2PConfig(), nil) // Lastly: let's add some blocks in for blockHeight := int64(1); blockHeight <= maxBlockHeight; blockHeight++ { firstBlock := makeBlock(blockHeight, state) secondBlock := makeBlock(blockHeight+1, state) - firstParts := firstBlock.MakePartSet(state.ConsensusParams.BlockGossip.BlockPartSizeBytes) + firstParts := firstBlock.MakePartSet(types.BlockPartSizeBytes) blockStore.SaveBlock(firstBlock, firstParts, secondBlock.LastCommit) } diff --git a/cmd/tendermint/commands/init.go b/cmd/tendermint/commands/init.go index dac4cd9a5..85ee44916 100644 --- a/cmd/tendermint/commands/init.go +++ b/cmd/tendermint/commands/init.go @@ -58,8 +58,9 @@ func initFilesWithConfig(config *cfg.Config) error { ConsensusParams: types.DefaultConsensusParams(), } genDoc.Validators = []types.GenesisValidator{{ - PubKey: pv.GetPubKey(), - Power: 10, + Address: pv.GetPubKey().Address(), + PubKey: pv.GetPubKey(), + Power: 10, }} if err := genDoc.SaveAs(genFile); err != nil { diff --git a/cmd/tendermint/commands/testnet.go b/cmd/tendermint/commands/testnet.go index d29c29eb1..0f7dd79a4 100644 --- a/cmd/tendermint/commands/testnet.go +++ b/cmd/tendermint/commands/testnet.go @@ -91,9 +91,10 @@ func testnetFiles(cmd *cobra.Command, args []string) error { pvFile := filepath.Join(nodeDir, config.BaseConfig.PrivValidator) pv := privval.LoadFilePV(pvFile) genVals[i] = types.GenesisValidator{ - PubKey: pv.GetPubKey(), - Power: 1, - Name: nodeDirName, + Address: pv.GetPubKey().Address(), + PubKey: pv.GetPubKey(), + Power: 1, + Name: nodeDirName, } } diff --git a/config/config.go b/config/config.go index c0882546f..d0e075477 100644 --- a/config/config.go +++ b/config/config.go @@ -113,7 +113,7 @@ type BaseConfig struct { // and verifying their commits FastSync bool `mapstructure:"fast_sync"` - // Database backend: leveldb | memdb + // Database backend: leveldb | memdb | cleveldb DBBackend string `mapstructure:"db_backend"` // Database directory @@ -587,15 +587,15 @@ type TxIndexConfig struct { // Comma-separated list of tags to index (by default the only tag is "tx.hash") // // You can also index transactions by height by adding "tx.height" tag here. - // + // // It's recommended to index only a subset of tags due to possible memory // bloat. This is, of course, depends on the indexer's DB and the volume of // transactions. IndexTags string `mapstructure:"index_tags"` // When set to true, tells indexer to index all tags (predefined tags: - // "tx.hash", "tx.height" and all tags from DeliverTx responses). - // + // "tx.hash", "tx.height" and all tags from DeliverTx responses). + // // Note this may be not desirable (see the comment above). IndexTags has a // precedence over IndexAllTags (i.e. when given both, IndexTags will be // indexed). diff --git a/config/toml.go b/config/toml.go index 2a35d7c36..9beb9d799 100644 --- a/config/toml.go +++ b/config/toml.go @@ -77,7 +77,7 @@ moniker = "{{ .BaseConfig.Moniker }}" # and verifying their commits fast_sync = {{ .BaseConfig.FastSync }} -# Database backend: leveldb | memdb +# Database backend: leveldb | memdb | cleveldb db_backend = "{{ .BaseConfig.DBBackend }}" # Database directory diff --git a/consensus/byzantine_test.go b/consensus/byzantine_test.go index 0aba77432..3903e6b9e 100644 --- a/consensus/byzantine_test.go +++ b/consensus/byzantine_test.go @@ -39,7 +39,13 @@ func TestByzantine(t *testing.T) { switches := make([]*p2p.Switch, N) p2pLogger := logger.With("module", "p2p") for i := 0; i < N; i++ { - switches[i] = p2p.NewSwitch(config.P2P) + switches[i] = p2p.MakeSwitch( + config.P2P, + i, + "foo", "1.0.0", + func(i int, sw *p2p.Switch) *p2p.Switch { + return sw + }) switches[i].SetLogger(p2pLogger.With("validator", i)) } diff --git a/consensus/mempool_test.go b/consensus/mempool_test.go index 16a167fd6..950cf67d8 100644 --- a/consensus/mempool_test.go +++ b/consensus/mempool_test.go @@ -148,7 +148,7 @@ func TestMempoolRmBadTx(t *testing.T) { // check for the tx for { - txs := cs.mempool.ReapMaxBytes(len(txBytes)) + txs := cs.mempool.ReapMaxBytesMaxGas(int64(len(txBytes)), -1) if len(txs) == 0 { emptyMempoolCh <- struct{}{} return diff --git a/consensus/metrics.go b/consensus/metrics.go index 253880e84..68d065ec6 100644 --- a/consensus/metrics.go +++ b/consensus/metrics.go @@ -30,7 +30,7 @@ type Metrics struct { ByzantineValidatorsPower metrics.Gauge // Time between this and the last block. - BlockIntervalSeconds metrics.Histogram + BlockIntervalSeconds metrics.Gauge // Number of transactions. NumTxs metrics.Gauge @@ -85,11 +85,10 @@ func PrometheusMetrics() *Metrics { Help: "Total power of the byzantine validators.", }, []string{}), - BlockIntervalSeconds: prometheus.NewHistogramFrom(stdprometheus.HistogramOpts{ + BlockIntervalSeconds: prometheus.NewGaugeFrom(stdprometheus.GaugeOpts{ Subsystem: "consensus", Name: "block_interval_seconds", Help: "Time between this and the last block.", - Buckets: []float64{1, 2.5, 5, 10, 60}, }, []string{}), NumTxs: prometheus.NewGaugeFrom(stdprometheus.GaugeOpts{ @@ -124,7 +123,7 @@ func NopMetrics() *Metrics { ByzantineValidators: discard.NewGauge(), ByzantineValidatorsPower: discard.NewGauge(), - BlockIntervalSeconds: discard.NewHistogram(), + BlockIntervalSeconds: discard.NewGauge(), NumTxs: discard.NewGauge(), BlockSizeBytes: discard.NewGauge(), diff --git a/consensus/reactor.go b/consensus/reactor.go index 6ba817264..4a915ace1 100644 --- a/consensus/reactor.go +++ b/consensus/reactor.go @@ -29,6 +29,7 @@ const ( maxMsgSize = 1048576 // 1MB; NOTE/TODO: keep in sync with types.PartSet sizes. blocksToContributeToBecomeGoodPeer = 10000 + votesToContributeToBecomeGoodPeer = 10000 ) //----------------------------------------------------------------------------- @@ -60,6 +61,9 @@ func NewConsensusReactor(consensusState *ConsensusState, fastSync bool) *Consens func (conR *ConsensusReactor) OnStart() error { conR.Logger.Info("ConsensusReactor ", "fastSync", conR.FastSync()) + // start routine that computes peer statistics for evaluating peer quality + go conR.peerStatsRoutine() + conR.subscribeToBroadcastEvents() if !conR.FastSync() { @@ -258,9 +262,7 @@ func (conR *ConsensusReactor) Receive(chID byte, src p2p.Peer, msgBytes []byte) ps.ApplyProposalPOLMessage(msg) case *BlockPartMessage: ps.SetHasProposalBlockPart(msg.Height, msg.Round, msg.Part.Index) - if numBlocks := ps.RecordBlockPart(msg); numBlocks%blocksToContributeToBecomeGoodPeer == 0 { - conR.Switch.MarkPeerAsGood(src) - } + conR.conS.peerMsgQueue <- msgInfo{msg, src.ID()} default: conR.Logger.Error(fmt.Sprintf("Unknown message type %v", reflect.TypeOf(msg))) @@ -280,9 +282,6 @@ func (conR *ConsensusReactor) Receive(chID byte, src p2p.Peer, msgBytes []byte) ps.EnsureVoteBitArrays(height, valSize) ps.EnsureVoteBitArrays(height-1, lastCommitSize) ps.SetHasVote(msg.Vote) - if blocks := ps.RecordVote(msg.Vote); blocks%blocksToContributeToBecomeGoodPeer == 0 { - conR.Switch.MarkPeerAsGood(src) - } cs.peerMsgQueue <- msgInfo{msg, src.ID()} @@ -794,6 +793,43 @@ OUTER_LOOP: } } +func (conR *ConsensusReactor) peerStatsRoutine() { + for { + if !conR.IsRunning() { + conR.Logger.Info("Stopping peerStatsRoutine") + return + } + + select { + case msg := <-conR.conS.statsMsgQueue: + // Get peer + peer := conR.Switch.Peers().Get(msg.PeerID) + if peer == nil { + conR.Logger.Debug("Attempt to update stats for non-existent peer", + "peer", msg.PeerID) + continue + } + // Get peer state + ps := peer.Get(types.PeerStateKey).(*PeerState) + switch msg.Msg.(type) { + case *VoteMessage: + if numVotes := ps.RecordVote(); numVotes%votesToContributeToBecomeGoodPeer == 0 { + conR.Switch.MarkPeerAsGood(peer) + } + case *BlockPartMessage: + if numParts := ps.RecordBlockPart(); numParts%blocksToContributeToBecomeGoodPeer == 0 { + conR.Switch.MarkPeerAsGood(peer) + } + } + case <-conR.conS.Quit(): + return + + case <-conR.Quit(): + return + } + } +} + // String returns a string representation of the ConsensusReactor. // NOTE: For now, it is just a hard-coded string to avoid accessing unprotected shared variables. // TODO: improve! @@ -836,15 +872,13 @@ type PeerState struct { // peerStateStats holds internal statistics for a peer. type peerStateStats struct { - LastVoteHeight int64 `json:"last_vote_height"` - Votes int `json:"votes"` - LastBlockPartHeight int64 `json:"last_block_part_height"` - BlockParts int `json:"block_parts"` + Votes int `json:"votes"` + BlockParts int `json:"block_parts"` } func (pss peerStateStats) String() string { - return fmt.Sprintf("peerStateStats{lvh: %d, votes: %d, lbph: %d, blockParts: %d}", - pss.LastVoteHeight, pss.Votes, pss.LastBlockPartHeight, pss.BlockParts) + return fmt.Sprintf("peerStateStats{votes: %d, blockParts: %d}", + pss.Votes, pss.BlockParts) } // NewPeerState returns a new PeerState for the given Peer @@ -1080,18 +1114,14 @@ func (ps *PeerState) ensureVoteBitArrays(height int64, numValidators int) { } } -// RecordVote updates internal statistics for this peer by recording the vote. -// It returns the total number of votes (1 per block). This essentially means -// the number of blocks for which peer has been sending us votes. -func (ps *PeerState) RecordVote(vote *types.Vote) int { +// RecordVote increments internal votes related statistics for this peer. +// It returns the total number of added votes. +func (ps *PeerState) RecordVote() int { ps.mtx.Lock() defer ps.mtx.Unlock() - if ps.Stats.LastVoteHeight >= vote.Height { - return ps.Stats.Votes - } - ps.Stats.LastVoteHeight = vote.Height ps.Stats.Votes++ + return ps.Stats.Votes } @@ -1104,25 +1134,17 @@ func (ps *PeerState) VotesSent() int { return ps.Stats.Votes } -// RecordBlockPart updates internal statistics for this peer by recording the -// block part. It returns the total number of block parts (1 per block). This -// essentially means the number of blocks for which peer has been sending us -// block parts. -func (ps *PeerState) RecordBlockPart(bp *BlockPartMessage) int { +// RecordBlockPart increments internal block part related statistics for this peer. +// It returns the total number of added block parts. +func (ps *PeerState) RecordBlockPart() int { ps.mtx.Lock() defer ps.mtx.Unlock() - if ps.Stats.LastBlockPartHeight >= bp.Height { - return ps.Stats.BlockParts - } - - ps.Stats.LastBlockPartHeight = bp.Height ps.Stats.BlockParts++ return ps.Stats.BlockParts } -// BlockPartsSent returns the number of blocks for which peer has been sending -// us block parts. +// BlockPartsSent returns the number of useful block parts the peer has sent us. func (ps *PeerState) BlockPartsSent() int { ps.mtx.Lock() defer ps.mtx.Unlock() diff --git a/consensus/reactor_test.go b/consensus/reactor_test.go index 98b058b8d..41bddbd68 100644 --- a/consensus/reactor_test.go +++ b/consensus/reactor_test.go @@ -11,20 +11,16 @@ import ( "testing" "time" - abcicli "github.com/tendermint/tendermint/abci/client" + "github.com/tendermint/tendermint/abci/client" "github.com/tendermint/tendermint/abci/example/kvstore" abci "github.com/tendermint/tendermint/abci/types" bc "github.com/tendermint/tendermint/blockchain" - cmn "github.com/tendermint/tendermint/libs/common" + cfg "github.com/tendermint/tendermint/config" dbm "github.com/tendermint/tendermint/libs/db" "github.com/tendermint/tendermint/libs/log" mempl "github.com/tendermint/tendermint/mempool" - sm "github.com/tendermint/tendermint/state" - tmtime "github.com/tendermint/tendermint/types/time" - - cfg "github.com/tendermint/tendermint/config" "github.com/tendermint/tendermint/p2p" - p2pdummy "github.com/tendermint/tendermint/p2p/dummy" + sm "github.com/tendermint/tendermint/state" "github.com/tendermint/tendermint/types" "github.com/stretchr/testify/assert" @@ -196,7 +192,7 @@ func newMockEvidencePool(val []byte) *mockEvidencePool { } // NOTE: maxBytes is ignored -func (m *mockEvidencePool) PendingEvidence(maxBytes int) []types.Evidence { +func (m *mockEvidencePool) PendingEvidence(maxBytes int64) []types.Evidence { if m.height > 0 { return m.ev } @@ -246,110 +242,25 @@ func TestReactorProposalHeartbeats(t *testing.T) { }, css) } -// Test we record block parts from other peers -func TestReactorRecordsBlockParts(t *testing.T) { - // create dummy peer - peer := p2pdummy.NewPeer() - ps := NewPeerState(peer).SetLogger(log.TestingLogger()) - peer.Set(types.PeerStateKey, ps) - - // create reactor - css := randConsensusNet(1, "consensus_reactor_records_block_parts_test", newMockTickerFunc(true), newPersistentKVStore) - reactor := NewConsensusReactor(css[0], false) // so we dont start the consensus states - reactor.SetEventBus(css[0].eventBus) - reactor.SetLogger(log.TestingLogger()) - sw := p2p.MakeSwitch(cfg.DefaultP2PConfig(), 1, "testing", "123.123.123", func(i int, sw *p2p.Switch) *p2p.Switch { return sw }) - reactor.SetSwitch(sw) - err := reactor.Start() - require.NoError(t, err) - defer reactor.Stop() - - // 1) new block part - parts := types.NewPartSetFromData(cmn.RandBytes(100), 10) - msg := &BlockPartMessage{ - Height: 2, - Round: 0, - Part: parts.GetPart(0), - } - bz, err := cdc.MarshalBinaryBare(msg) - require.NoError(t, err) - - reactor.Receive(DataChannel, peer, bz) - require.Equal(t, 1, ps.BlockPartsSent(), "number of block parts sent should have increased by 1") - - // 2) block part with the same height, but different round - msg.Round = 1 - - bz, err = cdc.MarshalBinaryBare(msg) - require.NoError(t, err) - - reactor.Receive(DataChannel, peer, bz) - require.Equal(t, 1, ps.BlockPartsSent(), "number of block parts sent should stay the same") - - // 3) block part from earlier height - msg.Height = 1 - msg.Round = 0 - - bz, err = cdc.MarshalBinaryBare(msg) - require.NoError(t, err) - - reactor.Receive(DataChannel, peer, bz) - require.Equal(t, 1, ps.BlockPartsSent(), "number of block parts sent should stay the same") -} - -// Test we record votes from other peers. -func TestReactorRecordsVotes(t *testing.T) { - // Create dummy peer. - peer := p2pdummy.NewPeer() - ps := NewPeerState(peer).SetLogger(log.TestingLogger()) - peer.Set(types.PeerStateKey, ps) - - // Create reactor. - css := randConsensusNet(1, "consensus_reactor_records_votes_test", newMockTickerFunc(true), newPersistentKVStore) - reactor := NewConsensusReactor(css[0], false) // so we dont start the consensus states - reactor.SetEventBus(css[0].eventBus) - reactor.SetLogger(log.TestingLogger()) - sw := p2p.MakeSwitch(cfg.DefaultP2PConfig(), 1, "testing", "123.123.123", func(i int, sw *p2p.Switch) *p2p.Switch { return sw }) - reactor.SetSwitch(sw) - err := reactor.Start() - require.NoError(t, err) - defer reactor.Stop() - _, val := css[0].state.Validators.GetByIndex(0) - - // 1) new vote - vote := &types.Vote{ - ValidatorIndex: 0, - ValidatorAddress: val.Address, - Height: 2, - Round: 0, - Timestamp: tmtime.Now(), - Type: types.VoteTypePrevote, - BlockID: types.BlockID{}, - } - bz, err := cdc.MarshalBinaryBare(&VoteMessage{vote}) - require.NoError(t, err) - - reactor.Receive(VoteChannel, peer, bz) - assert.Equal(t, 1, ps.VotesSent(), "number of votes sent should have increased by 1") - - // 2) vote with the same height, but different round - vote.Round = 1 - - bz, err = cdc.MarshalBinaryBare(&VoteMessage{vote}) - require.NoError(t, err) - - reactor.Receive(VoteChannel, peer, bz) - assert.Equal(t, 1, ps.VotesSent(), "number of votes sent should stay the same") +// Test we record stats about votes and block parts from other peers. +func TestReactorRecordsVotesAndBlockParts(t *testing.T) { + N := 4 + css := randConsensusNet(N, "consensus_reactor_test", newMockTickerFunc(true), newCounter) + reactors, eventChans, eventBuses := startConsensusNet(t, css, N) + defer stopConsensusNet(log.TestingLogger(), reactors, eventBuses) - // 3) vote from earlier height - vote.Height = 1 - vote.Round = 0 + // wait till everyone makes the first new block + timeoutWaitGroup(t, N, func(j int) { + <-eventChans[j] + }, css) - bz, err = cdc.MarshalBinaryBare(&VoteMessage{vote}) - require.NoError(t, err) + // Get peer + peer := reactors[1].Switch.Peers().List()[0] + // Get peer state + ps := peer.Get(types.PeerStateKey).(*PeerState) - reactor.Receive(VoteChannel, peer, bz) - assert.Equal(t, 1, ps.VotesSent(), "number of votes sent should stay the same") + assert.Equal(t, true, ps.VotesSent() > 0, "number of votes sent should have increased") + assert.Equal(t, true, ps.BlockPartsSent() > 0, "number of votes sent should have increased") } //------------------------------------------------------------- diff --git a/consensus/replay_file.go b/consensus/replay_file.go index e4b9f0196..685eb71f2 100644 --- a/consensus/replay_file.go +++ b/consensus/replay_file.go @@ -298,13 +298,18 @@ func newConsensusStateForReplay(config cfg.BaseConfig, csConfig *cfg.ConsensusCo // Create proxyAppConn connection (consensus, mempool, query) clientCreator := proxy.DefaultClientCreator(config.ProxyApp, config.ABCI, config.DBDir()) - proxyApp := proxy.NewAppConns(clientCreator, - NewHandshaker(stateDB, state, blockStore, gdoc)) + proxyApp := proxy.NewAppConns(clientCreator) err = proxyApp.Start() if err != nil { cmn.Exit(fmt.Sprintf("Error starting proxy app conns: %v", err)) } + handshaker := NewHandshaker(stateDB, state, blockStore, gdoc) + err = handshaker.Handshake(proxyApp) + if err != nil { + cmn.Exit(fmt.Sprintf("Error on handshake: %v", err)) + } + eventBus := types.NewEventBus() if err := eventBus.Start(); err != nil { cmn.Exit(fmt.Sprintf("Failed to start event bus: %v", err)) diff --git a/consensus/replay_test.go b/consensus/replay_test.go index 8ea71d353..7a828da64 100644 --- a/consensus/replay_test.go +++ b/consensus/replay_test.go @@ -102,14 +102,6 @@ func TestWALCrash(t *testing.T) { {"empty block", func(stateDB dbm.DB, cs *ConsensusState, ctx context.Context) {}, 1}, - {"block with a smaller part size", - func(stateDB dbm.DB, cs *ConsensusState, ctx context.Context) { - // XXX: is there a better way to change BlockPartSizeBytes? - cs.state.ConsensusParams.BlockPartSizeBytes = 512 - sm.SaveState(stateDB, cs.state) - go sendTxs(cs, ctx) - }, - 1}, {"many non-empty blocks", func(stateDB dbm.DB, cs *ConsensusState, ctx context.Context) { go sendTxs(cs, ctx) @@ -359,7 +351,7 @@ func testHandshakeReplay(t *testing.T, nBlocks int, mode uint) { if nBlocks > 0 { // run nBlocks against a new client to build up the app state. // use a throwaway tendermint state - proxyApp := proxy.NewAppConns(clientCreator2, nil) + proxyApp := proxy.NewAppConns(clientCreator2) stateDB, state, _ := stateAndStore(config, privVal.GetPubKey()) buildAppStateFromChain(proxyApp, stateDB, state, chain, nBlocks, mode) } @@ -367,11 +359,14 @@ func testHandshakeReplay(t *testing.T, nBlocks int, mode uint) { // now start the app using the handshake - it should sync genDoc, _ := sm.MakeGenesisDocFromFile(config.GenesisFile()) handshaker := NewHandshaker(stateDB, state, store, genDoc) - proxyApp := proxy.NewAppConns(clientCreator2, handshaker) + proxyApp := proxy.NewAppConns(clientCreator2) if err := proxyApp.Start(); err != nil { t.Fatalf("Error starting proxy app connections: %v", err) } defer proxyApp.Stop() + if err := handshaker.Handshake(proxyApp); err != nil { + t.Fatalf("Error on abci handshake: %v", err) + } // get the latest app hash from the app res, err := proxyApp.Query().InfoSync(abci.RequestInfo{Version: ""}) @@ -397,7 +392,7 @@ func testHandshakeReplay(t *testing.T, nBlocks int, mode uint) { } func applyBlock(stateDB dbm.DB, st sm.State, blk *types.Block, proxyApp proxy.AppConns) sm.State { - testPartSize := st.ConsensusParams.BlockPartSizeBytes + testPartSize := types.BlockPartSizeBytes blockExec := sm.NewBlockExecutor(stateDB, log.TestingLogger(), proxyApp.Consensus(), mempool, evpool) blkID := types.BlockID{blk.Hash(), blk.MakePartSet(testPartSize).Header()} @@ -447,7 +442,7 @@ func buildAppStateFromChain(proxyApp proxy.AppConns, stateDB dbm.DB, func buildTMStateFromChain(config *cfg.Config, stateDB dbm.DB, state sm.State, chain []*types.Block, mode uint) sm.State { // run the whole chain against this client to build up the tendermint state clientCreator := proxy.NewLocalClientCreator(kvstore.NewPersistentKVStoreApplication(path.Join(config.DBDir(), "1"))) - proxyApp := proxy.NewAppConns(clientCreator, nil) // sm.NewHandshaker(config, state, store, ReplayLastBlock)) + proxyApp := proxy.NewAppConns(clientCreator) // sm.NewHandshaker(config, state, store, ReplayLastBlock)) if err := proxyApp.Start(); err != nil { panic(err) } @@ -620,7 +615,7 @@ func (bs *mockBlockStore) LoadBlock(height int64) *types.Block { return bs.chain func (bs *mockBlockStore) LoadBlockMeta(height int64) *types.BlockMeta { block := bs.chain[height-1] return &types.BlockMeta{ - BlockID: types.BlockID{block.Hash(), block.MakePartSet(bs.params.BlockPartSizeBytes).Header()}, + BlockID: types.BlockID{block.Hash(), block.MakePartSet(types.BlockPartSizeBytes).Header()}, Header: block.Header, } } @@ -651,11 +646,14 @@ func TestInitChainUpdateValidators(t *testing.T) { // now start the app using the handshake - it should sync genDoc, _ := sm.MakeGenesisDocFromFile(config.GenesisFile()) handshaker := NewHandshaker(stateDB, state, store, genDoc) - proxyApp := proxy.NewAppConns(clientCreator, handshaker) + proxyApp := proxy.NewAppConns(clientCreator) if err := proxyApp.Start(); err != nil { t.Fatalf("Error starting proxy app connections: %v", err) } defer proxyApp.Stop() + if err := handshaker.Handshake(proxyApp); err != nil { + t.Fatalf("Error on abci handshake: %v", err) + } // reload the state, check the validator set was updated state = sm.LoadState(stateDB) diff --git a/consensus/state.go b/consensus/state.go index d77afafe9..3ee1cfbf1 100644 --- a/consensus/state.go +++ b/consensus/state.go @@ -91,6 +91,10 @@ type ConsensusState struct { internalMsgQueue chan msgInfo timeoutTicker TimeoutTicker + // information about about added votes and block parts are written on this channel + // so statistics can be computed by reactor + statsMsgQueue chan msgInfo + // we use eventBus to trigger msg broadcasts in the reactor, // and to notify external subscribers, eg. through a websocket eventBus *types.EventBus @@ -141,6 +145,7 @@ func NewConsensusState( peerMsgQueue: make(chan msgInfo, msgQueueSize), internalMsgQueue: make(chan msgInfo, msgQueueSize), timeoutTicker: NewTimeoutTicker(), + statsMsgQueue: make(chan msgInfo, msgQueueSize), done: make(chan struct{}), doWALCatchup: true, wal: nilWAL{}, @@ -639,7 +644,11 @@ 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, peerID) + added, err := cs.addProposalBlockPart(msg, peerID) + if added { + cs.statsMsgQueue <- mi + } + 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 @@ -647,7 +656,11 @@ func (cs *ConsensusState) handleMsg(mi msgInfo) { case *VoteMessage: // attempt to add the vote and dupeout the validator if its a duplicate signature // if the vote gives us a 2/3-any or 2/3-one, we transition - err := cs.tryAddVote(msg.Vote, peerID) + added, err := cs.tryAddVote(msg.Vote, peerID) + if added { + cs.statsMsgQueue <- mi + } + if err == ErrAddingVote { // TODO: punish peer // We probably don't want to stop the peer here. The vote does not @@ -949,24 +962,21 @@ func (cs *ConsensusState) createProposalBlock() (block *types.Block, blockParts } maxBytes := cs.state.ConsensusParams.BlockSize.MaxBytes + maxGas := cs.state.ConsensusParams.BlockSize.MaxGas // bound evidence to 1/10th of the block - evidence := cs.evpool.PendingEvidence(maxBytes / 10) + evidence := cs.evpool.PendingEvidence(types.MaxEvidenceBytesPerBlock(maxBytes)) // Mempool validated transactions - txs := cs.mempool.ReapMaxBytes(maxDataBytes(maxBytes, cs.state.Validators.Size(), len(evidence))) + txs := cs.mempool.ReapMaxBytesMaxGas(types.MaxDataBytes( + maxBytes, + cs.state.Validators.Size(), + len(evidence), + ), maxGas) proposerAddr := cs.privValidator.GetAddress() block, parts := cs.state.MakeBlock(cs.Height, txs, commit, evidence, proposerAddr) return block, parts } -func maxDataBytes(maxBytes, valsCount, evidenceCount int) int { - return maxBytes - - types.MaxAminoOverheadForBlock - - types.MaxHeaderBytes - - (valsCount * types.MaxVoteBytes) - - (evidenceCount * types.MaxEvidenceBytes) -} - // Enter: `timeoutPropose` after entering Propose. // Enter: proposal block and POL is ready. // Enter: any +2/3 prevotes for future round. @@ -1379,7 +1389,7 @@ func (cs *ConsensusState) recordMetrics(height int64, block *types.Block) { if height > 1 { lastBlockMeta := cs.blockStore.LoadBlockMeta(height - 1) - cs.metrics.BlockIntervalSeconds.Observe( + cs.metrics.BlockIntervalSeconds.Set( block.Time.Sub(lastBlockMeta.Header.Time).Seconds(), ) } @@ -1457,7 +1467,7 @@ func (cs *ConsensusState) addProposalBlockPart(msg *BlockPartMessage, peerID p2p int64(cs.state.ConsensusParams.BlockSize.MaxBytes), ) if err != nil { - return true, err + return added, err } // NOTE: it's possible to receive complete proposal blocks for future rounds without having the proposal cs.Logger.Info("Received complete proposal block", "height", cs.ProposalBlock.Height, "hash", cs.ProposalBlock.Hash()) @@ -1487,35 +1497,35 @@ func (cs *ConsensusState) addProposalBlockPart(msg *BlockPartMessage, peerID p2p // If we're waiting on the proposal block... cs.tryFinalizeCommit(height) } - return true, nil + return added, nil } return added, nil } // Attempt to add the vote. if its a duplicate signature, dupeout the validator -func (cs *ConsensusState) tryAddVote(vote *types.Vote, peerID p2p.ID) error { - _, err := cs.addVote(vote, peerID) +func (cs *ConsensusState) tryAddVote(vote *types.Vote, peerID p2p.ID) (bool, error) { + added, err := cs.addVote(vote, peerID) if err != nil { // If the vote height is off, we'll just ignore it, // But if it's a conflicting sig, add it to the cs.evpool. // If it's otherwise invalid, punish peer. if err == ErrVoteHeightMismatch { - return err + return added, err } else if voteErr, ok := err.(*types.ErrVoteConflictingVotes); ok { if bytes.Equal(vote.ValidatorAddress, cs.privValidator.GetAddress()) { cs.Logger.Error("Found conflicting vote from ourselves. Did you unsafe_reset a validator?", "height", vote.Height, "round", vote.Round, "type", vote.Type) - return err + return added, err } cs.evpool.AddEvidence(voteErr.DuplicateVoteEvidence) - return err + return added, err } else { // Probably an invalid signature / Bad peer. // Seems this can also err sometimes with "Unexpected step" - perhaps not from a bad peer ? cs.Logger.Error("Error attempting to add vote", "err", err) - return ErrAddingVote + return added, ErrAddingVote } } - return nil + return added, nil } //----------------------------------------------------------------------------- diff --git a/consensus/state_test.go b/consensus/state_test.go index 14cd0593e..32fc5fd6a 100644 --- a/consensus/state_test.go +++ b/consensus/state_test.go @@ -7,9 +7,13 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + cstypes "github.com/tendermint/tendermint/consensus/types" + cmn "github.com/tendermint/tendermint/libs/common" "github.com/tendermint/tendermint/libs/log" tmpubsub "github.com/tendermint/tendermint/libs/pubsub" + p2pdummy "github.com/tendermint/tendermint/p2p/dummy" "github.com/tendermint/tendermint/types" ) @@ -184,7 +188,7 @@ func TestStateBadProposal(t *testing.T) { height, round := cs1.Height, cs1.Round vs2 := vss[1] - partSize := cs1.state.ConsensusParams.BlockPartSizeBytes + partSize := types.BlockPartSizeBytes proposalCh := subscribe(cs1.eventBus, types.EventQueryCompleteProposal) voteCh := subscribe(cs1.eventBus, types.EventQueryVote) @@ -339,7 +343,7 @@ func TestStateLockNoPOL(t *testing.T) { vs2 := vss[1] height := cs1.Height - partSize := cs1.state.ConsensusParams.BlockPartSizeBytes + partSize := types.BlockPartSizeBytes timeoutProposeCh := subscribe(cs1.eventBus, types.EventQueryTimeoutPropose) timeoutWaitCh := subscribe(cs1.eventBus, types.EventQueryTimeoutWait) @@ -507,7 +511,7 @@ func TestStateLockPOLRelock(t *testing.T) { cs1, vss := randConsensusState(4) vs2, vs3, vs4 := vss[1], vss[2], vss[3] - partSize := cs1.state.ConsensusParams.BlockPartSizeBytes + partSize := types.BlockPartSizeBytes timeoutProposeCh := subscribe(cs1.eventBus, types.EventQueryTimeoutPropose) timeoutWaitCh := subscribe(cs1.eventBus, types.EventQueryTimeoutWait) @@ -622,7 +626,7 @@ func TestStateLockPOLUnlock(t *testing.T) { cs1, vss := randConsensusState(4) vs2, vs3, vs4 := vss[1], vss[2], vss[3] - partSize := cs1.state.ConsensusParams.BlockPartSizeBytes + partSize := types.BlockPartSizeBytes proposalCh := subscribe(cs1.eventBus, types.EventQueryCompleteProposal) timeoutProposeCh := subscribe(cs1.eventBus, types.EventQueryTimeoutPropose) @@ -719,7 +723,7 @@ func TestStateLockPOLSafety1(t *testing.T) { cs1, vss := randConsensusState(4) vs2, vs3, vs4 := vss[1], vss[2], vss[3] - partSize := cs1.state.ConsensusParams.BlockPartSizeBytes + partSize := types.BlockPartSizeBytes proposalCh := subscribe(cs1.eventBus, types.EventQueryCompleteProposal) timeoutProposeCh := subscribe(cs1.eventBus, types.EventQueryTimeoutPropose) @@ -842,7 +846,7 @@ func TestStateLockPOLSafety2(t *testing.T) { cs1, vss := randConsensusState(4) vs2, vs3, vs4 := vss[1], vss[2], vss[3] - partSize := cs1.state.ConsensusParams.BlockPartSizeBytes + partSize := types.BlockPartSizeBytes proposalCh := subscribe(cs1.eventBus, types.EventQueryCompleteProposal) timeoutProposeCh := subscribe(cs1.eventBus, types.EventQueryTimeoutPropose) @@ -1021,7 +1025,7 @@ func TestStateHalt1(t *testing.T) { cs1, vss := randConsensusState(4) vs2, vs3, vs4 := vss[1], vss[2], vss[3] - partSize := cs1.state.ConsensusParams.BlockPartSizeBytes + partSize := types.BlockPartSizeBytes proposalCh := subscribe(cs1.eventBus, types.EventQueryCompleteProposal) timeoutWaitCh := subscribe(cs1.eventBus, types.EventQueryTimeoutWait) @@ -1081,6 +1085,80 @@ func TestStateHalt1(t *testing.T) { } } +func TestStateOutputsBlockPartsStats(t *testing.T) { + // create dummy peer + cs, _ := randConsensusState(1) + peer := p2pdummy.NewPeer() + + // 1) new block part + parts := types.NewPartSetFromData(cmn.RandBytes(100), 10) + msg := &BlockPartMessage{ + Height: 1, + Round: 0, + Part: parts.GetPart(0), + } + + cs.ProposalBlockParts = types.NewPartSetFromHeader(parts.Header()) + cs.handleMsg(msgInfo{msg, peer.ID()}) + + statsMessage := <-cs.statsMsgQueue + require.Equal(t, msg, statsMessage.Msg, "") + require.Equal(t, peer.ID(), statsMessage.PeerID, "") + + // sending the same part from different peer + cs.handleMsg(msgInfo{msg, "peer2"}) + + // sending the part with the same height, but different round + msg.Round = 1 + cs.handleMsg(msgInfo{msg, peer.ID()}) + + // sending the part from the smaller height + msg.Height = 0 + cs.handleMsg(msgInfo{msg, peer.ID()}) + + // sending the part from the bigger height + msg.Height = 3 + cs.handleMsg(msgInfo{msg, peer.ID()}) + + select { + case <-cs.statsMsgQueue: + t.Errorf("Should not output stats message after receiving the known block part!") + case <-time.After(50 * time.Millisecond): + } + +} + +func TestStateOutputVoteStats(t *testing.T) { + cs, vss := randConsensusState(2) + // create dummy peer + peer := p2pdummy.NewPeer() + + vote := signVote(vss[1], types.VoteTypePrecommit, []byte("test"), types.PartSetHeader{}) + + voteMessage := &VoteMessage{vote} + cs.handleMsg(msgInfo{voteMessage, peer.ID()}) + + statsMessage := <-cs.statsMsgQueue + require.Equal(t, voteMessage, statsMessage.Msg, "") + require.Equal(t, peer.ID(), statsMessage.PeerID, "") + + // sending the same part from different peer + cs.handleMsg(msgInfo{&VoteMessage{vote}, "peer2"}) + + // sending the vote for the bigger height + incrementHeight(vss[1]) + vote = signVote(vss[1], types.VoteTypePrecommit, []byte("test"), types.PartSetHeader{}) + + cs.handleMsg(msgInfo{&VoteMessage{vote}, peer.ID()}) + + select { + case <-cs.statsMsgQueue: + t.Errorf("Should not output stats message after receiving the known vote or vote from bigger height") + case <-time.After(50 * time.Millisecond): + } + +} + // subscribe subscribes test client to the given query and returns a channel with cap = 1. func subscribe(eventBus *types.EventBus, q tmpubsub.Query) <-chan interface{} { out := make(chan interface{}, 1) diff --git a/consensus/wal.go b/consensus/wal.go index 870701f1c..10bef542b 100644 --- a/consensus/wal.go +++ b/consensus/wal.go @@ -18,7 +18,7 @@ import ( ) const ( - // must be greater than params.BlockGossip.BlockPartSizeBytes + a few bytes + // must be greater than types.BlockPartSizeBytes + a few bytes maxMsgSizeBytes = 1024 * 1024 // 1MB ) diff --git a/consensus/wal_generator.go b/consensus/wal_generator.go index 6d889aa6f..cdb667edf 100644 --- a/consensus/wal_generator.go +++ b/consensus/wal_generator.go @@ -52,13 +52,13 @@ func WALWithNBlocks(numBlocks int) (data []byte, err error) { return nil, errors.Wrap(err, "failed to make genesis state") } blockStore := bc.NewBlockStore(blockStoreDB) - handshaker := NewHandshaker(stateDB, state, blockStore, genDoc) - proxyApp := proxy.NewAppConns(proxy.NewLocalClientCreator(app), handshaker) + proxyApp := proxy.NewAppConns(proxy.NewLocalClientCreator(app)) proxyApp.SetLogger(logger.With("module", "proxy")) if err := proxyApp.Start(); err != nil { return nil, errors.Wrap(err, "failed to start proxy app connections") } defer proxyApp.Stop() + eventBus := types.NewEventBus() eventBus.SetLogger(logger.With("module", "events")) if err := eventBus.Start(); err != nil { diff --git a/docs/config.js b/docs/.vuepress/config.js similarity index 58% rename from docs/config.js rename to docs/.vuepress/config.js index a006a0756..5b064bf82 100644 --- a/docs/config.js +++ b/docs/.vuepress/config.js @@ -27,6 +27,7 @@ module.exports = { "/tendermint-core/configuration", "/tendermint-core/rpc", "/tendermint-core/running-in-production", + "/tendermint-core/fast-sync", "/tendermint-core/how-to-read-logs", "/tendermint-core/block-structure", "/tendermint-core/light-client-protocol", @@ -36,21 +37,23 @@ module.exports = { ] }, { - title: "Tendermint Tools", + title: "Tools", collapsable: false, - children: ["tools/benchmarking", "tools/monitoring"] + children: [ + "tools/benchmarking", + "tools/monitoring" + ] }, { - title: "Tendermint Networks", + title: "Networks", collapsable: false, children: [ "/networks/deploy-testnets", "/networks/terraform-and-ansible", - "/networks/fast-sync" ] }, { - title: "Application Development", + title: "Apps", collapsable: false, children: [ "/app-dev/getting-started", @@ -63,6 +66,38 @@ module.exports = { "/app-dev/ecosystem" ] }, + { + title: "Tendermint Spec", + collapsable: true, + children: [ + "/spec/", + "/spec/blockchain/blockchain", + "/spec/blockchain/encoding", + "/spec/blockchain/state", + "/spec/software/abci", + "/spec/consensus/bft-time", + "/spec/consensus/consensus", + "/spec/consensus/light-client", + "/spec/software/wal", + "/spec/p2p/config", + "/spec/p2p/connection", + "/spec/p2p/node", + "/spec/p2p/peer", + "/spec/reactors/block_sync/reactor", + "/spec/reactors/block_sync/impl", + "/spec/reactors/consensus/consensus", + "/spec/reactors/consensus/consensus-reactor", + "/spec/reactors/consensus/proposer-selection", + "/spec/reactors/evidence/reactor", + "/spec/reactors/mempool/concurrency", + "/spec/reactors/mempool/config", + "/spec/reactors/mempool/functionality", + "/spec/reactors/mempool/messages", + "/spec/reactors/mempool/reactor", + "/spec/reactors/pex/pex", + "/spec/reactors/pex/reactor", + ] + }, { title: "ABCI Specification", collapsable: false, @@ -75,7 +110,10 @@ module.exports = { { title: "Research", collapsable: false, - children: ["/research/determinism", "/research/transactional-semantics"] + children: [ + "/research/determinism", + "/research/transactional-semantics" + ] } ] } diff --git a/docs/.vuepress/dist/404.html b/docs/.vuepress/dist/404.html new file mode 100644 index 000000000..6249309b0 --- /dev/null +++ b/docs/.vuepress/dist/404.html @@ -0,0 +1,17 @@ + + +
+ + +