From ad580e2734de2b417a6731fb46dfb3a61a09a375 Mon Sep 17 00:00:00 2001 From: Anton Kaliaev Date: Tue, 24 Jul 2018 10:44:39 +0400 Subject: [PATCH 01/44] fix acceptDeadline before: 1.000000003s after: 3.000000000s Refs #2027 --- CHANGELOG.md | 4 +--- CHANGELOG_PENDING.md | 4 ++++ privval/socket.go | 6 +++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 27d5656b7..44a242340 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,5 @@ # Changelog -## TBA - ## 0.22.5 *July 23th, 2018* @@ -15,7 +13,7 @@ IMPROVEMENTS: - [config] Increase default send/recv rates to 5 mB/s - [p2p] allow persistent peers to be private -BUG FIXES +BUG FIXES: - [mempool] fixed a race condition when `create_empty_blocks=false` where a transaction is published at an old height. - [p2p] dial external IP setup by `persistent_peers`, not internal NAT IP diff --git a/CHANGELOG_PENDING.md b/CHANGELOG_PENDING.md index c51a2ab6f..596cf22d7 100644 --- a/CHANGELOG_PENDING.md +++ b/CHANGELOG_PENDING.md @@ -8,3 +8,7 @@ IMPROVEMENTS: - [blockchain] Improve fast-sync logic - tweak params - only process one block at a time to avoid starving + +BUG FIXES: +- [privval] fix a deadline for accepting new connections in socket private + validator. diff --git a/privval/socket.go b/privval/socket.go index c33443eda..d5ede471c 100644 --- a/privval/socket.go +++ b/privval/socket.go @@ -7,12 +7,12 @@ import ( "net" "time" - "github.com/tendermint/go-amino" + amino "github.com/tendermint/go-amino" + "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/crypto/ed25519" cmn "github.com/tendermint/tendermint/libs/common" "github.com/tendermint/tendermint/libs/log" - p2pconn "github.com/tendermint/tendermint/p2p/conn" "github.com/tendermint/tendermint/types" ) @@ -33,7 +33,7 @@ var ( ) var ( - acceptDeadline = time.Second + defaultAcceptDeadlineSeconds + acceptDeadline = time.Second * defaultAcceptDeadlineSeconds connDeadline = time.Second * defaultConnDeadlineSeconds connHeartbeat = time.Second * defaultConnHeartBeatSeconds ) From 75a26ebd6d09dcfdbabd9e63ca24b5f14c88b1f6 Mon Sep 17 00:00:00 2001 From: Anton Kaliaev Date: Tue, 24 Jul 2018 15:44:01 +0400 Subject: [PATCH 02/44] do not overwrite metrics provider in node#NewNode also, make running Prometheus server optional. Closes #2019 --- node/node.go | 35 +++++++++++++---------------------- rpc/test/helpers.go | 2 +- 2 files changed, 14 insertions(+), 23 deletions(-) diff --git a/node/node.go b/node/node.go index e333c667a..0c3396dc6 100644 --- a/node/node.go +++ b/node/node.go @@ -85,7 +85,7 @@ func DefaultNewNode(config *cfg.Config, logger log.Logger) (*Node, error) { proxy.DefaultClientCreator(config.ProxyApp, config.ABCI, config.DBDir()), DefaultGenesisDocProviderFunc(config), DefaultDBProvider, - DefaultMetricsProvider, + DefaultMetricsProvider(config.Instrumentation), logger, ) } @@ -93,15 +93,15 @@ func DefaultNewNode(config *cfg.Config, logger log.Logger) (*Node, error) { // MetricsProvider returns a consensus, p2p and mempool Metrics. type MetricsProvider func() (*cs.Metrics, *p2p.Metrics, *mempl.Metrics) -// DefaultMetricsProvider returns consensus, p2p and mempool Metrics build -// using Prometheus client library. -func DefaultMetricsProvider() (*cs.Metrics, *p2p.Metrics, *mempl.Metrics) { - return cs.PrometheusMetrics(), p2p.PrometheusMetrics(), mempl.PrometheusMetrics() -} - -// NopMetricsProvider returns consensus, p2p and mempool Metrics as no-op. -func NopMetricsProvider() (*cs.Metrics, *p2p.Metrics, *mempl.Metrics) { - return cs.NopMetrics(), p2p.NopMetrics(), mempl.NopMetrics() +// DefaultMetricsProvider returns Metrics build using Prometheus client library +// if Prometheus is enabled. Otherwise, it returns no-op Metrics. +func DefaultMetricsProvider(config *cfg.InstrumentationConfig) MetricsProvider { + return func() (*cs.Metrics, *p2p.Metrics, *mempl.Metrics) { + if config.Prometheus { + return cs.PrometheusMetrics(), p2p.PrometheusMetrics(), mempl.PrometheusMetrics() + } + return cs.NopMetrics(), p2p.NopMetrics(), mempl.NopMetrics() + } } //------------------------------------------------------------------------------ @@ -229,17 +229,7 @@ func NewNode(config *cfg.Config, consensusLogger.Info("This node is not a validator", "addr", privValidator.GetAddress(), "pubKey", privValidator.GetPubKey()) } - // metrics - var ( - csMetrics *cs.Metrics - p2pMetrics *p2p.Metrics - memplMetrics *mempl.Metrics - ) - if config.Instrumentation.Prometheus { - csMetrics, p2pMetrics, memplMetrics = metricsProvider() - } else { - csMetrics, p2pMetrics, memplMetrics = NopMetricsProvider() - } + csMetrics, p2pMetrics, memplMetrics := metricsProvider() // Make MempoolReactor mempoolLogger := logger.With("module", "mempool") @@ -462,7 +452,8 @@ func (n *Node) OnStart() error { n.rpcListeners = listeners } - if n.config.Instrumentation.Prometheus { + if n.config.Instrumentation.Prometheus && + n.config.Instrumentation.PrometheusListenAddr != "" { n.prometheusSrv = n.startPrometheusServer(n.config.Instrumentation.PrometheusListenAddr) } diff --git a/rpc/test/helpers.go b/rpc/test/helpers.go index 915911818..7e0cba0ed 100644 --- a/rpc/test/helpers.go +++ b/rpc/test/helpers.go @@ -123,7 +123,7 @@ func NewTendermint(app abci.Application) *nm.Node { node, err := nm.NewNode(config, pv, papp, nm.DefaultGenesisDocProviderFunc(config), nm.DefaultDBProvider, - nm.DefaultMetricsProvider, + nm.DefaultMetricsProvider(config.Instrumentation), logger) if err != nil { panic(err) From 059a03a66a0d950b5e4c8956145ce708d239a182 Mon Sep 17 00:00:00 2001 From: Anton Kaliaev Date: Tue, 24 Jul 2018 18:02:32 +0400 Subject: [PATCH 03/44] tools: clean up Makefile and remove LICENSE file (#2042) * lean up Makefile and remove LICENSE file * remove k8s and build LICENSE files * remove non-existing target --- tools/build/LICENSE | 204 ---------------------------- tools/mintnet-kubernetes/LICENSE | 192 -------------------------- tools/mintnet-kubernetes/README.rst | 2 +- tools/tm-bench/LICENSE | 204 ---------------------------- tools/tm-bench/Makefile | 4 +- tools/tm-monitor/LICENSE | 204 ---------------------------- tools/tm-monitor/Makefile | 73 +--------- 7 files changed, 6 insertions(+), 877 deletions(-) delete mode 100644 tools/build/LICENSE delete mode 100644 tools/mintnet-kubernetes/LICENSE delete mode 100644 tools/tm-bench/LICENSE delete mode 100644 tools/tm-monitor/LICENSE diff --git a/tools/build/LICENSE b/tools/build/LICENSE deleted file mode 100644 index bb66bb350..000000000 --- a/tools/build/LICENSE +++ /dev/null @@ -1,204 +0,0 @@ -Tendermint Core -License: Apache2.0 - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2016 All in Bits, Inc - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/tools/mintnet-kubernetes/LICENSE b/tools/mintnet-kubernetes/LICENSE deleted file mode 100644 index 64a33ddf1..000000000 --- a/tools/mintnet-kubernetes/LICENSE +++ /dev/null @@ -1,192 +0,0 @@ -Copyright (C) 2017 Tendermint - - - - Apache License - Version 2.0, January 2004 - https://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/tools/mintnet-kubernetes/README.rst b/tools/mintnet-kubernetes/README.rst index 9cfdbb8eb..edf5e81e5 100644 --- a/tools/mintnet-kubernetes/README.rst +++ b/tools/mintnet-kubernetes/README.rst @@ -52,7 +52,7 @@ then query the Tendermint app logs from the first pod: ``kubectl logs -c tm -f tm-0`` -finally, use our `Rest API <../specification/rpc.html>`__ to fetch the status of the second pod's Tendermint app. +finally, use our `Rest API `__ to fetch the status of the second pod's Tendermint app. Note we are using ``kubectl exec`` because pods are not exposed (and should not be) to the outer network: diff --git a/tools/tm-bench/LICENSE b/tools/tm-bench/LICENSE deleted file mode 100644 index f48913967..000000000 --- a/tools/tm-bench/LICENSE +++ /dev/null @@ -1,204 +0,0 @@ -Tendermint Bench -Copyright 2017 Tendermint - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/tools/tm-bench/Makefile b/tools/tm-bench/Makefile index 2d427dbc1..79aaf0c99 100644 --- a/tools/tm-bench/Makefile +++ b/tools/tm-bench/Makefile @@ -15,7 +15,7 @@ install: test: @go test -race -build-all: check_tools +build-all: rm -rf ./dist gox -verbose \ -ldflags "-s -w" \ @@ -47,4 +47,4 @@ clean: # To avoid unintended conflicts with file names, always add to .PHONY # unless there is a reason not to. # https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html -.PHONY: check check_tools get_tools update_tools get_vendor_deps build install test build-all dist fmt metalinter metalinter_all build-docker clean +.PHONY: build install test build-all dist build-docker clean diff --git a/tools/tm-monitor/LICENSE b/tools/tm-monitor/LICENSE deleted file mode 100644 index 20728d318..000000000 --- a/tools/tm-monitor/LICENSE +++ /dev/null @@ -1,204 +0,0 @@ -Tendermint Monitor -Copyright 2017 Tendermint - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/tools/tm-monitor/Makefile b/tools/tm-monitor/Makefile index 3371a0c19..077d60b94 100644 --- a/tools/tm-monitor/Makefile +++ b/tools/tm-monitor/Makefile @@ -1,36 +1,7 @@ DIST_DIRS := find * -type d -exec VERSION := $(shell perl -ne '/^var version.*"([^"]+)".*$$/ && print "v$$1\n"' main.go) -GOTOOLS = \ - github.com/mitchellh/gox \ - github.com/golang/dep/cmd/dep \ - gopkg.in/alecthomas/gometalinter.v2 -PACKAGES=$(shell go list ./... | grep -v '/vendor/') -all: check get_vendor_deps build test install metalinter - -check: check_tools - -######################################## -### Tools & dependencies - -check_tools: - @# https://stackoverflow.com/a/25668869 - @echo "Found tools: $(foreach tool,$(GOTOOLS_CHECK),\ - $(if $(shell which $(tool)),$(tool),$(error "No $(tool) in PATH")))" - -get_tools: - @echo "--> Installing tools" - go get -u -v $(GOTOOLS) - @gometalinter.v2 --install - -update_tools: - @echo "--> Updating tools" - @go get -u $(GOTOOLS) - -get_vendor_deps: - @rm -rf vendor/ - @echo "--> Running dep ensure" - @dep ensure +all: build test install ######################################## ### Build @@ -44,7 +15,7 @@ install: test: @go test -race $(PACKAGES) -build-all: check_tools +build-all: rm -rf ./dist gox -verbose \ -ldflags "-s -w" \ @@ -72,45 +43,7 @@ clean: rm -f ./tm-monitor rm -rf ./dist -######################################## -### Formatting, linting, and vetting - -fmt: - @go fmt ./... - -metalinter: - @echo "==> Running linter" - gometalinter.v2 --vendor --deadline=600s --disable-all \ - --enable=maligned \ - --enable=deadcode \ - --enable=goconst \ - --enable=goimports \ - --enable=gosimple \ - --enable=ineffassign \ - --enable=megacheck \ - --enable=misspell \ - --enable=staticcheck \ - --enable=safesql \ - --enable=structcheck \ - --enable=unconvert \ - --enable=unused \ - --enable=varcheck \ - --enable=vetshadow \ - ./... - #--enable=gas \ - #--enable=dupl \ - #--enable=errcheck \ - #--enable=gocyclo \ - #--enable=golint \ <== comments on anything exported - #--enable=gotype \ - #--enable=interfacer \ - #--enable=unparam \ - #--enable=vet \ - -metalinter_all: - gometalinter.v2 --vendor --deadline=600s --enable-all --disable=lll ./... - # To avoid unintended conflicts with file names, always add to .PHONY # unless there is a reason not to. # https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html -.PHONY: check check_tools get_tools update_tools get_vendor_deps build install test build-all dist fmt metalinter metalinter_all build-docker clean +.PHONY: build install test build-all dist build-docker clean From c248ce5ef6b877ebcc892cc652cfa2b254c19595 Mon Sep 17 00:00:00 2001 From: Anton Kaliaev Date: Tue, 24 Jul 2018 19:10:58 +0400 Subject: [PATCH 04/44] p2p: Reject addrs coming from private peers (#2032) Refs #1706 --- CHANGELOG.md | 1 + docs/spec/reactors/pex/pex.md | 3 ++- p2p/pex/addrbook.go | 5 +++++ p2p/pex/addrbook_test.go | 16 ++++++++++++---- p2p/pex/errors.go | 8 ++++++++ 5 files changed, 28 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 44a242340..f3b92deb8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ BREAKING CHANGES: IMPROVEMENTS: - [abci, libs/common] Generated gogoproto static marshaller methods - [config] Increase default send/recv rates to 5 mB/s +- [p2p] reject addresses coming from private peers - [p2p] allow persistent peers to be private BUG FIXES: diff --git a/docs/spec/reactors/pex/pex.md b/docs/spec/reactors/pex/pex.md index 317803b8e..0f13c0cb5 100644 --- a/docs/spec/reactors/pex/pex.md +++ b/docs/spec/reactors/pex/pex.md @@ -12,7 +12,8 @@ them. Some peers can be marked as `private`, which means we will not put them in the address book or gossip them to others. -All peers except private peers are tracked using the address book. +All peers except private peers and peers coming from them are tracked using the +address book. ## Discovery diff --git a/p2p/pex/addrbook.go b/p2p/pex/addrbook.go index c630d14c3..ef7d7edaa 100644 --- a/p2p/pex/addrbook.go +++ b/p2p/pex/addrbook.go @@ -638,6 +638,7 @@ func (a *addrBook) addAddress(addr, src *p2p.NetAddress) error { if a.routabilityStrict && !addr.Routable() { return ErrAddrBookNonRoutable{addr} } + // TODO: we should track ourAddrs by ID and by IP:PORT and refuse both. if _, ok := a.ourAddrs[addr.String()]; ok { return ErrAddrBookSelf{addr} @@ -647,6 +648,10 @@ func (a *addrBook) addAddress(addr, src *p2p.NetAddress) error { return ErrAddrBookPrivate{addr} } + if _, ok := a.privateIDs[src.ID]; ok { + return ErrAddrBookPrivateSrc{src} + } + ka := a.addrLookup[addr.ID] if ka != nil { // If its already old and the addr is the same, ignore it. diff --git a/p2p/pex/addrbook_test.go b/p2p/pex/addrbook_test.go index 8b64c380f..761c11874 100644 --- a/p2p/pex/addrbook_test.go +++ b/p2p/pex/addrbook_test.go @@ -8,7 +8,6 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" cmn "github.com/tendermint/tendermint/libs/common" "github.com/tendermint/tendermint/libs/log" @@ -374,10 +373,19 @@ func TestPrivatePeers(t *testing.T) { } book.AddPrivateIDs(private) + // private addrs must not be added for _, addr := range addrs { err := book.AddAddress(addr, addr) - require.Error(t, err, "AddAddress should have failed with private peer %s", addr) - _, ok := err.(ErrAddrBookPrivate) - require.True(t, ok, "Wrong error type, wanted ErrAddrBookPrivate, got error: %s", err) + if assert.Error(t, err) { + _, ok := err.(ErrAddrBookPrivate) + assert.True(t, ok) + } + } + + // addrs coming from private peers must not be added + err := book.AddAddress(randIPv4Address(t), addrs[0]) + if assert.Error(t, err) { + _, ok := err.(ErrAddrBookPrivateSrc) + assert.True(t, ok) } } diff --git a/p2p/pex/errors.go b/p2p/pex/errors.go index 34bfb5ab1..7f660bdc5 100644 --- a/p2p/pex/errors.go +++ b/p2p/pex/errors.go @@ -30,6 +30,14 @@ func (err ErrAddrBookPrivate) Error() string { return fmt.Sprintf("Cannot add private peer with address %v", err.Addr) } +type ErrAddrBookPrivateSrc struct { + Src *p2p.NetAddress +} + +func (err ErrAddrBookPrivateSrc) Error() string { + return fmt.Sprintf("Cannot add peer coming from private peer with address %v", err.Src) +} + type ErrAddrBookNilAddr struct { Addr *p2p.NetAddress Src *p2p.NetAddress From 60378fd7f9c295b5c4c40a9710f1acf7a0a573e9 Mon Sep 17 00:00:00 2001 From: Anton Kaliaev Date: Tue, 24 Jul 2018 19:28:26 +0400 Subject: [PATCH 05/44] abci: remove fee (#2043) Refs #1861 We don't use the fee field and its likely just confusing. We can add backwards compatible priority (instead of fee) later. Note priority is better than fee because it lets the app do the math on how to rank order transactions, rather than forcing that into tendermint (ie. if we return fee, priority would be fee/gas) --- CHANGELOG_PENDING.md | 1 + abci/types/messages_test.go | 1 - abci/types/types.pb.go | 476 ++++++++++++-------------------- abci/types/types.proto | 2 - docs/app-dev/abci-spec.md | 2 - docs/app-dev/getting-started.md | 22 +- state/txindex/kv/kv_test.go | 2 - types/event_bus_test.go | 2 +- 8 files changed, 192 insertions(+), 316 deletions(-) diff --git a/CHANGELOG_PENDING.md b/CHANGELOG_PENDING.md index 596cf22d7..3aa01cac8 100644 --- a/CHANGELOG_PENDING.md +++ b/CHANGELOG_PENDING.md @@ -3,6 +3,7 @@ BREAKING CHANGES: - [types] CanonicalTime uses nanoseconds instead of clipping to ms - breaks serialization/signing of all messages with a timestamp +- [abci] Removed Fee from ResponseDeliverTx and ResponseCheckTx IMPROVEMENTS: - [blockchain] Improve fast-sync logic diff --git a/abci/types/messages_test.go b/abci/types/messages_test.go index da6595a46..603e602ae 100644 --- a/abci/types/messages_test.go +++ b/abci/types/messages_test.go @@ -85,7 +85,6 @@ func TestWriteReadMessage2(t *testing.T) { Tags: []cmn.KVPair{ cmn.KVPair{[]byte("abc"), []byte("def")}, }, - // Fee: cmn.KI64Pair{ }, // TODO: add the rest } diff --git a/abci/types/types.pb.go b/abci/types/types.pb.go index 57dd14393..90870a276 100644 --- a/abci/types/types.pb.go +++ b/abci/types/types.pb.go @@ -1394,7 +1394,6 @@ type ResponseCheckTx struct { GasWanted int64 `protobuf:"varint,5,opt,name=gas_wanted,json=gasWanted,proto3" json:"gas_wanted,omitempty"` GasUsed int64 `protobuf:"varint,6,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"` Tags []common.KVPair `protobuf:"bytes,7,rep,name=tags" json:"tags,omitempty"` - Fee common.KI64Pair `protobuf:"bytes,8,opt,name=fee" json:"fee"` } func (m *ResponseCheckTx) Reset() { *m = ResponseCheckTx{} } @@ -1451,13 +1450,6 @@ func (m *ResponseCheckTx) GetTags() []common.KVPair { return nil } -func (m *ResponseCheckTx) GetFee() common.KI64Pair { - if m != nil { - return m.Fee - } - return common.KI64Pair{} -} - type ResponseDeliverTx struct { Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` @@ -1466,7 +1458,6 @@ type ResponseDeliverTx struct { GasWanted int64 `protobuf:"varint,5,opt,name=gas_wanted,json=gasWanted,proto3" json:"gas_wanted,omitempty"` GasUsed int64 `protobuf:"varint,6,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"` Tags []common.KVPair `protobuf:"bytes,7,rep,name=tags" json:"tags,omitempty"` - Fee common.KI64Pair `protobuf:"bytes,8,opt,name=fee" json:"fee"` } func (m *ResponseDeliverTx) Reset() { *m = ResponseDeliverTx{} } @@ -1523,13 +1514,6 @@ func (m *ResponseDeliverTx) GetTags() []common.KVPair { return nil } -func (m *ResponseDeliverTx) GetFee() common.KI64Pair { - if m != nil { - return m.Fee - } - return common.KI64Pair{} -} - type ResponseEndBlock struct { ValidatorUpdates []Validator `protobuf:"bytes,1,rep,name=validator_updates,json=validatorUpdates" json:"validator_updates"` ConsensusParamUpdates *ConsensusParams `protobuf:"bytes,2,opt,name=consensus_param_updates,json=consensusParamUpdates" json:"consensus_param_updates,omitempty"` @@ -3176,9 +3160,6 @@ func (this *ResponseCheckTx) Equal(that interface{}) bool { return false } } - if !this.Fee.Equal(&that1.Fee) { - return false - } return true } func (this *ResponseDeliverTx) Equal(that interface{}) bool { @@ -3226,9 +3207,6 @@ func (this *ResponseDeliverTx) Equal(that interface{}) bool { return false } } - if !this.Fee.Equal(&that1.Fee) { - return false - } return true } func (this *ResponseEndBlock) Equal(that interface{}) bool { @@ -5029,14 +5007,6 @@ func (m *ResponseCheckTx) MarshalTo(dAtA []byte) (int, error) { i += n } } - dAtA[i] = 0x42 - i++ - i = encodeVarintTypes(dAtA, i, uint64(m.Fee.Size())) - n29, err := m.Fee.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n29 return i, nil } @@ -5100,14 +5070,6 @@ func (m *ResponseDeliverTx) MarshalTo(dAtA []byte) (int, error) { i += n } } - dAtA[i] = 0x42 - i++ - i = encodeVarintTypes(dAtA, i, uint64(m.Fee.Size())) - n30, err := m.Fee.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n30 return i, nil } @@ -5142,11 +5104,11 @@ func (m *ResponseEndBlock) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintTypes(dAtA, i, uint64(m.ConsensusParamUpdates.Size())) - n31, err := m.ConsensusParamUpdates.MarshalTo(dAtA[i:]) + n29, err := m.ConsensusParamUpdates.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n31 + i += n29 } if len(m.Tags) > 0 { for _, msg := range m.Tags { @@ -5206,31 +5168,31 @@ func (m *ConsensusParams) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintTypes(dAtA, i, uint64(m.BlockSize.Size())) - n32, err := m.BlockSize.MarshalTo(dAtA[i:]) + n30, err := m.BlockSize.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n32 + i += n30 } if m.TxSize != nil { dAtA[i] = 0x12 i++ i = encodeVarintTypes(dAtA, i, uint64(m.TxSize.Size())) - n33, err := m.TxSize.MarshalTo(dAtA[i:]) + n31, err := m.TxSize.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n33 + i += n31 } if m.BlockGossip != nil { dAtA[i] = 0x1a i++ i = encodeVarintTypes(dAtA, i, uint64(m.BlockGossip.Size())) - n34, err := m.BlockGossip.MarshalTo(dAtA[i:]) + n32, err := m.BlockGossip.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n34 + i += n32 } return i, nil } @@ -5381,11 +5343,11 @@ func (m *Header) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x4a i++ i = encodeVarintTypes(dAtA, i, uint64(m.Proposer.Size())) - n35, err := m.Proposer.MarshalTo(dAtA[i:]) + n33, err := m.Proposer.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n35 + i += n33 return i, nil } @@ -5413,11 +5375,11 @@ func (m *Validator) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintTypes(dAtA, i, uint64(m.PubKey.Size())) - n36, err := m.PubKey.MarshalTo(dAtA[i:]) + n34, err := m.PubKey.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n36 + i += n34 if m.Power != 0 { dAtA[i] = 0x18 i++ @@ -5444,11 +5406,11 @@ func (m *SigningValidator) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintTypes(dAtA, i, uint64(m.Validator.Size())) - n37, err := m.Validator.MarshalTo(dAtA[i:]) + n35, err := m.Validator.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n37 + i += n35 if m.SignedLastBlock { dAtA[i] = 0x10 i++ @@ -5516,11 +5478,11 @@ func (m *Evidence) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintTypes(dAtA, i, uint64(m.Validator.Size())) - n38, err := m.Validator.MarshalTo(dAtA[i:]) + n36, err := m.Validator.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n38 + i += n36 if m.Height != 0 { dAtA[i] = 0x18 i++ @@ -6022,8 +5984,6 @@ func NewPopulatedResponseCheckTx(r randyTypes, easy bool) *ResponseCheckTx { this.Tags[i] = *v23 } } - v24 := common.NewPopulatedKI64Pair(r, easy) - this.Fee = *v24 if !easy && r.Intn(10) != 0 { } return this @@ -6032,9 +5992,9 @@ func NewPopulatedResponseCheckTx(r randyTypes, easy bool) *ResponseCheckTx { func NewPopulatedResponseDeliverTx(r randyTypes, easy bool) *ResponseDeliverTx { this := &ResponseDeliverTx{} this.Code = uint32(r.Uint32()) - v25 := r.Intn(100) - this.Data = make([]byte, v25) - for i := 0; i < v25; i++ { + v24 := r.Intn(100) + this.Data = make([]byte, v24) + for i := 0; i < v24; i++ { this.Data[i] = byte(r.Intn(256)) } this.Log = string(randStringTypes(r)) @@ -6048,15 +6008,13 @@ func NewPopulatedResponseDeliverTx(r randyTypes, easy bool) *ResponseDeliverTx { this.GasUsed *= -1 } if r.Intn(10) != 0 { - v26 := r.Intn(5) - this.Tags = make([]common.KVPair, v26) - for i := 0; i < v26; i++ { - v27 := common.NewPopulatedKVPair(r, easy) - this.Tags[i] = *v27 + v25 := r.Intn(5) + this.Tags = make([]common.KVPair, v25) + for i := 0; i < v25; i++ { + v26 := common.NewPopulatedKVPair(r, easy) + this.Tags[i] = *v26 } } - v28 := common.NewPopulatedKI64Pair(r, easy) - this.Fee = *v28 if !easy && r.Intn(10) != 0 { } return this @@ -6065,22 +6023,22 @@ func NewPopulatedResponseDeliverTx(r randyTypes, easy bool) *ResponseDeliverTx { func NewPopulatedResponseEndBlock(r randyTypes, easy bool) *ResponseEndBlock { this := &ResponseEndBlock{} if r.Intn(10) != 0 { - v29 := r.Intn(5) - this.ValidatorUpdates = make([]Validator, v29) - for i := 0; i < v29; i++ { - v30 := NewPopulatedValidator(r, easy) - this.ValidatorUpdates[i] = *v30 + v27 := r.Intn(5) + this.ValidatorUpdates = make([]Validator, v27) + for i := 0; i < v27; i++ { + v28 := NewPopulatedValidator(r, easy) + this.ValidatorUpdates[i] = *v28 } } if r.Intn(10) != 0 { this.ConsensusParamUpdates = NewPopulatedConsensusParams(r, easy) } if r.Intn(10) != 0 { - v31 := r.Intn(5) - this.Tags = make([]common.KVPair, v31) - for i := 0; i < v31; i++ { - v32 := common.NewPopulatedKVPair(r, easy) - this.Tags[i] = *v32 + v29 := r.Intn(5) + this.Tags = make([]common.KVPair, v29) + for i := 0; i < v29; i++ { + v30 := common.NewPopulatedKVPair(r, easy) + this.Tags[i] = *v30 } } if !easy && r.Intn(10) != 0 { @@ -6090,9 +6048,9 @@ func NewPopulatedResponseEndBlock(r randyTypes, easy bool) *ResponseEndBlock { func NewPopulatedResponseCommit(r randyTypes, easy bool) *ResponseCommit { this := &ResponseCommit{} - v33 := r.Intn(100) - this.Data = make([]byte, v33) - for i := 0; i < v33; i++ { + v31 := r.Intn(100) + this.Data = make([]byte, v31) + for i := 0; i < v31; i++ { this.Data[i] = byte(r.Intn(256)) } if !easy && r.Intn(10) != 0 { @@ -6180,23 +6138,23 @@ func NewPopulatedHeader(r randyTypes, easy bool) *Header { if r.Intn(2) == 0 { this.TotalTxs *= -1 } - v34 := r.Intn(100) - this.LastBlockHash = make([]byte, v34) - for i := 0; i < v34; i++ { + v32 := r.Intn(100) + this.LastBlockHash = make([]byte, v32) + for i := 0; i < v32; i++ { this.LastBlockHash[i] = byte(r.Intn(256)) } - v35 := r.Intn(100) - this.ValidatorsHash = make([]byte, v35) - for i := 0; i < v35; i++ { + v33 := r.Intn(100) + this.ValidatorsHash = make([]byte, v33) + for i := 0; i < v33; i++ { this.ValidatorsHash[i] = byte(r.Intn(256)) } - v36 := r.Intn(100) - this.AppHash = make([]byte, v36) - for i := 0; i < v36; i++ { + v34 := r.Intn(100) + this.AppHash = make([]byte, v34) + for i := 0; i < v34; i++ { this.AppHash[i] = byte(r.Intn(256)) } - v37 := NewPopulatedValidator(r, easy) - this.Proposer = *v37 + v35 := NewPopulatedValidator(r, easy) + this.Proposer = *v35 if !easy && r.Intn(10) != 0 { } return this @@ -6204,13 +6162,13 @@ func NewPopulatedHeader(r randyTypes, easy bool) *Header { func NewPopulatedValidator(r randyTypes, easy bool) *Validator { this := &Validator{} - v38 := r.Intn(100) - this.Address = make([]byte, v38) - for i := 0; i < v38; i++ { + v36 := r.Intn(100) + this.Address = make([]byte, v36) + for i := 0; i < v36; i++ { this.Address[i] = byte(r.Intn(256)) } - v39 := NewPopulatedPubKey(r, easy) - this.PubKey = *v39 + v37 := NewPopulatedPubKey(r, easy) + this.PubKey = *v37 this.Power = int64(r.Int63()) if r.Intn(2) == 0 { this.Power *= -1 @@ -6222,8 +6180,8 @@ func NewPopulatedValidator(r randyTypes, easy bool) *Validator { func NewPopulatedSigningValidator(r randyTypes, easy bool) *SigningValidator { this := &SigningValidator{} - v40 := NewPopulatedValidator(r, easy) - this.Validator = *v40 + v38 := NewPopulatedValidator(r, easy) + this.Validator = *v38 this.SignedLastBlock = bool(bool(r.Intn(2) == 0)) if !easy && r.Intn(10) != 0 { } @@ -6233,9 +6191,9 @@ func NewPopulatedSigningValidator(r randyTypes, easy bool) *SigningValidator { func NewPopulatedPubKey(r randyTypes, easy bool) *PubKey { this := &PubKey{} this.Type = string(randStringTypes(r)) - v41 := r.Intn(100) - this.Data = make([]byte, v41) - for i := 0; i < v41; i++ { + v39 := r.Intn(100) + this.Data = make([]byte, v39) + for i := 0; i < v39; i++ { this.Data[i] = byte(r.Intn(256)) } if !easy && r.Intn(10) != 0 { @@ -6246,8 +6204,8 @@ func NewPopulatedPubKey(r randyTypes, easy bool) *PubKey { func NewPopulatedEvidence(r randyTypes, easy bool) *Evidence { this := &Evidence{} this.Type = string(randStringTypes(r)) - v42 := NewPopulatedValidator(r, easy) - this.Validator = *v42 + v40 := NewPopulatedValidator(r, easy) + this.Validator = *v40 this.Height = int64(r.Int63()) if r.Intn(2) == 0 { this.Height *= -1 @@ -6284,9 +6242,9 @@ func randUTF8RuneTypes(r randyTypes) rune { return rune(ru + 61) } func randStringTypes(r randyTypes) string { - v43 := r.Intn(100) - tmps := make([]rune, v43) - for i := 0; i < v43; i++ { + v41 := r.Intn(100) + tmps := make([]rune, v41) + for i := 0; i < v41; i++ { tmps[i] = randUTF8RuneTypes(r) } return string(tmps) @@ -6308,11 +6266,11 @@ func randFieldTypes(dAtA []byte, r randyTypes, fieldNumber int, wire int) []byte switch wire { case 0: dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) - v44 := r.Int63() + v42 := r.Int63() if r.Intn(2) == 0 { - v44 *= -1 + v42 *= -1 } - dAtA = encodeVarintPopulateTypes(dAtA, uint64(v44)) + dAtA = encodeVarintPopulateTypes(dAtA, uint64(v42)) case 1: dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) @@ -6865,8 +6823,6 @@ func (m *ResponseCheckTx) Size() (n int) { n += 1 + l + sovTypes(uint64(l)) } } - l = m.Fee.Size() - n += 1 + l + sovTypes(uint64(l)) return n } @@ -6900,8 +6856,6 @@ func (m *ResponseDeliverTx) Size() (n int) { n += 1 + l + sovTypes(uint64(l)) } } - l = m.Fee.Size() - n += 1 + l + sovTypes(uint64(l)) return n } @@ -10201,36 +10155,6 @@ func (m *ResponseCheckTx) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fee", 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 err := m.Fee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) @@ -10458,36 +10382,6 @@ func (m *ResponseDeliverTx) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fee", 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 err := m.Fee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) @@ -12041,124 +11935,122 @@ func init() { proto.RegisterFile("abci/types/types.proto", fileDescriptorTypes) func init() { golang_proto.RegisterFile("abci/types/types.proto", fileDescriptorTypes) } var fileDescriptorTypes = []byte{ - // 1892 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x58, 0x4b, 0x73, 0x1c, 0x49, - 0x11, 0x56, 0xcf, 0xbb, 0x53, 0x8f, 0x19, 0x97, 0x6c, 0x69, 0x3c, 0x0b, 0xb2, 0xa3, 0x83, 0xf0, - 0xca, 0xac, 0x56, 0x02, 0xed, 0xda, 0x61, 0xef, 0xc2, 0x06, 0x1a, 0xad, 0xd9, 0x51, 0x2c, 0x0f, - 0xd1, 0xf6, 0x9a, 0x08, 0x2e, 0x13, 0x35, 0xd3, 0xa5, 0x9e, 0x0e, 0xcf, 0x74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 0xef, 0xa9, 0xef, 0xfd, 0x27, 0x00, 0x00, 0xff, 0xff, 0xf4, 0x59, 0x8b, 0xa6, - 0xd9, 0x15, 0x00, 0x00, + // 1871 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x58, 0x4b, 0x6f, 0x1c, 0xc7, + 0x11, 0xe6, 0xec, 0x7b, 0x8a, 0x8f, 0xa5, 0x9a, 0x12, 0xb9, 0x5a, 0x27, 0x94, 0x30, 0x08, 0x64, + 0x2a, 0xa6, 0xc9, 0x84, 0x8e, 0x0c, 0xc9, 0x4e, 0x8c, 0x70, 0x69, 0xc5, 0x4b, 0x38, 0x0f, 0x66, + 0x24, 0x2b, 0x40, 0x2e, 0x8b, 0xde, 0x99, 0xe6, 0x6c, 0x43, 0xbb, 0x33, 0xe3, 0xe9, 0x5e, 0x7a, + 0xa9, 0xdf, 0x60, 0xe4, 0x9a, 0x73, 0x6e, 0x39, 0xe5, 0x10, 0x20, 0x40, 0x8e, 0x39, 0x05, 0x3e, + 0xe6, 0x12, 0xe4, 0x14, 0x21, 0xa1, 0x73, 0xca, 0x2f, 0xc8, 0x31, 0xe8, 0xea, 0x79, 0x73, 0x56, + 0x10, 0x94, 0x5b, 0x2e, 0x64, 0xd7, 0x54, 0x55, 0x77, 0x57, 0x6d, 0xd5, 0x57, 0x55, 0x0d, 0xdb, + 0x74, 0xec, 0xf0, 0x43, 0x79, 0x19, 0x32, 0xa1, 0xff, 0x1e, 0x84, 0x51, 0x20, 0x03, 0xd2, 0x44, + 0xa2, 0xff, 0xae, 0xc7, 0xe5, 0x64, 0x3e, 0x3e, 0x70, 0x82, 0xd9, 0xa1, 0x17, 0x78, 0xc1, 0x21, + 0x72, 0xc7, 0xf3, 0x73, 0xa4, 0x90, 0xc0, 0x95, 0xd6, 0xea, 0x3f, 0xcc, 0x89, 0x4b, 0xe6, 0xbb, + 0x2c, 0x9a, 0x71, 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96, 0xbe, 0x90, 0xf5, 0x97, 0x0f, 0x59, 0xe4, + 0x43, 0xe8, 0x64, 0x83, 0x73, 0xf5, 0x9b, 0x57, 0x7f, 0xd9, 0xdc, 0x33, 0xf8, 0xc6, 0x7f, 0xfe, + 0xb9, 0x6b, 0xfc, 0xf6, 0x6a, 0xd7, 0xf8, 0xe3, 0xd5, 0xae, 0xf1, 0xd5, 0xd5, 0xae, 0xf1, 0x97, + 0xab, 0x5d, 0xe3, 0x1f, 0x57, 0xbb, 0xc6, 0x9f, 0xbe, 0xde, 0x35, 0xc6, 0x2d, 0x7c, 0xfb, 0x7c, + 0xef, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x14, 0xb6, 0x0c, 0x6d, 0x85, 0x15, 0x00, 0x00, } diff --git a/abci/types/types.proto b/abci/types/types.proto index 0e1c18430..2f98fe251 100644 --- a/abci/types/types.proto +++ b/abci/types/types.proto @@ -168,7 +168,6 @@ message ResponseCheckTx { int64 gas_wanted = 5; int64 gas_used = 6; repeated common.KVPair tags = 7 [(gogoproto.nullable)=false, (gogoproto.jsontag)="tags,omitempty"]; - common.KI64Pair fee = 8 [(gogoproto.nullable)=false]; } message ResponseDeliverTx { @@ -179,7 +178,6 @@ message ResponseDeliverTx { int64 gas_wanted = 5; int64 gas_used = 6; repeated common.KVPair tags = 7 [(gogoproto.nullable)=false, (gogoproto.jsontag)="tags,omitempty"]; - common.KI64Pair fee = 8 [(gogoproto.nullable)=false]; } message ResponseEndBlock { diff --git a/docs/app-dev/abci-spec.md b/docs/app-dev/abci-spec.md index ef274a4e8..bd2ba4394 100644 --- a/docs/app-dev/abci-spec.md +++ b/docs/app-dev/abci-spec.md @@ -186,7 +186,6 @@ See below for more details on the message types and how they are used. - `GasUsed (int64)`: Amount of gas consumed by transaction. - `Tags ([]cmn.KVPair)`: Key-Value tags for filtering and indexing transactions (eg. by account). - - `Fee (cmn.KI64Pair)`: Fee paid for the transaction. - **Usage**: Validate a mempool transaction, prior to broadcasting or proposing. CheckTx should perform stateful but light-weight checks of the validity of the transaction (like checking signatures @@ -223,7 +222,6 @@ See below for more details on the message types and how they are used. - `GasUsed (int64)`: Amount of gas consumed by transaction. - `Tags ([]cmn.KVPair)`: Key-Value tags for filtering and indexing transactions (eg. by account). - - `Fee (cmn.KI64Pair)`: Fee paid for the transaction. - **Usage**: - Deliver a transaction to be executed in full by the application. If the transaction is valid, returns CodeType.OK. diff --git a/docs/app-dev/getting-started.md b/docs/app-dev/getting-started.md index cfc614ddc..40820bea7 100644 --- a/docs/app-dev/getting-started.md +++ b/docs/app-dev/getting-started.md @@ -93,9 +93,7 @@ like: "jsonrpc": "2.0", "id": "", "result": { - "check_tx": { - "fee": {} - }, + "check_tx": {}, "deliver_tx": { "tags": [ { @@ -106,8 +104,7 @@ like: "key": "YXBwLmtleQ==", "value": "YWJjZA==" } - ], - "fee": {} + ] }, "hash": "9DF66553F98DE3C26E3C3317A3E4CED54F714E39", "height": 14 @@ -219,13 +216,10 @@ the number `1`. If instead, we try to send a `5`, we get an error: "jsonrpc": "2.0", "id": "", "result": { - "check_tx": { - "fee": {} - }, + "check_tx": {}, "deliver_tx": { "code": 2, - "log": "Invalid nonce. Expected 1, got 5", - "fee": {} + "log": "Invalid nonce. Expected 1, got 5" }, "hash": "33B93DFF98749B0D6996A70F64071347060DC19C", "height": 34 @@ -241,12 +235,8 @@ But if we send a `1`, it works again: "jsonrpc": "2.0", "id": "", "result": { - "check_tx": { - "fee": {} - }, - "deliver_tx": { - "fee": {} - }, + "check_tx": {}, + "deliver_tx": {}, "hash": "F17854A977F6FA7EEA1BD758E296710B86F72F3D", "height": 60 } diff --git a/state/txindex/kv/kv_test.go b/state/txindex/kv/kv_test.go index 1272f4a73..c32c827d4 100644 --- a/state/txindex/kv/kv_test.go +++ b/state/txindex/kv/kv_test.go @@ -185,7 +185,6 @@ func txResultWithTags(tags []cmn.KVPair) *types.TxResult { Code: abci.CodeTypeOK, Log: "", Tags: tags, - Fee: cmn.KI64Pair{Key: nil, Value: 0}, }, } } @@ -201,7 +200,6 @@ func benchmarkTxIndex(txsCount int64, b *testing.B) { Code: abci.CodeTypeOK, Log: "", Tags: []cmn.KVPair{}, - Fee: cmn.KI64Pair{Key: []uint8{}, Value: 0}, }, } diff --git a/types/event_bus_test.go b/types/event_bus_test.go index 768b5b325..907c69d31 100644 --- a/types/event_bus_test.go +++ b/types/event_bus_test.go @@ -22,7 +22,7 @@ func TestEventBusPublishEventTx(t *testing.T) { defer eventBus.Stop() tx := Tx("foo") - result := abci.ResponseDeliverTx{Data: []byte("bar"), Tags: []cmn.KVPair{{[]byte("baz"), []byte("1")}}, Fee: cmn.KI64Pair{Key: []uint8{}, Value: 0}} + result := abci.ResponseDeliverTx{Data: []byte("bar"), Tags: []cmn.KVPair{{[]byte("baz"), []byte("1")}}} txEventsCh := make(chan interface{}) From 70d37837476ce19fa52beabf241171f09a5fb39f Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Tue, 24 Jul 2018 19:29:37 -0400 Subject: [PATCH 06/44] dep: revert updates - leave protobuf on 1.1.1 for grpc import fixes - amino v0.11 breaks tendermint - revert to v0.10.1 --- Gopkg.lock | 12 +++--------- Gopkg.toml | 10 +++++----- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/Gopkg.lock b/Gopkg.lock index 5efb7254f..3a6e7217e 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -11,7 +11,6 @@ branch = "master" name = "github.com/btcsuite/btcd" packages = ["btcec"] - pruneopts = "UT" revision = "f673a4b563b57b9a95832545c878669a7fa801d9" [[projects]] @@ -81,8 +80,8 @@ "sortkeys", "types" ] - revision = "7d68e886eac4f7e34d0d82241a6273d6c304c5cf" - version = "v1.1.0" + revision = "636bf0302bc95575d69441b25a2603156ffdddf1" + version = "v1.1.1" [[projects]] name = "github.com/golang/protobuf" @@ -156,10 +155,8 @@ [[projects]] branch = "master" - digest = "1:5ab79470a1d0fb19b041a624415612f8236b3c06070161a910562f2b2d064355" name = "github.com/mitchellh/mapstructure" packages = ["."] - pruneopts = "UT" revision = "f15292f7a699fcc1a38a80977f80a046874ba8ac" [[projects]] @@ -190,10 +187,8 @@ [[projects]] branch = "master" - digest = "1:0f37e09b3e92aaeda5991581311f8dbf38944b36a3edec61cc2d1991f527554a" name = "github.com/prometheus/client_model" packages = ["go"] - pruneopts = "UT" revision = "5c3871d89910bfb32f5fcab2aa4b9ec68e65a99f" [[projects]] @@ -347,7 +342,6 @@ "cpu", "unix" ] - pruneopts = "UT" revision = "ac767d655b305d4e9612f5f6e33120b9176c4ad4" [[projects]] @@ -417,6 +411,6 @@ [solve-meta] analyzer-name = "dep" analyzer-version = 1 - inputs-digest = "9beb2d27dc19e3f9e2c7f416f312f7129f5441b1b53def42503fc6f7d3a54b16" + inputs-digest = "8e519c3716c259c6ecdb052889dd3602539fd98a3650dfbf50a4023e087a5d53" solver-name = "gps-cdcl" solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml index f53c5bb94..15d92b228 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -31,7 +31,7 @@ [[constraint]] name = "github.com/go-kit/kit" - version = "=0.7.0" + version = "=0.6.0" [[constraint]] name = "github.com/gogo/protobuf" @@ -51,19 +51,19 @@ [[constraint]] name = "github.com/spf13/cobra" - version = "=0.0.3" + version = "=0.0.1" [[constraint]] name = "github.com/spf13/viper" - version = "=1.0.2" + version = "=1.0.0" [[constraint]] name = "github.com/stretchr/testify" - version = "=1.2.2" + version = "=1.2.1" [[constraint]] name = "github.com/tendermint/go-amino" - version = "=v0.11.1" + version = "=v0.10.1" [[constraint]] name = "google.golang.org/grpc" From 8dc655dad25b0b04f271cb66ba73fd504db3195d Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Tue, 24 Jul 2018 20:35:36 -0400 Subject: [PATCH 07/44] rpc: fix /blockchain OOM #2049 --- rpc/core/blocks.go | 51 +++++++++++++++++++++++++----------- rpc/core/blocks_test.go | 58 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 94 insertions(+), 15 deletions(-) create mode 100644 rpc/core/blocks_test.go diff --git a/rpc/core/blocks.go b/rpc/core/blocks.go index 5815b60e3..671250db8 100644 --- a/rpc/core/blocks.go +++ b/rpc/core/blocks.go @@ -64,25 +64,15 @@ import ( // // func BlockchainInfo(minHeight, maxHeight int64) (*ctypes.ResultBlockchainInfo, error) { - if minHeight == 0 { - minHeight = 1 - } - - if maxHeight == 0 { - maxHeight = blockStore.Height() - } else { - maxHeight = cmn.MinInt64(blockStore.Height(), maxHeight) - } // maximum 20 block metas const limit int64 = 20 - minHeight = cmn.MaxInt64(minHeight, maxHeight-limit) - - logger.Debug("BlockchainInfoHandler", "maxHeight", maxHeight, "minHeight", minHeight) - - if minHeight > maxHeight { - return nil, fmt.Errorf("min height %d can't be greater than max height %d", minHeight, maxHeight) + var err error + minHeight, maxHeight, err = filterMinMax(blockStore.Height(), minHeight, maxHeight, limit) + if err != nil { + return nil, err } + logger.Debug("BlockchainInfoHandler", "maxHeight", maxHeight, "minHeight", minHeight) blockMetas := []*types.BlockMeta{} for height := maxHeight; height >= minHeight; height-- { @@ -93,6 +83,37 @@ func BlockchainInfo(minHeight, maxHeight int64) (*ctypes.ResultBlockchainInfo, e return &ctypes.ResultBlockchainInfo{blockStore.Height(), blockMetas}, nil } +// error if either min or max are negative or min < max +// if 0, use 1 for min, latest block height for max +// enforce limit. +// error if min > max +func filterMinMax(height, min, max, limit int64) (int64, int64, error) { + // filter negatives + if min < 0 || max < 0 { + return min, max, fmt.Errorf("heights must be non-negative") + } + + // adjust for default values + if min == 0 { + min = 1 + } + if max == 0 { + max = height + } + + // limit max to the height + max = cmn.MinInt64(height, max) + + // limit min to within `limit` of max + // so the total number of blocks returned will be `limit` + min = cmn.MaxInt64(min, max-limit+1) + + if min > max { + return min, max, fmt.Errorf("min height %d can't be greater than max height %d", min, max) + } + return min, max, nil +} + // Get block at a given height. // If no height is provided, it will fetch the latest block. // diff --git a/rpc/core/blocks_test.go b/rpc/core/blocks_test.go new file mode 100644 index 000000000..da3920c22 --- /dev/null +++ b/rpc/core/blocks_test.go @@ -0,0 +1,58 @@ +package core + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/require" +) + +func TestBlockchainInfo(t *testing.T) { + + cases := []struct { + min, max int64 + height int64 + limit int64 + resultLength int64 + wantErr bool + }{ + + // min > max + {0, 0, 0, 10, 0, true}, // min set to 1 + {0, 1, 0, 10, 0, true}, // max set to height (0) + {0, 0, 1, 10, 1, false}, // max set to height (1) + {2, 0, 1, 10, 0, true}, // max set to height (1) + {2, 1, 5, 10, 0, true}, + + // negative + {1, 10, 14, 10, 10, false}, // control + {-1, 10, 14, 10, 0, true}, + {1, -10, 14, 10, 0, true}, + {-9223372036854775808, -9223372036854775788, 100, 20, 0, true}, + + // check limit and height + {1, 1, 1, 10, 1, false}, + {1, 1, 5, 10, 1, false}, + {2, 2, 5, 10, 1, false}, + {1, 2, 5, 10, 2, false}, + {1, 5, 1, 10, 1, false}, + {1, 5, 10, 10, 5, false}, + {1, 15, 10, 10, 10, false}, + {1, 15, 15, 10, 10, false}, + {1, 15, 15, 20, 15, false}, + {1, 20, 15, 20, 15, false}, + {1, 20, 20, 20, 20, false}, + } + + for i, c := range cases { + caseString := fmt.Sprintf("test %d failed", i) + min, max, err := filterMinMax(c.height, c.min, c.max, c.limit) + if c.wantErr { + require.Error(t, err, caseString) + } else { + require.NoError(t, err, caseString) + require.Equal(t, 1+max-min, c.resultLength, caseString) + } + } + +} From 082557b7d4614527e2fbfbcc086b146fed622227 Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Tue, 24 Jul 2018 21:25:47 -0400 Subject: [PATCH 08/44] rpc: validate height in abci_query --- rpc/core/abci.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/rpc/core/abci.go b/rpc/core/abci.go index a5eede3fc..100176195 100644 --- a/rpc/core/abci.go +++ b/rpc/core/abci.go @@ -1,10 +1,12 @@ package core import ( + "fmt" + abci "github.com/tendermint/tendermint/abci/types" + cmn "github.com/tendermint/tendermint/libs/common" ctypes "github.com/tendermint/tendermint/rpc/core/types" "github.com/tendermint/tendermint/version" - cmn "github.com/tendermint/tendermint/libs/common" ) // Query the application for some information. @@ -48,6 +50,10 @@ import ( // | height | int64 | 0 | false | Height (0 means latest) | // | trusted | bool | false | false | Does not include a proof of the data inclusion | func ABCIQuery(path string, data cmn.HexBytes, height int64, trusted bool) (*ctypes.ResultABCIQuery, error) { + if height < 0 { + return nil, fmt.Errorf("height must be non-negative") + } + resQuery, err := proxyAppQuery.QuerySync(abci.RequestQuery{ Path: path, Data: data, From 5768b67162fc4a5034d439eb44d6e7199779d8f1 Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Tue, 24 Jul 2018 21:26:41 -0400 Subject: [PATCH 09/44] changelog and version --- CHANGELOG.md | 12 +++++++++++- version/version.go | 4 ++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 27d5656b7..e0f9ba907 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,16 @@ # Changelog -## TBA +## 0.22.6 + +*July 24th, 2018* + +BUG FIXES + +- [rpc] Fix `/blockchain` endpoint + - (#2049) Fix OOM attack by returning error on negative input + - Fix result length to have max 20 (instead of 21) block metas +- [rpc] Validate height is non-negative in `/abci_query` +- [Gopkg] Fix versions in the toml ## 0.22.5 diff --git a/version/version.go b/version/version.go index 706264372..5ef4aadbf 100644 --- a/version/version.go +++ b/version/version.go @@ -4,13 +4,13 @@ package version const ( Maj = "0" Min = "22" - Fix = "5" + Fix = "6" ) var ( // Version is the current version of Tendermint // Must be a string because scripts like dist.sh read this file. - Version = "0.22.5" + Version = "0.22.6" // GitCommit is the current HEAD set using ldflags. GitCommit string From 359898dcac9d5fc52c3523e2c9c76bb2808fa1ac Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Tue, 24 Jul 2018 21:32:30 -0400 Subject: [PATCH 10/44] p2p: fix conn leak. part of #2046 --- CHANGELOG.md | 6 +++++- p2p/listener.go | 4 +++- p2p/switch.go | 2 ++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e0f9ba907..929d11d97 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,11 @@ BUG FIXES - (#2049) Fix OOM attack by returning error on negative input - Fix result length to have max 20 (instead of 21) block metas - [rpc] Validate height is non-negative in `/abci_query` -- [Gopkg] Fix versions in the toml +- [consensus] (#2050) Include evidence in proposal block parts (previously evidence was + not being included in blocks!) +- [p2p] (#2046) Close rejected inbound connections so file descriptor doesn't + leak +- [Gopkg] (#2053) Fix versions in the toml ## 0.22.5 diff --git a/p2p/listener.go b/p2p/listener.go index 3509ec69c..d73b3cabf 100644 --- a/p2p/listener.go +++ b/p2p/listener.go @@ -151,7 +151,7 @@ func (l *DefaultListener) OnStop() { l.listener.Close() // nolint: errcheck } -// Accept connections and pass on the channel +// Accept connections and pass on the channel. func (l *DefaultListener) listenRoutine() { for { conn, err := l.listener.Accept() @@ -178,6 +178,8 @@ func (l *DefaultListener) listenRoutine() { // Connections returns a channel of inbound connections. // It gets closed when the listener closes. +// It is the callers responsibility to close any connections received +// over this channel. func (l *DefaultListener) Connections() <-chan net.Conn { return l.connections } diff --git a/p2p/switch.go b/p2p/switch.go index 636ca6d8e..da94fa4b0 100644 --- a/p2p/switch.go +++ b/p2p/switch.go @@ -496,6 +496,7 @@ func (sw *Switch) listenerRoutine(l Listener) { maxPeers := sw.config.MaxNumPeers - DefaultMinNumOutboundPeers if maxPeers <= sw.peers.Size() { sw.Logger.Info("Ignoring inbound connection: already have enough peers", "address", inConn.RemoteAddr().String(), "numPeers", sw.peers.Size(), "max", maxPeers) + inConn.Close() continue } @@ -510,6 +511,7 @@ func (sw *Switch) listenerRoutine(l Listener) { // cleanup } +// closes conn if err is returned func (sw *Switch) addInboundPeerWithConfig( conn net.Conn, config *config.P2PConfig, From 6046b991973ff8191cef8b77489213877daa9293 Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Tue, 24 Jul 2018 21:48:51 -0400 Subject: [PATCH 11/44] consensus: include evidence in proposed block parts. fixes #2050 --- blockchain/reactor_test.go | 2 +- consensus/state.go | 5 +++-- state/execution_test.go | 6 +++--- state/state.go | 24 ++++++++++++++-------- types/block.go | 11 ++-------- types/block_test.go | 42 +++++++++++++++++++++++--------------- 6 files changed, 50 insertions(+), 40 deletions(-) diff --git a/blockchain/reactor_test.go b/blockchain/reactor_test.go index 21eaae4ba..11991bda4 100644 --- a/blockchain/reactor_test.go +++ b/blockchain/reactor_test.go @@ -156,7 +156,7 @@ func makeTxs(height int64) (txs []types.Tx) { } func makeBlock(height int64, state sm.State) *types.Block { - block, _ := state.MakeBlock(height, makeTxs(height), new(types.Commit)) + block, _ := state.MakeBlock(height, makeTxs(height), new(types.Commit), nil) return block } diff --git a/consensus/state.go b/consensus/state.go index 634f10313..f66a872eb 100644 --- a/consensus/state.go +++ b/consensus/state.go @@ -907,6 +907,8 @@ func (cs *ConsensusState) isProposalComplete() bool { } // Create the next block to propose and return it. +// We really only need to return the parts, but the block +// is returned for convenience so we can log the proposal block. // Returns nil block upon error. // NOTE: keep it side-effect free for clarity. func (cs *ConsensusState) createProposalBlock() (block *types.Block, blockParts *types.PartSet) { @@ -926,9 +928,8 @@ func (cs *ConsensusState) createProposalBlock() (block *types.Block, blockParts // Mempool validated transactions txs := cs.mempool.Reap(cs.state.ConsensusParams.BlockSize.MaxTxs) - block, parts := cs.state.MakeBlock(cs.Height, txs, commit) evidence := cs.evpool.PendingEvidence() - block.AddEvidence(evidence) + block, parts := cs.state.MakeBlock(cs.Height, txs, commit, evidence) return block, parts } diff --git a/state/execution_test.go b/state/execution_test.go index 81510fb9f..d214ae4f2 100644 --- a/state/execution_test.go +++ b/state/execution_test.go @@ -79,7 +79,7 @@ func TestBeginBlockValidators(t *testing.T) { lastCommit := &types.Commit{BlockID: prevBlockID, Precommits: tc.lastCommitPrecommits} // block for height 2 - block, _ := state.MakeBlock(2, makeTxs(2), lastCommit) + block, _ := state.MakeBlock(2, makeTxs(2), lastCommit, nil) _, err = ExecCommitBlock(proxyApp.Consensus(), block, log.TestingLogger(), state.Validators, stateDB) require.Nil(t, err, tc.desc) @@ -138,7 +138,7 @@ func TestBeginBlockByzantineValidators(t *testing.T) { lastCommit := &types.Commit{BlockID: prevBlockID, Precommits: votes} for _, tc := range testCases { - block, _ := state.MakeBlock(10, makeTxs(2), lastCommit) + block, _ := state.MakeBlock(10, makeTxs(2), lastCommit, nil) block.Time = now block.Evidence.Evidence = tc.evidence _, err = ExecCommitBlock(proxyApp.Consensus(), block, log.TestingLogger(), state.Validators, stateDB) @@ -269,7 +269,7 @@ func state(nVals, height int) (State, dbm.DB) { } func makeBlock(state State, height int64) *types.Block { - block, _ := state.MakeBlock(height, makeTxs(state.LastBlockHeight), new(types.Commit)) + block, _ := state.MakeBlock(height, makeTxs(state.LastBlockHeight), new(types.Commit), nil) return block } diff --git a/state/state.go b/state/state.go index 3bc08dae3..fb589a240 100644 --- a/state/state.go +++ b/state/state.go @@ -101,18 +101,26 @@ func (state State) GetValidators() (last *types.ValidatorSet, current *types.Val //------------------------------------------------------------------------ // Create a block from the latest state -// MakeBlock builds a block with the given txs and commit from the current state. -func (state State) MakeBlock(height int64, txs []types.Tx, commit *types.Commit) (*types.Block, *types.PartSet) { - // build base block - block := types.MakeBlock(height, txs, commit) - - // fill header with state data +// MakeBlock builds a block from the current state with the given txs, commit, and evidence. +func (state State) MakeBlock( + height int64, + txs []types.Tx, + commit *types.Commit, + evidence []types.Evidence, +) (*types.Block, *types.PartSet) { + + // Build base block with block data. + block := types.MakeBlock(height, txs, commit, evidence) + + // Fill rest of header with state data. block.ChainID = state.ChainID - block.TotalTxs = state.LastBlockTotalTx + block.NumTxs + block.LastBlockID = state.LastBlockID + block.TotalTxs = state.LastBlockTotalTx + block.NumTxs + block.ValidatorsHash = state.Validators.Hash() - block.AppHash = state.AppHash block.ConsensusHash = state.ConsensusParams.Hash() + block.AppHash = state.AppHash block.LastResultsHash = state.LastResultsHash return block, block.MakePartSet(state.ConsensusParams.BlockGossip.BlockPartSizeBytes) diff --git a/types/block.go b/types/block.go index 488570764..304e8bdee 100644 --- a/types/block.go +++ b/types/block.go @@ -25,7 +25,7 @@ type Block struct { // MakeBlock returns a new block with an empty header, except what can be computed from itself. // It populates the same set of fields validated by ValidateBasic -func MakeBlock(height int64, txs []Tx, commit *Commit) *Block { +func MakeBlock(height int64, txs []Tx, commit *Commit, evidence []Evidence) *Block { block := &Block{ Header: Header{ Height: height, @@ -35,20 +35,13 @@ func MakeBlock(height int64, txs []Tx, commit *Commit) *Block { Data: Data{ Txs: txs, }, + Evidence: EvidenceData{Evidence: evidence}, LastCommit: commit, } block.fillHeader() return block } -// AddEvidence appends the given evidence to the block -func (b *Block) AddEvidence(evidence []Evidence) { - if b == nil { - return - } - b.Evidence.Evidence = append(b.Evidence.Evidence, evidence...) -} - // ValidateBasic performs basic validation that doesn't involve state data. // It checks the internal consistency of the block. func (b *Block) ValidateBasic() error { diff --git a/types/block_test.go b/types/block_test.go index 1d27a7746..714029bf2 100644 --- a/types/block_test.go +++ b/types/block_test.go @@ -19,11 +19,13 @@ func TestBlockAddEvidence(t *testing.T) { commit, err := MakeCommit(lastID, h-1, 1, voteSet, vals) require.NoError(t, err) - block := MakeBlock(h, txs, commit) - require.NotNil(t, block) - ev := NewMockGoodEvidence(h, 0, valSet.Validators[0].Address) - block.AddEvidence([]Evidence{ev}) + evList := []Evidence{ev} + + block := MakeBlock(h, txs, commit, evList) + require.NotNil(t, block) + require.Equal(t, 1, len(block.Evidence.Evidence)) + require.NotNil(t, block.EvidenceHash) } func TestBlockValidateBasic(t *testing.T) { @@ -33,11 +35,14 @@ func TestBlockValidateBasic(t *testing.T) { lastID := makeBlockIDRandom() h := int64(3) - voteSet, _, vals := randVoteSet(h-1, 1, VoteTypePrecommit, 10, 1) + voteSet, valSet, vals := randVoteSet(h-1, 1, VoteTypePrecommit, 10, 1) commit, err := MakeCommit(lastID, h-1, 1, voteSet, vals) require.NoError(t, err) - block := MakeBlock(h, txs, commit) + ev := NewMockGoodEvidence(h, 0, valSet.Validators[0].Address) + evList := []Evidence{ev} + + block := MakeBlock(h, txs, commit, evList) require.NotNil(t, block) // proper block must pass @@ -45,39 +50,39 @@ func TestBlockValidateBasic(t *testing.T) { require.NoError(t, err) // tamper with NumTxs - block = MakeBlock(h, txs, commit) + block = MakeBlock(h, txs, commit, evList) block.NumTxs++ err = block.ValidateBasic() require.Error(t, err) // remove 1/2 the commits - block = MakeBlock(h, txs, commit) + block = MakeBlock(h, txs, commit, evList) block.LastCommit.Precommits = commit.Precommits[:commit.Size()/2] block.LastCommit.hash = nil // clear hash or change wont be noticed err = block.ValidateBasic() require.Error(t, err) // tamper with LastCommitHash - block = MakeBlock(h, txs, commit) + block = MakeBlock(h, txs, commit, evList) block.LastCommitHash = []byte("something else") err = block.ValidateBasic() require.Error(t, err) // tamper with data - block = MakeBlock(h, txs, commit) + block = MakeBlock(h, txs, commit, evList) block.Data.Txs[0] = Tx("something else") block.Data.hash = nil // clear hash or change wont be noticed err = block.ValidateBasic() require.Error(t, err) // tamper with DataHash - block = MakeBlock(h, txs, commit) + block = MakeBlock(h, txs, commit, evList) block.DataHash = cmn.RandBytes(len(block.DataHash)) err = block.ValidateBasic() require.Error(t, err) // tamper with evidence - block = MakeBlock(h, txs, commit) + block = MakeBlock(h, txs, commit, evList) block.EvidenceHash = []byte("something else") err = block.ValidateBasic() require.Error(t, err) @@ -85,13 +90,13 @@ func TestBlockValidateBasic(t *testing.T) { func TestBlockHash(t *testing.T) { assert.Nil(t, (*Block)(nil).Hash()) - assert.Nil(t, MakeBlock(int64(3), []Tx{Tx("Hello World")}, nil).Hash()) + assert.Nil(t, MakeBlock(int64(3), []Tx{Tx("Hello World")}, nil, nil).Hash()) } func TestBlockMakePartSet(t *testing.T) { assert.Nil(t, (*Block)(nil).MakePartSet(2)) - partSet := MakeBlock(int64(3), []Tx{Tx("Hello World")}, nil).MakePartSet(1024) + partSet := MakeBlock(int64(3), []Tx{Tx("Hello World")}, nil, nil).MakePartSet(1024) assert.NotNil(t, partSet) assert.Equal(t, 1, partSet.Total()) } @@ -105,7 +110,10 @@ func TestBlockHashesTo(t *testing.T) { commit, err := MakeCommit(lastID, h-1, 1, voteSet, vals) require.NoError(t, err) - block := MakeBlock(h, []Tx{Tx("Hello World")}, commit) + ev := NewMockGoodEvidence(h, 0, valSet.Validators[0].Address) + evList := []Evidence{ev} + + block := MakeBlock(h, []Tx{Tx("Hello World")}, commit, evList) block.ValidatorsHash = valSet.Hash() assert.False(t, block.HashesTo([]byte{})) assert.False(t, block.HashesTo([]byte("something else"))) @@ -113,7 +121,7 @@ func TestBlockHashesTo(t *testing.T) { } func TestBlockSize(t *testing.T) { - size := MakeBlock(int64(3), []Tx{Tx("Hello World")}, nil).Size() + size := MakeBlock(int64(3), []Tx{Tx("Hello World")}, nil, nil).Size() if size <= 0 { t.Fatal("Size of the block is zero or negative") } @@ -124,7 +132,7 @@ func TestBlockString(t *testing.T) { assert.Equal(t, "nil-Block", (*Block)(nil).StringIndented("")) assert.Equal(t, "nil-Block", (*Block)(nil).StringShort()) - block := MakeBlock(int64(3), []Tx{Tx("Hello World")}, nil) + block := MakeBlock(int64(3), []Tx{Tx("Hello World")}, nil, nil) assert.NotEqual(t, "nil-Block", block.String()) assert.NotEqual(t, "nil-Block", block.StringIndented("")) assert.NotEqual(t, "nil-Block", block.StringShort()) From 74b6cc9057fd4b3d760033a0ec74c8a66bfa90f4 Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Wed, 25 Jul 2018 02:56:00 -0400 Subject: [PATCH 12/44] rpc: log error when we timeout getting validators from consensus (#2045) --- rpc/core/status.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rpc/core/status.go b/rpc/core/status.go index 739e67b86..137aaf422 100644 --- a/rpc/core/status.go +++ b/rpc/core/status.go @@ -166,6 +166,9 @@ func getValidatorsWithTimeout( case res := <-resultCh: return res.lastBlockHeight, res.vals case <-time.After(t): + if logger != nil { + logger.Error("Timed out querying validators from consensus", "timeout", t) + } return -1, []*types.Validator{} } } From d149d8f96d0c10d40d5787e10c4f52a3f1372d3b Mon Sep 17 00:00:00 2001 From: Dev Ojha Date: Wed, 25 Jul 2018 00:34:51 -0700 Subject: [PATCH 13/44] github: update PR template to indicate changing pending changelog. (#2059) --- .github/PULL_REQUEST_TEMPLATE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 902469b41..d4f55392b 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -3,4 +3,4 @@ * [ ] Updated all relevant documentation in docs * [ ] Updated all code comments where relevant * [ ] Wrote tests -* [ ] Updated CHANGELOG.md +* [ ] Updated CHANGELOG_PENDING.md From 9cfc47a93b19f7e82399f5c2c1a2f68c02d174ca Mon Sep 17 00:00:00 2001 From: Dev Ojha Date: Wed, 25 Jul 2018 09:09:52 -0700 Subject: [PATCH 14/44] makefile: Add `make check_dep` and remove `make ensure_deps` (#2055) This adds a new makefile command, which is used in CI linting, `make check_dep`. This ensures the toml is in sync with the lock, and that were not pinning to a branch in any repository. This also adapts `make get_vendor_deps` to check the lock, in addition to populating the vendor directory. This removes the need for `make ensure_deps`. This makes `make get_vendor_deps` consistent between tendermint and the sdk. --- .circleci/config.yml | 6 ++ CHANGELOG_PENDING.md | 6 ++ Gopkg.lock | 181 ++++++++++++++++++++++++++++++++++++----- Gopkg.toml | 5 -- Makefile | 16 ++-- test/docker/Dockerfile | 12 +-- 6 files changed, 181 insertions(+), 45 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 82ef52309..e76499712 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -77,6 +77,12 @@ jobs: set -ex export PATH="$GOBIN:$PATH" make metalinter + - run: + name: check_dep + command: | + set -ex + export PATH="$GOBIN:$PATH" + make check_dep test_abci_apps: <<: *defaults diff --git a/CHANGELOG_PENDING.md b/CHANGELOG_PENDING.md index 3aa01cac8..e58bda9f7 100644 --- a/CHANGELOG_PENDING.md +++ b/CHANGELOG_PENDING.md @@ -4,6 +4,12 @@ BREAKING CHANGES: - [types] CanonicalTime uses nanoseconds instead of clipping to ms - breaks serialization/signing of all messages with a timestamp - [abci] Removed Fee from ResponseDeliverTx and ResponseCheckTx +- [tools] Removed `make ensure_deps` in favor of `make get_vendor_deps` + +FEATURES: +- [tools] Added `make check_dep` + - ensures gopkg.lock is synced with gopkg.toml + - ensures no branches are used in the gopkg.toml IMPROVEMENTS: - [blockchain] Improve fast-sync logic diff --git a/Gopkg.lock b/Gopkg.lock index 6ec13589f..676751f14 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -3,48 +3,63 @@ [[projects]] branch = "master" + digest = "1:d6afaeed1502aa28e80a4ed0981d570ad91b2579193404256ce672ed0a609e0d" name = "github.com/beorn7/perks" packages = ["quantile"] + pruneopts = "UT" revision = "3a771d992973f24aa725d07868b467d1ddfceafb" [[projects]] branch = "master" + digest = "1:6aabc1566d6351115d561d038da82a4c19b46c3b6e17f4a0a2fa60260663dc79" name = "github.com/btcsuite/btcd" packages = ["btcec"] - revision = "f673a4b563b57b9a95832545c878669a7fa801d9" + pruneopts = "UT" + revision = "9a2f9524024889e129a5422aca2cff73cb3eabf6" [[projects]] + digest = "1:df684ed7fed3fb406ec421424aaf5fc9c63ccc2f428b25b842da78e634482e4b" name = "github.com/btcsuite/btcutil" packages = [ "base58", - "bech32" + "bech32", ] + pruneopts = "UT" revision = "d4cc87b860166d00d6b5b9e0d3b3d71d6088d4d4" [[projects]] + digest = "1:a2c1d0e43bd3baaa071d1b9ed72c27d78169b2b269f71c105ac4ba34b1be4a39" name = "github.com/davecgh/go-spew" packages = ["spew"] + pruneopts = "UT" revision = "346938d642f2ec3594ed81d874461961cd0faa76" version = "v1.1.0" [[projects]] + digest = "1:c7644c73a3d23741fdba8a99b1464e021a224b7e205be497271a8003a15ca41b" name = "github.com/ebuchman/fail-test" packages = ["."] + pruneopts = "UT" revision = "95f809107225be108efcf10a3509e4ea6ceef3c4" [[projects]] + digest = "1:544229a3ca0fb2dd5ebc2896d3d2ff7ce096d9751635301e44e37e761349ee70" name = "github.com/fortytw2/leaktest" packages = ["."] + pruneopts = "UT" revision = "a5ef70473c97b71626b9abeda80ee92ba2a7de9e" version = "v1.2.0" [[projects]] + digest = "1:abeb38ade3f32a92943e5be54f55ed6d6e3b6602761d74b4aab4c9dd45c18abd" name = "github.com/fsnotify/fsnotify" packages = ["."] + pruneopts = "UT" revision = "c2828203cd70a50dcccfb2761f8b1f8ceef9a8e9" version = "v1.4.7" [[projects]] + digest = "1:fa30c0652956e159cdb97dcb2ef8b8db63ed668c02a5c3a40961c8f0641252fe" name = "github.com/go-kit/kit" packages = [ "log", @@ -53,24 +68,30 @@ "metrics", "metrics/discard", "metrics/internal/lv", - "metrics/prometheus" + "metrics/prometheus", ] + pruneopts = "UT" revision = "4dc7be5d2d12881735283bcab7352178e190fc71" version = "v0.6.0" [[projects]] + digest = "1:31a18dae27a29aa074515e43a443abfd2ba6deb6d69309d8d7ce789c45f34659" name = "github.com/go-logfmt/logfmt" packages = ["."] + pruneopts = "UT" revision = "390ab7935ee28ec6b286364bba9b4dd6410cb3d5" version = "v0.3.0" [[projects]] + digest = "1:c4a2528ccbcabf90f9f3c464a5fc9e302d592861bbfd0b7135a7de8a943d0406" name = "github.com/go-stack/stack" packages = ["."] + pruneopts = "UT" revision = "259ab82a6cad3992b4e21ff5cac294ccb06474bc" version = "v1.7.0" [[projects]] + digest = "1:212285efb97b9ec2e20550d81f0446cb7897e57cbdfd7301b1363ab113d8be45" name = "github.com/gogo/protobuf" packages = [ "gogoproto", @@ -78,37 +99,45 @@ "proto", "protoc-gen-gogo/descriptor", "sortkeys", - "types" + "types", ] + pruneopts = "UT" revision = "636bf0302bc95575d69441b25a2603156ffdddf1" version = "v1.1.1" [[projects]] + digest = "1:cb22af0ed7c72d495d8be1106233ee553898950f15fd3f5404406d44c2e86888" name = "github.com/golang/protobuf" packages = [ "proto", "ptypes", "ptypes/any", "ptypes/duration", - "ptypes/timestamp" + "ptypes/timestamp", ] + pruneopts = "UT" revision = "b4deda0973fb4c70b50d226b1af49f3da59f5265" version = "v1.1.0" [[projects]] branch = "master" + digest = "1:4a0c6bb4805508a6287675fac876be2ac1182539ca8a32468d8128882e9d5009" name = "github.com/golang/snappy" packages = ["."] + pruneopts = "UT" revision = "2e65f85255dbc3072edf28d6b5b8efc472979f5a" [[projects]] + digest = "1:43dd08a10854b2056e615d1b1d22ac94559d822e1f8b6fcc92c1a1057e85188e" name = "github.com/gorilla/websocket" packages = ["."] + pruneopts = "UT" revision = "ea4d1f681babbce9545c9c5f3d5194a789c89f5b" version = "v1.2.0" [[projects]] branch = "master" + digest = "1:8951fe6e358876736d8fa1f3992624fdbb2dec6bc49401c1381d1ef8abbb544f" name = "github.com/hashicorp/hcl" packages = [ ".", @@ -119,153 +148,197 @@ "hcl/token", "json/parser", "json/scanner", - "json/token" + "json/token", ] + pruneopts = "UT" revision = "ef8a98b0bbce4a65b5aa4c368430a80ddc533168" [[projects]] + digest = "1:870d441fe217b8e689d7949fef6e43efbc787e50f200cb1e70dbca9204a1d6be" name = "github.com/inconshreveable/mousetrap" packages = ["."] + pruneopts = "UT" revision = "76626ae9c91c4f2a10f34cad8ce83ea42c93bb75" version = "v1.0" [[projects]] + digest = "1:39b27d1381a30421f9813967a5866fba35dc1d4df43a6eefe3b7a5444cb07214" name = "github.com/jmhodges/levigo" packages = ["."] + pruneopts = "UT" revision = "c42d9e0ca023e2198120196f842701bb4c55d7b9" [[projects]] branch = "master" + digest = "1:a64e323dc06b73892e5bb5d040ced475c4645d456038333883f58934abbf6f72" name = "github.com/kr/logfmt" packages = ["."] + pruneopts = "UT" revision = "b84e30acd515aadc4b783ad4ff83aff3299bdfe0" [[projects]] + digest = "1:c568d7727aa262c32bdf8a3f7db83614f7af0ed661474b24588de635c20024c7" name = "github.com/magiconair/properties" packages = ["."] + pruneopts = "UT" revision = "c2353362d570a7bfa228149c62842019201cfb71" version = "v1.8.0" [[projects]] + digest = "1:ff5ebae34cfbf047d505ee150de27e60570e8c394b3b8fdbb720ff6ac71985fc" name = "github.com/matttproud/golang_protobuf_extensions" packages = ["pbutil"] + pruneopts = "UT" revision = "c12348ce28de40eed0136aa2b644d0ee0650e56c" version = "v1.0.1" [[projects]] branch = "master" + digest = "1:5ab79470a1d0fb19b041a624415612f8236b3c06070161a910562f2b2d064355" name = "github.com/mitchellh/mapstructure" packages = ["."] + pruneopts = "UT" revision = "f15292f7a699fcc1a38a80977f80a046874ba8ac" [[projects]] + digest = "1:95741de3af260a92cc5c7f3f3061e85273f5a81b5db20d4bd68da74bd521675e" name = "github.com/pelletier/go-toml" packages = ["."] + pruneopts = "UT" revision = "c01d1270ff3e442a8a57cddc1c92dc1138598194" version = "v1.2.0" [[projects]] + digest = "1:40e195917a951a8bf867cd05de2a46aaf1806c50cf92eebf4c16f78cd196f747" name = "github.com/pkg/errors" packages = ["."] + pruneopts = "UT" revision = "645ef00459ed84a119197bfb8d8205042c6df63d" version = "v0.8.0" [[projects]] + digest = "1:0028cb19b2e4c3112225cd871870f2d9cf49b9b4276531f03438a88e94be86fe" name = "github.com/pmezard/go-difflib" packages = ["difflib"] + pruneopts = "UT" revision = "792786c7400a136282c1664665ae0a8db921c6c2" version = "v1.0.0" [[projects]] + digest = "1:98225904b7abff96c052b669b25788f18225a36673fba022fb93514bb9a2a64e" name = "github.com/prometheus/client_golang" packages = [ "prometheus", - "prometheus/promhttp" + "prometheus/promhttp", ] + pruneopts = "UT" revision = "ae27198cdd90bf12cd134ad79d1366a6cf49f632" [[projects]] branch = "master" + digest = "1:0f37e09b3e92aaeda5991581311f8dbf38944b36a3edec61cc2d1991f527554a" name = "github.com/prometheus/client_model" packages = ["go"] + pruneopts = "UT" revision = "5c3871d89910bfb32f5fcab2aa4b9ec68e65a99f" [[projects]] branch = "master" + digest = "1:4d291d51042ed9de40eef61a3c1b56e969d6e0f8aa5fd3da5e958ec66bee68e4" name = "github.com/prometheus/common" packages = [ "expfmt", "internal/bitbucket.org/ww/goautoneg", - "model" + "model", ] + pruneopts = "UT" revision = "7600349dcfe1abd18d72d3a1770870d9800a7801" [[projects]] branch = "master" + digest = "1:a37c98f4b7a66bb5c539c0539f0915a74ef1c8e0b3b6f45735289d94cae92bfd" name = "github.com/prometheus/procfs" packages = [ ".", "internal/util", "nfs", - "xfs" + "xfs", ] - revision = "ae68e2d4c00fed4943b5f6698d504a5fe083da8a" + pruneopts = "UT" + revision = "05ee40e3a273f7245e8777337fc7b46e533a9a92" [[projects]] + digest = "1:c4556a44e350b50a490544d9b06e9fba9c286c21d6c0e47f54f3a9214597298c" name = "github.com/rcrowley/go-metrics" packages = ["."] + pruneopts = "UT" revision = "e2704e165165ec55d062f5919b4b29494e9fa790" [[projects]] + digest = "1:37ace7f35375adec11634126944bdc45a673415e2fcc07382d03b75ec76ea94c" name = "github.com/spf13/afero" packages = [ ".", - "mem" + "mem", ] + pruneopts = "UT" revision = "787d034dfe70e44075ccc060d346146ef53270ad" version = "v1.1.1" [[projects]] + digest = "1:516e71bed754268937f57d4ecb190e01958452336fa73dbac880894164e91c1f" name = "github.com/spf13/cast" packages = ["."] + pruneopts = "UT" revision = "8965335b8c7107321228e3e3702cab9832751bac" version = "v1.2.0" [[projects]] + digest = "1:627ab2f549a6a55c44f46fa24a4307f4d0da81bfc7934ed0473bf38b24051d26" name = "github.com/spf13/cobra" packages = ["."] + pruneopts = "UT" revision = "7b2c5ac9fc04fc5efafb60700713d4fa609b777b" version = "v0.0.1" [[projects]] branch = "master" + digest = "1:080e5f630945ad754f4b920e60b4d3095ba0237ebf88dc462eb28002932e3805" name = "github.com/spf13/jwalterweatherman" packages = ["."] + pruneopts = "UT" revision = "7c0cea34c8ece3fbeb2b27ab9b59511d360fb394" [[projects]] + digest = "1:9424f440bba8f7508b69414634aef3b2b3a877e522d8a4624692412805407bb7" name = "github.com/spf13/pflag" packages = ["."] + pruneopts = "UT" revision = "583c0c0531f06d5278b7d917446061adc344b5cd" version = "v1.0.1" [[projects]] + digest = "1:f8e1a678a2571e265f4bf91a3e5e32aa6b1474a55cb0ea849750cc177b664d96" name = "github.com/spf13/viper" packages = ["."] + pruneopts = "UT" revision = "25b30aa063fc18e48662b86996252eabdcf2f0c7" version = "v1.0.0" [[projects]] + digest = "1:73697231b93fb74a73ebd8384b68b9a60c57ea6b13c56d2425414566a72c8e6d" name = "github.com/stretchr/testify" packages = [ "assert", - "require" + "require", ] + pruneopts = "UT" revision = "12b6f73e6084dad08a7c6e575284b177ecafbc71" version = "v1.2.1" [[projects]] branch = "master" + digest = "1:922191411ad8f61bcd8018ac127589bb489712c1d1a0ab2497aca4b16de417d2" name = "github.com/syndtr/goleveldb" packages = [ "leveldb", @@ -279,28 +352,34 @@ "leveldb/opt", "leveldb/storage", "leveldb/table", - "leveldb/util" + "leveldb/util", ] + pruneopts = "UT" revision = "c4c61651e9e37fa117f53c5a906d3b63090d8445" [[projects]] branch = "master" + digest = "1:203b409c21115233a576f99e8f13d8e07ad82b25500491f7e1cca12588fb3232" name = "github.com/tendermint/ed25519" packages = [ ".", "edwards25519", - "extra25519" + "extra25519", ] + pruneopts = "UT" revision = "d8387025d2b9d158cf4efb07e7ebf814bcce2057" [[projects]] + digest = "1:e9113641c839c21d8eaeb2c907c7276af1eddeed988df8322168c56b7e06e0e1" name = "github.com/tendermint/go-amino" packages = ["."] + pruneopts = "UT" revision = "2106ca61d91029c931fd54968c2bb02dc96b1412" version = "0.10.1" [[projects]] branch = "master" + digest = "1:df132ec33d5acb4a1ab58d637f1bc3557be49456ca59b9198f5c1e7fa32e0d31" name = "golang.org/x/crypto" packages = [ "bcrypt", @@ -316,11 +395,13 @@ "openpgp/errors", "poly1305", "ripemd160", - "salsa20/salsa" + "salsa20/salsa", ] - revision = "a2144134853fc9a27a7b1e3eb4f19f1a76df13c9" + pruneopts = "UT" + revision = "c126467f60eb25f8f27e5a981f32a87e3965053f" [[projects]] + digest = "1:04dda8391c3e2397daf254ac68003f30141c069b228d06baec8324a5f81dc1e9" name = "golang.org/x/net" packages = [ "context", @@ -330,20 +411,24 @@ "idna", "internal/timeseries", "netutil", - "trace" + "trace", ] + pruneopts = "UT" revision = "292b43bbf7cb8d35ddf40f8d5100ef3837cced3f" [[projects]] branch = "master" + digest = "1:bff8bf6fa46b4d638d61b48320e3c6da8f8ba190672a82cdb8cedafb1f9501b0" name = "golang.org/x/sys" packages = [ "cpu", - "unix" + "unix", ] - revision = "ac767d655b305d4e9612f5f6e33120b9176c4ad4" + pruneopts = "UT" + revision = "e072cadbbdc8dd3d3ffa82b8b4b9304c261d9311" [[projects]] + digest = "1:7509ba4347d1f8de6ae9be8818b0cd1abc3deeffe28aeaf4be6d4b6b5178d9ca" name = "golang.org/x/text" packages = [ "collate", @@ -359,17 +444,21 @@ "unicode/bidi", "unicode/cldr", "unicode/norm", - "unicode/rangetable" + "unicode/rangetable", ] + pruneopts = "UT" revision = "f21a4dfb5e38f5895301dc265a8def02365cc3d0" version = "v0.3.0" [[projects]] + digest = "1:cd018653a358d4b743a9d3bee89e825521f2ab2f2ec0770164bf7632d8d73ab7" name = "google.golang.org/genproto" packages = ["googleapis/rpc/status"] + pruneopts = "UT" revision = "7fd901a49ba6a7f87732eb344f6e3c5b19d1b200" [[projects]] + digest = "1:4515e3030c440845b046354fd5d57671238428b820deebce2e9dabb5cd3c51ac" name = "google.golang.org/grpc" packages = [ ".", @@ -396,20 +485,68 @@ "stats", "status", "tap", - "transport" + "transport", ] + pruneopts = "UT" revision = "168a6198bcb0ef175f7dacec0b8691fc141dc9b8" version = "v1.13.0" [[projects]] + digest = "1:342378ac4dcb378a5448dd723f0784ae519383532f5e70ade24132c4c8693202" name = "gopkg.in/yaml.v2" packages = ["."] + pruneopts = "UT" revision = "5420a8b6744d3b0345ab293f6fcba19c978f1183" version = "v2.2.1" [solve-meta] analyzer-name = "dep" analyzer-version = 1 - inputs-digest = "8e519c3716c259c6ecdb052889dd3602539fd98a3650dfbf50a4023e087a5d53" + input-imports = [ + "github.com/btcsuite/btcd/btcec", + "github.com/btcsuite/btcutil/base58", + "github.com/btcsuite/btcutil/bech32", + "github.com/ebuchman/fail-test", + "github.com/fortytw2/leaktest", + "github.com/go-kit/kit/log", + "github.com/go-kit/kit/log/level", + "github.com/go-kit/kit/log/term", + "github.com/go-kit/kit/metrics", + "github.com/go-kit/kit/metrics/discard", + "github.com/go-kit/kit/metrics/prometheus", + "github.com/go-logfmt/logfmt", + "github.com/gogo/protobuf/gogoproto", + "github.com/gogo/protobuf/jsonpb", + "github.com/gogo/protobuf/proto", + "github.com/golang/protobuf/proto", + "github.com/gorilla/websocket", + "github.com/jmhodges/levigo", + "github.com/pkg/errors", + "github.com/prometheus/client_golang/prometheus", + "github.com/prometheus/client_golang/prometheus/promhttp", + "github.com/rcrowley/go-metrics", + "github.com/spf13/cobra", + "github.com/spf13/viper", + "github.com/stretchr/testify/assert", + "github.com/stretchr/testify/require", + "github.com/syndtr/goleveldb/leveldb", + "github.com/syndtr/goleveldb/leveldb/errors", + "github.com/syndtr/goleveldb/leveldb/iterator", + "github.com/syndtr/goleveldb/leveldb/opt", + "github.com/tendermint/ed25519", + "github.com/tendermint/ed25519/extra25519", + "github.com/tendermint/go-amino", + "golang.org/x/crypto/bcrypt", + "golang.org/x/crypto/chacha20poly1305", + "golang.org/x/crypto/hkdf", + "golang.org/x/crypto/nacl/box", + "golang.org/x/crypto/nacl/secretbox", + "golang.org/x/crypto/openpgp/armor", + "golang.org/x/crypto/ripemd160", + "golang.org/x/net/context", + "golang.org/x/net/netutil", + "google.golang.org/grpc", + "google.golang.org/grpc/credentials", + ] solver-name = "gps-cdcl" solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml index 9aea7f4a0..cf0d4eceb 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -10,11 +10,6 @@ # name = "github.com/user/project" # version = "1.0.0" # -# [[constraint]] -# name = "github.com/user/project2" -# branch = "dev" -# source = "github.com/myfork/project2" -# # [[override]] # name = "github.com/x/y" # version = "2.4.0" diff --git a/Makefile b/Makefile index b567fe793..86dcc63fc 100644 --- a/Makefile +++ b/Makefile @@ -77,16 +77,8 @@ update_tools: @echo "--> Updating tools" @go get -u $(GOTOOLS) -#Run this from CI +#Update dependencies get_vendor_deps: - @rm -rf vendor/ - @echo "--> Running dep" - @dep ensure -vendor-only - - -#Run this locally. -ensure_deps: - @rm -rf vendor/ @echo "--> Running dep" @dep ensure @@ -254,6 +246,10 @@ metalinter_all: @echo "--> Running linter (all)" gometalinter.v2 --vendor --deadline=600s --enable-all --disable=lll ./... +check_dep: + dep status >> /dev/null + !(grep -n branch Gopkg.toml) + ########################################################### ### Docker image @@ -309,4 +305,4 @@ build-slate: # To avoid unintended conflicts with file names, always add to .PHONY # unless there is a reason not to. # https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html -.PHONY: check build build_race build_abci dist install install_abci check_tools get_tools update_tools get_vendor_deps draw_deps get_protoc protoc_abci protoc_libs gen_certs clean_certs grpc_dbserver test_cover test_apps test_persistence test_p2p test test_race test_integrations test_release test100 vagrant_test fmt build-linux localnet-start localnet-stop build-docker build-docker-localnode sentry-start sentry-config sentry-stop build-slate protoc_grpc protoc_all +.PHONY: check build build_race build_abci dist install install_abci check_dep check_tools get_tools update_tools get_vendor_deps draw_deps get_protoc protoc_abci protoc_libs gen_certs clean_certs grpc_dbserver test_cover test_apps test_persistence test_p2p test test_race test_integrations test_release test100 vagrant_test fmt build-linux localnet-start localnet-stop build-docker build-docker-localnode sentry-start sentry-config sentry-stop build-slate protoc_grpc protoc_all diff --git a/test/docker/Dockerfile b/test/docker/Dockerfile index 8b69d27fe..34968c391 100644 --- a/test/docker/Dockerfile +++ b/test/docker/Dockerfile @@ -13,18 +13,14 @@ ENV REPO $GOPATH/src/github.com/tendermint/tendermint ENV GOBIN $GOPATH/bin WORKDIR $REPO -# Install the vendored dependencies before copying code +# Copy in the code +COPY . $REPO + +# Install the vendored dependencies # docker caching prevents reinstall on code change! -ADD Gopkg.toml Gopkg.toml -ADD Gopkg.lock Gopkg.lock -ADD Makefile Makefile RUN make get_tools RUN make get_vendor_deps -# Now copy in the code -# NOTE: this will overwrite whatever is in vendor/ -COPY . $REPO - RUN go install ./cmd/tendermint RUN go install ./abci/cmd/abci-cli From 0bd4fb96f0923314ce345a400d07e0c3b35b8239 Mon Sep 17 00:00:00 2001 From: Dev Ojha Date: Wed, 25 Jul 2018 14:07:47 -0700 Subject: [PATCH 15/44] crypto: Add benchmarking code for signature schemes (#2061) * crypto: Add benchmarking code for signature schemes This does a slight refactor for the key generation code. It now calls a seperate unexported method to allow generation from a reader. I think this will actually reduce time in generation, due to no longer initializing an extra slice. This was needed in order to enable benchmarking. This uses an internal package for the benchmarking code, so that this can be standardized without being exported in the public API. The benchmarking code is derived from agl/ed25519's benchmarking code, and has copied the license over. Closes #1984 --- crypto/ed25519/bench_test.go | 26 ++++++++ crypto/ed25519/ed25519.go | 11 +++- crypto/internal/benchmarking/bench.go | 88 +++++++++++++++++++++++++++ crypto/secp256k1/bench_test.go | 26 ++++++++ crypto/secp256k1/secp256k1.go | 11 +++- 5 files changed, 160 insertions(+), 2 deletions(-) create mode 100644 crypto/ed25519/bench_test.go create mode 100644 crypto/internal/benchmarking/bench.go create mode 100644 crypto/secp256k1/bench_test.go diff --git a/crypto/ed25519/bench_test.go b/crypto/ed25519/bench_test.go new file mode 100644 index 000000000..47897cde6 --- /dev/null +++ b/crypto/ed25519/bench_test.go @@ -0,0 +1,26 @@ +package ed25519 + +import ( + "io" + "testing" + + "github.com/tendermint/tendermint/crypto" + "github.com/tendermint/tendermint/crypto/internal/benchmarking" +) + +func BenchmarkKeyGeneration(b *testing.B) { + benchmarkKeygenWrapper := func(reader io.Reader) crypto.PrivKey { + return genPrivKey(reader) + } + benchmarking.BenchmarkKeyGeneration(b, benchmarkKeygenWrapper) +} + +func BenchmarkSigning(b *testing.B) { + priv := GenPrivKey() + benchmarking.BenchmarkSigning(b, priv) +} + +func BenchmarkVerification(b *testing.B) { + priv := GenPrivKey() + benchmarking.BenchmarkVerification(b, priv) +} diff --git a/crypto/ed25519/ed25519.go b/crypto/ed25519/ed25519.go index 8b7bd42bd..3dd4d2b31 100644 --- a/crypto/ed25519/ed25519.go +++ b/crypto/ed25519/ed25519.go @@ -4,6 +4,7 @@ import ( "bytes" "crypto/subtle" "fmt" + "io" "github.com/tendermint/ed25519" "github.com/tendermint/ed25519/extra25519" @@ -102,8 +103,16 @@ func (privKey PrivKeyEd25519) ToCurve25519() *[PubKeyEd25519Size]byte { // It uses OS randomness in conjunction with the current global random seed // in tendermint/libs/common to generate the private key. func GenPrivKey() PrivKeyEd25519 { + return genPrivKey(crypto.CReader()) +} + +// genPrivKey generates a new ed25519 private key using the provided reader. +func genPrivKey(rand io.Reader) PrivKeyEd25519 { privKey := new([64]byte) - copy(privKey[:32], crypto.CRandBytes(32)) + _, err := io.ReadFull(rand, privKey[:32]) + if err != nil { + panic(err) + } // ed25519.MakePublicKey(privKey) alters the last 32 bytes of privKey. // It places the pubkey in the last 32 bytes of privKey, and returns the // public key. diff --git a/crypto/internal/benchmarking/bench.go b/crypto/internal/benchmarking/bench.go new file mode 100644 index 000000000..c988de48e --- /dev/null +++ b/crypto/internal/benchmarking/bench.go @@ -0,0 +1,88 @@ +package benchmarking + +import ( + "io" + "testing" + + "github.com/tendermint/tendermint/crypto" +) + +// The code in this file is adapted from agl/ed25519. +// As such it is under the following license. +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found at the bottom of this file. + +type zeroReader struct{} + +func (zeroReader) Read(buf []byte) (int, error) { + for i := range buf { + buf[i] = 0 + } + return len(buf), nil +} + +// BenchmarkKeyGeneration benchmarks the given key generation algorithm using +// a dummy reader. +func BenchmarkKeyGeneration(b *testing.B, GenerateKey func(reader io.Reader) crypto.PrivKey) { + var zero zeroReader + for i := 0; i < b.N; i++ { + GenerateKey(zero) + } +} + +// BenchmarkSigning benchmarks the given signing algorithm using +// the provided privkey. +func BenchmarkSigning(b *testing.B, priv crypto.PrivKey) { + message := []byte("Hello, world!") + b.ResetTimer() + for i := 0; i < b.N; i++ { + priv.Sign(message) + } +} + +// BenchmarkVerification benchmarks the given verification algorithm using +// the provided privkey on a constant message. +func BenchmarkVerification(b *testing.B, priv crypto.PrivKey) { + pub := priv.PubKey() + // use a short message, so this time doesn't get dominated by hashing. + message := []byte("Hello, world!") + signature, err := priv.Sign(message) + if err != nil { + b.Fatal(err) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + pub.VerifyBytes(message, signature) + } +} + +// Below is the aforementioned license. + +// Copyright (c) 2012 The Go Authors. All rights reserved. + +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: + +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/crypto/secp256k1/bench_test.go b/crypto/secp256k1/bench_test.go new file mode 100644 index 000000000..4f651b762 --- /dev/null +++ b/crypto/secp256k1/bench_test.go @@ -0,0 +1,26 @@ +package secp256k1 + +import ( + "io" + "testing" + + "github.com/tendermint/tendermint/crypto" + "github.com/tendermint/tendermint/crypto/internal/benchmarking" +) + +func BenchmarkKeyGeneration(b *testing.B) { + benchmarkKeygenWrapper := func(reader io.Reader) crypto.PrivKey { + return genPrivKey(reader) + } + benchmarking.BenchmarkKeyGeneration(b, benchmarkKeygenWrapper) +} + +func BenchmarkSigning(b *testing.B) { + priv := GenPrivKey() + benchmarking.BenchmarkSigning(b, priv) +} + +func BenchmarkVerification(b *testing.B) { + priv := GenPrivKey() + benchmarking.BenchmarkVerification(b, priv) +} diff --git a/crypto/secp256k1/secp256k1.go b/crypto/secp256k1/secp256k1.go index 4b210dc7f..03d5614ab 100644 --- a/crypto/secp256k1/secp256k1.go +++ b/crypto/secp256k1/secp256k1.go @@ -5,6 +5,7 @@ import ( "crypto/sha256" "crypto/subtle" "fmt" + "io" secp256k1 "github.com/btcsuite/btcd/btcec" amino "github.com/tendermint/go-amino" @@ -80,8 +81,16 @@ func (privKey PrivKeySecp256k1) Equals(other crypto.PrivKey) bool { // It uses OS randomness in conjunction with the current global random seed // in tendermint/libs/common to generate the private key. func GenPrivKey() PrivKeySecp256k1 { + return genPrivKey(crypto.CReader()) +} + +// genPrivKey generates a new secp256k1 private key using the provided reader. +func genPrivKey(rand io.Reader) PrivKeySecp256k1 { privKeyBytes := [32]byte{} - copy(privKeyBytes[:], crypto.CRandBytes(32)) + _, err := io.ReadFull(rand, privKeyBytes[:]) + if err != nil { + panic(err) + } // crypto.CRandBytes is guaranteed to be 32 bytes long, so it can be // casted to PrivKeySecp256k1. return PrivKeySecp256k1(privKeyBytes) From 24b94d7aa418c4e00d62b7244d213d53dcaecc1a Mon Sep 17 00:00:00 2001 From: Dev Ojha Date: Wed, 25 Jul 2018 14:12:39 -0700 Subject: [PATCH 16/44] crypto: Switch hkdfchacha back to xchacha (#2058) hkdfchachapoly was a construction we came up with. There is no longer any reason to use it. We should instead just use xchacha for the remaining use cases we have. (Symmetrically encrypting the keys in the sdk keys package) --- CHANGELOG_PENDING.md | 1 + crypto/hkdfchacha20poly1305/hkdfchachapoly.go | 106 ------- crypto/xchacha20poly1305/vector_test.go | 103 +++++++ crypto/xchacha20poly1305/xchachapoly.go | 261 ++++++++++++++++++ .../xchachapoly_test.go} | 44 +-- 5 files changed, 366 insertions(+), 149 deletions(-) delete mode 100644 crypto/hkdfchacha20poly1305/hkdfchachapoly.go create mode 100644 crypto/xchacha20poly1305/vector_test.go create mode 100644 crypto/xchacha20poly1305/xchachapoly.go rename crypto/{hkdfchacha20poly1305/hkdfchachapoly_test.go => xchacha20poly1305/xchachapoly_test.go} (73%) diff --git a/CHANGELOG_PENDING.md b/CHANGELOG_PENDING.md index e58bda9f7..aeefd38ba 100644 --- a/CHANGELOG_PENDING.md +++ b/CHANGELOG_PENDING.md @@ -15,6 +15,7 @@ IMPROVEMENTS: - [blockchain] Improve fast-sync logic - tweak params - only process one block at a time to avoid starving +- [crypto] Switch hkdfchachapoly1305 to xchachapoly1305 BUG FIXES: - [privval] fix a deadline for accepting new connections in socket private diff --git a/crypto/hkdfchacha20poly1305/hkdfchachapoly.go b/crypto/hkdfchacha20poly1305/hkdfchachapoly.go deleted file mode 100644 index 4bf24cb18..000000000 --- a/crypto/hkdfchacha20poly1305/hkdfchachapoly.go +++ /dev/null @@ -1,106 +0,0 @@ -// Package hkdfchacha20poly1305 creates an AEAD using hkdf, chacha20, and poly1305 -// When sealing and opening, the hkdf is used to obtain the nonce and subkey for -// chacha20. Other than the change for the how the subkey and nonce for chacha -// are obtained, this is the same as chacha20poly1305 -package hkdfchacha20poly1305 - -import ( - "crypto/cipher" - "crypto/sha256" - "errors" - "io" - - "golang.org/x/crypto/chacha20poly1305" - "golang.org/x/crypto/hkdf" -) - -// Implements crypto.AEAD -type hkdfchacha20poly1305 struct { - key [KeySize]byte -} - -const ( - // KeySize is the size of the key used by this AEAD, in bytes. - KeySize = 32 - // NonceSize is the size of the nonce used with this AEAD, in bytes. - NonceSize = 24 - // TagSize is the size added from poly1305 - TagSize = 16 - // MaxPlaintextSize is the max size that can be passed into a single call of Seal - MaxPlaintextSize = (1 << 38) - 64 - // MaxCiphertextSize is the max size that can be passed into a single call of Open, - // this differs from plaintext size due to the tag - MaxCiphertextSize = (1 << 38) - 48 - // HkdfInfo is the parameter used internally for Hkdf's info parameter. - HkdfInfo = "TENDERMINT_SECRET_CONNECTION_FRAME_KEY_DERIVE" -) - -//New xChaChapoly1305 AEAD with 24 byte nonces -func New(key []byte) (cipher.AEAD, error) { - if len(key) != KeySize { - return nil, errors.New("chacha20poly1305: bad key length") - } - ret := new(hkdfchacha20poly1305) - copy(ret.key[:], key) - return ret, nil - -} -func (c *hkdfchacha20poly1305) NonceSize() int { - return NonceSize -} - -func (c *hkdfchacha20poly1305) Overhead() int { - return TagSize -} - -func (c *hkdfchacha20poly1305) Seal(dst, nonce, plaintext, additionalData []byte) []byte { - if len(nonce) != NonceSize { - panic("hkdfchacha20poly1305: bad nonce length passed to Seal") - } - - if uint64(len(plaintext)) > MaxPlaintextSize { - panic("hkdfchacha20poly1305: plaintext too large") - } - - subKey, chachaNonce := getSubkeyAndChachaNonceFromHkdf(&c.key, &nonce) - - aead, err := chacha20poly1305.New(subKey[:]) - if err != nil { - panic("hkdfchacha20poly1305: failed to initialize chacha20poly1305") - } - - return aead.Seal(dst, chachaNonce[:], plaintext, additionalData) -} - -func (c *hkdfchacha20poly1305) Open(dst, nonce, ciphertext, additionalData []byte) ([]byte, error) { - if len(nonce) != NonceSize { - return nil, errors.New("hkdfchacha20poly1305: bad nonce length passed to Open") - } - if uint64(len(ciphertext)) > MaxCiphertextSize { - return nil, errors.New("hkdfchacha20poly1305: ciphertext too large") - } - - subKey, chachaNonce := getSubkeyAndChachaNonceFromHkdf(&c.key, &nonce) - - aead, err := chacha20poly1305.New(subKey[:]) - if err != nil { - panic("hkdfchacha20poly1305: failed to initialize chacha20poly1305") - } - - return aead.Open(dst, chachaNonce[:], ciphertext, additionalData) -} - -func getSubkeyAndChachaNonceFromHkdf(cKey *[32]byte, nonce *[]byte) ( - subKey [KeySize]byte, chachaNonce [chacha20poly1305.NonceSize]byte) { - hash := sha256.New - hkdf := hkdf.New(hash, (*cKey)[:], *nonce, []byte(HkdfInfo)) - _, err := io.ReadFull(hkdf, subKey[:]) - if err != nil { - panic("hkdfchacha20poly1305: failed to read subkey from hkdf") - } - _, err = io.ReadFull(hkdf, chachaNonce[:]) - if err != nil { - panic("hkdfchacha20poly1305: failed to read chachaNonce from hkdf") - } - return -} diff --git a/crypto/xchacha20poly1305/vector_test.go b/crypto/xchacha20poly1305/vector_test.go new file mode 100644 index 000000000..3001217f4 --- /dev/null +++ b/crypto/xchacha20poly1305/vector_test.go @@ -0,0 +1,103 @@ +package xchacha20poly1305 + +import ( + "bytes" + "encoding/hex" + "testing" +) + +func toHex(bits []byte) string { + return hex.EncodeToString(bits) +} + +func fromHex(bits string) []byte { + b, err := hex.DecodeString(bits) + if err != nil { + panic(err) + } + return b +} + +func TestHChaCha20(t *testing.T) { + for i, v := range hChaCha20Vectors { + var key [32]byte + var nonce [16]byte + copy(key[:], v.key) + copy(nonce[:], v.nonce) + + HChaCha20(&key, &nonce, &key) + if !bytes.Equal(key[:], v.keystream) { + t.Errorf("Test %d: keystream mismatch:\n \t got: %s\n \t want: %s", i, toHex(key[:]), toHex(v.keystream)) + } + } +} + +var hChaCha20Vectors = []struct { + key, nonce, keystream []byte +}{ + { + fromHex("0000000000000000000000000000000000000000000000000000000000000000"), + fromHex("000000000000000000000000000000000000000000000000"), + fromHex("1140704c328d1d5d0e30086cdf209dbd6a43b8f41518a11cc387b669b2ee6586"), + }, + { + fromHex("8000000000000000000000000000000000000000000000000000000000000000"), + fromHex("000000000000000000000000000000000000000000000000"), + fromHex("7d266a7fd808cae4c02a0a70dcbfbcc250dae65ce3eae7fc210f54cc8f77df86"), + }, + { + fromHex("0000000000000000000000000000000000000000000000000000000000000001"), + fromHex("000000000000000000000000000000000000000000000002"), + fromHex("e0c77ff931bb9163a5460c02ac281c2b53d792b1c43fea817e9ad275ae546963"), + }, + { + fromHex("000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f"), + fromHex("000102030405060708090a0b0c0d0e0f1011121314151617"), + fromHex("51e3ff45a895675c4b33b46c64f4a9ace110d34df6a2ceab486372bacbd3eff6"), + }, + { + fromHex("24f11cce8a1b3d61e441561a696c1c1b7e173d084fd4812425435a8896a013dc"), + fromHex("d9660c5900ae19ddad28d6e06e45fe5e"), + fromHex("5966b3eec3bff1189f831f06afe4d4e3be97fa9235ec8c20d08acfbbb4e851e3"), + }, +} + +func TestVectors(t *testing.T) { + for i, v := range vectors { + if len(v.plaintext) == 0 { + v.plaintext = make([]byte, len(v.ciphertext)) + } + + var nonce [24]byte + copy(nonce[:], v.nonce) + + aead, err := New(v.key) + if err != nil { + t.Error(err) + } + + dst := aead.Seal(nil, nonce[:], v.plaintext, v.ad) + if !bytes.Equal(dst, v.ciphertext) { + t.Errorf("Test %d: ciphertext mismatch:\n \t got: %s\n \t want: %s", i, toHex(dst), toHex(v.ciphertext)) + } + open, err := aead.Open(nil, nonce[:], dst, v.ad) + if err != nil { + t.Error(err) + } + if !bytes.Equal(open, v.plaintext) { + t.Errorf("Test %d: plaintext mismatch:\n \t got: %s\n \t want: %s", i, string(open), string(v.plaintext)) + } + } +} + +var vectors = []struct { + key, nonce, ad, plaintext, ciphertext []byte +}{ + { + []byte{0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f}, + []byte{0x07, 0x00, 0x00, 0x00, 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b}, + []byte{0x50, 0x51, 0x52, 0x53, 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7}, + []byte("Ladies and Gentlemen of the class of '99: If I could offer you only one tip for the future, sunscreen would be it."), + []byte{0x45, 0x3c, 0x06, 0x93, 0xa7, 0x40, 0x7f, 0x04, 0xff, 0x4c, 0x56, 0xae, 0xdb, 0x17, 0xa3, 0xc0, 0xa1, 0xaf, 0xff, 0x01, 0x17, 0x49, 0x30, 0xfc, 0x22, 0x28, 0x7c, 0x33, 0xdb, 0xcf, 0x0a, 0xc8, 0xb8, 0x9a, 0xd9, 0x29, 0x53, 0x0a, 0x1b, 0xb3, 0xab, 0x5e, 0x69, 0xf2, 0x4c, 0x7f, 0x60, 0x70, 0xc8, 0xf8, 0x40, 0xc9, 0xab, 0xb4, 0xf6, 0x9f, 0xbf, 0xc8, 0xa7, 0xff, 0x51, 0x26, 0xfa, 0xee, 0xbb, 0xb5, 0x58, 0x05, 0xee, 0x9c, 0x1c, 0xf2, 0xce, 0x5a, 0x57, 0x26, 0x32, 0x87, 0xae, 0xc5, 0x78, 0x0f, 0x04, 0xec, 0x32, 0x4c, 0x35, 0x14, 0x12, 0x2c, 0xfc, 0x32, 0x31, 0xfc, 0x1a, 0x8b, 0x71, 0x8a, 0x62, 0x86, 0x37, 0x30, 0xa2, 0x70, 0x2b, 0xb7, 0x63, 0x66, 0x11, 0x6b, 0xed, 0x09, 0xe0, 0xfd, 0x5c, 0x6d, 0x84, 0xb6, 0xb0, 0xc1, 0xab, 0xaf, 0x24, 0x9d, 0x5d, 0xd0, 0xf7, 0xf5, 0xa7, 0xea}, + }, +} diff --git a/crypto/xchacha20poly1305/xchachapoly.go b/crypto/xchacha20poly1305/xchachapoly.go new file mode 100644 index 000000000..c7a175b5f --- /dev/null +++ b/crypto/xchacha20poly1305/xchachapoly.go @@ -0,0 +1,261 @@ +// Package xchacha20poly1305 creates an AEAD using hchacha, chacha, and poly1305 +// This allows for randomized nonces to be used in conjunction with chacha. +package xchacha20poly1305 + +import ( + "crypto/cipher" + "encoding/binary" + "errors" + "fmt" + + "golang.org/x/crypto/chacha20poly1305" +) + +// Implements crypto.AEAD +type xchacha20poly1305 struct { + key [KeySize]byte +} + +const ( + // KeySize is the size of the key used by this AEAD, in bytes. + KeySize = 32 + // NonceSize is the size of the nonce used with this AEAD, in bytes. + NonceSize = 24 + // TagSize is the size added from poly1305 + TagSize = 16 + // MaxPlaintextSize is the max size that can be passed into a single call of Seal + MaxPlaintextSize = (1 << 38) - 64 + // MaxCiphertextSize is the max size that can be passed into a single call of Open, + // this differs from plaintext size due to the tag + MaxCiphertextSize = (1 << 38) - 48 + + // sigma are constants used in xchacha. + // Unrolled from a slice so that they can be inlined, as slices can't be constants. + sigma0 = uint32(0x61707865) + sigma1 = uint32(0x3320646e) + sigma2 = uint32(0x79622d32) + sigma3 = uint32(0x6b206574) +) + +// New returns a new xchachapoly1305 AEAD +func New(key []byte) (cipher.AEAD, error) { + if len(key) != KeySize { + return nil, errors.New("xchacha20poly1305: bad key length") + } + ret := new(xchacha20poly1305) + copy(ret.key[:], key) + return ret, nil +} + +// nolint +func (c *xchacha20poly1305) NonceSize() int { + return NonceSize +} + +// nolint +func (c *xchacha20poly1305) Overhead() int { + return TagSize +} + +func (c *xchacha20poly1305) Seal(dst, nonce, plaintext, additionalData []byte) []byte { + if len(nonce) != NonceSize { + panic("xchacha20poly1305: bad nonce length passed to Seal") + } + + if uint64(len(plaintext)) > MaxPlaintextSize { + panic("xchacha20poly1305: plaintext too large") + } + + var subKey [KeySize]byte + var hNonce [16]byte + var subNonce [chacha20poly1305.NonceSize]byte + copy(hNonce[:], nonce[:16]) + + HChaCha20(&subKey, &hNonce, &c.key) + + // This can't error because we always provide a correctly sized key + chacha20poly1305, _ := chacha20poly1305.New(subKey[:]) + + copy(subNonce[4:], nonce[16:]) + + return chacha20poly1305.Seal(dst, subNonce[:], plaintext, additionalData) +} + +func (c *xchacha20poly1305) Open(dst, nonce, ciphertext, additionalData []byte) ([]byte, error) { + if len(nonce) != NonceSize { + return nil, fmt.Errorf("xchacha20poly1305: bad nonce length passed to Open") + } + if uint64(len(ciphertext)) > MaxCiphertextSize { + return nil, fmt.Errorf("xchacha20poly1305: ciphertext too large") + } + var subKey [KeySize]byte + var hNonce [16]byte + var subNonce [chacha20poly1305.NonceSize]byte + copy(hNonce[:], nonce[:16]) + + HChaCha20(&subKey, &hNonce, &c.key) + + // This can't error because we always provide a correctly sized key + chacha20poly1305, _ := chacha20poly1305.New(subKey[:]) + + copy(subNonce[4:], nonce[16:]) + + return chacha20poly1305.Open(dst, subNonce[:], ciphertext, additionalData) +} + +// HChaCha exported from +// https://github.com/aead/chacha20/blob/8b13a72661dae6e9e5dea04f344f0dc95ea29547/chacha/chacha_generic.go#L194 +// TODO: Add support for the different assembly instructions used there. + +// The MIT License (MIT) + +// Copyright (c) 2016 Andreas Auernhammer + +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: + +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. + +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +// HChaCha20 generates 32 pseudo-random bytes from a 128 bit nonce and a 256 bit secret key. +// It can be used as a key-derivation-function (KDF). +func HChaCha20(out *[32]byte, nonce *[16]byte, key *[32]byte) { hChaCha20Generic(out, nonce, key) } + +func hChaCha20Generic(out *[32]byte, nonce *[16]byte, key *[32]byte) { + v00 := sigma0 + v01 := sigma1 + v02 := sigma2 + v03 := sigma3 + v04 := binary.LittleEndian.Uint32(key[0:]) + v05 := binary.LittleEndian.Uint32(key[4:]) + v06 := binary.LittleEndian.Uint32(key[8:]) + v07 := binary.LittleEndian.Uint32(key[12:]) + v08 := binary.LittleEndian.Uint32(key[16:]) + v09 := binary.LittleEndian.Uint32(key[20:]) + v10 := binary.LittleEndian.Uint32(key[24:]) + v11 := binary.LittleEndian.Uint32(key[28:]) + v12 := binary.LittleEndian.Uint32(nonce[0:]) + v13 := binary.LittleEndian.Uint32(nonce[4:]) + v14 := binary.LittleEndian.Uint32(nonce[8:]) + v15 := binary.LittleEndian.Uint32(nonce[12:]) + + for i := 0; i < 20; i += 2 { + v00 += v04 + v12 ^= v00 + v12 = (v12 << 16) | (v12 >> 16) + v08 += v12 + v04 ^= v08 + v04 = (v04 << 12) | (v04 >> 20) + v00 += v04 + v12 ^= v00 + v12 = (v12 << 8) | (v12 >> 24) + v08 += v12 + v04 ^= v08 + v04 = (v04 << 7) | (v04 >> 25) + v01 += v05 + v13 ^= v01 + v13 = (v13 << 16) | (v13 >> 16) + v09 += v13 + v05 ^= v09 + v05 = (v05 << 12) | (v05 >> 20) + v01 += v05 + v13 ^= v01 + v13 = (v13 << 8) | (v13 >> 24) + v09 += v13 + v05 ^= v09 + v05 = (v05 << 7) | (v05 >> 25) + v02 += v06 + v14 ^= v02 + v14 = (v14 << 16) | (v14 >> 16) + v10 += v14 + v06 ^= v10 + v06 = (v06 << 12) | (v06 >> 20) + v02 += v06 + v14 ^= v02 + v14 = (v14 << 8) | (v14 >> 24) + v10 += v14 + v06 ^= v10 + v06 = (v06 << 7) | (v06 >> 25) + v03 += v07 + v15 ^= v03 + v15 = (v15 << 16) | (v15 >> 16) + v11 += v15 + v07 ^= v11 + v07 = (v07 << 12) | (v07 >> 20) + v03 += v07 + v15 ^= v03 + v15 = (v15 << 8) | (v15 >> 24) + v11 += v15 + v07 ^= v11 + v07 = (v07 << 7) | (v07 >> 25) + v00 += v05 + v15 ^= v00 + v15 = (v15 << 16) | (v15 >> 16) + v10 += v15 + v05 ^= v10 + v05 = (v05 << 12) | (v05 >> 20) + v00 += v05 + v15 ^= v00 + v15 = (v15 << 8) | (v15 >> 24) + v10 += v15 + v05 ^= v10 + v05 = (v05 << 7) | (v05 >> 25) + v01 += v06 + v12 ^= v01 + v12 = (v12 << 16) | (v12 >> 16) + v11 += v12 + v06 ^= v11 + v06 = (v06 << 12) | (v06 >> 20) + v01 += v06 + v12 ^= v01 + v12 = (v12 << 8) | (v12 >> 24) + v11 += v12 + v06 ^= v11 + v06 = (v06 << 7) | (v06 >> 25) + v02 += v07 + v13 ^= v02 + v13 = (v13 << 16) | (v13 >> 16) + v08 += v13 + v07 ^= v08 + v07 = (v07 << 12) | (v07 >> 20) + v02 += v07 + v13 ^= v02 + v13 = (v13 << 8) | (v13 >> 24) + v08 += v13 + v07 ^= v08 + v07 = (v07 << 7) | (v07 >> 25) + v03 += v04 + v14 ^= v03 + v14 = (v14 << 16) | (v14 >> 16) + v09 += v14 + v04 ^= v09 + v04 = (v04 << 12) | (v04 >> 20) + v03 += v04 + v14 ^= v03 + v14 = (v14 << 8) | (v14 >> 24) + v09 += v14 + v04 ^= v09 + v04 = (v04 << 7) | (v04 >> 25) + } + + binary.LittleEndian.PutUint32(out[0:], v00) + binary.LittleEndian.PutUint32(out[4:], v01) + binary.LittleEndian.PutUint32(out[8:], v02) + binary.LittleEndian.PutUint32(out[12:], v03) + binary.LittleEndian.PutUint32(out[16:], v12) + binary.LittleEndian.PutUint32(out[20:], v13) + binary.LittleEndian.PutUint32(out[24:], v14) + binary.LittleEndian.PutUint32(out[28:], v15) +} diff --git a/crypto/hkdfchacha20poly1305/hkdfchachapoly_test.go b/crypto/xchacha20poly1305/xchachapoly_test.go similarity index 73% rename from crypto/hkdfchacha20poly1305/hkdfchachapoly_test.go rename to crypto/xchacha20poly1305/xchachapoly_test.go index 854a312e6..5b92a7607 100644 --- a/crypto/hkdfchacha20poly1305/hkdfchachapoly_test.go +++ b/crypto/xchacha20poly1305/xchachapoly_test.go @@ -1,54 +1,12 @@ -package hkdfchacha20poly1305 +package xchacha20poly1305 import ( "bytes" cr "crypto/rand" - "encoding/hex" mr "math/rand" "testing" - - "github.com/stretchr/testify/assert" ) -// Test that a test vector we generated is valid. (Ensures backwards -// compatibility) -func TestVector(t *testing.T) { - key, _ := hex.DecodeString("56f8de45d3c294c7675bcaf457bdd4b71c380b9b2408ce9412b348d0f08b69ee") - aead, err := New(key[:]) - if err != nil { - t.Fatal(err) - } - cts := []string{"e20a8bf42c535ac30125cfc52031577f0b", - "657695b37ba30f67b25860d90a6f1d00d8", - "e9aa6f3b7f625d957fd50f05bcdf20d014", - "8a00b3b5a6014e0d2033bebc5935086245", - "aadd74867b923879e6866ea9e03c009039", - "fc59773c2c864ee3b4cc971876b3c7bed4", - "caec14e3a9a52ce1a2682c6737defa4752", - "0b89511ffe490d2049d6950494ee51f919", - "7de854ea71f43ca35167a07566c769083d", - "cd477327f4ea4765c71e311c5fec1edbfb"} - - for i := 0; i < 10; i++ { - ct, _ := hex.DecodeString(cts[i]) - - byteArr := []byte{byte(i)} - nonce := make([]byte, 24) - nonce[0] = byteArr[0] - - // Test that we get the expected plaintext on open - plaintext, err := aead.Open(nil, nonce, ct, byteArr) - if err != nil { - t.Errorf("%dth Open failed", i) - continue - } - assert.Equal(t, byteArr, plaintext) - // Test that sealing yields the expected ciphertext - ciphertext := aead.Seal(nil, nonce, plaintext, byteArr) - assert.Equal(t, ct, ciphertext) - } -} - // The following test is taken from // https://github.com/golang/crypto/blob/master/chacha20poly1305/chacha20poly1305_test.go#L69 // It requires the below copyright notice, where "this source code" refers to the following function. From 66fe5b7baee043468f912af974d937068e5ff1c4 Mon Sep 17 00:00:00 2001 From: Zach Date: Wed, 25 Jul 2018 17:37:08 -0400 Subject: [PATCH 17/44] rpc: Improve slate for Jenkins (#2070) --- .gitignore | 1 + Makefile | 8 +++++++- rpc/core/README.md | 9 +++------ rpc/core/slate_header.txt | 13 +++++++++++++ 4 files changed, 24 insertions(+), 7 deletions(-) create mode 100644 rpc/core/slate_header.txt diff --git a/.gitignore b/.gitignore index d4f36adbb..4f8481603 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,7 @@ docs/_build *.log abci-cli docs/node_modules/ +index.html.md scripts/wal2json/wal2json scripts/cutWALUntil/cutWALUntil diff --git a/Makefile b/Makefile index 86dcc63fc..7a7273b6f 100644 --- a/Makefile +++ b/Makefile @@ -246,6 +246,12 @@ metalinter_all: @echo "--> Running linter (all)" gometalinter.v2 --vendor --deadline=600s --enable-all --disable=lll ./... +DESTINATION = ./index.html.md + +rpc-docs: + cat rpc/core/slate_header.txt > $(DESTINATION) + godoc2md -template rpc/core/doc_template.txt github.com/tendermint/tendermint/rpc/core | grep -v -e "pipe.go" -e "routes.go" -e "dev.go" | sed 's,/src/target,https://github.com/tendermint/tendermint/tree/master/rpc/core,' >> $(DESTINATION) + check_dep: dep status >> /dev/null !(grep -n branch Gopkg.toml) @@ -305,4 +311,4 @@ build-slate: # To avoid unintended conflicts with file names, always add to .PHONY # unless there is a reason not to. # https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html -.PHONY: check build build_race build_abci dist install install_abci check_dep check_tools get_tools update_tools get_vendor_deps draw_deps get_protoc protoc_abci protoc_libs gen_certs clean_certs grpc_dbserver test_cover test_apps test_persistence test_p2p test test_race test_integrations test_release test100 vagrant_test fmt build-linux localnet-start localnet-stop build-docker build-docker-localnode sentry-start sentry-config sentry-stop build-slate protoc_grpc protoc_all +.PHONY: check build build_race build_abci dist install install_abci check_dep check_tools get_tools update_tools get_vendor_deps draw_deps get_protoc protoc_abci protoc_libs gen_certs clean_certs grpc_dbserver test_cover test_apps test_persistence test_p2p test test_race test_integrations test_release test100 vagrant_test fmt rpc-docs build-linux localnet-start localnet-stop build-docker build-docker-localnode sentry-start sentry-config sentry-stop build-slate protoc_grpc protoc_all diff --git a/rpc/core/README.md b/rpc/core/README.md index 9547079b2..32c3051e3 100644 --- a/rpc/core/README.md +++ b/rpc/core/README.md @@ -1,18 +1,15 @@ # Tendermint RPC -## Generate markdown for [Slate](https://github.com/tendermint/slate) - -We are using [Slate](https://github.com/tendermint/slate) to power our RPC +We are using [Slate](https://github.com/lord/slate) to power our RPC documentation. For generating markdown use: ```shell go get github.com/davecheney/godoc2md -godoc2md -template rpc/core/doc_template.txt github.com/tendermint/tendermint/rpc/core | grep -v -e "pipe.go" -e "routes.go" -e "dev.go" | sed 's$/src/target$https://github.com/tendermint/tendermint/tree/master/rpc/core$' +# from root of this repo +make rpc-docs ``` -For more information see the [CI script for building the Slate docs](/scripts/slate.sh) - ## Pagination Requests that return multiple items will be paginated to 30 items by default. diff --git a/rpc/core/slate_header.txt b/rpc/core/slate_header.txt new file mode 100644 index 000000000..bb4ca6e03 --- /dev/null +++ b/rpc/core/slate_header.txt @@ -0,0 +1,13 @@ +--- +title: RPC Reference + +language_tabs: # must be one of https://git.io/vQNgJ + - shell + - go + +toc_footers: + - Tendermint + - Documentation Powered by Slate + +search: true +--- From 1b04e4e5f1e02e192596f29e8440c7f7116181d3 Mon Sep 17 00:00:00 2001 From: Zaki Manian Date: Sun, 13 May 2018 18:42:29 -0400 Subject: [PATCH 18/44] p2p: Remove RipeMd160. Generate keys with HKDF instead of hash functions, which provides better security properties. Add xchacha20poly1305 to secret connection. (Due to rebasing, this code has been removed) --- CHANGELOG.md | 8 +++++++ Gopkg.lock | 20 +++------------- p2p/conn/secret_connection.go | 43 +++++++++++++++++++---------------- 3 files changed, 34 insertions(+), 37 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fce7d6ee3..6629c56a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -317,6 +317,14 @@ BUG FIXES - [cmd] Set GenesisTime during `tendermint init` - [consensus] fix ValidBlock rules +## 0.20.0 (TBD) + +BREAKING: + +- [p2p] Change the key/nonce derivation in secret connection to use hkdf instead of a raw hash function. + + + ## 0.19.2 (April 30th, 2018) FEATURES: diff --git a/Gopkg.lock b/Gopkg.lock index 676751f14..796d81752 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -143,6 +143,7 @@ ".", "hcl/ast", "hcl/parser", + "hcl/printer", "hcl/scanner", "hcl/strconv", "hcl/token", @@ -194,11 +195,9 @@ [[projects]] branch = "master" - digest = "1:5ab79470a1d0fb19b041a624415612f8236b3c06070161a910562f2b2d064355" name = "github.com/mitchellh/mapstructure" packages = ["."] - pruneopts = "UT" - revision = "f15292f7a699fcc1a38a80977f80a046874ba8ac" + revision = "bb74f1db0675b241733089d5a1faa5dd8b0ef57b" [[projects]] digest = "1:95741de3af260a92cc5c7f3f3061e85273f5a81b5db20d4bd68da74bd521675e" @@ -382,13 +381,8 @@ digest = "1:df132ec33d5acb4a1ab58d637f1bc3557be49456ca59b9198f5c1e7fa32e0d31" name = "golang.org/x/crypto" packages = [ - "bcrypt", - "blowfish", - "chacha20poly1305", "curve25519", "hkdf", - "internal/chacha20", - "internal/subtle", "nacl/box", "nacl/secretbox", "openpgp/armor", @@ -463,25 +457,17 @@ packages = [ ".", "balancer", - "balancer/base", - "balancer/roundrobin", "codes", "connectivity", "credentials", - "encoding", - "encoding/proto", + "grpclb/grpc_lb_v1/messages", "grpclog", "internal", - "internal/backoff", - "internal/channelz", - "internal/grpcrand", "keepalive", "metadata", "naming", "peer", "resolver", - "resolver/dns", - "resolver/passthrough", "stats", "status", "tap", diff --git a/p2p/conn/secret_connection.go b/p2p/conn/secret_connection.go index a2cbe008d..7762515d5 100644 --- a/p2p/conn/secret_connection.go +++ b/p2p/conn/secret_connection.go @@ -17,18 +17,16 @@ import ( "time" "golang.org/x/crypto/nacl/box" - "golang.org/x/crypto/nacl/secretbox" - "golang.org/x/crypto/ripemd160" "github.com/tendermint/tendermint/crypto" cmn "github.com/tendermint/tendermint/libs/common" + "golang.org/x/crypto/hkdf" ) // 4 + 1024 == 1028 total frame size const dataLenSize = 4 const dataMaxSize = 1024 const totalFrameSize = dataMaxSize + dataLenSize -const sealedFrameSize = totalFrameSize + secretbox.Overhead // Implements net.Conn type SecretConnection struct { @@ -124,14 +122,18 @@ func (sc *SecretConnection) Write(data []byte) (n int, err error) { binary.BigEndian.PutUint32(frame, uint32(chunkLength)) copy(frame[dataLenSize:], chunk) + aead, err := xchacha20poly1305.New(sc.shrSecret[:]) + if err != nil { + return n, errors.New("Invalid SecretConnection Key") + } // encrypt the frame - var sealedFrame = make([]byte, sealedFrameSize) - secretbox.Seal(sealedFrame[:0], frame, sc.sendNonce, sc.shrSecret) + var sealedFrame = make([]byte, aead.Overhead()+totalFrameSize) + aead.Seal(sealedFrame[:0], sc.sendNonce[:], frame, nil) // fmt.Printf("secretbox.Seal(sealed:%X,sendNonce:%X,shrSecret:%X\n", sealedFrame, sc.sendNonce, sc.shrSecret) incr2Nonce(sc.sendNonce) // end encryption - _, err := sc.conn.Write(sealedFrame) + _, err = sc.conn.Write(sealedFrame) if err != nil { return n, err } @@ -148,7 +150,11 @@ func (sc *SecretConnection) Read(data []byte) (n int, err error) { return } - sealedFrame := make([]byte, sealedFrameSize) + aead, err := xchacha20poly1305.New(sc.shrSecret[:]) + if err != nil { + return n, errors.New("Invalid SecretConnection Key") + } + sealedFrame := make([]byte, totalFrameSize+aead.Overhead()) _, err = io.ReadFull(sc.conn, sealedFrame) if err != nil { return @@ -157,8 +163,8 @@ func (sc *SecretConnection) Read(data []byte) (n int, err error) { // decrypt the frame var frame = make([]byte, totalFrameSize) // fmt.Printf("secretbox.Open(sealed:%X,recvNonce:%X,shrSecret:%X\n", sealedFrame, sc.recvNonce, sc.shrSecret) - _, ok := secretbox.Open(frame[:0], sealedFrame, sc.recvNonce, sc.shrSecret) - if !ok { + _, err = aead.Open(frame[:0], sc.recvNonce[:], sealedFrame, nil) + if err != nil { return n, errors.New("Failed to decrypt SecretConnection") } incr2Nonce(sc.recvNonce) @@ -317,22 +323,19 @@ func shareAuthSignature(sc *SecretConnection, pubKey crypto.PubKey, signature cr // sha256 func hash32(input []byte) (res *[32]byte) { - hasher := sha256.New() - hasher.Write(input) // nolint: errcheck, gas - resSlice := hasher.Sum(nil) + hash := sha256.New + hkdf := hkdf.New(hash, input, nil, []byte("TENDERMINT_SECRET_CONNECTION_KEY_GEN")) res = new([32]byte) - copy(res[:], resSlice) - return + io.ReadFull(hkdf, res[:]) + return res } -// We only fill in the first 20 bytes with ripemd160 func hash24(input []byte) (res *[24]byte) { - hasher := ripemd160.New() - hasher.Write(input) // nolint: errcheck, gas - resSlice := hasher.Sum(nil) + hash := sha256.New + hkdf := hkdf.New(hash, input, nil, []byte("TENDERMINT_SECRET_CONNECTION_NONCE_GEN")) res = new([24]byte) - copy(res[:], resSlice) - return + io.ReadFull(hkdf, res[:]) + return res } // increment nonce big-endian by 2 with wraparound. From 7bf28af590018491606bfd5fa4e4aa0c3b91708e Mon Sep 17 00:00:00 2001 From: ValarDragon Date: Tue, 24 Jul 2018 12:33:02 -0700 Subject: [PATCH 19/44] p2p/secret_connection: Switch salsa usage to hkdf + chacha This now uses one hkdf on the X25519 shared secret to create a key for the sender and receiver. The hkdf call is now just called upon the computed shared secret, since the shared secret is a function of the pubkeys. The nonces now start at 0, as we are using chacha as a stream cipher, and the sender and receiver now have different keys. --- CHANGELOG.md | 8 -- CHANGELOG_PENDING.md | 1 + Gopkg.lock | 20 ++++- docs/spec/p2p/peer.md | 29 +++--- p2p/conn/secret_connection.go | 165 ++++++++++++++++------------------ 5 files changed, 109 insertions(+), 114 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6629c56a7..fce7d6ee3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -317,14 +317,6 @@ BUG FIXES - [cmd] Set GenesisTime during `tendermint init` - [consensus] fix ValidBlock rules -## 0.20.0 (TBD) - -BREAKING: - -- [p2p] Change the key/nonce derivation in secret connection to use hkdf instead of a raw hash function. - - - ## 0.19.2 (April 30th, 2018) FEATURES: diff --git a/CHANGELOG_PENDING.md b/CHANGELOG_PENDING.md index aeefd38ba..3bb4940ce 100644 --- a/CHANGELOG_PENDING.md +++ b/CHANGELOG_PENDING.md @@ -5,6 +5,7 @@ BREAKING CHANGES: - breaks serialization/signing of all messages with a timestamp - [abci] Removed Fee from ResponseDeliverTx and ResponseCheckTx - [tools] Removed `make ensure_deps` in favor of `make get_vendor_deps` +- [p2p] Remove salsa and ripemd primitives, in favor of using chacha as a stream cipher, and hkdf FEATURES: - [tools] Added `make check_dep` diff --git a/Gopkg.lock b/Gopkg.lock index 796d81752..8bad303bd 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -195,9 +195,11 @@ [[projects]] branch = "master" + digest = "1:5ab79470a1d0fb19b041a624415612f8236b3c06070161a910562f2b2d064355" name = "github.com/mitchellh/mapstructure" packages = ["."] - revision = "bb74f1db0675b241733089d5a1faa5dd8b0ef57b" + pruneopts = "UT" + revision = "f15292f7a699fcc1a38a80977f80a046874ba8ac" [[projects]] digest = "1:95741de3af260a92cc5c7f3f3061e85273f5a81b5db20d4bd68da74bd521675e" @@ -381,8 +383,13 @@ digest = "1:df132ec33d5acb4a1ab58d637f1bc3557be49456ca59b9198f5c1e7fa32e0d31" name = "golang.org/x/crypto" packages = [ + "bcrypt", + "blowfish", + "chacha20poly1305", "curve25519", "hkdf", + "internal/chacha20", + "internal/subtle", "nacl/box", "nacl/secretbox", "openpgp/armor", @@ -457,17 +464,25 @@ packages = [ ".", "balancer", + "balancer/base", + "balancer/roundrobin", "codes", "connectivity", "credentials", - "grpclb/grpc_lb_v1/messages", + "encoding", + "encoding/proto", "grpclog", "internal", + "internal/backoff", + "internal/channelz", + "internal/grpcrand", "keepalive", "metadata", "naming", "peer", "resolver", + "resolver/dns", + "resolver/passthrough", "stats", "status", "tap", @@ -524,6 +539,7 @@ "github.com/tendermint/go-amino", "golang.org/x/crypto/bcrypt", "golang.org/x/crypto/chacha20poly1305", + "golang.org/x/crypto/curve25519", "golang.org/x/crypto/hkdf", "golang.org/x/crypto/nacl/box", "golang.org/x/crypto/nacl/secretbox", diff --git a/docs/spec/p2p/peer.md b/docs/spec/p2p/peer.md index 69c5bbacf..dadb4a3a5 100644 --- a/docs/spec/p2p/peer.md +++ b/docs/spec/p2p/peer.md @@ -27,27 +27,24 @@ Both handshakes have configurable timeouts (they should complete quickly). ### Authenticated Encryption Handshake Tendermint implements the Station-to-Station protocol -using ED25519 keys for Diffie-Helman key-exchange and NACL SecretBox for encryption. +using X25519 keys for Diffie-Helman key-exchange and chacha20poly1305 for encryption. It goes as follows: -- generate an emphemeral ED25519 keypair +- generate an ephemeral X25519 keypair - send the ephemeral public key to the peer - wait to receive the peer's ephemeral public key - compute the Diffie-Hellman shared secret using the peers ephemeral public key and our ephemeral private key -- generate two nonces to use for encryption (sending and receiving) as follows: - - sort the ephemeral public keys in ascending order and concatenate them - - RIPEMD160 the result - - append 4 empty bytes (extending the hash to 24-bytes) - - the result is nonce1 - - flip the last bit of nonce1 to get nonce2 - - if we had the smaller ephemeral pubkey, use nonce1 for receiving, nonce2 for sending; - else the opposite -- all communications from now on are encrypted using the shared secret and the nonces, where each nonce -increments by 2 every time it is used +- generate two keys to use for encryption (sending and receiving) and a challenge for authentication as follows: + - create a hkdf-sha256 instance with the key being the diffie hellman shared secret, and info parameter as + `TENDERMINT_SECRET_CONNECTION_KEY_AND_CHALLENGE_GEN` + - get 96 bytes of output from hkdf-sha256 + - if we had the smaller ephemeral pubkey, use the first 32 bytes for the key for receiving, the second 32 bytes for sending; else the opposite + - use the last 32 bytes of output for the challenge +- use a seperate nonce for receiving and sending. Both nonces start at 0, and should support the full 96 bit nonce range +- all communications from now on are encrypted in 1024 byte frames, +using the respective secret and nonce. Each nonce is incremented by one after each use. - we now have an encrypted channel, but still need to authenticate -- generate a common challenge to sign: - - SHA256 of the sorted (lowest first) and concatenated ephemeral pub keys -- sign the common challenge with our persistent private key -- send the go-wire encoded persistent pubkey and signature to the peer +- sign the common challenge obtained from the hkdf with our persistent private key +- send the amino encoded persistent pubkey and signature to the peer - wait to receive the persistent public key and signature from the peer - verify the signature on the challenge using the peer's persistent public key diff --git a/p2p/conn/secret_connection.go b/p2p/conn/secret_connection.go index 7762515d5..1b2b1da52 100644 --- a/p2p/conn/secret_connection.go +++ b/p2p/conn/secret_connection.go @@ -1,9 +1,3 @@ -// Uses nacl's secret_box to encrypt a net.Conn. -// It is (meant to be) an implementation of the STS protocol. -// Note we do not (yet) assume that a remote peer's pubkey -// is known ahead of time, and thus we are technically -// still vulnerable to MITM. (TODO!) -// See docs/sts-final.pdf for more info package conn import ( @@ -16,6 +10,8 @@ import ( "net" "time" + "golang.org/x/crypto/chacha20poly1305" + "golang.org/x/crypto/curve25519" "golang.org/x/crypto/nacl/box" "github.com/tendermint/tendermint/crypto" @@ -27,23 +23,32 @@ import ( const dataLenSize = 4 const dataMaxSize = 1024 const totalFrameSize = dataMaxSize + dataLenSize +const aeadSizeOverhead = 16 // overhead of poly 1305 authentication tag +const aeadKeySize = chacha20poly1305.KeySize +const aeadNonceSize = chacha20poly1305.NonceSize -// Implements net.Conn +// SecretConnection implements net.conn. +// It is an implementation of the STS protocol. +// Note we do not (yet) assume that a remote peer's pubkey +// is known ahead of time, and thus we are technically +// still vulnerable to MITM. (TODO!) +// See docs/sts-final.pdf for more info type SecretConnection struct { conn io.ReadWriteCloser recvBuffer []byte - recvNonce *[24]byte - sendNonce *[24]byte + recvNonce *[aeadNonceSize]byte + sendNonce *[aeadNonceSize]byte + recvSecret *[aeadKeySize]byte + sendSecret *[aeadKeySize]byte remPubKey crypto.PubKey - shrSecret *[32]byte // shared secret } -// Performs handshake and returns a new authenticated SecretConnection. -// Returns nil if error in handshake. +// MakeSecretConnection performs handshake and returns a new authenticated +// SecretConnection. +// Returns nil if there is an error in handshake. // Caller should call conn.Close() // See docs/sts-final.pdf for more information. func MakeSecretConnection(conn io.ReadWriteCloser, locPrivKey crypto.PrivKey) (*SecretConnection, error) { - locPubKey := locPrivKey.PubKey() // Generate ephemeral keys for perfect forward secrecy. @@ -57,29 +62,27 @@ func MakeSecretConnection(conn io.ReadWriteCloser, locPrivKey crypto.PrivKey) (* return nil, err } - // Compute common shared secret. - shrSecret := computeSharedSecret(remEphPub, locEphPriv) - // Sort by lexical order. - loEphPub, hiEphPub := sort32(locEphPub, remEphPub) + loEphPub, _ := sort32(locEphPub, remEphPub) // Check if the local ephemeral public key // was the least, lexicographically sorted. locIsLeast := bytes.Equal(locEphPub[:], loEphPub[:]) - // Generate nonces to use for secretbox. - recvNonce, sendNonce := genNonces(loEphPub, hiEphPub, locIsLeast) + // Compute common diffie hellman secret using X25519. + dhSecret := computeDHSecret(remEphPub, locEphPriv) - // Generate common challenge to sign. - challenge := genChallenge(loEphPub, hiEphPub) + // generate the secret used for receiving, sending, challenge via hkdf-sha2 on dhSecret + recvSecret, sendSecret, challenge := deriveSecretAndChallenge(dhSecret, locIsLeast) // Construct SecretConnection. sc := &SecretConnection{ conn: conn, recvBuffer: nil, - recvNonce: recvNonce, - sendNonce: sendNonce, - shrSecret: shrSecret, + recvNonce: new([aeadNonceSize]byte), + sendNonce: new([aeadNonceSize]byte), + recvSecret: recvSecret, + sendSecret: sendSecret, } // Sign the challenge bytes for authentication. @@ -90,6 +93,7 @@ func MakeSecretConnection(conn io.ReadWriteCloser, locPrivKey crypto.PrivKey) (* if err != nil { return nil, err } + remPubKey, remSignature := authSigMsg.Key, authSigMsg.Sig if !remPubKey.VerifyBytes(challenge[:], remSignature) { return nil, errors.New("Challenge verification failed") @@ -100,7 +104,7 @@ func MakeSecretConnection(conn io.ReadWriteCloser, locPrivKey crypto.PrivKey) (* return sc, nil } -// Returns authenticated remote pubkey +// RemotePubKey returns authenticated remote pubkey func (sc *SecretConnection) RemotePubKey() crypto.PubKey { return sc.remPubKey } @@ -122,15 +126,14 @@ func (sc *SecretConnection) Write(data []byte) (n int, err error) { binary.BigEndian.PutUint32(frame, uint32(chunkLength)) copy(frame[dataLenSize:], chunk) - aead, err := xchacha20poly1305.New(sc.shrSecret[:]) + aead, err := chacha20poly1305.New(sc.sendSecret[:]) if err != nil { return n, errors.New("Invalid SecretConnection Key") } // encrypt the frame - var sealedFrame = make([]byte, aead.Overhead()+totalFrameSize) + var sealedFrame = make([]byte, aeadSizeOverhead+totalFrameSize) aead.Seal(sealedFrame[:0], sc.sendNonce[:], frame, nil) - // fmt.Printf("secretbox.Seal(sealed:%X,sendNonce:%X,shrSecret:%X\n", sealedFrame, sc.sendNonce, sc.shrSecret) - incr2Nonce(sc.sendNonce) + incrNonce(sc.sendNonce) // end encryption _, err = sc.conn.Write(sealedFrame) @@ -150,11 +153,11 @@ func (sc *SecretConnection) Read(data []byte) (n int, err error) { return } - aead, err := xchacha20poly1305.New(sc.shrSecret[:]) + aead, err := chacha20poly1305.New(sc.recvSecret[:]) if err != nil { return n, errors.New("Invalid SecretConnection Key") } - sealedFrame := make([]byte, totalFrameSize+aead.Overhead()) + sealedFrame := make([]byte, totalFrameSize+aeadSizeOverhead) _, err = io.ReadFull(sc.conn, sealedFrame) if err != nil { return @@ -162,12 +165,11 @@ func (sc *SecretConnection) Read(data []byte) (n int, err error) { // decrypt the frame var frame = make([]byte, totalFrameSize) - // fmt.Printf("secretbox.Open(sealed:%X,recvNonce:%X,shrSecret:%X\n", sealedFrame, sc.recvNonce, sc.shrSecret) _, err = aead.Open(frame[:0], sc.recvNonce[:], sealedFrame, nil) if err != nil { return n, errors.New("Failed to decrypt SecretConnection") } - incr2Nonce(sc.recvNonce) + incrNonce(sc.recvNonce) // end decryption var chunkLength = binary.BigEndian.Uint32(frame) // read the first two bytes @@ -182,6 +184,7 @@ func (sc *SecretConnection) Read(data []byte) (n int, err error) { } // Implements net.Conn +// nolint func (sc *SecretConnection) Close() error { return sc.conn.Close() } func (sc *SecretConnection) LocalAddr() net.Addr { return sc.conn.(net.Conn).LocalAddr() } func (sc *SecretConnection) RemoteAddr() net.Addr { return sc.conn.(net.Conn).RemoteAddr() } @@ -210,18 +213,16 @@ func shareEphPubKey(conn io.ReadWriteCloser, locEphPub *[32]byte) (remEphPub *[3 var _, err1 = cdc.MarshalBinaryWriter(conn, locEphPub) if err1 != nil { return nil, err1, true // abort - } else { - return nil, nil, false } + return nil, nil, false }, func(_ int) (val interface{}, err error, abort bool) { var _remEphPub [32]byte var _, err2 = cdc.UnmarshalBinaryReader(conn, &_remEphPub, 1024*1024) // TODO if err2 != nil { return nil, err2, true // abort - } else { - return _remEphPub, nil, false } + return _remEphPub, nil, false }, ) @@ -236,9 +237,40 @@ func shareEphPubKey(conn io.ReadWriteCloser, locEphPub *[32]byte) (remEphPub *[3 return &_remEphPub, nil } -func computeSharedSecret(remPubKey, locPrivKey *[32]byte) (shrSecret *[32]byte) { - shrSecret = new([32]byte) - box.Precompute(shrSecret, remPubKey, locPrivKey) +func deriveSecretAndChallenge(dhSecret *[32]byte, locIsLeast bool) (recvSecret, sendSecret *[aeadKeySize]byte, challenge *[32]byte) { + hash := sha256.New + hkdf := hkdf.New(hash, dhSecret[:], nil, []byte("TENDERMINT_SECRET_CONNECTION_KEY_AND_CHALLENGE_GEN")) + // get enough data for 2 aead keys, and a 32 byte challenge + res := new([2*aeadKeySize + 32]byte) + _, err := io.ReadFull(hkdf, res[:]) + if err != nil { + panic(err) + } + + challenge = new([32]byte) + recvSecret = new([aeadKeySize]byte) + sendSecret = new([aeadKeySize]byte) + // Use the last 32 bytes as the challenge + copy(challenge[:], res[2*aeadKeySize:2*aeadKeySize+32]) + + // bytes 0 through aeadKeySize - 1 are one aead key. + // bytes aeadKeySize through 2*aeadKeySize -1 are another aead key. + // which key corresponds to sending and receiving key depends on whether + // the local key is less than the remote key. + if locIsLeast { + copy(recvSecret[:], res[0:aeadKeySize]) + copy(sendSecret[:], res[aeadKeySize:aeadKeySize*2]) + } else { + copy(sendSecret[:], res[0:aeadKeySize]) + copy(recvSecret[:], res[aeadKeySize:aeadKeySize*2]) + } + + return +} + +func computeDHSecret(remPubKey, locPrivKey *[32]byte) (shrKey *[32]byte) { + shrKey = new([32]byte) + curve25519.ScalarMult(shrKey, locPrivKey, remPubKey) return } @@ -253,25 +285,6 @@ func sort32(foo, bar *[32]byte) (lo, hi *[32]byte) { return } -func genNonces(loPubKey, hiPubKey *[32]byte, locIsLo bool) (recvNonce, sendNonce *[24]byte) { - nonce1 := hash24(append(loPubKey[:], hiPubKey[:]...)) - nonce2 := new([24]byte) - copy(nonce2[:], nonce1[:]) - nonce2[len(nonce2)-1] ^= 0x01 - if locIsLo { - recvNonce = nonce1 - sendNonce = nonce2 - } else { - recvNonce = nonce2 - sendNonce = nonce1 - } - return -} - -func genChallenge(loPubKey, hiPubKey *[32]byte) (challenge *[32]byte) { - return hash32(append(loPubKey[:], hiPubKey[:]...)) -} - func signChallenge(challenge *[32]byte, locPrivKey crypto.PrivKey) (signature crypto.Signature) { signature, err := locPrivKey.Sign(challenge[:]) // TODO(ismail): let signChallenge return an error instead @@ -294,18 +307,16 @@ func shareAuthSignature(sc *SecretConnection, pubKey crypto.PubKey, signature cr var _, err1 = cdc.MarshalBinaryWriter(sc, authSigMessage{pubKey, signature}) if err1 != nil { return nil, err1, true // abort - } else { - return nil, nil, false } + return nil, nil, false }, func(_ int) (val interface{}, err error, abort bool) { var _recvMsg authSigMessage var _, err2 = cdc.UnmarshalBinaryReader(sc, &_recvMsg, 1024*1024) // TODO if err2 != nil { return nil, err2, true // abort - } else { - return _recvMsg, nil, false } + return _recvMsg, nil, false }, ) @@ -321,33 +332,11 @@ func shareAuthSignature(sc *SecretConnection, pubKey crypto.PubKey, signature cr //-------------------------------------------------------------------------------- -// sha256 -func hash32(input []byte) (res *[32]byte) { - hash := sha256.New - hkdf := hkdf.New(hash, input, nil, []byte("TENDERMINT_SECRET_CONNECTION_KEY_GEN")) - res = new([32]byte) - io.ReadFull(hkdf, res[:]) - return res -} - -func hash24(input []byte) (res *[24]byte) { - hash := sha256.New - hkdf := hkdf.New(hash, input, nil, []byte("TENDERMINT_SECRET_CONNECTION_NONCE_GEN")) - res = new([24]byte) - io.ReadFull(hkdf, res[:]) - return res -} - -// increment nonce big-endian by 2 with wraparound. -func incr2Nonce(nonce *[24]byte) { - incrNonce(nonce) - incrNonce(nonce) -} - // increment nonce big-endian by 1 with wraparound. -func incrNonce(nonce *[24]byte) { - for i := 23; 0 <= i; i-- { +func incrNonce(nonce *[aeadNonceSize]byte) { + for i := aeadNonceSize - 1; 0 <= i; i-- { nonce[i]++ + // if this byte wrapped around to zero, we need to increment the next byte if nonce[i] != 0 { return } From 9f1922979142798a945d0058e3db50cff8bacda9 Mon Sep 17 00:00:00 2001 From: Dev Ojha Date: Thu, 26 Jul 2018 01:18:55 -0700 Subject: [PATCH 20/44] .github: Split the issue template into two seperate templates (#2073) * .github: Split the issue template into two seperate templates Now we have different bug report and feature request templates. * Forgot to add the name, and about fields --- .github/ISSUE_TEMPLATE | 42 ----------------------- .github/ISSUE_TEMPLATE/bug-report.md | 38 ++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature-request.md | 13 +++++++ 3 files changed, 51 insertions(+), 42 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE create mode 100644 .github/ISSUE_TEMPLATE/bug-report.md create mode 100644 .github/ISSUE_TEMPLATE/feature-request.md diff --git a/.github/ISSUE_TEMPLATE b/.github/ISSUE_TEMPLATE deleted file mode 100644 index ed3caac5f..000000000 --- a/.github/ISSUE_TEMPLATE +++ /dev/null @@ -1,42 +0,0 @@ - - -**Is this a BUG REPORT or FEATURE REQUEST?** (choose one): - - - -**Tendermint version** (use `tendermint version` or `git rev-parse --verify HEAD` if installed from source): - - -**ABCI app** (name for built-in, URL for self-written if it's publicly available): - -**Environment**: -- **OS** (e.g. from /etc/os-release): -- **Install tools**: -- **Others**: - - -**What happened**: - - -**What you expected to happen**: - - -**How to reproduce it** (as minimally and precisely as possible): - -**Logs (you can paste a small part showing an error or link a pastebin, gist, etc. containing more of the log file)**: - -**Config (you can paste only the changes you've made)**: - -**`/dump_consensus_state` output for consensus bugs** - -**Anything else do we need to know**: diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md new file mode 100644 index 000000000..7ace32f24 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -0,0 +1,38 @@ +--- +name: Bug Report +about: Create a report to help us squash bugs! + +--- + + +**Tendermint version** (use `tendermint version` or `git rev-parse --verify HEAD` if installed from source): + + +**ABCI app** (name for built-in, URL for self-written if it's publicly available): + +**Environment**: +- **OS** (e.g. from /etc/os-release): +- **Install tools**: +- **Others**: + + +**What happened**: + + +**What you expected to happen**: + + +**How to reproduce it** (as minimally and precisely as possible): + +**Logs (paste a small part showing an error (< 10 lines) or link a pastebin, gist, etc. containing more of the log file)**: + +**Config (you can paste only the changes you've made)**: + +**`/dump_consensus_state` output for consensus bugs** + +**Anything else we need to know**: diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md new file mode 100644 index 000000000..e88fe61d4 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-request.md @@ -0,0 +1,13 @@ +--- +name: Feature Request +about: Create a proposal to request a feature + +--- + From 0e127562bf60228a0824c15c11eeeba7f1101d9f Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Thu, 26 Jul 2018 18:53:19 -0400 Subject: [PATCH 21/44] register evidence interface wherever its used --- blockchain/wire.go | 2 ++ consensus/reactor_test.go | 46 +++++++++++++++++++++++++++++++++++++++ consensus/types/wire.go | 2 ++ evidence/wire.go | 10 --------- types/evidence.go | 4 ++++ types/wire.go | 1 + 6 files changed, 55 insertions(+), 10 deletions(-) diff --git a/blockchain/wire.go b/blockchain/wire.go index ff02d58c1..cfd261abb 100644 --- a/blockchain/wire.go +++ b/blockchain/wire.go @@ -3,6 +3,7 @@ package blockchain import ( "github.com/tendermint/go-amino" cryptoAmino "github.com/tendermint/tendermint/crypto/encoding/amino" + "github.com/tendermint/tendermint/types" ) var cdc = amino.NewCodec() @@ -10,4 +11,5 @@ var cdc = amino.NewCodec() func init() { RegisterBlockchainMessages(cdc) cryptoAmino.RegisterAmino(cdc) + types.RegisterEvidences(cdc) } diff --git a/consensus/reactor_test.go b/consensus/reactor_test.go index 9e2aa0a0b..90def612b 100644 --- a/consensus/reactor_test.go +++ b/consensus/reactor_test.go @@ -13,6 +13,7 @@ import ( "github.com/tendermint/tendermint/abci/example/kvstore" cmn "github.com/tendermint/tendermint/libs/common" "github.com/tendermint/tendermint/libs/log" + sm "github.com/tendermint/tendermint/state" cfg "github.com/tendermint/tendermint/config" "github.com/tendermint/tendermint/p2p" @@ -91,6 +92,51 @@ func TestReactorBasic(t *testing.T) { }, css) } +// Ensure we can process blocks with evidence +func TestReactorWithEvidence(t *testing.T) { + N := 4 + css := randConsensusNet(N, "consensus_reactor_test", newMockTickerFunc(true), newCounter) + evpool := mockEvidencePool{ + t: t, + ev: []types.Evidence{types.NewMockGoodEvidence(1, 1, []byte("somone"))}, + } + for i := 0; i < N; i++ { + css[i].evpool = evpool + } + reactors, eventChans, eventBuses := startConsensusNet(t, css, N) + defer stopConsensusNet(log.TestingLogger(), reactors, eventBuses) + // wait till everyone makes the first new block + timeoutWaitGroup(t, N, func(j int) { + <-eventChans[j] + }, css) + + // second block should have evidence + timeoutWaitGroup(t, N, func(j int) { + <-eventChans[j] + }, css) +} + +type mockEvidencePool struct { + height int + ev []types.Evidence + t *testing.T +} + +func (m mockEvidencePool) PendingEvidence() []types.Evidence { + if m.height > 0 { + return m.ev + } + return nil +} +func (m mockEvidencePool) AddEvidence(types.Evidence) error { return nil } +func (m mockEvidencePool) Update(block *types.Block, state sm.State) { + m.height += 1 + + if m.height > 0 { + require.True(m.t, len(block.Evidence.Evidence) > 0) + } +} + // Ensure a testnet sends proposal heartbeats and makes blocks when there are txs func TestReactorProposalHeartbeats(t *testing.T) { N := 4 diff --git a/consensus/types/wire.go b/consensus/types/wire.go index 9221de968..c0b858ddf 100644 --- a/consensus/types/wire.go +++ b/consensus/types/wire.go @@ -3,10 +3,12 @@ package types import ( "github.com/tendermint/go-amino" cryptoAmino "github.com/tendermint/tendermint/crypto/encoding/amino" + "github.com/tendermint/tendermint/types" ) var cdc = amino.NewCodec() func init() { cryptoAmino.RegisterAmino(cdc) + types.RegisterEvidences(cdc) } diff --git a/evidence/wire.go b/evidence/wire.go index c61b86184..73ff33b2b 100644 --- a/evidence/wire.go +++ b/evidence/wire.go @@ -12,14 +12,4 @@ func init() { RegisterEvidenceMessages(cdc) cryptoAmino.RegisterAmino(cdc) types.RegisterEvidences(cdc) - RegisterMockEvidences(cdc) // For testing -} - -//------------------------------------------- - -func RegisterMockEvidences(cdc *amino.Codec) { - cdc.RegisterConcrete(types.MockGoodEvidence{}, - "tendermint/MockGoodEvidence", nil) - cdc.RegisterConcrete(types.MockBadEvidence{}, - "tendermint/MockBadEvidence", nil) } diff --git a/types/evidence.go b/types/evidence.go index 6313f43a5..b04d0ece5 100644 --- a/types/evidence.go +++ b/types/evidence.go @@ -41,6 +41,10 @@ type Evidence interface { func RegisterEvidences(cdc *amino.Codec) { cdc.RegisterInterface((*Evidence)(nil), nil) cdc.RegisterConcrete(&DuplicateVoteEvidence{}, "tendermint/DuplicateVoteEvidence", nil) + + // mocks + cdc.RegisterConcrete(&MockGoodEvidence{}, "tendermint/MockGoodEvidence", nil) + cdc.RegisterConcrete(&MockBadEvidence{}, "tendermint/MockBadEvidence", nil) } //------------------------------------------- diff --git a/types/wire.go b/types/wire.go index 9221de968..4f7a38c59 100644 --- a/types/wire.go +++ b/types/wire.go @@ -9,4 +9,5 @@ var cdc = amino.NewCodec() func init() { cryptoAmino.RegisterAmino(cdc) + RegisterEvidences(cdc) } From e4dfab6349026c40bd737933a1ff86e6dcb033ef Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Thu, 26 Jul 2018 18:54:15 -0400 Subject: [PATCH 22/44] changelog and version --- CHANGELOG.md | 9 +++++++++ version/version.go | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 929d11d97..c0dca0af1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## 0.22.7 + +*July 26th, 2018* + +BUG FIXES + +- [consensus, blockchain] Register the Evidence interface so it can be + marshalled/unmarshalled by the blockchain and consensus reactors + ## 0.22.6 *July 24th, 2018* diff --git a/version/version.go b/version/version.go index 5ef4aadbf..474c43a38 100644 --- a/version/version.go +++ b/version/version.go @@ -4,13 +4,13 @@ package version const ( Maj = "0" Min = "22" - Fix = "6" + Fix = "7" ) var ( // Version is the current version of Tendermint // Must be a string because scripts like dist.sh read this file. - Version = "0.22.6" + Version = "0.22.7" // GitCommit is the current HEAD set using ldflags. GitCommit string From 49b52ee3c77e1e7350de801c65b76961f6b9b934 Mon Sep 17 00:00:00 2001 From: Hendrik Hofstadt Date: Fri, 27 Jul 2018 00:41:15 +0200 Subject: [PATCH 23/44] Add test for MakePartSet with evidence --- types/block_test.go | 21 ++++++++++++++++++++- types/evidence.go | 4 ++-- types/wire.go | 2 +- 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/types/block_test.go b/types/block_test.go index 714029bf2..50695c84b 100644 --- a/types/block_test.go +++ b/types/block_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - crypto "github.com/tendermint/tendermint/crypto" + "github.com/tendermint/tendermint/crypto" cmn "github.com/tendermint/tendermint/libs/common" ) @@ -101,6 +101,25 @@ func TestBlockMakePartSet(t *testing.T) { assert.Equal(t, 1, partSet.Total()) } +func TestBlockMakePartSetWithEvidence(t *testing.T) { + assert.Nil(t, (*Block)(nil).MakePartSet(2)) + + txs := []Tx{Tx("foo"), Tx("bar")} + lastID := makeBlockIDRandom() + h := int64(3) + + voteSet, valSet, vals := randVoteSet(h-1, 1, VoteTypePrecommit, 10, 1) + commit, err := MakeCommit(lastID, h-1, 1, voteSet, vals) + require.NoError(t, err) + + ev := NewMockGoodEvidence(h, 0, valSet.Validators[0].Address) + evList := []Evidence{ev} + + partSet := MakeBlock(h, txs, commit, evList).MakePartSet(1024) + assert.NotNil(t, partSet) + assert.Equal(t, 3, partSet.Total()) +} + func TestBlockHashesTo(t *testing.T) { assert.False(t, (*Block)(nil).HashesTo(nil)) diff --git a/types/evidence.go b/types/evidence.go index b04d0ece5..92675868f 100644 --- a/types/evidence.go +++ b/types/evidence.go @@ -43,8 +43,8 @@ func RegisterEvidences(cdc *amino.Codec) { cdc.RegisterConcrete(&DuplicateVoteEvidence{}, "tendermint/DuplicateVoteEvidence", nil) // mocks - cdc.RegisterConcrete(&MockGoodEvidence{}, "tendermint/MockGoodEvidence", nil) - cdc.RegisterConcrete(&MockBadEvidence{}, "tendermint/MockBadEvidence", nil) + cdc.RegisterConcrete(MockGoodEvidence{}, "tendermint/MockGoodEvidence", nil) + cdc.RegisterConcrete(MockBadEvidence{}, "tendermint/MockBadEvidence", nil) } //------------------------------------------- diff --git a/types/wire.go b/types/wire.go index 4f7a38c59..569ea3213 100644 --- a/types/wire.go +++ b/types/wire.go @@ -2,7 +2,7 @@ package types import ( "github.com/tendermint/go-amino" - cryptoAmino "github.com/tendermint/tendermint/crypto/encoding/amino" + "github.com/tendermint/tendermint/crypto/encoding/amino" ) var cdc = amino.NewCodec() From 6241e6b927b0c2cd9830316dc88c56585b9a85a3 Mon Sep 17 00:00:00 2001 From: Dev Ojha Date: Thu, 26 Jul 2018 17:10:58 -0700 Subject: [PATCH 24/44] libs: update BitArray go docs (#2079) --- libs/common/bit_array.go | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/libs/common/bit_array.go b/libs/common/bit_array.go index 0290921a6..50c6f12e3 100644 --- a/libs/common/bit_array.go +++ b/libs/common/bit_array.go @@ -8,13 +8,15 @@ import ( "sync" ) +// BitArray is a thread-safe implementation of a bit array. type BitArray struct { mtx sync.Mutex Bits int `json:"bits"` // NOTE: persisted via reflect, must be exported Elems []uint64 `json:"elems"` // NOTE: persisted via reflect, must be exported } -// There is no BitArray whose Size is 0. Use nil instead. +// NewBitArray returns a new bit array. +// It returns nil if the number of bits is zero. func NewBitArray(bits int) *BitArray { if bits <= 0 { return nil @@ -25,6 +27,7 @@ func NewBitArray(bits int) *BitArray { } } +// Size returns the number of bits in the bitarray func (bA *BitArray) Size() int { if bA == nil { return 0 @@ -32,7 +35,8 @@ func (bA *BitArray) Size() int { return bA.Bits } -// NOTE: behavior is undefined if i >= bA.Bits +// GetIndex returns the bit at index i within the bit array. +// The behavior is undefined if i >= bA.Bits func (bA *BitArray) GetIndex(i int) bool { if bA == nil { return false @@ -49,7 +53,8 @@ func (bA *BitArray) getIndex(i int) bool { return bA.Elems[i/64]&(uint64(1)< 0 } -// NOTE: behavior is undefined if i >= bA.Bits +// SetIndex sets the bit at index i within the bit array. +// The behavior is undefined if i >= bA.Bits func (bA *BitArray) SetIndex(i int, v bool) bool { if bA == nil { return false @@ -71,6 +76,7 @@ func (bA *BitArray) setIndex(i int, v bool) bool { return true } +// Copy returns a copy of the provided bit array. func (bA *BitArray) Copy() *BitArray { if bA == nil { return nil @@ -98,7 +104,9 @@ func (bA *BitArray) copyBits(bits int) *BitArray { } } -// Returns a BitArray of larger bits size. +// Or returns a bit array resulting from a bitwise OR of the two bit arrays. +// If the two bit-arrys have different lengths, Or right-pads the smaller of the two bit-arrays with zeroes. +// Thus the size of the return value is the maximum of the two provided bit arrays. func (bA *BitArray) Or(o *BitArray) *BitArray { if bA == nil && o == nil { return nil @@ -118,7 +126,9 @@ func (bA *BitArray) Or(o *BitArray) *BitArray { return c } -// Returns a BitArray of smaller bit size. +// And returns a bit array resulting from a bitwise AND of the two bit arrays. +// If the two bit-arrys have different lengths, this truncates the larger of the two bit-arrays from the right. +// Thus the size of the return value is the minimum of the two provided bit arrays. func (bA *BitArray) And(o *BitArray) *BitArray { if bA == nil || o == nil { return nil @@ -136,6 +146,7 @@ func (bA *BitArray) and(o *BitArray) *BitArray { return c } +// Not returns a bit array resulting from a bitwise Not of the provided bit array. func (bA *BitArray) Not() *BitArray { if bA == nil { return nil // Degenerate @@ -149,6 +160,9 @@ func (bA *BitArray) Not() *BitArray { return c } +// Sub subtracts the two bit-arrays bitwise, without carrying the bits. +// This is essentially bA.And(o.Not()). +// If bA is longer than o, o is right padded with zeroes. func (bA *BitArray) Sub(o *BitArray) *BitArray { if bA == nil || o == nil { // TODO: Decide if we should do 1's complement here? @@ -173,6 +187,7 @@ func (bA *BitArray) Sub(o *BitArray) *BitArray { return bA.and(o.Not()) // Note degenerate case where o == nil } +// IsEmpty returns true iff all bits in the bit array are 0 func (bA *BitArray) IsEmpty() bool { if bA == nil { return true // should this be opposite? @@ -187,6 +202,7 @@ func (bA *BitArray) IsEmpty() bool { return true } +// IsFull returns true iff all bits in the bit array are 1. func (bA *BitArray) IsFull() bool { if bA == nil { return true @@ -207,6 +223,8 @@ func (bA *BitArray) IsFull() bool { return (lastElem+1)&((uint64(1)< Date: Fri, 27 Jul 2018 02:27:19 +0200 Subject: [PATCH 25/44] adr: PeerTransport (#2069) * p2p: Propose PeerTransport ADR * adr: Set status to in review * adr: Add high-level decision * adr: Extend on the idea of guards * adr: Rework guards into transport specific filters * adr: Rename to nodeAddr * adr: Incorporate review --- docs/architecture/adr-012-peer-transport.md | 113 ++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 docs/architecture/adr-012-peer-transport.md diff --git a/docs/architecture/adr-012-peer-transport.md b/docs/architecture/adr-012-peer-transport.md new file mode 100644 index 000000000..01a79c8a9 --- /dev/null +++ b/docs/architecture/adr-012-peer-transport.md @@ -0,0 +1,113 @@ +# ADR 012: PeerTransport + +## Context + +One of the more apparent problems with the current architecture in the p2p +package is that there is no clear separation of concerns between different +components. Most notably the `Switch` is currently doing physical connection +handling. An artifact is the dependency of the Switch on +`[config.P2PConfig`](https://github.com/tendermint/tendermint/blob/05a76fb517f50da27b4bfcdc7b4cf185fc61eff6/config/config.go#L272-L339). + +Addresses: +* [#2046](https://github.com/tendermint/tendermint/issues/2046) +* [#2047](https://github.com/tendermint/tendermint/issues/2047) + +First iteraton in [#2067](https://github.com/tendermint/tendermint/issues/2067) + +## Decision + +Transport concerns will be handled by a new component (`PeerTransport`) which +will provide Peers at its boundary to the caller. In turn `Switch` will use +this new component accept new `Peer`s and dial them based on `NetAddress`. + +### PeerTransport + +Responsible for emitting and connecting to Peers. The implementation of `Peer` +is left to the transport, which implies that the chosen transport dictates the +characteristics of the implementation handed back to the `Switch`. Each +transport implementation is responsible to filter establishing peers specific +to its domain, for the default multiplexed implementation the following will +apply: + +* connections from our own node +* handshake fails +* upgrade to secret connection fails +* prevent duplicate ip +* prevent duplicate id +* nodeinfo incompatibility + + +``` go +// PeerTransport proxies incoming and outgoing peer connections. +type PeerTransport interface { + // Accept returns a newly connected Peer. + Accept() (Peer, error) + + // Dial connects to a Peer. + Dial(NetAddress) (Peer, error) +} + +// EXAMPLE OF DEFAULT IMPLEMENTATION + +// multiplexTransport accepts tcp connections and upgrades to multiplexted +// peers. +type multiplexTransport struct { + listener net.Listener + + acceptc chan accept + closec <-chan struct{} + listenc <-chan struct{} + + dialTimeout time.Duration + handshakeTimeout time.Duration + nodeAddr NetAddress + nodeInfo NodeInfo + nodeKey NodeKey + + // TODO(xla): Remove when MConnection is refactored into mPeer. + mConfig conn.MConnConfig +} + +var _ PeerTransport = (*multiplexTransport)(nil) + +// NewMTransport returns network connected multiplexed peers. +func NewMTransport( + nodeAddr NetAddress, + nodeInfo NodeInfo, + nodeKey NodeKey, +) *multiplexTransport +``` + +### Switch + +From now the Switch will depend on a fully setup `PeerTransport` to +retrieve/reach out to its peers. As the more low-level concerns are pushed to +the transport, we can omit passing the `config.P2PConfig` to the Switch. + +``` go +func NewSwitch(transport PeerTransport, opts ...SwitchOption) *Switch +``` + +## Status + +In Review. + +## Consequences + +### Positive + +* free Switch from transport concerns - simpler implementation +* pluggable transport implementation - simpler test setup +* remove Switch dependency on P2PConfig - easier to test + +### Negative + +* more setup for tests which depend on Switches + +### Neutral + +* multiplexed will be the default implementation + +[0] These guards could be potentially extended to be pluggable much like +middlewares to express different concerns required by differentally configured +environments. From d542d2c3945116697f60451e6a407082c41c3cc9 Mon Sep 17 00:00:00 2001 From: Jae Kwon Date: Thu, 26 Jul 2018 18:08:09 -0700 Subject: [PATCH 26/44] Fix 0.22.7, bump to 0.22.8 --- CHANGELOG.md | 8 ++++++++ blockchain/wire.go | 4 +--- consensus/types/wire.go | 4 +--- consensus/wire.go | 4 ++-- lite/files/wire.go | 4 ++-- rpc/core/types/wire.go | 4 +--- types/wire.go | 4 ++++ version/version.go | 4 ++-- 8 files changed, 21 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c0dca0af1..0c7446783 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.22.8 + +*July 26th, 2018* + +BUG FIXES + +- [consensus, blockchain] Fix 0.22.7 below. + ## 0.22.7 *July 26th, 2018* diff --git a/blockchain/wire.go b/blockchain/wire.go index cfd261abb..91156fa8f 100644 --- a/blockchain/wire.go +++ b/blockchain/wire.go @@ -2,7 +2,6 @@ package blockchain import ( "github.com/tendermint/go-amino" - cryptoAmino "github.com/tendermint/tendermint/crypto/encoding/amino" "github.com/tendermint/tendermint/types" ) @@ -10,6 +9,5 @@ var cdc = amino.NewCodec() func init() { RegisterBlockchainMessages(cdc) - cryptoAmino.RegisterAmino(cdc) - types.RegisterEvidences(cdc) + types.RegisterBlockAmino(cdc) } diff --git a/consensus/types/wire.go b/consensus/types/wire.go index c0b858ddf..db674816d 100644 --- a/consensus/types/wire.go +++ b/consensus/types/wire.go @@ -2,13 +2,11 @@ package types import ( "github.com/tendermint/go-amino" - cryptoAmino "github.com/tendermint/tendermint/crypto/encoding/amino" "github.com/tendermint/tendermint/types" ) var cdc = amino.NewCodec() func init() { - cryptoAmino.RegisterAmino(cdc) - types.RegisterEvidences(cdc) + types.RegisterBlockAmino(cdc) } diff --git a/consensus/wire.go b/consensus/wire.go index cc172bead..567e6095e 100644 --- a/consensus/wire.go +++ b/consensus/wire.go @@ -2,7 +2,7 @@ package consensus import ( "github.com/tendermint/go-amino" - cryptoAmino "github.com/tendermint/tendermint/crypto/encoding/amino" + "github.com/tendermint/tendermint/types" ) var cdc = amino.NewCodec() @@ -10,5 +10,5 @@ var cdc = amino.NewCodec() func init() { RegisterConsensusMessages(cdc) RegisterWALMessages(cdc) - cryptoAmino.RegisterAmino(cdc) + types.RegisterBlockAmino(cdc) } diff --git a/lite/files/wire.go b/lite/files/wire.go index f45e4c630..e7864831e 100644 --- a/lite/files/wire.go +++ b/lite/files/wire.go @@ -2,11 +2,11 @@ package files import ( "github.com/tendermint/go-amino" - cryptoAmino "github.com/tendermint/tendermint/crypto/encoding/amino" + "github.com/tendermint/tendermint/types" ) var cdc = amino.NewCodec() func init() { - cryptoAmino.RegisterAmino(cdc) + types.RegisterBlockAmino(cdc) } diff --git a/rpc/core/types/wire.go b/rpc/core/types/wire.go index d49b977eb..ef1fa8001 100644 --- a/rpc/core/types/wire.go +++ b/rpc/core/types/wire.go @@ -2,12 +2,10 @@ package core_types import ( "github.com/tendermint/go-amino" - cryptoAmino "github.com/tendermint/tendermint/crypto/encoding/amino" "github.com/tendermint/tendermint/types" ) func RegisterAmino(cdc *amino.Codec) { types.RegisterEventDatas(cdc) - types.RegisterEvidences(cdc) - cryptoAmino.RegisterAmino(cdc) + types.RegisterBlockAmino(cdc) } diff --git a/types/wire.go b/types/wire.go index 569ea3213..c56089983 100644 --- a/types/wire.go +++ b/types/wire.go @@ -8,6 +8,10 @@ import ( var cdc = amino.NewCodec() func init() { + RegisterBlockAmino(cdc) +} + +func RegisterBlockAmino(cdc *amino.Codec) { cryptoAmino.RegisterAmino(cdc) RegisterEvidences(cdc) } diff --git a/version/version.go b/version/version.go index 474c43a38..85b1f1918 100644 --- a/version/version.go +++ b/version/version.go @@ -4,13 +4,13 @@ package version const ( Maj = "0" Min = "22" - Fix = "7" + Fix = "8" ) var ( // Version is the current version of Tendermint // Must be a string because scripts like dist.sh read this file. - Version = "0.22.7" + Version = "0.22.8" // GitCommit is the current HEAD set using ldflags. GitCommit string From bc526f18a4b053aa111dc170a08f157b50526d3e Mon Sep 17 00:00:00 2001 From: Dev Ojha Date: Thu, 26 Jul 2018 19:21:08 -0700 Subject: [PATCH 27/44] libs: Make bitarray functions lock parameters that aren't the caller (#2081) This now makes bit array functions which take in a second bit array, thread safe. Previously there was a warning on bitarray.Update to be lock the second parameter externally if thread safety wasrequired. This was not done within the codebase, so it was fine to change here. Closes #2080 --- CHANGELOG_PENDING.md | 1 + libs/common/bit_array.go | 36 ++++++++++++++++++++++++++---------- 2 files changed, 27 insertions(+), 10 deletions(-) diff --git a/CHANGELOG_PENDING.md b/CHANGELOG_PENDING.md index 3bb4940ce..627632945 100644 --- a/CHANGELOG_PENDING.md +++ b/CHANGELOG_PENDING.md @@ -17,6 +17,7 @@ IMPROVEMENTS: - tweak params - only process one block at a time to avoid starving - [crypto] Switch hkdfchachapoly1305 to xchachapoly1305 +- [common] bit array functions which take in another parameter are now thread safe BUG FIXES: - [privval] fix a deadline for accepting new connections in socket private diff --git a/libs/common/bit_array.go b/libs/common/bit_array.go index 50c6f12e3..abf6110d8 100644 --- a/libs/common/bit_array.go +++ b/libs/common/bit_array.go @@ -118,7 +118,11 @@ func (bA *BitArray) Or(o *BitArray) *BitArray { return bA.Copy() } bA.mtx.Lock() - defer bA.mtx.Unlock() + o.mtx.Lock() + defer func() { + bA.mtx.Unlock() + o.mtx.Unlock() + }() c := bA.copyBits(MaxInt(bA.Bits, o.Bits)) for i := 0; i < len(c.Elems); i++ { c.Elems[i] |= o.Elems[i] @@ -134,7 +138,11 @@ func (bA *BitArray) And(o *BitArray) *BitArray { return nil } bA.mtx.Lock() - defer bA.mtx.Unlock() + o.mtx.Lock() + defer func() { + bA.mtx.Unlock() + o.mtx.Unlock() + }() return bA.and(o) } @@ -153,6 +161,10 @@ func (bA *BitArray) Not() *BitArray { } bA.mtx.Lock() defer bA.mtx.Unlock() + return bA.not() +} + +func (bA *BitArray) not() *BitArray { c := bA.copy() for i := 0; i < len(c.Elems); i++ { c.Elems[i] = ^c.Elems[i] @@ -169,7 +181,11 @@ func (bA *BitArray) Sub(o *BitArray) *BitArray { return nil } bA.mtx.Lock() - defer bA.mtx.Unlock() + o.mtx.Lock() + defer func() { + bA.mtx.Unlock() + o.mtx.Unlock() + }() if bA.Bits > o.Bits { c := bA.copy() for i := 0; i < len(o.Elems)-1; i++ { @@ -178,13 +194,12 @@ func (bA *BitArray) Sub(o *BitArray) *BitArray { i := len(o.Elems) - 1 if i >= 0 { for idx := i * 64; idx < o.Bits; idx++ { - // NOTE: each individual GetIndex() call to o is safe. - c.setIndex(idx, c.getIndex(idx) && !o.GetIndex(idx)) + c.setIndex(idx, c.getIndex(idx) && !o.getIndex(idx)) } } return c } - return bA.and(o.Not()) // Note degenerate case where o == nil + return bA.and(o.not()) // Note degenerate case where o == nil } // IsEmpty returns true iff all bits in the bit array are 0 @@ -332,15 +347,16 @@ func (bA *BitArray) Bytes() []byte { // Update sets the bA's bits to be that of the other bit array. // The copying begins from the begin of both bit arrays. -// Note, the other bitarray o is not locked when reading, -// so if necessary, caller must copy or lock o prior to calling Update. -// If bA is nil, does nothing. func (bA *BitArray) Update(o *BitArray) { if bA == nil || o == nil { return } bA.mtx.Lock() - defer bA.mtx.Unlock() + o.mtx.Lock() + defer func() { + bA.mtx.Unlock() + o.mtx.Unlock() + }() copy(bA.Elems, o.Elems) } From 96ae535fb88d14d69a0c1676f3d1348a5cf65a7e Mon Sep 17 00:00:00 2001 From: Anton Kaliaev Date: Fri, 27 Jul 2018 06:23:19 +0400 Subject: [PATCH 28/44] proto3 timestamp (#2064) This PR changes ABCI time format from int64 (Unix seconds) to WKT (WellKnownType) google.protobuf.Timestamp. Refs #1857 Reasons: better precision standard DT for proto * update Gopkg.lock * [makefile] remove extra grep - go list excludes vendor by default now * proto3 timestamp * [docs/abci-spec] note about serialisation format * make time non-nullable --- CHANGELOG_PENDING.md | 1 + Gopkg.lock | 43 +- Makefile | 4 +- abci/client/grpc_client.go | 24 +- abci/client/local_client.go | 2 +- abci/cmd/abci-cli/abci-cli.go | 4 +- abci/example/example_test.go | 2 +- abci/example/kvstore/kvstore_test.go | 8 +- abci/tests/test_app/app.go | 2 +- abci/types/application.go | 2 +- abci/types/messages.go | 10 +- abci/types/types.pb.go | 2678 ++++++++++++++++++++------ abci/types/types.proto | 7 +- abci/types/typespb_test.go | 1340 +++++++------ consensus/replay.go | 4 +- consensus/replay_test.go | 2 +- docs/app-dev/abci-spec.md | 13 +- mempool/mempool_test.go | 2 +- proxy/app_conn_test.go | 2 +- rpc/client/mock/abci.go | 4 +- rpc/core/abci.go | 2 +- state/execution.go | 2 +- state/execution_test.go | 12 +- types/protobuf.go | 4 +- 24 files changed, 2786 insertions(+), 1388 deletions(-) diff --git a/CHANGELOG_PENDING.md b/CHANGELOG_PENDING.md index 627632945..5bb79e4f6 100644 --- a/CHANGELOG_PENDING.md +++ b/CHANGELOG_PENDING.md @@ -6,6 +6,7 @@ BREAKING CHANGES: - [abci] Removed Fee from ResponseDeliverTx and ResponseCheckTx - [tools] Removed `make ensure_deps` in favor of `make get_vendor_deps` - [p2p] Remove salsa and ripemd primitives, in favor of using chacha as a stream cipher, and hkdf +- [abci] Changed time format from int64 to google.protobuf.Timestamp FEATURES: - [tools] Added `make check_dep` diff --git a/Gopkg.lock b/Gopkg.lock index 8bad303bd..aa9a1ff2f 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -11,14 +11,14 @@ [[projects]] branch = "master" - digest = "1:6aabc1566d6351115d561d038da82a4c19b46c3b6e17f4a0a2fa60260663dc79" + digest = "1:2c00f064ba355903866cbfbf3f7f4c0fe64af6638cc7d1b8bdcf3181bc67f1d8" name = "github.com/btcsuite/btcd" packages = ["btcec"] pruneopts = "UT" revision = "9a2f9524024889e129a5422aca2cff73cb3eabf6" [[projects]] - digest = "1:df684ed7fed3fb406ec421424aaf5fc9c63ccc2f428b25b842da78e634482e4b" + digest = "1:1d8e1cb71c33a9470bbbae09bfec09db43c6bf358dfcae13cd8807c4e2a9a2bf" name = "github.com/btcsuite/btcutil" packages = [ "base58", @@ -59,7 +59,7 @@ version = "v1.4.7" [[projects]] - digest = "1:fa30c0652956e159cdb97dcb2ef8b8db63ed668c02a5c3a40961c8f0641252fe" + digest = "1:fdf5169073fb0ad6dc12a70c249145e30f4058647bea25f0abd48b6d9f228a11" name = "github.com/go-kit/kit" packages = [ "log", @@ -91,7 +91,7 @@ version = "v1.7.0" [[projects]] - digest = "1:212285efb97b9ec2e20550d81f0446cb7897e57cbdfd7301b1363ab113d8be45" + digest = "1:35621fe20f140f05a0c4ef662c26c0ab4ee50bca78aa30fe87d33120bd28165e" name = "github.com/gogo/protobuf" packages = [ "gogoproto", @@ -106,7 +106,7 @@ version = "v1.1.1" [[projects]] - digest = "1:cb22af0ed7c72d495d8be1106233ee553898950f15fd3f5404406d44c2e86888" + digest = "1:17fe264ee908afc795734e8c4e63db2accabaf57326dbf21763a7d6b86096260" name = "github.com/golang/protobuf" packages = [ "proto", @@ -137,13 +137,12 @@ [[projects]] branch = "master" - digest = "1:8951fe6e358876736d8fa1f3992624fdbb2dec6bc49401c1381d1ef8abbb544f" + digest = "1:12247a2e99a060cc692f6680e5272c8adf0b8f572e6bce0d7095e624c958a240" name = "github.com/hashicorp/hcl" packages = [ ".", "hcl/ast", "hcl/parser", - "hcl/printer", "hcl/scanner", "hcl/strconv", "hcl/token", @@ -226,7 +225,7 @@ version = "v1.0.0" [[projects]] - digest = "1:98225904b7abff96c052b669b25788f18225a36673fba022fb93514bb9a2a64e" + digest = "1:c1a04665f9613e082e1209cf288bf64f4068dcd6c87a64bf1c4ff006ad422ba0" name = "github.com/prometheus/client_golang" packages = [ "prometheus", @@ -237,7 +236,7 @@ [[projects]] branch = "master" - digest = "1:0f37e09b3e92aaeda5991581311f8dbf38944b36a3edec61cc2d1991f527554a" + digest = "1:2d5cd61daa5565187e1d96bae64dbbc6080dacf741448e9629c64fd93203b0d4" name = "github.com/prometheus/client_model" packages = ["go"] pruneopts = "UT" @@ -245,7 +244,7 @@ [[projects]] branch = "master" - digest = "1:4d291d51042ed9de40eef61a3c1b56e969d6e0f8aa5fd3da5e958ec66bee68e4" + digest = "1:e469cd65badf7694aeb44874518606d93c1d59e7735d3754ad442782437d3cc3" name = "github.com/prometheus/common" packages = [ "expfmt", @@ -257,7 +256,7 @@ [[projects]] branch = "master" - digest = "1:a37c98f4b7a66bb5c539c0539f0915a74ef1c8e0b3b6f45735289d94cae92bfd" + digest = "1:8c49953a1414305f2ff5465147ee576dd705487c35b15918fcd4efdc0cb7a290" name = "github.com/prometheus/procfs" packages = [ ".", @@ -276,7 +275,7 @@ revision = "e2704e165165ec55d062f5919b4b29494e9fa790" [[projects]] - digest = "1:37ace7f35375adec11634126944bdc45a673415e2fcc07382d03b75ec76ea94c" + digest = "1:bd1ae00087d17c5a748660b8e89e1043e1e5479d0fea743352cda2f8dd8c4f84" name = "github.com/spf13/afero" packages = [ ".", @@ -295,7 +294,7 @@ version = "v1.2.0" [[projects]] - digest = "1:627ab2f549a6a55c44f46fa24a4307f4d0da81bfc7934ed0473bf38b24051d26" + digest = "1:7ffc0983035bc7e297da3688d9fe19d60a420e9c38bef23f845c53788ed6a05e" name = "github.com/spf13/cobra" packages = ["."] pruneopts = "UT" @@ -327,7 +326,7 @@ version = "v1.0.0" [[projects]] - digest = "1:73697231b93fb74a73ebd8384b68b9a60c57ea6b13c56d2425414566a72c8e6d" + digest = "1:7e8d267900c7fa7f35129a2a37596e38ed0f11ca746d6d9ba727980ee138f9f6" name = "github.com/stretchr/testify" packages = [ "assert", @@ -339,7 +338,7 @@ [[projects]] branch = "master" - digest = "1:922191411ad8f61bcd8018ac127589bb489712c1d1a0ab2497aca4b16de417d2" + digest = "1:b3cfb8d82b1601a846417c3f31c03a7961862cb2c98dcf0959c473843e6d9a2b" name = "github.com/syndtr/goleveldb" packages = [ "leveldb", @@ -360,7 +359,7 @@ [[projects]] branch = "master" - digest = "1:203b409c21115233a576f99e8f13d8e07ad82b25500491f7e1cca12588fb3232" + digest = "1:087aaa7920e5d0bf79586feb57ce01c35c830396ab4392798112e8aae8c47722" name = "github.com/tendermint/ed25519" packages = [ ".", @@ -380,7 +379,7 @@ [[projects]] branch = "master" - digest = "1:df132ec33d5acb4a1ab58d637f1bc3557be49456ca59b9198f5c1e7fa32e0d31" + digest = "1:c31a37cafc12315b8bd745c8ad6a006ac25350472488162a821e557b3e739d67" name = "golang.org/x/crypto" packages = [ "bcrypt", @@ -402,7 +401,7 @@ revision = "c126467f60eb25f8f27e5a981f32a87e3965053f" [[projects]] - digest = "1:04dda8391c3e2397daf254ac68003f30141c069b228d06baec8324a5f81dc1e9" + digest = "1:d36f55a999540d29b6ea3c2ea29d71c76b1d9853fdcd3e5c5cb4836f2ba118f1" name = "golang.org/x/net" packages = [ "context", @@ -419,7 +418,7 @@ [[projects]] branch = "master" - digest = "1:bff8bf6fa46b4d638d61b48320e3c6da8f8ba190672a82cdb8cedafb1f9501b0" + digest = "1:12ff7b51d336ea7e8b182aa3313679a37d53de64f84d2c3cbfd6a0237877e20a" name = "golang.org/x/sys" packages = [ "cpu", @@ -429,7 +428,7 @@ revision = "e072cadbbdc8dd3d3ffa82b8b4b9304c261d9311" [[projects]] - digest = "1:7509ba4347d1f8de6ae9be8818b0cd1abc3deeffe28aeaf4be6d4b6b5178d9ca" + digest = "1:a2ab62866c75542dd18d2b069fec854577a20211d7c0ea6ae746072a1dccdd18" name = "golang.org/x/text" packages = [ "collate", @@ -459,7 +458,7 @@ revision = "7fd901a49ba6a7f87732eb344f6e3c5b19d1b200" [[projects]] - digest = "1:4515e3030c440845b046354fd5d57671238428b820deebce2e9dabb5cd3c51ac" + digest = "1:2dab32a43451e320e49608ff4542fdfc653c95dcc35d0065ec9c6c3dd540ed74" name = "google.golang.org/grpc" packages = [ ".", @@ -519,7 +518,9 @@ "github.com/gogo/protobuf/gogoproto", "github.com/gogo/protobuf/jsonpb", "github.com/gogo/protobuf/proto", + "github.com/gogo/protobuf/types", "github.com/golang/protobuf/proto", + "github.com/golang/protobuf/ptypes/timestamp", "github.com/gorilla/websocket", "github.com/jmhodges/levigo", "github.com/pkg/errors", diff --git a/Makefile b/Makefile index 7a7273b6f..45703c84b 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ GOTOOLS = \ github.com/gogo/protobuf/protoc-gen-gogo \ github.com/gogo/protobuf/gogoproto \ github.com/square/certstrap -PACKAGES=$(shell go list ./... | grep -v '/vendor/') +PACKAGES=$(shell go list ./...) INCLUDE = -I=. -I=${GOPATH}/src -I=${GOPATH}/src/github.com/gogo/protobuf/protobuf BUILD_TAGS?='tendermint' @@ -37,7 +37,7 @@ protoc_all: protoc_libs protoc_abci protoc_grpc ## If you get the following error, ## "error while loading shared libraries: libprotobuf.so.14: cannot open shared object file: No such file or directory" ## See https://stackoverflow.com/a/25518702 - protoc $(INCLUDE) $< --gogo_out=plugins=grpc:. + protoc $(INCLUDE) $< --gogo_out=Mgoogle/protobuf/timestamp.proto=github.com/golang/protobuf/ptypes/timestamp,plugins=grpc:. @echo "--> adding nolint declarations to protobuf generated files" @awk -i inplace '/^\s*package \w+/ { print "//nolint" }1' $@ diff --git a/abci/client/grpc_client.go b/abci/client/grpc_client.go index 502ee0fcd..a1f099468 100644 --- a/abci/client/grpc_client.go +++ b/abci/client/grpc_client.go @@ -63,7 +63,7 @@ RETRY_LOOP: ENSURE_CONNECTED: for { - _, err := client.Echo(context.Background(), &types.RequestEcho{"hello"}, grpc.FailFast(true)) + _, err := client.Echo(context.Background(), &types.RequestEcho{Message: "hello"}, grpc.FailFast(true)) if err == nil { break ENSURE_CONNECTED } @@ -129,7 +129,7 @@ func (cli *grpcClient) EchoAsync(msg string) *ReqRes { if err != nil { cli.StopForError(err) } - return cli.finishAsyncCall(req, &types.Response{&types.Response_Echo{res}}) + return cli.finishAsyncCall(req, &types.Response{Value: &types.Response_Echo{res}}) } func (cli *grpcClient) FlushAsync() *ReqRes { @@ -138,7 +138,7 @@ func (cli *grpcClient) FlushAsync() *ReqRes { if err != nil { cli.StopForError(err) } - return cli.finishAsyncCall(req, &types.Response{&types.Response_Flush{res}}) + return cli.finishAsyncCall(req, &types.Response{Value: &types.Response_Flush{res}}) } func (cli *grpcClient) InfoAsync(params types.RequestInfo) *ReqRes { @@ -147,7 +147,7 @@ func (cli *grpcClient) InfoAsync(params types.RequestInfo) *ReqRes { if err != nil { cli.StopForError(err) } - return cli.finishAsyncCall(req, &types.Response{&types.Response_Info{res}}) + return cli.finishAsyncCall(req, &types.Response{Value: &types.Response_Info{res}}) } func (cli *grpcClient) SetOptionAsync(params types.RequestSetOption) *ReqRes { @@ -156,7 +156,7 @@ func (cli *grpcClient) SetOptionAsync(params types.RequestSetOption) *ReqRes { if err != nil { cli.StopForError(err) } - return cli.finishAsyncCall(req, &types.Response{&types.Response_SetOption{res}}) + return cli.finishAsyncCall(req, &types.Response{Value: &types.Response_SetOption{res}}) } func (cli *grpcClient) DeliverTxAsync(tx []byte) *ReqRes { @@ -165,7 +165,7 @@ func (cli *grpcClient) DeliverTxAsync(tx []byte) *ReqRes { if err != nil { cli.StopForError(err) } - return cli.finishAsyncCall(req, &types.Response{&types.Response_DeliverTx{res}}) + return cli.finishAsyncCall(req, &types.Response{Value: &types.Response_DeliverTx{res}}) } func (cli *grpcClient) CheckTxAsync(tx []byte) *ReqRes { @@ -174,7 +174,7 @@ func (cli *grpcClient) CheckTxAsync(tx []byte) *ReqRes { if err != nil { cli.StopForError(err) } - return cli.finishAsyncCall(req, &types.Response{&types.Response_CheckTx{res}}) + return cli.finishAsyncCall(req, &types.Response{Value: &types.Response_CheckTx{res}}) } func (cli *grpcClient) QueryAsync(params types.RequestQuery) *ReqRes { @@ -183,7 +183,7 @@ func (cli *grpcClient) QueryAsync(params types.RequestQuery) *ReqRes { if err != nil { cli.StopForError(err) } - return cli.finishAsyncCall(req, &types.Response{&types.Response_Query{res}}) + return cli.finishAsyncCall(req, &types.Response{Value: &types.Response_Query{res}}) } func (cli *grpcClient) CommitAsync() *ReqRes { @@ -192,7 +192,7 @@ func (cli *grpcClient) CommitAsync() *ReqRes { if err != nil { cli.StopForError(err) } - return cli.finishAsyncCall(req, &types.Response{&types.Response_Commit{res}}) + return cli.finishAsyncCall(req, &types.Response{Value: &types.Response_Commit{res}}) } func (cli *grpcClient) InitChainAsync(params types.RequestInitChain) *ReqRes { @@ -201,7 +201,7 @@ func (cli *grpcClient) InitChainAsync(params types.RequestInitChain) *ReqRes { if err != nil { cli.StopForError(err) } - return cli.finishAsyncCall(req, &types.Response{&types.Response_InitChain{res}}) + return cli.finishAsyncCall(req, &types.Response{Value: &types.Response_InitChain{res}}) } func (cli *grpcClient) BeginBlockAsync(params types.RequestBeginBlock) *ReqRes { @@ -210,7 +210,7 @@ func (cli *grpcClient) BeginBlockAsync(params types.RequestBeginBlock) *ReqRes { if err != nil { cli.StopForError(err) } - return cli.finishAsyncCall(req, &types.Response{&types.Response_BeginBlock{res}}) + return cli.finishAsyncCall(req, &types.Response{Value: &types.Response_BeginBlock{res}}) } func (cli *grpcClient) EndBlockAsync(params types.RequestEndBlock) *ReqRes { @@ -219,7 +219,7 @@ func (cli *grpcClient) EndBlockAsync(params types.RequestEndBlock) *ReqRes { if err != nil { cli.StopForError(err) } - return cli.finishAsyncCall(req, &types.Response{&types.Response_EndBlock{res}}) + return cli.finishAsyncCall(req, &types.Response{Value: &types.Response_EndBlock{res}}) } func (cli *grpcClient) finishAsyncCall(req *types.Request, res *types.Response) *ReqRes { diff --git a/abci/client/local_client.go b/abci/client/local_client.go index 3d1f8d8e4..3ac3b6afa 100644 --- a/abci/client/local_client.go +++ b/abci/client/local_client.go @@ -149,7 +149,7 @@ func (app *localClient) FlushSync() error { } func (app *localClient) EchoSync(msg string) (*types.ResponseEcho, error) { - return &types.ResponseEcho{msg}, nil + return &types.ResponseEcho{Message: msg}, nil } func (app *localClient) InfoSync(req types.RequestInfo) (*types.ResponseInfo, error) { diff --git a/abci/cmd/abci-cli/abci-cli.go b/abci/cmd/abci-cli/abci-cli.go index e20244011..00bceec21 100644 --- a/abci/cmd/abci-cli/abci-cli.go +++ b/abci/cmd/abci-cli/abci-cli.go @@ -514,7 +514,7 @@ func cmdInfo(cmd *cobra.Command, args []string) error { if len(args) == 1 { version = args[0] } - res, err := client.InfoSync(types.RequestInfo{version}) + res, err := client.InfoSync(types.RequestInfo{Version: version}) if err != nil { return err } @@ -537,7 +537,7 @@ func cmdSetOption(cmd *cobra.Command, args []string) error { } key, val := args[0], args[1] - _, err := client.SetOptionSync(types.RequestSetOption{key, val}) + _, err := client.SetOptionSync(types.RequestSetOption{Key: key, Value: val}) if err != nil { return err } diff --git a/abci/example/example_test.go b/abci/example/example_test.go index bbb53b5af..7e8bd2e5e 100644 --- a/abci/example/example_test.go +++ b/abci/example/example_test.go @@ -132,7 +132,7 @@ func testGRPCSync(t *testing.T, app *types.GRPCApplication) { // Write requests for counter := 0; counter < numDeliverTxs; counter++ { // Send request - response, err := client.DeliverTx(context.Background(), &types.RequestDeliverTx{[]byte("test")}) + response, err := client.DeliverTx(context.Background(), &types.RequestDeliverTx{Tx: []byte("test")}) if err != nil { t.Fatalf("Error in GRPC DeliverTx: %v", err.Error()) } diff --git a/abci/example/kvstore/kvstore_test.go b/abci/example/kvstore/kvstore_test.go index 2d8f81272..6ef5a08f9 100644 --- a/abci/example/kvstore/kvstore_test.go +++ b/abci/example/kvstore/kvstore_test.go @@ -90,8 +90,8 @@ func TestPersistentKVStoreInfo(t *testing.T) { header := types.Header{ Height: int64(height), } - kvstore.BeginBlock(types.RequestBeginBlock{hash, header, nil, nil}) - kvstore.EndBlock(types.RequestEndBlock{header.Height}) + kvstore.BeginBlock(types.RequestBeginBlock{Hash: hash, Header: header}) + kvstore.EndBlock(types.RequestEndBlock{Height: header.Height}) kvstore.Commit() resInfo = kvstore.Info(types.RequestInfo{}) @@ -176,13 +176,13 @@ func makeApplyBlock(t *testing.T, kvstore types.Application, heightInt int, diff Height: height, } - kvstore.BeginBlock(types.RequestBeginBlock{hash, header, nil, nil}) + kvstore.BeginBlock(types.RequestBeginBlock{Hash: hash, Header: header}) for _, tx := range txs { if r := kvstore.DeliverTx(tx); r.IsErr() { t.Fatal(r) } } - resEndBlock := kvstore.EndBlock(types.RequestEndBlock{header.Height}) + resEndBlock := kvstore.EndBlock(types.RequestEndBlock{Height: header.Height}) kvstore.Commit() valsEqual(t, diff, resEndBlock.ValidatorUpdates) diff --git a/abci/tests/test_app/app.go b/abci/tests/test_app/app.go index a33f4ee9e..25ed2f582 100644 --- a/abci/tests/test_app/app.go +++ b/abci/tests/test_app/app.go @@ -26,7 +26,7 @@ func startClient(abciType string) abcicli.Client { } func setOption(client abcicli.Client, key, value string) { - _, err := client.SetOptionSync(types.RequestSetOption{key, value}) + _, err := client.SetOptionSync(types.RequestSetOption{Key: key, Value: value}) if err != nil { panicf("setting %v=%v: \nerr: %v", key, value, err) } diff --git a/abci/types/application.go b/abci/types/application.go index ef1bc92e5..88f8d001e 100644 --- a/abci/types/application.go +++ b/abci/types/application.go @@ -85,7 +85,7 @@ func NewGRPCApplication(app Application) *GRPCApplication { } func (app *GRPCApplication) Echo(ctx context.Context, req *RequestEcho) (*ResponseEcho, error) { - return &ResponseEcho{req.Message}, nil + return &ResponseEcho{Message: req.Message}, nil } func (app *GRPCApplication) Flush(ctx context.Context, req *RequestFlush) (*ResponseFlush, error) { diff --git a/abci/types/messages.go b/abci/types/messages.go index 52e4b6758..cb64a15d6 100644 --- a/abci/types/messages.go +++ b/abci/types/messages.go @@ -71,7 +71,7 @@ func encodeVarint(w io.Writer, i int64) (err error) { func ToRequestEcho(message string) *Request { return &Request{ - Value: &Request_Echo{&RequestEcho{message}}, + Value: &Request_Echo{&RequestEcho{Message: message}}, } } @@ -95,13 +95,13 @@ func ToRequestSetOption(req RequestSetOption) *Request { func ToRequestDeliverTx(tx []byte) *Request { return &Request{ - Value: &Request_DeliverTx{&RequestDeliverTx{tx}}, + Value: &Request_DeliverTx{&RequestDeliverTx{Tx: tx}}, } } func ToRequestCheckTx(tx []byte) *Request { return &Request{ - Value: &Request_CheckTx{&RequestCheckTx{tx}}, + Value: &Request_CheckTx{&RequestCheckTx{Tx: tx}}, } } @@ -139,13 +139,13 @@ func ToRequestEndBlock(req RequestEndBlock) *Request { func ToResponseException(errStr string) *Response { return &Response{ - Value: &Response_Exception{&ResponseException{errStr}}, + Value: &Response_Exception{&ResponseException{Error: errStr}}, } } func ToResponseEcho(message string) *Response { return &Response{ - Value: &Response_Echo{&ResponseEcho{message}}, + Value: &Response_Echo{&ResponseEcho{Message: message}}, } } diff --git a/abci/types/types.pb.go b/abci/types/types.pb.go index 90870a276..9a2b511b2 100644 --- a/abci/types/types.pb.go +++ b/abci/types/types.pb.go @@ -1,48 +1,6 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: abci/types/types.proto -/* - Package types is a generated protocol buffer package. - - It is generated from these files: - abci/types/types.proto - - It has these top-level messages: - Request - RequestEcho - RequestFlush - RequestInfo - RequestSetOption - RequestInitChain - RequestQuery - RequestBeginBlock - RequestCheckTx - RequestDeliverTx - RequestEndBlock - RequestCommit - Response - ResponseException - ResponseEcho - ResponseFlush - ResponseInfo - ResponseSetOption - ResponseInitChain - ResponseQuery - ResponseBeginBlock - ResponseCheckTx - ResponseDeliverTx - ResponseEndBlock - ResponseCommit - ConsensusParams - BlockSize - TxSize - BlockGossip - Header - Validator - SigningValidator - PubKey - Evidence -*/ //nolint package types @@ -51,13 +9,18 @@ import golang_proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" import _ "github.com/gogo/protobuf/gogoproto" +import _ "github.com/golang/protobuf/ptypes/timestamp" import common "github.com/tendermint/tendermint/libs/common" +import time "time" + import bytes "bytes" import context "golang.org/x/net/context" import grpc "google.golang.org/grpc" +import github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + import io "io" // Reference imports to suppress errors if they are not otherwise used. @@ -65,6 +28,7 @@ var _ = proto.Marshal var _ = golang_proto.Marshal var _ = fmt.Errorf var _ = math.Inf +var _ = time.Kitchen // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. @@ -85,13 +49,44 @@ type Request struct { // *Request_DeliverTx // *Request_EndBlock // *Request_Commit - Value isRequest_Value `protobuf_oneof:"value"` + Value isRequest_Value `protobuf_oneof:"value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_2c69c6b96b429b1c, []int{0} +} +func (m *Request) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Request.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 *Request) XXX_Merge(src proto.Message) { + xxx_messageInfo_Request.Merge(dst, src) +} +func (m *Request) XXX_Size() int { + return m.Size() +} +func (m *Request) XXX_DiscardUnknown() { + xxx_messageInfo_Request.DiscardUnknown(m) } -func (m *Request) Reset() { *m = Request{} } -func (m *Request) String() string { return proto.CompactTextString(m) } -func (*Request) ProtoMessage() {} -func (*Request) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{0} } +var xxx_messageInfo_Request proto.InternalMessageInfo type isRequest_Value interface { isRequest_Value() @@ -415,57 +410,57 @@ func _Request_OneofSizer(msg proto.Message) (n int) { switch x := m.Value.(type) { case *Request_Echo: s := proto.Size(x.Echo) - n += proto.SizeVarint(2<<3 | proto.WireBytes) + n += 1 // tag and wire n += proto.SizeVarint(uint64(s)) n += s case *Request_Flush: s := proto.Size(x.Flush) - n += proto.SizeVarint(3<<3 | proto.WireBytes) + n += 1 // tag and wire n += proto.SizeVarint(uint64(s)) n += s case *Request_Info: s := proto.Size(x.Info) - n += proto.SizeVarint(4<<3 | proto.WireBytes) + n += 1 // tag and wire n += proto.SizeVarint(uint64(s)) n += s case *Request_SetOption: s := proto.Size(x.SetOption) - n += proto.SizeVarint(5<<3 | proto.WireBytes) + n += 1 // tag and wire n += proto.SizeVarint(uint64(s)) n += s case *Request_InitChain: s := proto.Size(x.InitChain) - n += proto.SizeVarint(6<<3 | proto.WireBytes) + n += 1 // tag and wire n += proto.SizeVarint(uint64(s)) n += s case *Request_Query: s := proto.Size(x.Query) - n += proto.SizeVarint(7<<3 | proto.WireBytes) + n += 1 // tag and wire n += proto.SizeVarint(uint64(s)) n += s case *Request_BeginBlock: s := proto.Size(x.BeginBlock) - n += proto.SizeVarint(8<<3 | proto.WireBytes) + n += 1 // tag and wire n += proto.SizeVarint(uint64(s)) n += s case *Request_CheckTx: s := proto.Size(x.CheckTx) - n += proto.SizeVarint(9<<3 | proto.WireBytes) + n += 1 // tag and wire n += proto.SizeVarint(uint64(s)) n += s case *Request_DeliverTx: s := proto.Size(x.DeliverTx) - n += proto.SizeVarint(19<<3 | proto.WireBytes) + n += 2 // tag and wire n += proto.SizeVarint(uint64(s)) n += s case *Request_EndBlock: s := proto.Size(x.EndBlock) - n += proto.SizeVarint(11<<3 | proto.WireBytes) + n += 1 // tag and wire n += proto.SizeVarint(uint64(s)) n += s case *Request_Commit: s := proto.Size(x.Commit) - n += proto.SizeVarint(12<<3 | proto.WireBytes) + n += 1 // tag and wire n += proto.SizeVarint(uint64(s)) n += s case nil: @@ -476,13 +471,44 @@ func _Request_OneofSizer(msg proto.Message) (n int) { } type RequestEcho struct { - Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_2c69c6b96b429b1c, []int{1} +} +func (m *RequestEcho) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RequestEcho) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RequestEcho.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 *RequestEcho) XXX_Merge(src proto.Message) { + xxx_messageInfo_RequestEcho.Merge(dst, src) +} +func (m *RequestEcho) XXX_Size() int { + return m.Size() +} +func (m *RequestEcho) XXX_DiscardUnknown() { + xxx_messageInfo_RequestEcho.DiscardUnknown(m) } -func (m *RequestEcho) Reset() { *m = RequestEcho{} } -func (m *RequestEcho) String() string { return proto.CompactTextString(m) } -func (*RequestEcho) ProtoMessage() {} -func (*RequestEcho) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{1} } +var xxx_messageInfo_RequestEcho proto.InternalMessageInfo func (m *RequestEcho) GetMessage() string { if m != nil { @@ -492,21 +518,83 @@ func (m *RequestEcho) GetMessage() string { } type RequestFlush struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_2c69c6b96b429b1c, []int{2} +} +func (m *RequestFlush) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RequestFlush) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RequestFlush.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 *RequestFlush) XXX_Merge(src proto.Message) { + xxx_messageInfo_RequestFlush.Merge(dst, src) +} +func (m *RequestFlush) XXX_Size() int { + return m.Size() +} +func (m *RequestFlush) XXX_DiscardUnknown() { + xxx_messageInfo_RequestFlush.DiscardUnknown(m) } -func (m *RequestFlush) Reset() { *m = RequestFlush{} } -func (m *RequestFlush) String() string { return proto.CompactTextString(m) } -func (*RequestFlush) ProtoMessage() {} -func (*RequestFlush) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{2} } +var xxx_messageInfo_RequestFlush proto.InternalMessageInfo type RequestInfo struct { - Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_2c69c6b96b429b1c, []int{3} +} +func (m *RequestInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RequestInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RequestInfo.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 *RequestInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_RequestInfo.Merge(dst, src) +} +func (m *RequestInfo) XXX_Size() int { + return m.Size() +} +func (m *RequestInfo) XXX_DiscardUnknown() { + xxx_messageInfo_RequestInfo.DiscardUnknown(m) } -func (m *RequestInfo) Reset() { *m = RequestInfo{} } -func (m *RequestInfo) String() string { return proto.CompactTextString(m) } -func (*RequestInfo) ProtoMessage() {} -func (*RequestInfo) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{3} } +var xxx_messageInfo_RequestInfo proto.InternalMessageInfo func (m *RequestInfo) GetVersion() string { if m != nil { @@ -517,14 +605,45 @@ func (m *RequestInfo) GetVersion() string { // nondeterministic type RequestSetOption struct { - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_2c69c6b96b429b1c, []int{4} +} +func (m *RequestSetOption) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RequestSetOption) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RequestSetOption.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 *RequestSetOption) XXX_Merge(src proto.Message) { + xxx_messageInfo_RequestSetOption.Merge(dst, src) +} +func (m *RequestSetOption) XXX_Size() int { + return m.Size() +} +func (m *RequestSetOption) XXX_DiscardUnknown() { + xxx_messageInfo_RequestSetOption.DiscardUnknown(m) } -func (m *RequestSetOption) Reset() { *m = RequestSetOption{} } -func (m *RequestSetOption) String() string { return proto.CompactTextString(m) } -func (*RequestSetOption) ProtoMessage() {} -func (*RequestSetOption) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{4} } +var xxx_messageInfo_RequestSetOption proto.InternalMessageInfo func (m *RequestSetOption) GetKey() string { if m != nil { @@ -541,23 +660,54 @@ func (m *RequestSetOption) GetValue() string { } type RequestInitChain struct { - Time int64 `protobuf:"varint,1,opt,name=time,proto3" json:"time,omitempty"` - ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - ConsensusParams *ConsensusParams `protobuf:"bytes,3,opt,name=consensus_params,json=consensusParams" json:"consensus_params,omitempty"` - Validators []Validator `protobuf:"bytes,4,rep,name=validators" json:"validators"` - AppStateBytes []byte `protobuf:"bytes,5,opt,name=app_state_bytes,json=appStateBytes,proto3" json:"app_state_bytes,omitempty"` + Time time.Time `protobuf:"bytes,1,opt,name=time,stdtime" json:"time"` + ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + ConsensusParams *ConsensusParams `protobuf:"bytes,3,opt,name=consensus_params,json=consensusParams" json:"consensus_params,omitempty"` + Validators []Validator `protobuf:"bytes,4,rep,name=validators" json:"validators"` + AppStateBytes []byte `protobuf:"bytes,5,opt,name=app_state_bytes,json=appStateBytes,proto3" json:"app_state_bytes,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_2c69c6b96b429b1c, []int{5} +} +func (m *RequestInitChain) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RequestInitChain) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RequestInitChain.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 *RequestInitChain) XXX_Merge(src proto.Message) { + xxx_messageInfo_RequestInitChain.Merge(dst, src) +} +func (m *RequestInitChain) XXX_Size() int { + return m.Size() +} +func (m *RequestInitChain) XXX_DiscardUnknown() { + xxx_messageInfo_RequestInitChain.DiscardUnknown(m) } -func (m *RequestInitChain) Reset() { *m = RequestInitChain{} } -func (m *RequestInitChain) String() string { return proto.CompactTextString(m) } -func (*RequestInitChain) ProtoMessage() {} -func (*RequestInitChain) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{5} } +var xxx_messageInfo_RequestInitChain proto.InternalMessageInfo -func (m *RequestInitChain) GetTime() int64 { +func (m *RequestInitChain) GetTime() time.Time { if m != nil { return m.Time } - return 0 + return time.Time{} } func (m *RequestInitChain) GetChainId() string { @@ -589,16 +739,47 @@ func (m *RequestInitChain) GetAppStateBytes() []byte { } type RequestQuery struct { - Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` - Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` - Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"` - Prove bool `protobuf:"varint,4,opt,name=prove,proto3" json:"prove,omitempty"` + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` + Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"` + Prove bool `protobuf:"varint,4,opt,name=prove,proto3" json:"prove,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_2c69c6b96b429b1c, []int{6} +} +func (m *RequestQuery) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RequestQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RequestQuery.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 *RequestQuery) XXX_Merge(src proto.Message) { + xxx_messageInfo_RequestQuery.Merge(dst, src) +} +func (m *RequestQuery) XXX_Size() int { + return m.Size() +} +func (m *RequestQuery) XXX_DiscardUnknown() { + xxx_messageInfo_RequestQuery.DiscardUnknown(m) } -func (m *RequestQuery) Reset() { *m = RequestQuery{} } -func (m *RequestQuery) String() string { return proto.CompactTextString(m) } -func (*RequestQuery) ProtoMessage() {} -func (*RequestQuery) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{6} } +var xxx_messageInfo_RequestQuery proto.InternalMessageInfo func (m *RequestQuery) GetData() []byte { if m != nil { @@ -629,16 +810,47 @@ func (m *RequestQuery) GetProve() bool { } type RequestBeginBlock struct { - Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` - Header Header `protobuf:"bytes,2,opt,name=header" json:"header"` - Validators []SigningValidator `protobuf:"bytes,3,rep,name=validators" json:"validators"` - ByzantineValidators []Evidence `protobuf:"bytes,4,rep,name=byzantine_validators,json=byzantineValidators" json:"byzantine_validators"` + Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` + Header Header `protobuf:"bytes,2,opt,name=header" json:"header"` + Validators []SigningValidator `protobuf:"bytes,3,rep,name=validators" json:"validators"` + ByzantineValidators []Evidence `protobuf:"bytes,4,rep,name=byzantine_validators,json=byzantineValidators" json:"byzantine_validators"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_2c69c6b96b429b1c, []int{7} +} +func (m *RequestBeginBlock) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RequestBeginBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RequestBeginBlock.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 *RequestBeginBlock) XXX_Merge(src proto.Message) { + xxx_messageInfo_RequestBeginBlock.Merge(dst, src) +} +func (m *RequestBeginBlock) XXX_Size() int { + return m.Size() +} +func (m *RequestBeginBlock) XXX_DiscardUnknown() { + xxx_messageInfo_RequestBeginBlock.DiscardUnknown(m) } -func (m *RequestBeginBlock) Reset() { *m = RequestBeginBlock{} } -func (m *RequestBeginBlock) String() string { return proto.CompactTextString(m) } -func (*RequestBeginBlock) ProtoMessage() {} -func (*RequestBeginBlock) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{7} } +var xxx_messageInfo_RequestBeginBlock proto.InternalMessageInfo func (m *RequestBeginBlock) GetHash() []byte { if m != nil { @@ -669,13 +881,44 @@ func (m *RequestBeginBlock) GetByzantineValidators() []Evidence { } type RequestCheckTx struct { - Tx []byte `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"` + Tx []byte `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_2c69c6b96b429b1c, []int{8} +} +func (m *RequestCheckTx) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RequestCheckTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RequestCheckTx.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 *RequestCheckTx) XXX_Merge(src proto.Message) { + xxx_messageInfo_RequestCheckTx.Merge(dst, src) +} +func (m *RequestCheckTx) XXX_Size() int { + return m.Size() +} +func (m *RequestCheckTx) XXX_DiscardUnknown() { + xxx_messageInfo_RequestCheckTx.DiscardUnknown(m) } -func (m *RequestCheckTx) Reset() { *m = RequestCheckTx{} } -func (m *RequestCheckTx) String() string { return proto.CompactTextString(m) } -func (*RequestCheckTx) ProtoMessage() {} -func (*RequestCheckTx) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{8} } +var xxx_messageInfo_RequestCheckTx proto.InternalMessageInfo func (m *RequestCheckTx) GetTx() []byte { if m != nil { @@ -685,13 +928,44 @@ func (m *RequestCheckTx) GetTx() []byte { } type RequestDeliverTx struct { - Tx []byte `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"` + Tx []byte `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_2c69c6b96b429b1c, []int{9} +} +func (m *RequestDeliverTx) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RequestDeliverTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RequestDeliverTx.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 *RequestDeliverTx) XXX_Merge(src proto.Message) { + xxx_messageInfo_RequestDeliverTx.Merge(dst, src) +} +func (m *RequestDeliverTx) XXX_Size() int { + return m.Size() +} +func (m *RequestDeliverTx) XXX_DiscardUnknown() { + xxx_messageInfo_RequestDeliverTx.DiscardUnknown(m) } -func (m *RequestDeliverTx) Reset() { *m = RequestDeliverTx{} } -func (m *RequestDeliverTx) String() string { return proto.CompactTextString(m) } -func (*RequestDeliverTx) ProtoMessage() {} -func (*RequestDeliverTx) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{9} } +var xxx_messageInfo_RequestDeliverTx proto.InternalMessageInfo func (m *RequestDeliverTx) GetTx() []byte { if m != nil { @@ -701,13 +975,44 @@ func (m *RequestDeliverTx) GetTx() []byte { } type RequestEndBlock struct { - Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` + Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_2c69c6b96b429b1c, []int{10} +} +func (m *RequestEndBlock) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RequestEndBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RequestEndBlock.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 *RequestEndBlock) XXX_Merge(src proto.Message) { + xxx_messageInfo_RequestEndBlock.Merge(dst, src) +} +func (m *RequestEndBlock) XXX_Size() int { + return m.Size() +} +func (m *RequestEndBlock) XXX_DiscardUnknown() { + xxx_messageInfo_RequestEndBlock.DiscardUnknown(m) } -func (m *RequestEndBlock) Reset() { *m = RequestEndBlock{} } -func (m *RequestEndBlock) String() string { return proto.CompactTextString(m) } -func (*RequestEndBlock) ProtoMessage() {} -func (*RequestEndBlock) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{10} } +var xxx_messageInfo_RequestEndBlock proto.InternalMessageInfo func (m *RequestEndBlock) GetHeight() int64 { if m != nil { @@ -717,12 +1022,43 @@ func (m *RequestEndBlock) GetHeight() int64 { } type RequestCommit struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_2c69c6b96b429b1c, []int{11} +} +func (m *RequestCommit) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RequestCommit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RequestCommit.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 *RequestCommit) XXX_Merge(src proto.Message) { + xxx_messageInfo_RequestCommit.Merge(dst, src) +} +func (m *RequestCommit) XXX_Size() int { + return m.Size() +} +func (m *RequestCommit) XXX_DiscardUnknown() { + xxx_messageInfo_RequestCommit.DiscardUnknown(m) } -func (m *RequestCommit) Reset() { *m = RequestCommit{} } -func (m *RequestCommit) String() string { return proto.CompactTextString(m) } -func (*RequestCommit) ProtoMessage() {} -func (*RequestCommit) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{11} } +var xxx_messageInfo_RequestCommit proto.InternalMessageInfo type Response struct { // Types that are valid to be assigned to Value: @@ -738,13 +1074,44 @@ type Response struct { // *Response_DeliverTx // *Response_EndBlock // *Response_Commit - Value isResponse_Value `protobuf_oneof:"value"` + Value isResponse_Value `protobuf_oneof:"value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_2c69c6b96b429b1c, []int{12} +} +func (m *Response) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Response.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 *Response) XXX_Merge(src proto.Message) { + xxx_messageInfo_Response.Merge(dst, src) +} +func (m *Response) XXX_Size() int { + return m.Size() +} +func (m *Response) XXX_DiscardUnknown() { + xxx_messageInfo_Response.DiscardUnknown(m) } -func (m *Response) Reset() { *m = Response{} } -func (m *Response) String() string { return proto.CompactTextString(m) } -func (*Response) ProtoMessage() {} -func (*Response) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{12} } +var xxx_messageInfo_Response proto.InternalMessageInfo type isResponse_Value interface { isResponse_Value() @@ -1093,62 +1460,62 @@ func _Response_OneofSizer(msg proto.Message) (n int) { switch x := m.Value.(type) { case *Response_Exception: s := proto.Size(x.Exception) - n += proto.SizeVarint(1<<3 | proto.WireBytes) + n += 1 // tag and wire n += proto.SizeVarint(uint64(s)) n += s case *Response_Echo: s := proto.Size(x.Echo) - n += proto.SizeVarint(2<<3 | proto.WireBytes) + n += 1 // tag and wire n += proto.SizeVarint(uint64(s)) n += s case *Response_Flush: s := proto.Size(x.Flush) - n += proto.SizeVarint(3<<3 | proto.WireBytes) + n += 1 // tag and wire n += proto.SizeVarint(uint64(s)) n += s case *Response_Info: s := proto.Size(x.Info) - n += proto.SizeVarint(4<<3 | proto.WireBytes) + n += 1 // tag and wire n += proto.SizeVarint(uint64(s)) n += s case *Response_SetOption: s := proto.Size(x.SetOption) - n += proto.SizeVarint(5<<3 | proto.WireBytes) + n += 1 // tag and wire n += proto.SizeVarint(uint64(s)) n += s case *Response_InitChain: s := proto.Size(x.InitChain) - n += proto.SizeVarint(6<<3 | proto.WireBytes) + n += 1 // tag and wire n += proto.SizeVarint(uint64(s)) n += s case *Response_Query: s := proto.Size(x.Query) - n += proto.SizeVarint(7<<3 | proto.WireBytes) + n += 1 // tag and wire n += proto.SizeVarint(uint64(s)) n += s case *Response_BeginBlock: s := proto.Size(x.BeginBlock) - n += proto.SizeVarint(8<<3 | proto.WireBytes) + n += 1 // tag and wire n += proto.SizeVarint(uint64(s)) n += s case *Response_CheckTx: s := proto.Size(x.CheckTx) - n += proto.SizeVarint(9<<3 | proto.WireBytes) + n += 1 // tag and wire n += proto.SizeVarint(uint64(s)) n += s case *Response_DeliverTx: s := proto.Size(x.DeliverTx) - n += proto.SizeVarint(10<<3 | proto.WireBytes) + n += 1 // tag and wire n += proto.SizeVarint(uint64(s)) n += s case *Response_EndBlock: s := proto.Size(x.EndBlock) - n += proto.SizeVarint(11<<3 | proto.WireBytes) + n += 1 // tag and wire n += proto.SizeVarint(uint64(s)) n += s case *Response_Commit: s := proto.Size(x.Commit) - n += proto.SizeVarint(12<<3 | proto.WireBytes) + n += 1 // tag and wire n += proto.SizeVarint(uint64(s)) n += s case nil: @@ -1160,13 +1527,44 @@ func _Response_OneofSizer(msg proto.Message) (n int) { // nondeterministic type ResponseException struct { - Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` + Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_2c69c6b96b429b1c, []int{13} +} +func (m *ResponseException) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResponseException) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ResponseException.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 *ResponseException) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResponseException.Merge(dst, src) +} +func (m *ResponseException) XXX_Size() int { + return m.Size() +} +func (m *ResponseException) XXX_DiscardUnknown() { + xxx_messageInfo_ResponseException.DiscardUnknown(m) } -func (m *ResponseException) Reset() { *m = ResponseException{} } -func (m *ResponseException) String() string { return proto.CompactTextString(m) } -func (*ResponseException) ProtoMessage() {} -func (*ResponseException) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{13} } +var xxx_messageInfo_ResponseException proto.InternalMessageInfo func (m *ResponseException) GetError() string { if m != nil { @@ -1176,13 +1574,44 @@ func (m *ResponseException) GetError() string { } type ResponseEcho struct { - Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_2c69c6b96b429b1c, []int{14} +} +func (m *ResponseEcho) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResponseEcho) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ResponseEcho.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 *ResponseEcho) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResponseEcho.Merge(dst, src) +} +func (m *ResponseEcho) XXX_Size() int { + return m.Size() +} +func (m *ResponseEcho) XXX_DiscardUnknown() { + xxx_messageInfo_ResponseEcho.DiscardUnknown(m) } -func (m *ResponseEcho) Reset() { *m = ResponseEcho{} } -func (m *ResponseEcho) String() string { return proto.CompactTextString(m) } -func (*ResponseEcho) ProtoMessage() {} -func (*ResponseEcho) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{14} } +var xxx_messageInfo_ResponseEcho proto.InternalMessageInfo func (m *ResponseEcho) GetMessage() string { if m != nil { @@ -1192,24 +1621,86 @@ func (m *ResponseEcho) GetMessage() string { } type ResponseFlush struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_2c69c6b96b429b1c, []int{15} +} +func (m *ResponseFlush) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResponseFlush) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ResponseFlush.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 *ResponseFlush) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResponseFlush.Merge(dst, src) +} +func (m *ResponseFlush) XXX_Size() int { + return m.Size() +} +func (m *ResponseFlush) XXX_DiscardUnknown() { + xxx_messageInfo_ResponseFlush.DiscardUnknown(m) } -func (m *ResponseFlush) Reset() { *m = ResponseFlush{} } -func (m *ResponseFlush) String() string { return proto.CompactTextString(m) } -func (*ResponseFlush) ProtoMessage() {} -func (*ResponseFlush) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{15} } +var xxx_messageInfo_ResponseFlush proto.InternalMessageInfo type ResponseInfo struct { - Data string `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` - Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` - LastBlockHeight int64 `protobuf:"varint,3,opt,name=last_block_height,json=lastBlockHeight,proto3" json:"last_block_height,omitempty"` - LastBlockAppHash []byte `protobuf:"bytes,4,opt,name=last_block_app_hash,json=lastBlockAppHash,proto3" json:"last_block_app_hash,omitempty"` + Data string `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` + LastBlockHeight int64 `protobuf:"varint,3,opt,name=last_block_height,json=lastBlockHeight,proto3" json:"last_block_height,omitempty"` + LastBlockAppHash []byte `protobuf:"bytes,4,opt,name=last_block_app_hash,json=lastBlockAppHash,proto3" json:"last_block_app_hash,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_2c69c6b96b429b1c, []int{16} +} +func (m *ResponseInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResponseInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ResponseInfo.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 *ResponseInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResponseInfo.Merge(dst, src) +} +func (m *ResponseInfo) XXX_Size() int { + return m.Size() +} +func (m *ResponseInfo) XXX_DiscardUnknown() { + xxx_messageInfo_ResponseInfo.DiscardUnknown(m) } -func (m *ResponseInfo) Reset() { *m = ResponseInfo{} } -func (m *ResponseInfo) String() string { return proto.CompactTextString(m) } -func (*ResponseInfo) ProtoMessage() {} -func (*ResponseInfo) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{16} } +var xxx_messageInfo_ResponseInfo proto.InternalMessageInfo func (m *ResponseInfo) GetData() string { if m != nil { @@ -1243,14 +1734,45 @@ func (m *ResponseInfo) GetLastBlockAppHash() []byte { type ResponseSetOption struct { Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` // bytes data = 2; - Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"` - Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"` + Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"` + Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_2c69c6b96b429b1c, []int{17} +} +func (m *ResponseSetOption) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResponseSetOption) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ResponseSetOption.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 *ResponseSetOption) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResponseSetOption.Merge(dst, src) +} +func (m *ResponseSetOption) XXX_Size() int { + return m.Size() +} +func (m *ResponseSetOption) XXX_DiscardUnknown() { + xxx_messageInfo_ResponseSetOption.DiscardUnknown(m) } -func (m *ResponseSetOption) Reset() { *m = ResponseSetOption{} } -func (m *ResponseSetOption) String() string { return proto.CompactTextString(m) } -func (*ResponseSetOption) ProtoMessage() {} -func (*ResponseSetOption) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{17} } +var xxx_messageInfo_ResponseSetOption proto.InternalMessageInfo func (m *ResponseSetOption) GetCode() uint32 { if m != nil { @@ -1274,14 +1796,45 @@ func (m *ResponseSetOption) GetInfo() string { } type ResponseInitChain struct { - ConsensusParams *ConsensusParams `protobuf:"bytes,1,opt,name=consensus_params,json=consensusParams" json:"consensus_params,omitempty"` - Validators []Validator `protobuf:"bytes,2,rep,name=validators" json:"validators"` + ConsensusParams *ConsensusParams `protobuf:"bytes,1,opt,name=consensus_params,json=consensusParams" json:"consensus_params,omitempty"` + Validators []Validator `protobuf:"bytes,2,rep,name=validators" json:"validators"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_2c69c6b96b429b1c, []int{18} +} +func (m *ResponseInitChain) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResponseInitChain) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ResponseInitChain.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 *ResponseInitChain) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResponseInitChain.Merge(dst, src) +} +func (m *ResponseInitChain) XXX_Size() int { + return m.Size() +} +func (m *ResponseInitChain) XXX_DiscardUnknown() { + xxx_messageInfo_ResponseInitChain.DiscardUnknown(m) } -func (m *ResponseInitChain) Reset() { *m = ResponseInitChain{} } -func (m *ResponseInitChain) String() string { return proto.CompactTextString(m) } -func (*ResponseInitChain) ProtoMessage() {} -func (*ResponseInitChain) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{18} } +var xxx_messageInfo_ResponseInitChain proto.InternalMessageInfo func (m *ResponseInitChain) GetConsensusParams() *ConsensusParams { if m != nil { @@ -1300,19 +1853,50 @@ func (m *ResponseInitChain) GetValidators() []Validator { type ResponseQuery struct { Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` // bytes data = 2; // use "value" instead. - Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"` - Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"` - Index int64 `protobuf:"varint,5,opt,name=index,proto3" json:"index,omitempty"` - Key []byte `protobuf:"bytes,6,opt,name=key,proto3" json:"key,omitempty"` - Value []byte `protobuf:"bytes,7,opt,name=value,proto3" json:"value,omitempty"` - Proof []byte `protobuf:"bytes,8,opt,name=proof,proto3" json:"proof,omitempty"` - Height int64 `protobuf:"varint,9,opt,name=height,proto3" json:"height,omitempty"` + Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"` + Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"` + Index int64 `protobuf:"varint,5,opt,name=index,proto3" json:"index,omitempty"` + Key []byte `protobuf:"bytes,6,opt,name=key,proto3" json:"key,omitempty"` + Value []byte `protobuf:"bytes,7,opt,name=value,proto3" json:"value,omitempty"` + Proof []byte `protobuf:"bytes,8,opt,name=proof,proto3" json:"proof,omitempty"` + Height int64 `protobuf:"varint,9,opt,name=height,proto3" json:"height,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_2c69c6b96b429b1c, []int{19} +} +func (m *ResponseQuery) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResponseQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ResponseQuery.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 *ResponseQuery) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResponseQuery.Merge(dst, src) +} +func (m *ResponseQuery) XXX_Size() int { + return m.Size() +} +func (m *ResponseQuery) XXX_DiscardUnknown() { + xxx_messageInfo_ResponseQuery.DiscardUnknown(m) } -func (m *ResponseQuery) Reset() { *m = ResponseQuery{} } -func (m *ResponseQuery) String() string { return proto.CompactTextString(m) } -func (*ResponseQuery) ProtoMessage() {} -func (*ResponseQuery) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{19} } +var xxx_messageInfo_ResponseQuery proto.InternalMessageInfo func (m *ResponseQuery) GetCode() uint32 { if m != nil { @@ -1371,13 +1955,44 @@ func (m *ResponseQuery) GetHeight() int64 { } type ResponseBeginBlock struct { - Tags []common.KVPair `protobuf:"bytes,1,rep,name=tags" json:"tags,omitempty"` + Tags []common.KVPair `protobuf:"bytes,1,rep,name=tags" json:"tags,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_2c69c6b96b429b1c, []int{20} +} +func (m *ResponseBeginBlock) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResponseBeginBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ResponseBeginBlock.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 *ResponseBeginBlock) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResponseBeginBlock.Merge(dst, src) +} +func (m *ResponseBeginBlock) XXX_Size() int { + return m.Size() +} +func (m *ResponseBeginBlock) XXX_DiscardUnknown() { + xxx_messageInfo_ResponseBeginBlock.DiscardUnknown(m) } -func (m *ResponseBeginBlock) Reset() { *m = ResponseBeginBlock{} } -func (m *ResponseBeginBlock) String() string { return proto.CompactTextString(m) } -func (*ResponseBeginBlock) ProtoMessage() {} -func (*ResponseBeginBlock) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{20} } +var xxx_messageInfo_ResponseBeginBlock proto.InternalMessageInfo func (m *ResponseBeginBlock) GetTags() []common.KVPair { if m != nil { @@ -1387,19 +2002,50 @@ func (m *ResponseBeginBlock) GetTags() []common.KVPair { } type ResponseCheckTx struct { - Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` - Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` - Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"` - Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"` - GasWanted int64 `protobuf:"varint,5,opt,name=gas_wanted,json=gasWanted,proto3" json:"gas_wanted,omitempty"` - GasUsed int64 `protobuf:"varint,6,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"` - Tags []common.KVPair `protobuf:"bytes,7,rep,name=tags" json:"tags,omitempty"` + Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` + Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"` + Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"` + GasWanted int64 `protobuf:"varint,5,opt,name=gas_wanted,json=gasWanted,proto3" json:"gas_wanted,omitempty"` + GasUsed int64 `protobuf:"varint,6,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"` + Tags []common.KVPair `protobuf:"bytes,7,rep,name=tags" json:"tags,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_2c69c6b96b429b1c, []int{21} +} +func (m *ResponseCheckTx) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResponseCheckTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ResponseCheckTx.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 *ResponseCheckTx) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResponseCheckTx.Merge(dst, src) +} +func (m *ResponseCheckTx) XXX_Size() int { + return m.Size() +} +func (m *ResponseCheckTx) XXX_DiscardUnknown() { + xxx_messageInfo_ResponseCheckTx.DiscardUnknown(m) } -func (m *ResponseCheckTx) Reset() { *m = ResponseCheckTx{} } -func (m *ResponseCheckTx) String() string { return proto.CompactTextString(m) } -func (*ResponseCheckTx) ProtoMessage() {} -func (*ResponseCheckTx) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{21} } +var xxx_messageInfo_ResponseCheckTx proto.InternalMessageInfo func (m *ResponseCheckTx) GetCode() uint32 { if m != nil { @@ -1451,19 +2097,50 @@ func (m *ResponseCheckTx) GetTags() []common.KVPair { } type ResponseDeliverTx struct { - Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` - Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` - Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"` - Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"` - GasWanted int64 `protobuf:"varint,5,opt,name=gas_wanted,json=gasWanted,proto3" json:"gas_wanted,omitempty"` - GasUsed int64 `protobuf:"varint,6,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"` - Tags []common.KVPair `protobuf:"bytes,7,rep,name=tags" json:"tags,omitempty"` + Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` + Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"` + Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"` + GasWanted int64 `protobuf:"varint,5,opt,name=gas_wanted,json=gasWanted,proto3" json:"gas_wanted,omitempty"` + GasUsed int64 `protobuf:"varint,6,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"` + Tags []common.KVPair `protobuf:"bytes,7,rep,name=tags" json:"tags,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_2c69c6b96b429b1c, []int{22} +} +func (m *ResponseDeliverTx) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResponseDeliverTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ResponseDeliverTx.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 *ResponseDeliverTx) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResponseDeliverTx.Merge(dst, src) +} +func (m *ResponseDeliverTx) XXX_Size() int { + return m.Size() +} +func (m *ResponseDeliverTx) XXX_DiscardUnknown() { + xxx_messageInfo_ResponseDeliverTx.DiscardUnknown(m) } -func (m *ResponseDeliverTx) Reset() { *m = ResponseDeliverTx{} } -func (m *ResponseDeliverTx) String() string { return proto.CompactTextString(m) } -func (*ResponseDeliverTx) ProtoMessage() {} -func (*ResponseDeliverTx) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{22} } +var xxx_messageInfo_ResponseDeliverTx proto.InternalMessageInfo func (m *ResponseDeliverTx) GetCode() uint32 { if m != nil { @@ -1518,12 +2195,43 @@ type ResponseEndBlock struct { ValidatorUpdates []Validator `protobuf:"bytes,1,rep,name=validator_updates,json=validatorUpdates" json:"validator_updates"` ConsensusParamUpdates *ConsensusParams `protobuf:"bytes,2,opt,name=consensus_param_updates,json=consensusParamUpdates" json:"consensus_param_updates,omitempty"` Tags []common.KVPair `protobuf:"bytes,3,rep,name=tags" json:"tags,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_2c69c6b96b429b1c, []int{23} +} +func (m *ResponseEndBlock) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResponseEndBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ResponseEndBlock.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 *ResponseEndBlock) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResponseEndBlock.Merge(dst, src) +} +func (m *ResponseEndBlock) XXX_Size() int { + return m.Size() +} +func (m *ResponseEndBlock) XXX_DiscardUnknown() { + xxx_messageInfo_ResponseEndBlock.DiscardUnknown(m) } -func (m *ResponseEndBlock) Reset() { *m = ResponseEndBlock{} } -func (m *ResponseEndBlock) String() string { return proto.CompactTextString(m) } -func (*ResponseEndBlock) ProtoMessage() {} -func (*ResponseEndBlock) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{23} } +var xxx_messageInfo_ResponseEndBlock proto.InternalMessageInfo func (m *ResponseEndBlock) GetValidatorUpdates() []Validator { if m != nil { @@ -1548,13 +2256,44 @@ func (m *ResponseEndBlock) GetTags() []common.KVPair { type ResponseCommit struct { // reserve 1 - Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_2c69c6b96b429b1c, []int{24} +} +func (m *ResponseCommit) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResponseCommit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ResponseCommit.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 *ResponseCommit) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResponseCommit.Merge(dst, src) +} +func (m *ResponseCommit) XXX_Size() int { + return m.Size() +} +func (m *ResponseCommit) XXX_DiscardUnknown() { + xxx_messageInfo_ResponseCommit.DiscardUnknown(m) } -func (m *ResponseCommit) Reset() { *m = ResponseCommit{} } -func (m *ResponseCommit) String() string { return proto.CompactTextString(m) } -func (*ResponseCommit) ProtoMessage() {} -func (*ResponseCommit) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{24} } +var xxx_messageInfo_ResponseCommit proto.InternalMessageInfo func (m *ResponseCommit) GetData() []byte { if m != nil { @@ -1566,15 +2305,46 @@ 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"` + 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:"-"` +} + +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_2c69c6b96b429b1c, []int{25} +} +func (m *ConsensusParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ConsensusParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ConsensusParams.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 *ConsensusParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_ConsensusParams.Merge(dst, src) +} +func (m *ConsensusParams) XXX_Size() int { + return m.Size() +} +func (m *ConsensusParams) XXX_DiscardUnknown() { + xxx_messageInfo_ConsensusParams.DiscardUnknown(m) } -func (m *ConsensusParams) Reset() { *m = ConsensusParams{} } -func (m *ConsensusParams) String() string { return proto.CompactTextString(m) } -func (*ConsensusParams) ProtoMessage() {} -func (*ConsensusParams) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{25} } +var xxx_messageInfo_ConsensusParams proto.InternalMessageInfo func (m *ConsensusParams) GetBlockSize() *BlockSize { if m != nil { @@ -1599,15 +2369,46 @@ func (m *ConsensusParams) GetBlockGossip() *BlockGossip { // BlockSize contain limits on the block size. type BlockSize struct { - MaxBytes int32 `protobuf:"varint,1,opt,name=max_bytes,json=maxBytes,proto3" json:"max_bytes,omitempty"` - MaxTxs int32 `protobuf:"varint,2,opt,name=max_txs,json=maxTxs,proto3" json:"max_txs,omitempty"` - MaxGas int64 `protobuf:"varint,3,opt,name=max_gas,json=maxGas,proto3" json:"max_gas,omitempty"` + MaxBytes int32 `protobuf:"varint,1,opt,name=max_bytes,json=maxBytes,proto3" json:"max_bytes,omitempty"` + MaxTxs int32 `protobuf:"varint,2,opt,name=max_txs,json=maxTxs,proto3" json:"max_txs,omitempty"` + MaxGas int64 `protobuf:"varint,3,opt,name=max_gas,json=maxGas,proto3" json:"max_gas,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_2c69c6b96b429b1c, []int{26} +} +func (m *BlockSize) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BlockSize) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BlockSize.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 *BlockSize) XXX_Merge(src proto.Message) { + xxx_messageInfo_BlockSize.Merge(dst, src) +} +func (m *BlockSize) XXX_Size() int { + return m.Size() +} +func (m *BlockSize) XXX_DiscardUnknown() { + xxx_messageInfo_BlockSize.DiscardUnknown(m) } -func (m *BlockSize) Reset() { *m = BlockSize{} } -func (m *BlockSize) String() string { return proto.CompactTextString(m) } -func (*BlockSize) ProtoMessage() {} -func (*BlockSize) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{26} } +var xxx_messageInfo_BlockSize proto.InternalMessageInfo func (m *BlockSize) GetMaxBytes() int32 { if m != nil { @@ -1632,14 +2433,45 @@ func (m *BlockSize) GetMaxGas() int64 { // TxSize contain 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"` + 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"` + 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_2c69c6b96b429b1c, []int{27} +} +func (m *TxSize) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TxSize) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TxSize.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 *TxSize) XXX_Merge(src proto.Message) { + xxx_messageInfo_TxSize.Merge(dst, src) +} +func (m *TxSize) XXX_Size() int { + return m.Size() +} +func (m *TxSize) XXX_DiscardUnknown() { + xxx_messageInfo_TxSize.DiscardUnknown(m) } -func (m *TxSize) Reset() { *m = TxSize{} } -func (m *TxSize) String() string { return proto.CompactTextString(m) } -func (*TxSize) ProtoMessage() {} -func (*TxSize) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{27} } +var xxx_messageInfo_TxSize proto.InternalMessageInfo func (m *TxSize) GetMaxBytes() int32 { if m != nil { @@ -1659,13 +2491,44 @@ func (m *TxSize) GetMaxGas() int64 { // 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"` + 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_2c69c6b96b429b1c, []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) } -func (m *BlockGossip) Reset() { *m = BlockGossip{} } -func (m *BlockGossip) String() string { return proto.CompactTextString(m) } -func (*BlockGossip) ProtoMessage() {} -func (*BlockGossip) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{28} } +var xxx_messageInfo_BlockGossip proto.InternalMessageInfo func (m *BlockGossip) GetBlockPartSizeBytes() int32 { if m != nil { @@ -1677,9 +2540,9 @@ func (m *BlockGossip) GetBlockPartSizeBytes() int32 { // just the minimum the app might need type Header struct { // basics - ChainID string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` - Time int64 `protobuf:"varint,3,opt,name=time,proto3" json:"time,omitempty"` + ChainID string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` + Time time.Time `protobuf:"bytes,3,opt,name=time,stdtime" json:"time"` // txs NumTxs int32 `protobuf:"varint,4,opt,name=num_txs,json=numTxs,proto3" json:"num_txs,omitempty"` TotalTxs int64 `protobuf:"varint,5,opt,name=total_txs,json=totalTxs,proto3" json:"total_txs,omitempty"` @@ -1688,13 +2551,44 @@ type Header struct { ValidatorsHash []byte `protobuf:"bytes,7,opt,name=validators_hash,json=validatorsHash,proto3" json:"validators_hash,omitempty"` AppHash []byte `protobuf:"bytes,8,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"` // consensus - Proposer Validator `protobuf:"bytes,9,opt,name=proposer" json:"proposer"` + Proposer Validator `protobuf:"bytes,9,opt,name=proposer" json:"proposer"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_2c69c6b96b429b1c, []int{29} +} +func (m *Header) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Header.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 *Header) XXX_Merge(src proto.Message) { + xxx_messageInfo_Header.Merge(dst, src) +} +func (m *Header) XXX_Size() int { + return m.Size() +} +func (m *Header) XXX_DiscardUnknown() { + xxx_messageInfo_Header.DiscardUnknown(m) } -func (m *Header) Reset() { *m = Header{} } -func (m *Header) String() string { return proto.CompactTextString(m) } -func (*Header) ProtoMessage() {} -func (*Header) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{29} } +var xxx_messageInfo_Header proto.InternalMessageInfo func (m *Header) GetChainID() string { if m != nil { @@ -1710,11 +2604,11 @@ func (m *Header) GetHeight() int64 { return 0 } -func (m *Header) GetTime() int64 { +func (m *Header) GetTime() time.Time { if m != nil { return m.Time } - return 0 + return time.Time{} } func (m *Header) GetNumTxs() int32 { @@ -1761,15 +2655,46 @@ func (m *Header) GetProposer() Validator { // Validator type Validator struct { - Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - PubKey PubKey `protobuf:"bytes,2,opt,name=pub_key,json=pubKey" json:"pub_key"` - Power int64 `protobuf:"varint,3,opt,name=power,proto3" json:"power,omitempty"` + Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + PubKey PubKey `protobuf:"bytes,2,opt,name=pub_key,json=pubKey" json:"pub_key"` + Power int64 `protobuf:"varint,3,opt,name=power,proto3" json:"power,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_2c69c6b96b429b1c, []int{30} +} +func (m *Validator) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Validator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Validator.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 *Validator) XXX_Merge(src proto.Message) { + xxx_messageInfo_Validator.Merge(dst, src) +} +func (m *Validator) XXX_Size() int { + return m.Size() +} +func (m *Validator) XXX_DiscardUnknown() { + xxx_messageInfo_Validator.DiscardUnknown(m) } -func (m *Validator) Reset() { *m = Validator{} } -func (m *Validator) String() string { return proto.CompactTextString(m) } -func (*Validator) ProtoMessage() {} -func (*Validator) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{30} } +var xxx_messageInfo_Validator proto.InternalMessageInfo func (m *Validator) GetAddress() []byte { if m != nil { @@ -1794,14 +2719,45 @@ func (m *Validator) GetPower() int64 { // Validator with an extra bool type SigningValidator struct { - Validator Validator `protobuf:"bytes,1,opt,name=validator" json:"validator"` - SignedLastBlock bool `protobuf:"varint,2,opt,name=signed_last_block,json=signedLastBlock,proto3" json:"signed_last_block,omitempty"` + Validator Validator `protobuf:"bytes,1,opt,name=validator" json:"validator"` + SignedLastBlock bool `protobuf:"varint,2,opt,name=signed_last_block,json=signedLastBlock,proto3" json:"signed_last_block,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SigningValidator) Reset() { *m = SigningValidator{} } +func (m *SigningValidator) String() string { return proto.CompactTextString(m) } +func (*SigningValidator) ProtoMessage() {} +func (*SigningValidator) Descriptor() ([]byte, []int) { + return fileDescriptor_types_2c69c6b96b429b1c, []int{31} +} +func (m *SigningValidator) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SigningValidator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SigningValidator.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 *SigningValidator) XXX_Merge(src proto.Message) { + xxx_messageInfo_SigningValidator.Merge(dst, src) +} +func (m *SigningValidator) XXX_Size() int { + return m.Size() +} +func (m *SigningValidator) XXX_DiscardUnknown() { + xxx_messageInfo_SigningValidator.DiscardUnknown(m) } -func (m *SigningValidator) Reset() { *m = SigningValidator{} } -func (m *SigningValidator) String() string { return proto.CompactTextString(m) } -func (*SigningValidator) ProtoMessage() {} -func (*SigningValidator) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{31} } +var xxx_messageInfo_SigningValidator proto.InternalMessageInfo func (m *SigningValidator) GetValidator() Validator { if m != nil { @@ -1818,14 +2774,45 @@ func (m *SigningValidator) GetSignedLastBlock() bool { } type PubKey struct { - Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_2c69c6b96b429b1c, []int{32} +} +func (m *PubKey) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PubKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PubKey.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 *PubKey) XXX_Merge(src proto.Message) { + xxx_messageInfo_PubKey.Merge(dst, src) +} +func (m *PubKey) XXX_Size() int { + return m.Size() +} +func (m *PubKey) XXX_DiscardUnknown() { + xxx_messageInfo_PubKey.DiscardUnknown(m) } -func (m *PubKey) Reset() { *m = PubKey{} } -func (m *PubKey) String() string { return proto.CompactTextString(m) } -func (*PubKey) ProtoMessage() {} -func (*PubKey) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{32} } +var xxx_messageInfo_PubKey proto.InternalMessageInfo func (m *PubKey) GetType() string { if m != nil { @@ -1842,17 +2829,48 @@ func (m *PubKey) GetData() []byte { } type Evidence struct { - Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - Validator Validator `protobuf:"bytes,2,opt,name=validator" json:"validator"` - Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"` - Time int64 `protobuf:"varint,4,opt,name=time,proto3" json:"time,omitempty"` - TotalVotingPower int64 `protobuf:"varint,5,opt,name=total_voting_power,json=totalVotingPower,proto3" json:"total_voting_power,omitempty"` + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + Validator Validator `protobuf:"bytes,2,opt,name=validator" json:"validator"` + Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"` + Time time.Time `protobuf:"bytes,4,opt,name=time,stdtime" json:"time"` + TotalVotingPower int64 `protobuf:"varint,5,opt,name=total_voting_power,json=totalVotingPower,proto3" json:"total_voting_power,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_2c69c6b96b429b1c, []int{33} +} +func (m *Evidence) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Evidence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Evidence.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 *Evidence) XXX_Merge(src proto.Message) { + xxx_messageInfo_Evidence.Merge(dst, src) +} +func (m *Evidence) XXX_Size() int { + return m.Size() +} +func (m *Evidence) XXX_DiscardUnknown() { + xxx_messageInfo_Evidence.DiscardUnknown(m) } -func (m *Evidence) Reset() { *m = Evidence{} } -func (m *Evidence) String() string { return proto.CompactTextString(m) } -func (*Evidence) ProtoMessage() {} -func (*Evidence) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{33} } +var xxx_messageInfo_Evidence proto.InternalMessageInfo func (m *Evidence) GetType() string { if m != nil { @@ -1875,11 +2893,11 @@ func (m *Evidence) GetHeight() int64 { return 0 } -func (m *Evidence) GetTime() int64 { +func (m *Evidence) GetTime() time.Time { if m != nil { return m.Time } - return 0 + return time.Time{} } func (m *Evidence) GetTotalVotingPower() int64 { @@ -1987,6 +3005,9 @@ func (this *Request) Equal(that interface{}) bool { } else if !this.Value.Equal(that1.Value) { return false } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } return true } func (this *Request_Echo) Equal(that interface{}) bool { @@ -2275,6 +3296,9 @@ func (this *RequestEcho) Equal(that interface{}) bool { if this.Message != that1.Message { return false } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } return true } func (this *RequestFlush) Equal(that interface{}) bool { @@ -2296,6 +3320,9 @@ func (this *RequestFlush) Equal(that interface{}) bool { } else if this == nil { return false } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } return true } func (this *RequestInfo) Equal(that interface{}) bool { @@ -2320,6 +3347,9 @@ func (this *RequestInfo) Equal(that interface{}) bool { if this.Version != that1.Version { return false } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } return true } func (this *RequestSetOption) Equal(that interface{}) bool { @@ -2347,6 +3377,9 @@ func (this *RequestSetOption) Equal(that interface{}) bool { if this.Value != that1.Value { return false } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } return true } func (this *RequestInitChain) Equal(that interface{}) bool { @@ -2368,7 +3401,7 @@ func (this *RequestInitChain) Equal(that interface{}) bool { } else if this == nil { return false } - if this.Time != that1.Time { + if !this.Time.Equal(that1.Time) { return false } if this.ChainId != that1.ChainId { @@ -2388,6 +3421,9 @@ func (this *RequestInitChain) Equal(that interface{}) bool { if !bytes.Equal(this.AppStateBytes, that1.AppStateBytes) { return false } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } return true } func (this *RequestQuery) Equal(that interface{}) bool { @@ -2421,6 +3457,9 @@ func (this *RequestQuery) Equal(that interface{}) bool { if this.Prove != that1.Prove { return false } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } return true } func (this *RequestBeginBlock) Equal(that interface{}) bool { @@ -2464,6 +3503,9 @@ func (this *RequestBeginBlock) Equal(that interface{}) bool { return false } } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } return true } func (this *RequestCheckTx) Equal(that interface{}) bool { @@ -2488,6 +3530,9 @@ func (this *RequestCheckTx) Equal(that interface{}) bool { if !bytes.Equal(this.Tx, that1.Tx) { return false } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } return true } func (this *RequestDeliverTx) Equal(that interface{}) bool { @@ -2512,6 +3557,9 @@ func (this *RequestDeliverTx) Equal(that interface{}) bool { if !bytes.Equal(this.Tx, that1.Tx) { return false } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } return true } func (this *RequestEndBlock) Equal(that interface{}) bool { @@ -2536,6 +3584,9 @@ func (this *RequestEndBlock) Equal(that interface{}) bool { if this.Height != that1.Height { return false } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } return true } func (this *RequestCommit) Equal(that interface{}) bool { @@ -2557,6 +3608,9 @@ func (this *RequestCommit) Equal(that interface{}) bool { } else if this == nil { return false } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } return true } func (this *Response) Equal(that interface{}) bool { @@ -2587,6 +3641,9 @@ func (this *Response) Equal(that interface{}) bool { } else if !this.Value.Equal(that1.Value) { return false } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } return true } func (this *Response_Exception) Equal(that interface{}) bool { @@ -2899,6 +3956,9 @@ func (this *ResponseException) Equal(that interface{}) bool { if this.Error != that1.Error { return false } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } return true } func (this *ResponseEcho) Equal(that interface{}) bool { @@ -2923,6 +3983,9 @@ func (this *ResponseEcho) Equal(that interface{}) bool { if this.Message != that1.Message { return false } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } return true } func (this *ResponseFlush) Equal(that interface{}) bool { @@ -2944,6 +4007,9 @@ func (this *ResponseFlush) Equal(that interface{}) bool { } else if this == nil { return false } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } return true } func (this *ResponseInfo) Equal(that interface{}) bool { @@ -2977,6 +4043,9 @@ func (this *ResponseInfo) Equal(that interface{}) bool { if !bytes.Equal(this.LastBlockAppHash, that1.LastBlockAppHash) { return false } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } return true } func (this *ResponseSetOption) Equal(that interface{}) bool { @@ -3007,6 +4076,9 @@ func (this *ResponseSetOption) Equal(that interface{}) bool { if this.Info != that1.Info { return false } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } return true } func (this *ResponseInitChain) Equal(that interface{}) bool { @@ -3039,6 +4111,9 @@ func (this *ResponseInitChain) Equal(that interface{}) bool { return false } } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } return true } func (this *ResponseQuery) Equal(that interface{}) bool { @@ -3084,6 +4159,9 @@ func (this *ResponseQuery) Equal(that interface{}) bool { if this.Height != that1.Height { return false } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } return true } func (this *ResponseBeginBlock) Equal(that interface{}) bool { @@ -3113,6 +4191,9 @@ func (this *ResponseBeginBlock) Equal(that interface{}) bool { return false } } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } return true } func (this *ResponseCheckTx) Equal(that interface{}) bool { @@ -3160,6 +4241,9 @@ func (this *ResponseCheckTx) Equal(that interface{}) bool { return false } } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } return true } func (this *ResponseDeliverTx) Equal(that interface{}) bool { @@ -3207,6 +4291,9 @@ func (this *ResponseDeliverTx) Equal(that interface{}) bool { return false } } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } return true } func (this *ResponseEndBlock) Equal(that interface{}) bool { @@ -3247,6 +4334,9 @@ func (this *ResponseEndBlock) Equal(that interface{}) bool { return false } } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } return true } func (this *ResponseCommit) Equal(that interface{}) bool { @@ -3271,6 +4361,9 @@ func (this *ResponseCommit) Equal(that interface{}) bool { if !bytes.Equal(this.Data, that1.Data) { return false } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } return true } func (this *ConsensusParams) Equal(that interface{}) bool { @@ -3301,6 +4394,9 @@ func (this *ConsensusParams) Equal(that interface{}) bool { if !this.BlockGossip.Equal(that1.BlockGossip) { return false } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } return true } func (this *BlockSize) Equal(that interface{}) bool { @@ -3331,6 +4427,9 @@ func (this *BlockSize) Equal(that interface{}) bool { if this.MaxGas != that1.MaxGas { return false } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } return true } func (this *TxSize) Equal(that interface{}) bool { @@ -3358,6 +4457,9 @@ func (this *TxSize) Equal(that interface{}) bool { 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 { @@ -3382,6 +4484,9 @@ func (this *BlockGossip) Equal(that interface{}) bool { if this.BlockPartSizeBytes != that1.BlockPartSizeBytes { return false } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } return true } func (this *Header) Equal(that interface{}) bool { @@ -3409,7 +4514,7 @@ func (this *Header) Equal(that interface{}) bool { if this.Height != that1.Height { return false } - if this.Time != that1.Time { + if !this.Time.Equal(that1.Time) { return false } if this.NumTxs != that1.NumTxs { @@ -3430,6 +4535,9 @@ func (this *Header) Equal(that interface{}) bool { if !this.Proposer.Equal(&that1.Proposer) { return false } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } return true } func (this *Validator) Equal(that interface{}) bool { @@ -3460,6 +4568,9 @@ func (this *Validator) Equal(that interface{}) bool { if this.Power != that1.Power { return false } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } return true } func (this *SigningValidator) Equal(that interface{}) bool { @@ -3487,6 +4598,9 @@ func (this *SigningValidator) Equal(that interface{}) bool { if this.SignedLastBlock != that1.SignedLastBlock { return false } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } return true } func (this *PubKey) Equal(that interface{}) bool { @@ -3514,6 +4628,9 @@ func (this *PubKey) Equal(that interface{}) bool { if !bytes.Equal(this.Data, that1.Data) { return false } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } return true } func (this *Evidence) Equal(that interface{}) bool { @@ -3544,12 +4661,15 @@ func (this *Evidence) Equal(that interface{}) bool { if this.Height != that1.Height { return false } - if this.Time != that1.Time { + if !this.Time.Equal(that1.Time) { return false } if this.TotalVotingPower != that1.TotalVotingPower { return false } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } return true } @@ -3587,7 +4707,7 @@ func NewABCIApplicationClient(cc *grpc.ClientConn) ABCIApplicationClient { func (c *aBCIApplicationClient) Echo(ctx context.Context, in *RequestEcho, opts ...grpc.CallOption) (*ResponseEcho, error) { out := new(ResponseEcho) - err := grpc.Invoke(ctx, "/types.ABCIApplication/Echo", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/types.ABCIApplication/Echo", in, out, opts...) if err != nil { return nil, err } @@ -3596,7 +4716,7 @@ func (c *aBCIApplicationClient) Echo(ctx context.Context, in *RequestEcho, opts func (c *aBCIApplicationClient) Flush(ctx context.Context, in *RequestFlush, opts ...grpc.CallOption) (*ResponseFlush, error) { out := new(ResponseFlush) - err := grpc.Invoke(ctx, "/types.ABCIApplication/Flush", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/types.ABCIApplication/Flush", in, out, opts...) if err != nil { return nil, err } @@ -3605,7 +4725,7 @@ func (c *aBCIApplicationClient) Flush(ctx context.Context, in *RequestFlush, opt func (c *aBCIApplicationClient) Info(ctx context.Context, in *RequestInfo, opts ...grpc.CallOption) (*ResponseInfo, error) { out := new(ResponseInfo) - err := grpc.Invoke(ctx, "/types.ABCIApplication/Info", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/types.ABCIApplication/Info", in, out, opts...) if err != nil { return nil, err } @@ -3614,7 +4734,7 @@ func (c *aBCIApplicationClient) Info(ctx context.Context, in *RequestInfo, opts func (c *aBCIApplicationClient) SetOption(ctx context.Context, in *RequestSetOption, opts ...grpc.CallOption) (*ResponseSetOption, error) { out := new(ResponseSetOption) - err := grpc.Invoke(ctx, "/types.ABCIApplication/SetOption", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/types.ABCIApplication/SetOption", in, out, opts...) if err != nil { return nil, err } @@ -3623,7 +4743,7 @@ func (c *aBCIApplicationClient) SetOption(ctx context.Context, in *RequestSetOpt func (c *aBCIApplicationClient) DeliverTx(ctx context.Context, in *RequestDeliverTx, opts ...grpc.CallOption) (*ResponseDeliverTx, error) { out := new(ResponseDeliverTx) - err := grpc.Invoke(ctx, "/types.ABCIApplication/DeliverTx", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/types.ABCIApplication/DeliverTx", in, out, opts...) if err != nil { return nil, err } @@ -3632,7 +4752,7 @@ func (c *aBCIApplicationClient) DeliverTx(ctx context.Context, in *RequestDelive func (c *aBCIApplicationClient) CheckTx(ctx context.Context, in *RequestCheckTx, opts ...grpc.CallOption) (*ResponseCheckTx, error) { out := new(ResponseCheckTx) - err := grpc.Invoke(ctx, "/types.ABCIApplication/CheckTx", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/types.ABCIApplication/CheckTx", in, out, opts...) if err != nil { return nil, err } @@ -3641,7 +4761,7 @@ func (c *aBCIApplicationClient) CheckTx(ctx context.Context, in *RequestCheckTx, func (c *aBCIApplicationClient) Query(ctx context.Context, in *RequestQuery, opts ...grpc.CallOption) (*ResponseQuery, error) { out := new(ResponseQuery) - err := grpc.Invoke(ctx, "/types.ABCIApplication/Query", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/types.ABCIApplication/Query", in, out, opts...) if err != nil { return nil, err } @@ -3650,7 +4770,7 @@ func (c *aBCIApplicationClient) Query(ctx context.Context, in *RequestQuery, opt func (c *aBCIApplicationClient) Commit(ctx context.Context, in *RequestCommit, opts ...grpc.CallOption) (*ResponseCommit, error) { out := new(ResponseCommit) - err := grpc.Invoke(ctx, "/types.ABCIApplication/Commit", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/types.ABCIApplication/Commit", in, out, opts...) if err != nil { return nil, err } @@ -3659,7 +4779,7 @@ func (c *aBCIApplicationClient) Commit(ctx context.Context, in *RequestCommit, o func (c *aBCIApplicationClient) InitChain(ctx context.Context, in *RequestInitChain, opts ...grpc.CallOption) (*ResponseInitChain, error) { out := new(ResponseInitChain) - err := grpc.Invoke(ctx, "/types.ABCIApplication/InitChain", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/types.ABCIApplication/InitChain", in, out, opts...) if err != nil { return nil, err } @@ -3668,7 +4788,7 @@ func (c *aBCIApplicationClient) InitChain(ctx context.Context, in *RequestInitCh func (c *aBCIApplicationClient) BeginBlock(ctx context.Context, in *RequestBeginBlock, opts ...grpc.CallOption) (*ResponseBeginBlock, error) { out := new(ResponseBeginBlock) - err := grpc.Invoke(ctx, "/types.ABCIApplication/BeginBlock", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/types.ABCIApplication/BeginBlock", in, out, opts...) if err != nil { return nil, err } @@ -3677,7 +4797,7 @@ func (c *aBCIApplicationClient) BeginBlock(ctx context.Context, in *RequestBegin func (c *aBCIApplicationClient) EndBlock(ctx context.Context, in *RequestEndBlock, opts ...grpc.CallOption) (*ResponseEndBlock, error) { out := new(ResponseEndBlock) - err := grpc.Invoke(ctx, "/types.ABCIApplication/EndBlock", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/types.ABCIApplication/EndBlock", in, out, opts...) if err != nil { return nil, err } @@ -3977,6 +5097,9 @@ func (m *Request) MarshalTo(dAtA []byte) (int, error) { } i += nn1 } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } return i, nil } @@ -4157,6 +5280,9 @@ func (m *RequestEcho) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintTypes(dAtA, i, uint64(len(m.Message))) i += copy(dAtA[i:], m.Message) } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } return i, nil } @@ -4175,6 +5301,9 @@ func (m *RequestFlush) MarshalTo(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } return i, nil } @@ -4199,6 +5328,9 @@ func (m *RequestInfo) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintTypes(dAtA, i, uint64(len(m.Version))) i += copy(dAtA[i:], m.Version) } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } return i, nil } @@ -4229,6 +5361,9 @@ func (m *RequestSetOption) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintTypes(dAtA, i, uint64(len(m.Value))) i += copy(dAtA[i:], m.Value) } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } return i, nil } @@ -4247,11 +5382,14 @@ func (m *RequestInitChain) MarshalTo(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.Time != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintTypes(dAtA, i, uint64(m.Time)) + dAtA[i] = 0xa + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.Time))) + n13, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i:]) + if err != nil { + return 0, err } + i += n13 if len(m.ChainId) > 0 { dAtA[i] = 0x12 i++ @@ -4262,11 +5400,11 @@ func (m *RequestInitChain) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1a i++ i = encodeVarintTypes(dAtA, i, uint64(m.ConsensusParams.Size())) - n13, err := m.ConsensusParams.MarshalTo(dAtA[i:]) + n14, err := m.ConsensusParams.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n13 + i += n14 } if len(m.Validators) > 0 { for _, msg := range m.Validators { @@ -4286,6 +5424,9 @@ func (m *RequestInitChain) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintTypes(dAtA, i, uint64(len(m.AppStateBytes))) i += copy(dAtA[i:], m.AppStateBytes) } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } return i, nil } @@ -4331,6 +5472,9 @@ func (m *RequestQuery) MarshalTo(dAtA []byte) (int, error) { } i++ } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } return i, nil } @@ -4358,11 +5502,11 @@ func (m *RequestBeginBlock) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintTypes(dAtA, i, uint64(m.Header.Size())) - n14, err := m.Header.MarshalTo(dAtA[i:]) + n15, err := m.Header.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n14 + i += n15 if len(m.Validators) > 0 { for _, msg := range m.Validators { dAtA[i] = 0x1a @@ -4387,6 +5531,9 @@ func (m *RequestBeginBlock) MarshalTo(dAtA []byte) (int, error) { i += n } } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } return i, nil } @@ -4411,6 +5558,9 @@ func (m *RequestCheckTx) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintTypes(dAtA, i, uint64(len(m.Tx))) i += copy(dAtA[i:], m.Tx) } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } return i, nil } @@ -4435,6 +5585,9 @@ func (m *RequestDeliverTx) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintTypes(dAtA, i, uint64(len(m.Tx))) i += copy(dAtA[i:], m.Tx) } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } return i, nil } @@ -4458,6 +5611,9 @@ func (m *RequestEndBlock) MarshalTo(dAtA []byte) (int, error) { i++ i = encodeVarintTypes(dAtA, i, uint64(m.Height)) } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } return i, nil } @@ -4476,6 +5632,9 @@ func (m *RequestCommit) MarshalTo(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } return i, nil } @@ -4495,11 +5654,14 @@ func (m *Response) MarshalTo(dAtA []byte) (int, error) { var l int _ = l if m.Value != nil { - nn15, err := m.Value.MarshalTo(dAtA[i:]) + nn16, err := m.Value.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += nn15 + i += nn16 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } return i, nil } @@ -4510,11 +5672,11 @@ func (m *Response_Exception) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintTypes(dAtA, i, uint64(m.Exception.Size())) - n16, err := m.Exception.MarshalTo(dAtA[i:]) + n17, err := m.Exception.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n16 + i += n17 } return i, nil } @@ -4524,11 +5686,11 @@ func (m *Response_Echo) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintTypes(dAtA, i, uint64(m.Echo.Size())) - n17, err := m.Echo.MarshalTo(dAtA[i:]) + n18, err := m.Echo.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n17 + i += n18 } return i, nil } @@ -4538,11 +5700,11 @@ func (m *Response_Flush) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1a i++ i = encodeVarintTypes(dAtA, i, uint64(m.Flush.Size())) - n18, err := m.Flush.MarshalTo(dAtA[i:]) + n19, err := m.Flush.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n18 + i += n19 } return i, nil } @@ -4552,11 +5714,11 @@ func (m *Response_Info) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x22 i++ i = encodeVarintTypes(dAtA, i, uint64(m.Info.Size())) - n19, err := m.Info.MarshalTo(dAtA[i:]) + n20, err := m.Info.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n19 + i += n20 } return i, nil } @@ -4566,11 +5728,11 @@ func (m *Response_SetOption) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x2a i++ i = encodeVarintTypes(dAtA, i, uint64(m.SetOption.Size())) - n20, err := m.SetOption.MarshalTo(dAtA[i:]) + n21, err := m.SetOption.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n20 + i += n21 } return i, nil } @@ -4580,11 +5742,11 @@ func (m *Response_InitChain) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x32 i++ i = encodeVarintTypes(dAtA, i, uint64(m.InitChain.Size())) - n21, err := m.InitChain.MarshalTo(dAtA[i:]) + n22, err := m.InitChain.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n21 + i += n22 } return i, nil } @@ -4594,11 +5756,11 @@ func (m *Response_Query) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x3a i++ i = encodeVarintTypes(dAtA, i, uint64(m.Query.Size())) - n22, err := m.Query.MarshalTo(dAtA[i:]) + n23, err := m.Query.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n22 + i += n23 } return i, nil } @@ -4608,11 +5770,11 @@ func (m *Response_BeginBlock) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x42 i++ i = encodeVarintTypes(dAtA, i, uint64(m.BeginBlock.Size())) - n23, err := m.BeginBlock.MarshalTo(dAtA[i:]) + n24, err := m.BeginBlock.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n23 + i += n24 } return i, nil } @@ -4622,11 +5784,11 @@ func (m *Response_CheckTx) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x4a i++ i = encodeVarintTypes(dAtA, i, uint64(m.CheckTx.Size())) - n24, err := m.CheckTx.MarshalTo(dAtA[i:]) + n25, err := m.CheckTx.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n24 + i += n25 } return i, nil } @@ -4636,11 +5798,11 @@ func (m *Response_DeliverTx) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x52 i++ i = encodeVarintTypes(dAtA, i, uint64(m.DeliverTx.Size())) - n25, err := m.DeliverTx.MarshalTo(dAtA[i:]) + n26, err := m.DeliverTx.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n25 + i += n26 } return i, nil } @@ -4650,11 +5812,11 @@ func (m *Response_EndBlock) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x5a i++ i = encodeVarintTypes(dAtA, i, uint64(m.EndBlock.Size())) - n26, err := m.EndBlock.MarshalTo(dAtA[i:]) + n27, err := m.EndBlock.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n26 + i += n27 } return i, nil } @@ -4664,11 +5826,11 @@ func (m *Response_Commit) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x62 i++ i = encodeVarintTypes(dAtA, i, uint64(m.Commit.Size())) - n27, err := m.Commit.MarshalTo(dAtA[i:]) + n28, err := m.Commit.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n27 + i += n28 } return i, nil } @@ -4693,6 +5855,9 @@ func (m *ResponseException) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintTypes(dAtA, i, uint64(len(m.Error))) i += copy(dAtA[i:], m.Error) } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } return i, nil } @@ -4717,6 +5882,9 @@ func (m *ResponseEcho) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintTypes(dAtA, i, uint64(len(m.Message))) i += copy(dAtA[i:], m.Message) } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } return i, nil } @@ -4735,6 +5903,9 @@ func (m *ResponseFlush) MarshalTo(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } return i, nil } @@ -4776,6 +5947,9 @@ func (m *ResponseInfo) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintTypes(dAtA, i, uint64(len(m.LastBlockAppHash))) i += copy(dAtA[i:], m.LastBlockAppHash) } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } return i, nil } @@ -4811,6 +5985,9 @@ func (m *ResponseSetOption) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintTypes(dAtA, i, uint64(len(m.Info))) i += copy(dAtA[i:], m.Info) } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } return i, nil } @@ -4833,11 +6010,11 @@ func (m *ResponseInitChain) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintTypes(dAtA, i, uint64(m.ConsensusParams.Size())) - n28, err := m.ConsensusParams.MarshalTo(dAtA[i:]) + n29, err := m.ConsensusParams.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n28 + i += n29 } if len(m.Validators) > 0 { for _, msg := range m.Validators { @@ -4851,6 +6028,9 @@ func (m *ResponseInitChain) MarshalTo(dAtA []byte) (int, error) { i += n } } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } return i, nil } @@ -4914,6 +6094,9 @@ func (m *ResponseQuery) MarshalTo(dAtA []byte) (int, error) { i++ i = encodeVarintTypes(dAtA, i, uint64(m.Height)) } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } return i, nil } @@ -4944,6 +6127,9 @@ func (m *ResponseBeginBlock) MarshalTo(dAtA []byte) (int, error) { i += n } } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } return i, nil } @@ -5007,6 +6193,9 @@ func (m *ResponseCheckTx) MarshalTo(dAtA []byte) (int, error) { i += n } } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } return i, nil } @@ -5070,6 +6259,9 @@ func (m *ResponseDeliverTx) MarshalTo(dAtA []byte) (int, error) { i += n } } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } return i, nil } @@ -5104,11 +6296,11 @@ func (m *ResponseEndBlock) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintTypes(dAtA, i, uint64(m.ConsensusParamUpdates.Size())) - n29, err := m.ConsensusParamUpdates.MarshalTo(dAtA[i:]) + n30, err := m.ConsensusParamUpdates.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n29 + i += n30 } if len(m.Tags) > 0 { for _, msg := range m.Tags { @@ -5122,6 +6314,9 @@ func (m *ResponseEndBlock) MarshalTo(dAtA []byte) (int, error) { i += n } } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } return i, nil } @@ -5146,6 +6341,9 @@ func (m *ResponseCommit) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintTypes(dAtA, i, uint64(len(m.Data))) i += copy(dAtA[i:], m.Data) } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } return i, nil } @@ -5168,31 +6366,34 @@ func (m *ConsensusParams) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintTypes(dAtA, i, uint64(m.BlockSize.Size())) - n30, err := m.BlockSize.MarshalTo(dAtA[i:]) + n31, err := m.BlockSize.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n30 + i += n31 } if m.TxSize != nil { dAtA[i] = 0x12 i++ i = encodeVarintTypes(dAtA, i, uint64(m.TxSize.Size())) - n31, err := m.TxSize.MarshalTo(dAtA[i:]) + n32, err := m.TxSize.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n31 + i += n32 } if m.BlockGossip != nil { dAtA[i] = 0x1a i++ i = encodeVarintTypes(dAtA, i, uint64(m.BlockGossip.Size())) - n32, err := m.BlockGossip.MarshalTo(dAtA[i:]) + n33, err := m.BlockGossip.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n32 + i += n33 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } return i, nil } @@ -5227,6 +6428,9 @@ func (m *BlockSize) MarshalTo(dAtA []byte) (int, error) { i++ i = encodeVarintTypes(dAtA, i, uint64(m.MaxGas)) } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } return i, nil } @@ -5255,6 +6459,9 @@ func (m *TxSize) MarshalTo(dAtA []byte) (int, error) { i++ i = encodeVarintTypes(dAtA, i, uint64(m.MaxGas)) } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } return i, nil } @@ -5278,6 +6485,9 @@ func (m *BlockGossip) MarshalTo(dAtA []byte) (int, error) { i++ i = encodeVarintTypes(dAtA, i, uint64(m.BlockPartSizeBytes)) } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } return i, nil } @@ -5307,11 +6517,14 @@ func (m *Header) MarshalTo(dAtA []byte) (int, error) { i++ i = encodeVarintTypes(dAtA, i, uint64(m.Height)) } - if m.Time != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintTypes(dAtA, i, uint64(m.Time)) + dAtA[i] = 0x1a + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.Time))) + n34, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i:]) + if err != nil { + return 0, err } + i += n34 if m.NumTxs != 0 { dAtA[i] = 0x20 i++ @@ -5343,11 +6556,14 @@ func (m *Header) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x4a i++ i = encodeVarintTypes(dAtA, i, uint64(m.Proposer.Size())) - n33, err := m.Proposer.MarshalTo(dAtA[i:]) + n35, err := m.Proposer.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n33 + i += n35 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } return i, nil } @@ -5375,16 +6591,19 @@ func (m *Validator) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintTypes(dAtA, i, uint64(m.PubKey.Size())) - n34, err := m.PubKey.MarshalTo(dAtA[i:]) + n36, err := m.PubKey.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n34 + i += n36 if m.Power != 0 { dAtA[i] = 0x18 i++ i = encodeVarintTypes(dAtA, i, uint64(m.Power)) } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } return i, nil } @@ -5406,11 +6625,11 @@ func (m *SigningValidator) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintTypes(dAtA, i, uint64(m.Validator.Size())) - n35, err := m.Validator.MarshalTo(dAtA[i:]) + n37, err := m.Validator.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n35 + i += n37 if m.SignedLastBlock { dAtA[i] = 0x10 i++ @@ -5421,6 +6640,9 @@ func (m *SigningValidator) MarshalTo(dAtA []byte) (int, error) { } i++ } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } return i, nil } @@ -5451,6 +6673,9 @@ func (m *PubKey) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintTypes(dAtA, i, uint64(len(m.Data))) i += copy(dAtA[i:], m.Data) } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } return i, nil } @@ -5478,26 +6703,32 @@ func (m *Evidence) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintTypes(dAtA, i, uint64(m.Validator.Size())) - n36, err := m.Validator.MarshalTo(dAtA[i:]) + n38, err := m.Validator.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n36 + i += n38 if m.Height != 0 { dAtA[i] = 0x18 i++ i = encodeVarintTypes(dAtA, i, uint64(m.Height)) } - if m.Time != 0 { - dAtA[i] = 0x20 - i++ - i = encodeVarintTypes(dAtA, i, uint64(m.Time)) + dAtA[i] = 0x22 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.Time))) + n39, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i:]) + if err != nil { + return 0, err } + i += n39 if m.TotalVotingPower != 0 { dAtA[i] = 0x28 i++ i = encodeVarintTypes(dAtA, i, uint64(m.TotalVotingPower)) } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } return i, nil } @@ -5538,6 +6769,7 @@ func NewPopulatedRequest(r randyTypes, easy bool) *Request { this.Value = NewPopulatedRequest_DeliverTx(r, easy) } if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 20) } return this } @@ -5601,6 +6833,7 @@ func NewPopulatedRequestEcho(r randyTypes, easy bool) *RequestEcho { this := &RequestEcho{} this.Message = string(randStringTypes(r)) if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 2) } return this } @@ -5608,6 +6841,7 @@ func NewPopulatedRequestEcho(r randyTypes, easy bool) *RequestEcho { func NewPopulatedRequestFlush(r randyTypes, easy bool) *RequestFlush { this := &RequestFlush{} if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 1) } return this } @@ -5616,6 +6850,7 @@ func NewPopulatedRequestInfo(r randyTypes, easy bool) *RequestInfo { this := &RequestInfo{} this.Version = string(randStringTypes(r)) if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 2) } return this } @@ -5625,43 +6860,43 @@ func NewPopulatedRequestSetOption(r randyTypes, easy bool) *RequestSetOption { this.Key = string(randStringTypes(r)) this.Value = string(randStringTypes(r)) if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 3) } return this } func NewPopulatedRequestInitChain(r randyTypes, easy bool) *RequestInitChain { this := &RequestInitChain{} - this.Time = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Time *= -1 - } + v1 := github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + this.Time = *v1 this.ChainId = string(randStringTypes(r)) if r.Intn(10) != 0 { this.ConsensusParams = NewPopulatedConsensusParams(r, easy) } if r.Intn(10) != 0 { - v1 := r.Intn(5) - this.Validators = make([]Validator, v1) - for i := 0; i < v1; i++ { - v2 := NewPopulatedValidator(r, easy) - this.Validators[i] = *v2 + v2 := r.Intn(5) + this.Validators = make([]Validator, v2) + for i := 0; i < v2; i++ { + v3 := NewPopulatedValidator(r, easy) + this.Validators[i] = *v3 } } - v3 := r.Intn(100) - this.AppStateBytes = make([]byte, v3) - for i := 0; i < v3; i++ { + v4 := r.Intn(100) + this.AppStateBytes = make([]byte, v4) + for i := 0; i < v4; i++ { this.AppStateBytes[i] = byte(r.Intn(256)) } if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 6) } return this } func NewPopulatedRequestQuery(r randyTypes, easy bool) *RequestQuery { this := &RequestQuery{} - v4 := r.Intn(100) - this.Data = make([]byte, v4) - for i := 0; i < v4; i++ { + v5 := r.Intn(100) + this.Data = make([]byte, v5) + for i := 0; i < v5; i++ { this.Data[i] = byte(r.Intn(256)) } this.Path = string(randStringTypes(r)) @@ -5671,60 +6906,64 @@ func NewPopulatedRequestQuery(r randyTypes, easy bool) *RequestQuery { } this.Prove = bool(bool(r.Intn(2) == 0)) if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 5) } return this } func NewPopulatedRequestBeginBlock(r randyTypes, easy bool) *RequestBeginBlock { this := &RequestBeginBlock{} - v5 := r.Intn(100) - this.Hash = make([]byte, v5) - for i := 0; i < v5; i++ { + v6 := r.Intn(100) + this.Hash = make([]byte, v6) + for i := 0; i < v6; i++ { this.Hash[i] = byte(r.Intn(256)) } - v6 := NewPopulatedHeader(r, easy) - this.Header = *v6 + v7 := NewPopulatedHeader(r, easy) + this.Header = *v7 if r.Intn(10) != 0 { - v7 := r.Intn(5) - this.Validators = make([]SigningValidator, v7) - for i := 0; i < v7; i++ { - v8 := NewPopulatedSigningValidator(r, easy) - this.Validators[i] = *v8 + v8 := r.Intn(5) + this.Validators = make([]SigningValidator, v8) + for i := 0; i < v8; i++ { + v9 := NewPopulatedSigningValidator(r, easy) + this.Validators[i] = *v9 } } if r.Intn(10) != 0 { - v9 := r.Intn(5) - this.ByzantineValidators = make([]Evidence, v9) - for i := 0; i < v9; i++ { - v10 := NewPopulatedEvidence(r, easy) - this.ByzantineValidators[i] = *v10 + v10 := r.Intn(5) + this.ByzantineValidators = make([]Evidence, v10) + for i := 0; i < v10; i++ { + v11 := NewPopulatedEvidence(r, easy) + this.ByzantineValidators[i] = *v11 } } if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 5) } return this } func NewPopulatedRequestCheckTx(r randyTypes, easy bool) *RequestCheckTx { this := &RequestCheckTx{} - v11 := r.Intn(100) - this.Tx = make([]byte, v11) - for i := 0; i < v11; i++ { + v12 := r.Intn(100) + this.Tx = make([]byte, v12) + for i := 0; i < v12; i++ { this.Tx[i] = byte(r.Intn(256)) } if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 2) } return this } func NewPopulatedRequestDeliverTx(r randyTypes, easy bool) *RequestDeliverTx { this := &RequestDeliverTx{} - v12 := r.Intn(100) - this.Tx = make([]byte, v12) - for i := 0; i < v12; i++ { + v13 := r.Intn(100) + this.Tx = make([]byte, v13) + for i := 0; i < v13; i++ { this.Tx[i] = byte(r.Intn(256)) } if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 2) } return this } @@ -5736,6 +6975,7 @@ func NewPopulatedRequestEndBlock(r randyTypes, easy bool) *RequestEndBlock { this.Height *= -1 } if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 2) } return this } @@ -5743,6 +6983,7 @@ func NewPopulatedRequestEndBlock(r randyTypes, easy bool) *RequestEndBlock { func NewPopulatedRequestCommit(r randyTypes, easy bool) *RequestCommit { this := &RequestCommit{} if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 1) } return this } @@ -5777,6 +7018,7 @@ func NewPopulatedResponse(r randyTypes, easy bool) *Response { this.Value = NewPopulatedResponse_Commit(r, easy) } if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 13) } return this } @@ -5845,6 +7087,7 @@ func NewPopulatedResponseException(r randyTypes, easy bool) *ResponseException { this := &ResponseException{} this.Error = string(randStringTypes(r)) if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 2) } return this } @@ -5853,6 +7096,7 @@ func NewPopulatedResponseEcho(r randyTypes, easy bool) *ResponseEcho { this := &ResponseEcho{} this.Message = string(randStringTypes(r)) if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 2) } return this } @@ -5860,6 +7104,7 @@ func NewPopulatedResponseEcho(r randyTypes, easy bool) *ResponseEcho { func NewPopulatedResponseFlush(r randyTypes, easy bool) *ResponseFlush { this := &ResponseFlush{} if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 1) } return this } @@ -5872,12 +7117,13 @@ func NewPopulatedResponseInfo(r randyTypes, easy bool) *ResponseInfo { if r.Intn(2) == 0 { this.LastBlockHeight *= -1 } - v13 := r.Intn(100) - this.LastBlockAppHash = make([]byte, v13) - for i := 0; i < v13; i++ { + v14 := r.Intn(100) + this.LastBlockAppHash = make([]byte, v14) + for i := 0; i < v14; i++ { this.LastBlockAppHash[i] = byte(r.Intn(256)) } if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 5) } return this } @@ -5888,6 +7134,7 @@ func NewPopulatedResponseSetOption(r randyTypes, easy bool) *ResponseSetOption { this.Log = string(randStringTypes(r)) this.Info = string(randStringTypes(r)) if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 5) } return this } @@ -5898,14 +7145,15 @@ func NewPopulatedResponseInitChain(r randyTypes, easy bool) *ResponseInitChain { this.ConsensusParams = NewPopulatedConsensusParams(r, easy) } if r.Intn(10) != 0 { - v14 := r.Intn(5) - this.Validators = make([]Validator, v14) - for i := 0; i < v14; i++ { - v15 := NewPopulatedValidator(r, easy) - this.Validators[i] = *v15 + v15 := r.Intn(5) + this.Validators = make([]Validator, v15) + for i := 0; i < v15; i++ { + v16 := NewPopulatedValidator(r, easy) + this.Validators[i] = *v16 } } if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 3) } return this } @@ -5919,19 +7167,19 @@ func NewPopulatedResponseQuery(r randyTypes, easy bool) *ResponseQuery { if r.Intn(2) == 0 { this.Index *= -1 } - v16 := r.Intn(100) - this.Key = make([]byte, v16) - for i := 0; i < v16; i++ { - this.Key[i] = byte(r.Intn(256)) - } v17 := r.Intn(100) - this.Value = make([]byte, v17) + this.Key = make([]byte, v17) for i := 0; i < v17; i++ { - this.Value[i] = byte(r.Intn(256)) + this.Key[i] = byte(r.Intn(256)) } v18 := r.Intn(100) - this.Proof = make([]byte, v18) + this.Value = make([]byte, v18) for i := 0; i < v18; i++ { + this.Value[i] = byte(r.Intn(256)) + } + v19 := r.Intn(100) + this.Proof = make([]byte, v19) + for i := 0; i < v19; i++ { this.Proof[i] = byte(r.Intn(256)) } this.Height = int64(r.Int63()) @@ -5939,6 +7187,7 @@ func NewPopulatedResponseQuery(r randyTypes, easy bool) *ResponseQuery { this.Height *= -1 } if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 10) } return this } @@ -5946,14 +7195,15 @@ func NewPopulatedResponseQuery(r randyTypes, easy bool) *ResponseQuery { func NewPopulatedResponseBeginBlock(r randyTypes, easy bool) *ResponseBeginBlock { this := &ResponseBeginBlock{} if r.Intn(10) != 0 { - v19 := r.Intn(5) - this.Tags = make([]common.KVPair, v19) - for i := 0; i < v19; i++ { - v20 := common.NewPopulatedKVPair(r, easy) - this.Tags[i] = *v20 + v20 := r.Intn(5) + this.Tags = make([]common.KVPair, v20) + for i := 0; i < v20; i++ { + v21 := common.NewPopulatedKVPair(r, easy) + this.Tags[i] = *v21 } } if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 2) } return this } @@ -5961,9 +7211,9 @@ func NewPopulatedResponseBeginBlock(r randyTypes, easy bool) *ResponseBeginBlock func NewPopulatedResponseCheckTx(r randyTypes, easy bool) *ResponseCheckTx { this := &ResponseCheckTx{} this.Code = uint32(r.Uint32()) - v21 := r.Intn(100) - this.Data = make([]byte, v21) - for i := 0; i < v21; i++ { + v22 := r.Intn(100) + this.Data = make([]byte, v22) + for i := 0; i < v22; i++ { this.Data[i] = byte(r.Intn(256)) } this.Log = string(randStringTypes(r)) @@ -5977,14 +7227,15 @@ func NewPopulatedResponseCheckTx(r randyTypes, easy bool) *ResponseCheckTx { this.GasUsed *= -1 } if r.Intn(10) != 0 { - v22 := r.Intn(5) - this.Tags = make([]common.KVPair, v22) - for i := 0; i < v22; i++ { - v23 := common.NewPopulatedKVPair(r, easy) - this.Tags[i] = *v23 + v23 := r.Intn(5) + this.Tags = make([]common.KVPair, v23) + for i := 0; i < v23; i++ { + v24 := common.NewPopulatedKVPair(r, easy) + this.Tags[i] = *v24 } } if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 8) } return this } @@ -5992,9 +7243,9 @@ func NewPopulatedResponseCheckTx(r randyTypes, easy bool) *ResponseCheckTx { func NewPopulatedResponseDeliverTx(r randyTypes, easy bool) *ResponseDeliverTx { this := &ResponseDeliverTx{} this.Code = uint32(r.Uint32()) - v24 := r.Intn(100) - this.Data = make([]byte, v24) - for i := 0; i < v24; i++ { + v25 := r.Intn(100) + this.Data = make([]byte, v25) + for i := 0; i < v25; i++ { this.Data[i] = byte(r.Intn(256)) } this.Log = string(randStringTypes(r)) @@ -6008,14 +7259,15 @@ func NewPopulatedResponseDeliverTx(r randyTypes, easy bool) *ResponseDeliverTx { this.GasUsed *= -1 } if r.Intn(10) != 0 { - v25 := r.Intn(5) - this.Tags = make([]common.KVPair, v25) - for i := 0; i < v25; i++ { - v26 := common.NewPopulatedKVPair(r, easy) - this.Tags[i] = *v26 + v26 := r.Intn(5) + this.Tags = make([]common.KVPair, v26) + for i := 0; i < v26; i++ { + v27 := common.NewPopulatedKVPair(r, easy) + this.Tags[i] = *v27 } } if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 8) } return this } @@ -6023,37 +7275,39 @@ func NewPopulatedResponseDeliverTx(r randyTypes, easy bool) *ResponseDeliverTx { func NewPopulatedResponseEndBlock(r randyTypes, easy bool) *ResponseEndBlock { this := &ResponseEndBlock{} if r.Intn(10) != 0 { - v27 := r.Intn(5) - this.ValidatorUpdates = make([]Validator, v27) - for i := 0; i < v27; i++ { - v28 := NewPopulatedValidator(r, easy) - this.ValidatorUpdates[i] = *v28 + v28 := r.Intn(5) + this.ValidatorUpdates = make([]Validator, v28) + for i := 0; i < v28; i++ { + v29 := NewPopulatedValidator(r, easy) + this.ValidatorUpdates[i] = *v29 } } if r.Intn(10) != 0 { this.ConsensusParamUpdates = NewPopulatedConsensusParams(r, easy) } if r.Intn(10) != 0 { - v29 := r.Intn(5) - this.Tags = make([]common.KVPair, v29) - for i := 0; i < v29; i++ { - v30 := common.NewPopulatedKVPair(r, easy) - this.Tags[i] = *v30 + v30 := r.Intn(5) + this.Tags = make([]common.KVPair, v30) + for i := 0; i < v30; i++ { + v31 := common.NewPopulatedKVPair(r, easy) + this.Tags[i] = *v31 } } if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 4) } return this } func NewPopulatedResponseCommit(r randyTypes, easy bool) *ResponseCommit { this := &ResponseCommit{} - v31 := r.Intn(100) - this.Data = make([]byte, v31) - for i := 0; i < v31; i++ { + v32 := r.Intn(100) + this.Data = make([]byte, v32) + for i := 0; i < v32; i++ { this.Data[i] = byte(r.Intn(256)) } if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 3) } return this } @@ -6070,6 +7324,7 @@ func NewPopulatedConsensusParams(r randyTypes, easy bool) *ConsensusParams { this.BlockGossip = NewPopulatedBlockGossip(r, easy) } if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 4) } return this } @@ -6089,6 +7344,7 @@ func NewPopulatedBlockSize(r randyTypes, easy bool) *BlockSize { this.MaxGas *= -1 } if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 4) } return this } @@ -6104,6 +7360,7 @@ func NewPopulatedTxSize(r randyTypes, easy bool) *TxSize { this.MaxGas *= -1 } if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 3) } return this } @@ -6115,6 +7372,7 @@ func NewPopulatedBlockGossip(r randyTypes, easy bool) *BlockGossip { this.BlockPartSizeBytes *= -1 } if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 2) } return this } @@ -6126,10 +7384,8 @@ func NewPopulatedHeader(r randyTypes, easy bool) *Header { if r.Intn(2) == 0 { this.Height *= -1 } - this.Time = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Time *= -1 - } + v33 := github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + this.Time = *v33 this.NumTxs = int32(r.Int31()) if r.Intn(2) == 0 { this.NumTxs *= -1 @@ -6138,52 +7394,55 @@ func NewPopulatedHeader(r randyTypes, easy bool) *Header { if r.Intn(2) == 0 { this.TotalTxs *= -1 } - v32 := r.Intn(100) - this.LastBlockHash = make([]byte, v32) - for i := 0; i < v32; i++ { + v34 := r.Intn(100) + this.LastBlockHash = make([]byte, v34) + for i := 0; i < v34; i++ { this.LastBlockHash[i] = byte(r.Intn(256)) } - v33 := r.Intn(100) - this.ValidatorsHash = make([]byte, v33) - for i := 0; i < v33; i++ { + v35 := r.Intn(100) + this.ValidatorsHash = make([]byte, v35) + for i := 0; i < v35; i++ { this.ValidatorsHash[i] = byte(r.Intn(256)) } - v34 := r.Intn(100) - this.AppHash = make([]byte, v34) - for i := 0; i < v34; i++ { + v36 := r.Intn(100) + this.AppHash = make([]byte, v36) + for i := 0; i < v36; i++ { this.AppHash[i] = byte(r.Intn(256)) } - v35 := NewPopulatedValidator(r, easy) - this.Proposer = *v35 + v37 := NewPopulatedValidator(r, easy) + this.Proposer = *v37 if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 10) } return this } func NewPopulatedValidator(r randyTypes, easy bool) *Validator { this := &Validator{} - v36 := r.Intn(100) - this.Address = make([]byte, v36) - for i := 0; i < v36; i++ { + v38 := r.Intn(100) + this.Address = make([]byte, v38) + for i := 0; i < v38; i++ { this.Address[i] = byte(r.Intn(256)) } - v37 := NewPopulatedPubKey(r, easy) - this.PubKey = *v37 + v39 := NewPopulatedPubKey(r, easy) + this.PubKey = *v39 this.Power = int64(r.Int63()) if r.Intn(2) == 0 { this.Power *= -1 } if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 4) } return this } func NewPopulatedSigningValidator(r randyTypes, easy bool) *SigningValidator { this := &SigningValidator{} - v38 := NewPopulatedValidator(r, easy) - this.Validator = *v38 + v40 := NewPopulatedValidator(r, easy) + this.Validator = *v40 this.SignedLastBlock = bool(bool(r.Intn(2) == 0)) if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 3) } return this } @@ -6191,12 +7450,13 @@ func NewPopulatedSigningValidator(r randyTypes, easy bool) *SigningValidator { func NewPopulatedPubKey(r randyTypes, easy bool) *PubKey { this := &PubKey{} this.Type = string(randStringTypes(r)) - v39 := r.Intn(100) - this.Data = make([]byte, v39) - for i := 0; i < v39; i++ { + v41 := r.Intn(100) + this.Data = make([]byte, v41) + for i := 0; i < v41; i++ { this.Data[i] = byte(r.Intn(256)) } if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 3) } return this } @@ -6204,21 +7464,20 @@ func NewPopulatedPubKey(r randyTypes, easy bool) *PubKey { func NewPopulatedEvidence(r randyTypes, easy bool) *Evidence { this := &Evidence{} this.Type = string(randStringTypes(r)) - v40 := NewPopulatedValidator(r, easy) - this.Validator = *v40 + v42 := NewPopulatedValidator(r, easy) + this.Validator = *v42 this.Height = int64(r.Int63()) if r.Intn(2) == 0 { this.Height *= -1 } - this.Time = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Time *= -1 - } + v43 := github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + this.Time = *v43 this.TotalVotingPower = int64(r.Int63()) if r.Intn(2) == 0 { this.TotalVotingPower *= -1 } if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 6) } return this } @@ -6242,9 +7501,9 @@ func randUTF8RuneTypes(r randyTypes) rune { return rune(ru + 61) } func randStringTypes(r randyTypes) string { - v41 := r.Intn(100) - tmps := make([]rune, v41) - for i := 0; i < v41; i++ { + v44 := r.Intn(100) + tmps := make([]rune, v44) + for i := 0; i < v44; i++ { tmps[i] = randUTF8RuneTypes(r) } return string(tmps) @@ -6266,11 +7525,11 @@ func randFieldTypes(dAtA []byte, r randyTypes, fieldNumber int, wire int) []byte switch wire { case 0: dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) - v42 := r.Int63() + v45 := r.Int63() if r.Intn(2) == 0 { - v42 *= -1 + v45 *= -1 } - dAtA = encodeVarintPopulateTypes(dAtA, uint64(v42)) + dAtA = encodeVarintPopulateTypes(dAtA, uint64(v45)) case 1: dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) @@ -6301,6 +7560,9 @@ func (m *Request) Size() (n int) { if m.Value != nil { n += m.Value.Size() } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } @@ -6410,12 +7672,18 @@ func (m *RequestEcho) Size() (n int) { if l > 0 { n += 1 + l + sovTypes(uint64(l)) } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } func (m *RequestFlush) Size() (n int) { var l int _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } @@ -6426,6 +7694,9 @@ func (m *RequestInfo) Size() (n int) { if l > 0 { n += 1 + l + sovTypes(uint64(l)) } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } @@ -6440,15 +7711,17 @@ func (m *RequestSetOption) Size() (n int) { if l > 0 { n += 1 + l + sovTypes(uint64(l)) } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } func (m *RequestInitChain) Size() (n int) { var l int _ = l - if m.Time != 0 { - n += 1 + sovTypes(uint64(m.Time)) - } + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time) + n += 1 + l + sovTypes(uint64(l)) l = len(m.ChainId) if l > 0 { n += 1 + l + sovTypes(uint64(l)) @@ -6467,6 +7740,9 @@ func (m *RequestInitChain) Size() (n int) { if l > 0 { n += 1 + l + sovTypes(uint64(l)) } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } @@ -6487,6 +7763,9 @@ func (m *RequestQuery) Size() (n int) { if m.Prove { n += 2 } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } @@ -6511,6 +7790,9 @@ func (m *RequestBeginBlock) Size() (n int) { n += 1 + l + sovTypes(uint64(l)) } } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } @@ -6521,6 +7803,9 @@ func (m *RequestCheckTx) Size() (n int) { if l > 0 { n += 1 + l + sovTypes(uint64(l)) } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } @@ -6531,6 +7816,9 @@ func (m *RequestDeliverTx) Size() (n int) { if l > 0 { n += 1 + l + sovTypes(uint64(l)) } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } @@ -6540,12 +7828,18 @@ func (m *RequestEndBlock) Size() (n int) { if m.Height != 0 { n += 1 + sovTypes(uint64(m.Height)) } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } func (m *RequestCommit) Size() (n int) { var l int _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } @@ -6555,6 +7849,9 @@ func (m *Response) Size() (n int) { if m.Value != nil { n += m.Value.Size() } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } @@ -6673,6 +7970,9 @@ func (m *ResponseException) Size() (n int) { if l > 0 { n += 1 + l + sovTypes(uint64(l)) } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } @@ -6683,12 +7983,18 @@ func (m *ResponseEcho) Size() (n int) { if l > 0 { n += 1 + l + sovTypes(uint64(l)) } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } func (m *ResponseFlush) Size() (n int) { var l int _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } @@ -6710,6 +8016,9 @@ func (m *ResponseInfo) Size() (n int) { if l > 0 { n += 1 + l + sovTypes(uint64(l)) } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } @@ -6727,6 +8036,9 @@ func (m *ResponseSetOption) Size() (n int) { if l > 0 { n += 1 + l + sovTypes(uint64(l)) } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } @@ -6743,6 +8055,9 @@ func (m *ResponseInitChain) Size() (n int) { n += 1 + l + sovTypes(uint64(l)) } } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } @@ -6778,6 +8093,9 @@ func (m *ResponseQuery) Size() (n int) { if m.Height != 0 { n += 1 + sovTypes(uint64(m.Height)) } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } @@ -6790,6 +8108,9 @@ func (m *ResponseBeginBlock) Size() (n int) { n += 1 + l + sovTypes(uint64(l)) } } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } @@ -6823,6 +8144,9 @@ func (m *ResponseCheckTx) Size() (n int) { n += 1 + l + sovTypes(uint64(l)) } } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } @@ -6856,6 +8180,9 @@ func (m *ResponseDeliverTx) Size() (n int) { n += 1 + l + sovTypes(uint64(l)) } } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } @@ -6878,6 +8205,9 @@ func (m *ResponseEndBlock) Size() (n int) { n += 1 + l + sovTypes(uint64(l)) } } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } @@ -6888,6 +8218,9 @@ func (m *ResponseCommit) Size() (n int) { if l > 0 { n += 1 + l + sovTypes(uint64(l)) } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } @@ -6906,6 +8239,9 @@ func (m *ConsensusParams) Size() (n int) { l = m.BlockGossip.Size() n += 1 + l + sovTypes(uint64(l)) } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } @@ -6921,6 +8257,9 @@ func (m *BlockSize) Size() (n int) { if m.MaxGas != 0 { n += 1 + sovTypes(uint64(m.MaxGas)) } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } @@ -6933,6 +8272,9 @@ func (m *TxSize) Size() (n int) { if m.MaxGas != 0 { n += 1 + sovTypes(uint64(m.MaxGas)) } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } @@ -6942,6 +8284,9 @@ func (m *BlockGossip) Size() (n int) { if m.BlockPartSizeBytes != 0 { n += 1 + sovTypes(uint64(m.BlockPartSizeBytes)) } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } @@ -6955,9 +8300,8 @@ func (m *Header) Size() (n int) { if m.Height != 0 { n += 1 + sovTypes(uint64(m.Height)) } - if m.Time != 0 { - n += 1 + sovTypes(uint64(m.Time)) - } + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time) + n += 1 + l + sovTypes(uint64(l)) if m.NumTxs != 0 { n += 1 + sovTypes(uint64(m.NumTxs)) } @@ -6978,6 +8322,9 @@ func (m *Header) Size() (n int) { } l = m.Proposer.Size() n += 1 + l + sovTypes(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } @@ -6993,6 +8340,9 @@ func (m *Validator) Size() (n int) { if m.Power != 0 { n += 1 + sovTypes(uint64(m.Power)) } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } @@ -7004,6 +8354,9 @@ func (m *SigningValidator) Size() (n int) { if m.SignedLastBlock { n += 2 } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } @@ -7018,6 +8371,9 @@ func (m *PubKey) Size() (n int) { if l > 0 { n += 1 + l + sovTypes(uint64(l)) } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } @@ -7033,12 +8389,14 @@ func (m *Evidence) Size() (n int) { if m.Height != 0 { n += 1 + sovTypes(uint64(m.Height)) } - if m.Time != 0 { - n += 1 + sovTypes(uint64(m.Time)) - } + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time) + n += 1 + l + sovTypes(uint64(l)) if m.TotalVotingPower != 0 { n += 1 + sovTypes(uint64(m.TotalVotingPower)) } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } @@ -7448,6 +8806,7 @@ func (m *Request) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -7527,6 +8886,7 @@ func (m *RequestEcho) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -7577,6 +8937,7 @@ func (m *RequestFlush) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -7656,6 +9017,7 @@ func (m *RequestInfo) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -7764,6 +9126,7 @@ func (m *RequestSetOption) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -7803,10 +9166,10 @@ func (m *RequestInitChain) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: - if wireType != 0 { + if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType) } - m.Time = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -7816,11 +9179,22 @@ func (m *RequestInitChain) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Time |= (int64(b) & 0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) @@ -7957,6 +9331,7 @@ func (m *RequestInitChain) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -8106,6 +9481,7 @@ func (m *RequestQuery) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -8279,6 +9655,7 @@ func (m *RequestBeginBlock) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -8360,6 +9737,7 @@ func (m *RequestCheckTx) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -8441,6 +9819,7 @@ func (m *RequestDeliverTx) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -8510,6 +9889,7 @@ func (m *RequestEndBlock) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -8560,6 +9940,7 @@ func (m *RequestCommit) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -8994,6 +10375,7 @@ func (m *Response) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -9073,6 +10455,7 @@ func (m *ResponseException) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -9152,6 +10535,7 @@ func (m *ResponseEcho) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -9202,6 +10586,7 @@ func (m *ResponseFlush) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -9360,6 +10745,7 @@ func (m *ResponseInfo) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -9487,6 +10873,7 @@ func (m *ResponseSetOption) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -9601,6 +10988,7 @@ func (m *ResponseInitChain) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -9859,6 +11247,7 @@ func (m *ResponseQuery) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -9940,6 +11329,7 @@ func (m *ResponseBeginBlock) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -10167,6 +11557,7 @@ func (m *ResponseCheckTx) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -10394,6 +11785,7 @@ func (m *ResponseDeliverTx) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -10539,6 +11931,7 @@ func (m *ResponseEndBlock) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -10620,6 +12013,7 @@ func (m *ResponseCommit) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -10769,6 +12163,7 @@ func (m *ConsensusParams) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -10876,6 +12271,7 @@ func (m *BlockSize) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -10964,6 +12360,7 @@ func (m *TxSize) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -11033,6 +12430,7 @@ func (m *BlockGossip) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -11120,10 +12518,10 @@ func (m *Header) Unmarshal(dAtA []byte) error { } } case 3: - if wireType != 0 { + if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType) } - m.Time = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -11133,11 +12531,22 @@ func (m *Header) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Time |= (int64(b) & 0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field NumTxs", wireType) @@ -11311,6 +12720,7 @@ func (m *Header) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -11441,6 +12851,7 @@ func (m *Validator) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -11541,6 +12952,7 @@ func (m *SigningValidator) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -11651,6 +13063,7 @@ func (m *PubKey) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -11768,10 +13181,10 @@ func (m *Evidence) Unmarshal(dAtA []byte) error { } } case 4: - if wireType != 0 { + if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType) } - m.Time = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -11781,11 +13194,22 @@ func (m *Evidence) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Time |= (int64(b) & 0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 5: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field TotalVotingPower", wireType) @@ -11817,6 +13241,7 @@ func (m *Evidence) Unmarshal(dAtA []byte) error { if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -11931,126 +13356,131 @@ var ( ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") ) -func init() { proto.RegisterFile("abci/types/types.proto", fileDescriptorTypes) } -func init() { golang_proto.RegisterFile("abci/types/types.proto", fileDescriptorTypes) } - -var fileDescriptorTypes = []byte{ - // 1871 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x58, 0x4b, 0x6f, 0x1c, 0xc7, - 0x11, 0xe6, 0xec, 0x7b, 0x8a, 0x8f, 0xa5, 0x9a, 0x12, 0xb9, 0x5a, 0x27, 0x94, 0x30, 0x08, 0x64, - 0x2a, 0xa6, 0xc9, 0x84, 0x8e, 0x0c, 0xc9, 0x4e, 0x8c, 0x70, 0x69, 0xc5, 0x4b, 0x38, 0x0f, 0x66, - 0x24, 0x2b, 0x40, 0x2e, 0x8b, 0xde, 0x99, 0xe6, 0x6c, 0x43, 0xbb, 0x33, 0xe3, 0xe9, 0x5e, 0x7a, - 0xa9, 0xdf, 0x60, 0xe4, 0x9a, 0x73, 0x6e, 0x39, 0xe5, 0x10, 0x20, 0x40, 0x8e, 0x39, 0x05, 0x3e, - 0xe6, 0x12, 0xe4, 0x14, 0x21, 0xa1, 0x73, 0xca, 0x2f, 0xc8, 0x31, 0xe8, 0xea, 0x79, 0x73, 0x56, - 0x10, 0x94, 0x5b, 0x2e, 0x64, 0xd7, 0x54, 0x55, 0x77, 0x57, 0x6d, 0xd5, 0x57, 0x55, 0x0d, 0xdb, - 0x74, 0xec, 0xf0, 0x43, 0x79, 0x19, 0x32, 0xa1, 0xff, 0x1e, 0x84, 0x51, 0x20, 0x03, 0xd2, 0x44, - 0xa2, 0xff, 0xae, 0xc7, 0xe5, 0x64, 0x3e, 0x3e, 0x70, 0x82, 0xd9, 0xa1, 0x17, 0x78, 0xc1, 0x21, - 0x72, 0xc7, 0xf3, 0x73, 0xa4, 0x90, 0xc0, 0x95, 0xd6, 0xea, 0x3f, 0xcc, 0x89, 0x4b, 0xe6, 0xbb, - 0x2c, 0x9a, 0x71, 0x5f, 0xe6, 0x97, 0x53, 0x3e, 0x16, 0x87, 0x4e, 0x30, 0x9b, 0x05, 0x7e, 0xfe, - 0x3c, 0xeb, 0xcf, 0x0d, 0x68, 0xdb, 0xec, 0xf3, 0x39, 0x13, 0x92, 0xec, 0x41, 0x83, 0x39, 0x93, - 0xa0, 0x57, 0xbb, 0x6b, 0xec, 0xad, 0x1e, 0x91, 0x03, 0x2d, 0x17, 0x73, 0x1f, 0x3b, 0x93, 0x60, - 0xb8, 0x62, 0xa3, 0x04, 0x79, 0x07, 0x9a, 0xe7, 0xd3, 0xb9, 0x98, 0xf4, 0xea, 0x28, 0xba, 0x55, - 0x14, 0xfd, 0x91, 0x62, 0x0d, 0x57, 0x6c, 0x2d, 0xa3, 0xb6, 0xe5, 0xfe, 0x79, 0xd0, 0x6b, 0x54, - 0x6d, 0x7b, 0xea, 0x9f, 0xe3, 0xb6, 0x4a, 0x82, 0x3c, 0x04, 0x10, 0x4c, 0x8e, 0x82, 0x50, 0xf2, - 0xc0, 0xef, 0x35, 0x51, 0x7e, 0xa7,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, 0x8b, 0xd7, 0xdf, 0x95, 0xfa, 0x55, 0x83, 0x09, 0xf9, 0x08, 0xcc, - 0xac, 0x89, 0x5b, 0xf6, 0xba, 0xd4, 0x5f, 0x3a, 0xa2, 0x28, 0xfd, 0xac, 0x82, 0x2e, 0x7b, 0x24, - 0xe9, 0x2f, 0xed, 0xe5, 0xc9, 0x43, 0x68, 0x27, 0x9d, 0x45, 0xf5, 0xfb, 0x4f, 0x7f, 0xc9, 0xf8, - 0xa0, 0xdc, 0xa3, 0xbb, 0xb3, 0xaa, 0x47, 0xaa, 0x7e, 0xe5, 0x8c, 0x43, 0x1e, 0x40, 0x2b, 0x2e, - 0x18, 0x95, 0x6f, 0x40, 0xfd, 0xea, 0x21, 0x40, 0x19, 0x99, 0x75, 0xa6, 0xcb, 0x1e, 0xd2, 0xfa, - 0x4b, 0x87, 0x31, 0x72, 0x0c, 0x90, 0xeb, 0xc8, 0x96, 0xbe, 0x90, 0xf5, 0x97, 0x0f, 0x59, 0xe4, - 0x43, 0xe8, 0x64, 0x83, 0x73, 0xf5, 0x9b, 0x57, 0x7f, 0xd9, 0xdc, 0x33, 0xf8, 0xc6, 0x7f, 0xfe, - 0xb9, 0x6b, 0xfc, 0xf6, 0x6a, 0xd7, 0xf8, 0xe3, 0xd5, 0xae, 0xf1, 0xd5, 0xd5, 0xae, 0xf1, 0x97, - 0xab, 0x5d, 0xe3, 0x1f, 0x57, 0xbb, 0xc6, 0x9f, 0xbe, 0xde, 0x35, 0xc6, 0x2d, 0x7c, 0xfb, 0x7c, - 0xef, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x14, 0xb6, 0x0c, 0x6d, 0x85, 0x15, 0x00, 0x00, +func init() { proto.RegisterFile("abci/types/types.proto", fileDescriptor_types_2c69c6b96b429b1c) } +func init() { + golang_proto.RegisterFile("abci/types/types.proto", fileDescriptor_types_2c69c6b96b429b1c) +} + +var fileDescriptor_types_2c69c6b96b429b1c = []byte{ + // 1911 bytes of a gzipped File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x65, 0x93, 0xe7, 0x23, 0xb1, 0xe8, + 0xea, 0x52, 0xf3, 0x4e, 0x5e, 0xf3, 0x04, 0xb9, 0x4f, 0x17, 0xc3, 0x15, 0xb3, 0x39, 0x51, 0x4b, + 0xf2, 0x10, 0x74, 0xe6, 0x59, 0xd1, 0x71, 0x6d, 0xa9, 0xb4, 0x55, 0xf8, 0x5d, 0x3c, 0x2b, 0x3e, + 0xac, 0xc5, 0xa2, 0x35, 0xe9, 0x43, 0x03, 0x7f, 0x6b, 0x47, 0x74, 0x57, 0xa5, 0xce, 0xed, 0xc2, + 0x41, 0x92, 0x37, 0x5c, 0x31, 0x23, 0x29, 0x74, 0x9f, 0xc5, 0x66, 0xce, 0x05, 0x0b, 0xf1, 0x72, + 0x9b, 0x65, 0xee, 0xfb, 0x50, 0xf1, 0xe5, 0xf5, 0x74, 0x2b, 0x26, 0x06, 0x4d, 0xa8, 0x5f, 0xd0, + 0xd9, 0x9c, 0x19, 0x6f, 0x42, 0x3b, 0x13, 0x29, 0xa4, 0x0b, 0x4d, 0x97, 0x71, 0x4e, 0x6d, 0xd6, + 0xd5, 0xee, 0x69, 0x7b, 0xba, 0x19, 0x93, 0xc6, 0x3a, 0xac, 0x66, 0xe3, 0x24, 0xa3, 0x88, 0xb1, + 0x80, 0x8a, 0x17, 0x2c, 0xe4, 0x18, 0x00, 0x91, 0x62, 0x44, 0x1a, 0xef, 0xc1, 0x46, 0x31, 0x08, + 0xc8, 0x06, 0x54, 0x9f, 0xb3, 0xcb, 0x48, 0x12, 0x97, 0xe4, 0x76, 0x74, 0x21, 0x19, 0xc5, 0xba, + 0x19, 0xdd, 0xee, 0x17, 0x95, 0x44, 0x39, 0x89, 0x03, 0x72, 0x04, 0x35, 0x4c, 0x24, 0xa9, 0xdd, + 0x3e, 0xec, 0xf5, 0x55, 0x96, 0xf5, 0xe3, 0x2c, 0xeb, 0x3f, 0x8d, 0xb3, 0x6c, 0xd0, 0xfa, 0xe2, + 0xe5, 0xee, 0x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xbe, 0x3a, 0xf5, 0xca, 0x07, 0x0a, + 0x34, 0x32, 0xed, 0x72, 0x97, 0x3d, 0xdd, 0xf5, 0x96, 0x0e, 0x76, 0xe4, 0x18, 0x20, 0xd3, 0xdd, + 0x2d, 0x7d, 0x93, 0xeb, 0x2d, 0x1f, 0xd8, 0xc8, 0xfb, 0xd0, 0x4a, 0x87, 0xf0, 0xf2, 0x57, 0xb6, + 0xde, 0xb2, 0x19, 0x6a, 0xf0, 0xb5, 0xff, 0xfc, 0x6b, 0x47, 0xfb, 0xed, 0xd5, 0x8e, 0xf6, 0xfb, + 0xab, 0x1d, 0xed, 0x8b, 0xab, 0x1d, 0xed, 0x4f, 0x57, 0x3b, 0xda, 0x3f, 0xaf, 0x76, 0xb4, 0x3f, + 0x7c, 0xb9, 0xa3, 0x8d, 0x1b, 0x32, 0xfc, 0xdf, 0xf9, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x9c, + 0x90, 0xd5, 0xfd, 0x18, 0x16, 0x00, 0x00, } diff --git a/abci/types/types.proto b/abci/types/types.proto index 2f98fe251..7f87628e1 100644 --- a/abci/types/types.proto +++ b/abci/types/types.proto @@ -4,6 +4,7 @@ package types; // For more information on gogo.proto, see: // https://github.com/gogo/protobuf/blob/master/extensions.md import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +import "google/protobuf/timestamp.proto"; import "github.com/tendermint/tendermint/libs/common/types.proto"; // This file is copied from http://github.com/tendermint/abci @@ -56,7 +57,7 @@ message RequestSetOption { } message RequestInitChain { - int64 time = 1; + google.protobuf.Timestamp time = 1 [(gogoproto.nullable)=false, (gogoproto.stdtime)=true]; string chain_id = 2; ConsensusParams consensus_params = 3; repeated Validator validators = 4 [(gogoproto.nullable)=false]; @@ -230,7 +231,7 @@ message Header { // basics string chain_id = 1 [(gogoproto.customname)="ChainID"]; int64 height = 2; - int64 time = 3; + google.protobuf.Timestamp time = 3 [(gogoproto.nullable)=false, (gogoproto.stdtime)=true]; // txs int32 num_txs = 4; @@ -267,7 +268,7 @@ message Evidence { string type = 1; Validator validator = 2 [(gogoproto.nullable)=false]; int64 height = 3; - int64 time = 4; + google.protobuf.Timestamp time = 4 [(gogoproto.nullable)=false, (gogoproto.stdtime)=true]; int64 total_voting_power = 5; } diff --git a/abci/types/typespb_test.go b/abci/types/typespb_test.go index d1316239e..db88ed394 100644 --- a/abci/types/typespb_test.go +++ b/abci/types/typespb_test.go @@ -1,59 +1,19 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: abci/types/types.proto -/* -Package types is a generated protocol buffer package. - -It is generated from these files: - abci/types/types.proto - -It has these top-level messages: - Request - RequestEcho - RequestFlush - RequestInfo - RequestSetOption - RequestInitChain - RequestQuery - RequestBeginBlock - RequestCheckTx - RequestDeliverTx - RequestEndBlock - RequestCommit - Response - ResponseException - ResponseEcho - ResponseFlush - ResponseInfo - ResponseSetOption - ResponseInitChain - ResponseQuery - ResponseBeginBlock - ResponseCheckTx - ResponseDeliverTx - ResponseEndBlock - ResponseCommit - ConsensusParams - BlockSize - TxSize - BlockGossip - Header - Validator - SigningValidator - PubKey - Evidence -*/ package types import testing "testing" -import rand "math/rand" +import math_rand "math/rand" import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" import golang_proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" import _ "github.com/gogo/protobuf/gogoproto" +import _ "github.com/golang/protobuf/ptypes/timestamp" import _ "github.com/tendermint/tendermint/libs/common" // Reference imports to suppress errors if they are not otherwise used. @@ -64,14 +24,14 @@ var _ = math.Inf func TestRequestProto(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequest(popr, false) - dAtA, err := proto.Marshal(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Request{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + 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)) @@ -89,13 +49,13 @@ func TestRequestProto(t *testing.T) { littlefuzz = append(littlefuzz, byte(popr.Intn(256))) } // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestRequestMarshalTo(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequest(popr, false) size := p.Size() dAtA := make([]byte, size) @@ -107,7 +67,7 @@ func TestRequestMarshalTo(t *testing.T) { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Request{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } for i := range dAtA { @@ -120,14 +80,14 @@ func TestRequestMarshalTo(t *testing.T) { func TestRequestEchoProto(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestEcho(popr, false) - dAtA, err := proto.Marshal(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &RequestEcho{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + 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)) @@ -145,13 +105,13 @@ func TestRequestEchoProto(t *testing.T) { littlefuzz = append(littlefuzz, byte(popr.Intn(256))) } // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestRequestEchoMarshalTo(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestEcho(popr, false) size := p.Size() dAtA := make([]byte, size) @@ -163,7 +123,7 @@ func TestRequestEchoMarshalTo(t *testing.T) { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &RequestEcho{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } for i := range dAtA { @@ -176,14 +136,14 @@ func TestRequestEchoMarshalTo(t *testing.T) { func TestRequestFlushProto(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestFlush(popr, false) - dAtA, err := proto.Marshal(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &RequestFlush{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + 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)) @@ -201,13 +161,13 @@ func TestRequestFlushProto(t *testing.T) { littlefuzz = append(littlefuzz, byte(popr.Intn(256))) } // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestRequestFlushMarshalTo(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestFlush(popr, false) size := p.Size() dAtA := make([]byte, size) @@ -219,7 +179,7 @@ func TestRequestFlushMarshalTo(t *testing.T) { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &RequestFlush{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } for i := range dAtA { @@ -232,14 +192,14 @@ func TestRequestFlushMarshalTo(t *testing.T) { func TestRequestInfoProto(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestInfo(popr, false) - dAtA, err := proto.Marshal(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &RequestInfo{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + 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)) @@ -257,13 +217,13 @@ func TestRequestInfoProto(t *testing.T) { littlefuzz = append(littlefuzz, byte(popr.Intn(256))) } // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestRequestInfoMarshalTo(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestInfo(popr, false) size := p.Size() dAtA := make([]byte, size) @@ -275,7 +235,7 @@ func TestRequestInfoMarshalTo(t *testing.T) { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &RequestInfo{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } for i := range dAtA { @@ -288,14 +248,14 @@ func TestRequestInfoMarshalTo(t *testing.T) { func TestRequestSetOptionProto(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestSetOption(popr, false) - dAtA, err := proto.Marshal(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &RequestSetOption{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + 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)) @@ -313,13 +273,13 @@ func TestRequestSetOptionProto(t *testing.T) { littlefuzz = append(littlefuzz, byte(popr.Intn(256))) } // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestRequestSetOptionMarshalTo(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestSetOption(popr, false) size := p.Size() dAtA := make([]byte, size) @@ -331,7 +291,7 @@ func TestRequestSetOptionMarshalTo(t *testing.T) { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &RequestSetOption{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } for i := range dAtA { @@ -344,14 +304,14 @@ func TestRequestSetOptionMarshalTo(t *testing.T) { func TestRequestInitChainProto(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestInitChain(popr, false) - dAtA, err := proto.Marshal(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &RequestInitChain{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + 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)) @@ -369,13 +329,13 @@ func TestRequestInitChainProto(t *testing.T) { littlefuzz = append(littlefuzz, byte(popr.Intn(256))) } // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestRequestInitChainMarshalTo(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestInitChain(popr, false) size := p.Size() dAtA := make([]byte, size) @@ -387,7 +347,7 @@ func TestRequestInitChainMarshalTo(t *testing.T) { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &RequestInitChain{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } for i := range dAtA { @@ -400,14 +360,14 @@ func TestRequestInitChainMarshalTo(t *testing.T) { func TestRequestQueryProto(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestQuery(popr, false) - dAtA, err := proto.Marshal(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &RequestQuery{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + 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)) @@ -425,13 +385,13 @@ func TestRequestQueryProto(t *testing.T) { littlefuzz = append(littlefuzz, byte(popr.Intn(256))) } // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestRequestQueryMarshalTo(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestQuery(popr, false) size := p.Size() dAtA := make([]byte, size) @@ -443,7 +403,7 @@ func TestRequestQueryMarshalTo(t *testing.T) { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &RequestQuery{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } for i := range dAtA { @@ -456,14 +416,14 @@ func TestRequestQueryMarshalTo(t *testing.T) { func TestRequestBeginBlockProto(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestBeginBlock(popr, false) - dAtA, err := proto.Marshal(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &RequestBeginBlock{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + 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)) @@ -481,13 +441,13 @@ func TestRequestBeginBlockProto(t *testing.T) { littlefuzz = append(littlefuzz, byte(popr.Intn(256))) } // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestRequestBeginBlockMarshalTo(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestBeginBlock(popr, false) size := p.Size() dAtA := make([]byte, size) @@ -499,7 +459,7 @@ func TestRequestBeginBlockMarshalTo(t *testing.T) { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &RequestBeginBlock{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } for i := range dAtA { @@ -512,14 +472,14 @@ func TestRequestBeginBlockMarshalTo(t *testing.T) { func TestRequestCheckTxProto(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestCheckTx(popr, false) - dAtA, err := proto.Marshal(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &RequestCheckTx{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + 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)) @@ -537,13 +497,13 @@ func TestRequestCheckTxProto(t *testing.T) { littlefuzz = append(littlefuzz, byte(popr.Intn(256))) } // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestRequestCheckTxMarshalTo(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestCheckTx(popr, false) size := p.Size() dAtA := make([]byte, size) @@ -555,7 +515,7 @@ func TestRequestCheckTxMarshalTo(t *testing.T) { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &RequestCheckTx{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } for i := range dAtA { @@ -568,14 +528,14 @@ func TestRequestCheckTxMarshalTo(t *testing.T) { func TestRequestDeliverTxProto(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestDeliverTx(popr, false) - dAtA, err := proto.Marshal(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &RequestDeliverTx{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + 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)) @@ -593,13 +553,13 @@ func TestRequestDeliverTxProto(t *testing.T) { littlefuzz = append(littlefuzz, byte(popr.Intn(256))) } // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestRequestDeliverTxMarshalTo(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestDeliverTx(popr, false) size := p.Size() dAtA := make([]byte, size) @@ -611,7 +571,7 @@ func TestRequestDeliverTxMarshalTo(t *testing.T) { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &RequestDeliverTx{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } for i := range dAtA { @@ -624,14 +584,14 @@ func TestRequestDeliverTxMarshalTo(t *testing.T) { func TestRequestEndBlockProto(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestEndBlock(popr, false) - dAtA, err := proto.Marshal(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &RequestEndBlock{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + 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)) @@ -649,13 +609,13 @@ func TestRequestEndBlockProto(t *testing.T) { littlefuzz = append(littlefuzz, byte(popr.Intn(256))) } // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestRequestEndBlockMarshalTo(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestEndBlock(popr, false) size := p.Size() dAtA := make([]byte, size) @@ -667,7 +627,7 @@ func TestRequestEndBlockMarshalTo(t *testing.T) { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &RequestEndBlock{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } for i := range dAtA { @@ -680,14 +640,14 @@ func TestRequestEndBlockMarshalTo(t *testing.T) { func TestRequestCommitProto(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestCommit(popr, false) - dAtA, err := proto.Marshal(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &RequestCommit{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + 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)) @@ -705,13 +665,13 @@ func TestRequestCommitProto(t *testing.T) { littlefuzz = append(littlefuzz, byte(popr.Intn(256))) } // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestRequestCommitMarshalTo(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestCommit(popr, false) size := p.Size() dAtA := make([]byte, size) @@ -723,7 +683,7 @@ func TestRequestCommitMarshalTo(t *testing.T) { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &RequestCommit{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } for i := range dAtA { @@ -736,14 +696,14 @@ func TestRequestCommitMarshalTo(t *testing.T) { func TestResponseProto(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponse(popr, false) - dAtA, err := proto.Marshal(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Response{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + 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)) @@ -761,13 +721,13 @@ func TestResponseProto(t *testing.T) { littlefuzz = append(littlefuzz, byte(popr.Intn(256))) } // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestResponseMarshalTo(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponse(popr, false) size := p.Size() dAtA := make([]byte, size) @@ -779,7 +739,7 @@ func TestResponseMarshalTo(t *testing.T) { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Response{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } for i := range dAtA { @@ -792,14 +752,14 @@ func TestResponseMarshalTo(t *testing.T) { func TestResponseExceptionProto(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseException(popr, false) - dAtA, err := proto.Marshal(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &ResponseException{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + 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)) @@ -817,13 +777,13 @@ func TestResponseExceptionProto(t *testing.T) { littlefuzz = append(littlefuzz, byte(popr.Intn(256))) } // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestResponseExceptionMarshalTo(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseException(popr, false) size := p.Size() dAtA := make([]byte, size) @@ -835,7 +795,7 @@ func TestResponseExceptionMarshalTo(t *testing.T) { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &ResponseException{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } for i := range dAtA { @@ -848,14 +808,14 @@ func TestResponseExceptionMarshalTo(t *testing.T) { func TestResponseEchoProto(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseEcho(popr, false) - dAtA, err := proto.Marshal(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &ResponseEcho{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + 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)) @@ -873,13 +833,13 @@ func TestResponseEchoProto(t *testing.T) { littlefuzz = append(littlefuzz, byte(popr.Intn(256))) } // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestResponseEchoMarshalTo(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseEcho(popr, false) size := p.Size() dAtA := make([]byte, size) @@ -891,7 +851,7 @@ func TestResponseEchoMarshalTo(t *testing.T) { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &ResponseEcho{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } for i := range dAtA { @@ -904,14 +864,14 @@ func TestResponseEchoMarshalTo(t *testing.T) { func TestResponseFlushProto(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseFlush(popr, false) - dAtA, err := proto.Marshal(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &ResponseFlush{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + 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)) @@ -929,13 +889,13 @@ func TestResponseFlushProto(t *testing.T) { littlefuzz = append(littlefuzz, byte(popr.Intn(256))) } // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestResponseFlushMarshalTo(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseFlush(popr, false) size := p.Size() dAtA := make([]byte, size) @@ -947,7 +907,7 @@ func TestResponseFlushMarshalTo(t *testing.T) { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &ResponseFlush{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } for i := range dAtA { @@ -960,14 +920,14 @@ func TestResponseFlushMarshalTo(t *testing.T) { func TestResponseInfoProto(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseInfo(popr, false) - dAtA, err := proto.Marshal(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &ResponseInfo{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + 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)) @@ -985,13 +945,13 @@ func TestResponseInfoProto(t *testing.T) { littlefuzz = append(littlefuzz, byte(popr.Intn(256))) } // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestResponseInfoMarshalTo(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseInfo(popr, false) size := p.Size() dAtA := make([]byte, size) @@ -1003,7 +963,7 @@ func TestResponseInfoMarshalTo(t *testing.T) { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &ResponseInfo{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } for i := range dAtA { @@ -1016,14 +976,14 @@ func TestResponseInfoMarshalTo(t *testing.T) { func TestResponseSetOptionProto(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseSetOption(popr, false) - dAtA, err := proto.Marshal(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &ResponseSetOption{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + 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)) @@ -1041,13 +1001,13 @@ func TestResponseSetOptionProto(t *testing.T) { littlefuzz = append(littlefuzz, byte(popr.Intn(256))) } // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestResponseSetOptionMarshalTo(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseSetOption(popr, false) size := p.Size() dAtA := make([]byte, size) @@ -1059,7 +1019,7 @@ func TestResponseSetOptionMarshalTo(t *testing.T) { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &ResponseSetOption{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } for i := range dAtA { @@ -1072,14 +1032,14 @@ func TestResponseSetOptionMarshalTo(t *testing.T) { func TestResponseInitChainProto(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseInitChain(popr, false) - dAtA, err := proto.Marshal(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &ResponseInitChain{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + 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)) @@ -1097,13 +1057,13 @@ func TestResponseInitChainProto(t *testing.T) { littlefuzz = append(littlefuzz, byte(popr.Intn(256))) } // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestResponseInitChainMarshalTo(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseInitChain(popr, false) size := p.Size() dAtA := make([]byte, size) @@ -1115,7 +1075,7 @@ func TestResponseInitChainMarshalTo(t *testing.T) { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &ResponseInitChain{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } for i := range dAtA { @@ -1128,14 +1088,14 @@ func TestResponseInitChainMarshalTo(t *testing.T) { func TestResponseQueryProto(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseQuery(popr, false) - dAtA, err := proto.Marshal(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &ResponseQuery{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + 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)) @@ -1153,13 +1113,13 @@ func TestResponseQueryProto(t *testing.T) { littlefuzz = append(littlefuzz, byte(popr.Intn(256))) } // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestResponseQueryMarshalTo(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseQuery(popr, false) size := p.Size() dAtA := make([]byte, size) @@ -1171,7 +1131,7 @@ func TestResponseQueryMarshalTo(t *testing.T) { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &ResponseQuery{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } for i := range dAtA { @@ -1184,14 +1144,14 @@ func TestResponseQueryMarshalTo(t *testing.T) { func TestResponseBeginBlockProto(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseBeginBlock(popr, false) - dAtA, err := proto.Marshal(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &ResponseBeginBlock{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + 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)) @@ -1209,13 +1169,13 @@ func TestResponseBeginBlockProto(t *testing.T) { littlefuzz = append(littlefuzz, byte(popr.Intn(256))) } // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestResponseBeginBlockMarshalTo(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseBeginBlock(popr, false) size := p.Size() dAtA := make([]byte, size) @@ -1227,7 +1187,7 @@ func TestResponseBeginBlockMarshalTo(t *testing.T) { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &ResponseBeginBlock{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } for i := range dAtA { @@ -1240,14 +1200,14 @@ func TestResponseBeginBlockMarshalTo(t *testing.T) { func TestResponseCheckTxProto(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseCheckTx(popr, false) - dAtA, err := proto.Marshal(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &ResponseCheckTx{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + 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)) @@ -1265,13 +1225,13 @@ func TestResponseCheckTxProto(t *testing.T) { littlefuzz = append(littlefuzz, byte(popr.Intn(256))) } // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestResponseCheckTxMarshalTo(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseCheckTx(popr, false) size := p.Size() dAtA := make([]byte, size) @@ -1283,7 +1243,7 @@ func TestResponseCheckTxMarshalTo(t *testing.T) { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &ResponseCheckTx{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } for i := range dAtA { @@ -1296,14 +1256,14 @@ func TestResponseCheckTxMarshalTo(t *testing.T) { func TestResponseDeliverTxProto(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseDeliverTx(popr, false) - dAtA, err := proto.Marshal(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &ResponseDeliverTx{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + 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)) @@ -1321,13 +1281,13 @@ func TestResponseDeliverTxProto(t *testing.T) { littlefuzz = append(littlefuzz, byte(popr.Intn(256))) } // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestResponseDeliverTxMarshalTo(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseDeliverTx(popr, false) size := p.Size() dAtA := make([]byte, size) @@ -1339,7 +1299,7 @@ func TestResponseDeliverTxMarshalTo(t *testing.T) { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &ResponseDeliverTx{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } for i := range dAtA { @@ -1352,14 +1312,14 @@ func TestResponseDeliverTxMarshalTo(t *testing.T) { func TestResponseEndBlockProto(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseEndBlock(popr, false) - dAtA, err := proto.Marshal(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &ResponseEndBlock{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + 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)) @@ -1377,13 +1337,13 @@ func TestResponseEndBlockProto(t *testing.T) { littlefuzz = append(littlefuzz, byte(popr.Intn(256))) } // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestResponseEndBlockMarshalTo(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseEndBlock(popr, false) size := p.Size() dAtA := make([]byte, size) @@ -1395,7 +1355,7 @@ func TestResponseEndBlockMarshalTo(t *testing.T) { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &ResponseEndBlock{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } for i := range dAtA { @@ -1408,14 +1368,14 @@ func TestResponseEndBlockMarshalTo(t *testing.T) { func TestResponseCommitProto(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseCommit(popr, false) - dAtA, err := proto.Marshal(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &ResponseCommit{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + 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)) @@ -1433,13 +1393,13 @@ func TestResponseCommitProto(t *testing.T) { littlefuzz = append(littlefuzz, byte(popr.Intn(256))) } // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestResponseCommitMarshalTo(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseCommit(popr, false) size := p.Size() dAtA := make([]byte, size) @@ -1451,7 +1411,7 @@ func TestResponseCommitMarshalTo(t *testing.T) { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &ResponseCommit{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } for i := range dAtA { @@ -1464,14 +1424,14 @@ func TestResponseCommitMarshalTo(t *testing.T) { func TestConsensusParamsProto(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedConsensusParams(popr, false) - dAtA, err := proto.Marshal(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &ConsensusParams{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + 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)) @@ -1489,13 +1449,13 @@ func TestConsensusParamsProto(t *testing.T) { littlefuzz = append(littlefuzz, byte(popr.Intn(256))) } // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestConsensusParamsMarshalTo(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedConsensusParams(popr, false) size := p.Size() dAtA := make([]byte, size) @@ -1507,7 +1467,7 @@ func TestConsensusParamsMarshalTo(t *testing.T) { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &ConsensusParams{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } for i := range dAtA { @@ -1520,14 +1480,14 @@ func TestConsensusParamsMarshalTo(t *testing.T) { func TestBlockSizeProto(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedBlockSize(popr, false) - dAtA, err := proto.Marshal(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &BlockSize{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + 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)) @@ -1545,13 +1505,13 @@ func TestBlockSizeProto(t *testing.T) { littlefuzz = append(littlefuzz, byte(popr.Intn(256))) } // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestBlockSizeMarshalTo(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedBlockSize(popr, false) size := p.Size() dAtA := make([]byte, size) @@ -1563,7 +1523,7 @@ func TestBlockSizeMarshalTo(t *testing.T) { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &BlockSize{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } for i := range dAtA { @@ -1576,14 +1536,14 @@ func TestBlockSizeMarshalTo(t *testing.T) { func TestTxSizeProto(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedTxSize(popr, false) - dAtA, err := proto.Marshal(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &TxSize{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + 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)) @@ -1601,13 +1561,13 @@ func TestTxSizeProto(t *testing.T) { littlefuzz = append(littlefuzz, byte(popr.Intn(256))) } // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestTxSizeMarshalTo(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedTxSize(popr, false) size := p.Size() dAtA := make([]byte, size) @@ -1619,7 +1579,7 @@ func TestTxSizeMarshalTo(t *testing.T) { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &TxSize{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } for i := range dAtA { @@ -1632,14 +1592,14 @@ func TestTxSizeMarshalTo(t *testing.T) { func TestBlockGossipProto(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedBlockGossip(popr, false) - dAtA, err := proto.Marshal(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &BlockGossip{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + 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)) @@ -1657,13 +1617,13 @@ func TestBlockGossipProto(t *testing.T) { littlefuzz = append(littlefuzz, byte(popr.Intn(256))) } // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestBlockGossipMarshalTo(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedBlockGossip(popr, false) size := p.Size() dAtA := make([]byte, size) @@ -1675,7 +1635,7 @@ func TestBlockGossipMarshalTo(t *testing.T) { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &BlockGossip{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } for i := range dAtA { @@ -1688,14 +1648,14 @@ func TestBlockGossipMarshalTo(t *testing.T) { func TestHeaderProto(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedHeader(popr, false) - dAtA, err := proto.Marshal(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Header{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + 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)) @@ -1713,13 +1673,13 @@ func TestHeaderProto(t *testing.T) { littlefuzz = append(littlefuzz, byte(popr.Intn(256))) } // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestHeaderMarshalTo(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedHeader(popr, false) size := p.Size() dAtA := make([]byte, size) @@ -1731,7 +1691,7 @@ func TestHeaderMarshalTo(t *testing.T) { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Header{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } for i := range dAtA { @@ -1744,14 +1704,14 @@ func TestHeaderMarshalTo(t *testing.T) { func TestValidatorProto(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedValidator(popr, false) - dAtA, err := proto.Marshal(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Validator{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + 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)) @@ -1769,13 +1729,13 @@ func TestValidatorProto(t *testing.T) { littlefuzz = append(littlefuzz, byte(popr.Intn(256))) } // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestValidatorMarshalTo(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedValidator(popr, false) size := p.Size() dAtA := make([]byte, size) @@ -1787,7 +1747,7 @@ func TestValidatorMarshalTo(t *testing.T) { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Validator{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } for i := range dAtA { @@ -1800,14 +1760,14 @@ func TestValidatorMarshalTo(t *testing.T) { func TestSigningValidatorProto(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedSigningValidator(popr, false) - dAtA, err := proto.Marshal(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &SigningValidator{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + 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)) @@ -1825,13 +1785,13 @@ func TestSigningValidatorProto(t *testing.T) { littlefuzz = append(littlefuzz, byte(popr.Intn(256))) } // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestSigningValidatorMarshalTo(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedSigningValidator(popr, false) size := p.Size() dAtA := make([]byte, size) @@ -1843,7 +1803,7 @@ func TestSigningValidatorMarshalTo(t *testing.T) { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &SigningValidator{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } for i := range dAtA { @@ -1856,14 +1816,14 @@ func TestSigningValidatorMarshalTo(t *testing.T) { func TestPubKeyProto(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedPubKey(popr, false) - dAtA, err := proto.Marshal(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &PubKey{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + 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)) @@ -1881,13 +1841,13 @@ func TestPubKeyProto(t *testing.T) { littlefuzz = append(littlefuzz, byte(popr.Intn(256))) } // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestPubKeyMarshalTo(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedPubKey(popr, false) size := p.Size() dAtA := make([]byte, size) @@ -1899,7 +1859,7 @@ func TestPubKeyMarshalTo(t *testing.T) { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &PubKey{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } for i := range dAtA { @@ -1912,14 +1872,14 @@ func TestPubKeyMarshalTo(t *testing.T) { func TestEvidenceProto(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedEvidence(popr, false) - dAtA, err := proto.Marshal(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Evidence{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + 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)) @@ -1937,13 +1897,13 @@ func TestEvidenceProto(t *testing.T) { littlefuzz = append(littlefuzz, byte(popr.Intn(256))) } // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestEvidenceMarshalTo(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedEvidence(popr, false) size := p.Size() dAtA := make([]byte, size) @@ -1955,7 +1915,7 @@ func TestEvidenceMarshalTo(t *testing.T) { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Evidence{} - if err := proto.Unmarshal(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } for i := range dAtA { @@ -1968,15 +1928,15 @@ func TestEvidenceMarshalTo(t *testing.T) { func TestRequestJSON(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequest(popr, true) - marshaler := jsonpb.Marshaler{} + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Request{} - err = jsonpb.UnmarshalString(jsondata, msg) + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -1986,15 +1946,15 @@ func TestRequestJSON(t *testing.T) { } func TestRequestEchoJSON(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestEcho(popr, true) - marshaler := jsonpb.Marshaler{} + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &RequestEcho{} - err = jsonpb.UnmarshalString(jsondata, msg) + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2004,15 +1964,15 @@ func TestRequestEchoJSON(t *testing.T) { } func TestRequestFlushJSON(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestFlush(popr, true) - marshaler := jsonpb.Marshaler{} + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &RequestFlush{} - err = jsonpb.UnmarshalString(jsondata, msg) + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2022,15 +1982,15 @@ func TestRequestFlushJSON(t *testing.T) { } func TestRequestInfoJSON(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestInfo(popr, true) - marshaler := jsonpb.Marshaler{} + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &RequestInfo{} - err = jsonpb.UnmarshalString(jsondata, msg) + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2040,15 +2000,15 @@ func TestRequestInfoJSON(t *testing.T) { } func TestRequestSetOptionJSON(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestSetOption(popr, true) - marshaler := jsonpb.Marshaler{} + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &RequestSetOption{} - err = jsonpb.UnmarshalString(jsondata, msg) + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2058,15 +2018,15 @@ func TestRequestSetOptionJSON(t *testing.T) { } func TestRequestInitChainJSON(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestInitChain(popr, true) - marshaler := jsonpb.Marshaler{} + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &RequestInitChain{} - err = jsonpb.UnmarshalString(jsondata, msg) + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2076,15 +2036,15 @@ func TestRequestInitChainJSON(t *testing.T) { } func TestRequestQueryJSON(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestQuery(popr, true) - marshaler := jsonpb.Marshaler{} + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &RequestQuery{} - err = jsonpb.UnmarshalString(jsondata, msg) + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2094,15 +2054,15 @@ func TestRequestQueryJSON(t *testing.T) { } func TestRequestBeginBlockJSON(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestBeginBlock(popr, true) - marshaler := jsonpb.Marshaler{} + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &RequestBeginBlock{} - err = jsonpb.UnmarshalString(jsondata, msg) + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2112,15 +2072,15 @@ func TestRequestBeginBlockJSON(t *testing.T) { } func TestRequestCheckTxJSON(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestCheckTx(popr, true) - marshaler := jsonpb.Marshaler{} + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &RequestCheckTx{} - err = jsonpb.UnmarshalString(jsondata, msg) + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2130,15 +2090,15 @@ func TestRequestCheckTxJSON(t *testing.T) { } func TestRequestDeliverTxJSON(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestDeliverTx(popr, true) - marshaler := jsonpb.Marshaler{} + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &RequestDeliverTx{} - err = jsonpb.UnmarshalString(jsondata, msg) + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2148,15 +2108,15 @@ func TestRequestDeliverTxJSON(t *testing.T) { } func TestRequestEndBlockJSON(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestEndBlock(popr, true) - marshaler := jsonpb.Marshaler{} + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &RequestEndBlock{} - err = jsonpb.UnmarshalString(jsondata, msg) + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2166,15 +2126,15 @@ func TestRequestEndBlockJSON(t *testing.T) { } func TestRequestCommitJSON(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestCommit(popr, true) - marshaler := jsonpb.Marshaler{} + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &RequestCommit{} - err = jsonpb.UnmarshalString(jsondata, msg) + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2184,15 +2144,15 @@ func TestRequestCommitJSON(t *testing.T) { } func TestResponseJSON(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponse(popr, true) - marshaler := jsonpb.Marshaler{} + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Response{} - err = jsonpb.UnmarshalString(jsondata, msg) + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2202,15 +2162,15 @@ func TestResponseJSON(t *testing.T) { } func TestResponseExceptionJSON(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseException(popr, true) - marshaler := jsonpb.Marshaler{} + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &ResponseException{} - err = jsonpb.UnmarshalString(jsondata, msg) + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2220,15 +2180,15 @@ func TestResponseExceptionJSON(t *testing.T) { } func TestResponseEchoJSON(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseEcho(popr, true) - marshaler := jsonpb.Marshaler{} + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &ResponseEcho{} - err = jsonpb.UnmarshalString(jsondata, msg) + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2238,15 +2198,15 @@ func TestResponseEchoJSON(t *testing.T) { } func TestResponseFlushJSON(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseFlush(popr, true) - marshaler := jsonpb.Marshaler{} + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &ResponseFlush{} - err = jsonpb.UnmarshalString(jsondata, msg) + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2256,15 +2216,15 @@ func TestResponseFlushJSON(t *testing.T) { } func TestResponseInfoJSON(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseInfo(popr, true) - marshaler := jsonpb.Marshaler{} + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &ResponseInfo{} - err = jsonpb.UnmarshalString(jsondata, msg) + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2274,15 +2234,15 @@ func TestResponseInfoJSON(t *testing.T) { } func TestResponseSetOptionJSON(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseSetOption(popr, true) - marshaler := jsonpb.Marshaler{} + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &ResponseSetOption{} - err = jsonpb.UnmarshalString(jsondata, msg) + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2292,15 +2252,15 @@ func TestResponseSetOptionJSON(t *testing.T) { } func TestResponseInitChainJSON(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseInitChain(popr, true) - marshaler := jsonpb.Marshaler{} + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &ResponseInitChain{} - err = jsonpb.UnmarshalString(jsondata, msg) + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2310,15 +2270,15 @@ func TestResponseInitChainJSON(t *testing.T) { } func TestResponseQueryJSON(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseQuery(popr, true) - marshaler := jsonpb.Marshaler{} + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &ResponseQuery{} - err = jsonpb.UnmarshalString(jsondata, msg) + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2328,15 +2288,15 @@ func TestResponseQueryJSON(t *testing.T) { } func TestResponseBeginBlockJSON(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseBeginBlock(popr, true) - marshaler := jsonpb.Marshaler{} + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &ResponseBeginBlock{} - err = jsonpb.UnmarshalString(jsondata, msg) + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2346,15 +2306,15 @@ func TestResponseBeginBlockJSON(t *testing.T) { } func TestResponseCheckTxJSON(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseCheckTx(popr, true) - marshaler := jsonpb.Marshaler{} + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &ResponseCheckTx{} - err = jsonpb.UnmarshalString(jsondata, msg) + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2364,15 +2324,15 @@ func TestResponseCheckTxJSON(t *testing.T) { } func TestResponseDeliverTxJSON(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseDeliverTx(popr, true) - marshaler := jsonpb.Marshaler{} + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &ResponseDeliverTx{} - err = jsonpb.UnmarshalString(jsondata, msg) + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2382,15 +2342,15 @@ func TestResponseDeliverTxJSON(t *testing.T) { } func TestResponseEndBlockJSON(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseEndBlock(popr, true) - marshaler := jsonpb.Marshaler{} + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &ResponseEndBlock{} - err = jsonpb.UnmarshalString(jsondata, msg) + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2400,15 +2360,15 @@ func TestResponseEndBlockJSON(t *testing.T) { } func TestResponseCommitJSON(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseCommit(popr, true) - marshaler := jsonpb.Marshaler{} + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &ResponseCommit{} - err = jsonpb.UnmarshalString(jsondata, msg) + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2418,15 +2378,15 @@ func TestResponseCommitJSON(t *testing.T) { } func TestConsensusParamsJSON(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedConsensusParams(popr, true) - marshaler := jsonpb.Marshaler{} + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &ConsensusParams{} - err = jsonpb.UnmarshalString(jsondata, msg) + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2436,15 +2396,15 @@ func TestConsensusParamsJSON(t *testing.T) { } func TestBlockSizeJSON(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedBlockSize(popr, true) - marshaler := jsonpb.Marshaler{} + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &BlockSize{} - err = jsonpb.UnmarshalString(jsondata, msg) + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2454,15 +2414,15 @@ func TestBlockSizeJSON(t *testing.T) { } func TestTxSizeJSON(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedTxSize(popr, true) - marshaler := jsonpb.Marshaler{} + 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 = jsonpb.UnmarshalString(jsondata, msg) + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2472,15 +2432,15 @@ func TestTxSizeJSON(t *testing.T) { } func TestBlockGossipJSON(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedBlockGossip(popr, true) - marshaler := jsonpb.Marshaler{} + 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{} - err = jsonpb.UnmarshalString(jsondata, msg) + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2490,15 +2450,15 @@ func TestBlockGossipJSON(t *testing.T) { } func TestHeaderJSON(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedHeader(popr, true) - marshaler := jsonpb.Marshaler{} + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Header{} - err = jsonpb.UnmarshalString(jsondata, msg) + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2508,15 +2468,15 @@ func TestHeaderJSON(t *testing.T) { } func TestValidatorJSON(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedValidator(popr, true) - marshaler := jsonpb.Marshaler{} + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Validator{} - err = jsonpb.UnmarshalString(jsondata, msg) + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2526,15 +2486,15 @@ func TestValidatorJSON(t *testing.T) { } func TestSigningValidatorJSON(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedSigningValidator(popr, true) - marshaler := jsonpb.Marshaler{} + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &SigningValidator{} - err = jsonpb.UnmarshalString(jsondata, msg) + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2544,15 +2504,15 @@ func TestSigningValidatorJSON(t *testing.T) { } func TestPubKeyJSON(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedPubKey(popr, true) - marshaler := jsonpb.Marshaler{} + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &PubKey{} - err = jsonpb.UnmarshalString(jsondata, msg) + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2562,15 +2522,15 @@ func TestPubKeyJSON(t *testing.T) { } func TestEvidenceJSON(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedEvidence(popr, true) - marshaler := jsonpb.Marshaler{} + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Evidence{} - err = jsonpb.UnmarshalString(jsondata, msg) + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2580,11 +2540,11 @@ func TestEvidenceJSON(t *testing.T) { } func TestRequestProtoText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequest(popr, true) - dAtA := proto.MarshalTextString(p) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &Request{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -2594,11 +2554,11 @@ func TestRequestProtoText(t *testing.T) { func TestRequestProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequest(popr, true) - dAtA := proto.CompactTextString(p) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &Request{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -2608,11 +2568,11 @@ func TestRequestProtoCompactText(t *testing.T) { func TestRequestEchoProtoText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestEcho(popr, true) - dAtA := proto.MarshalTextString(p) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &RequestEcho{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -2622,11 +2582,11 @@ func TestRequestEchoProtoText(t *testing.T) { func TestRequestEchoProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestEcho(popr, true) - dAtA := proto.CompactTextString(p) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &RequestEcho{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -2636,11 +2596,11 @@ func TestRequestEchoProtoCompactText(t *testing.T) { func TestRequestFlushProtoText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestFlush(popr, true) - dAtA := proto.MarshalTextString(p) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &RequestFlush{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -2650,11 +2610,11 @@ func TestRequestFlushProtoText(t *testing.T) { func TestRequestFlushProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestFlush(popr, true) - dAtA := proto.CompactTextString(p) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &RequestFlush{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -2664,11 +2624,11 @@ func TestRequestFlushProtoCompactText(t *testing.T) { func TestRequestInfoProtoText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestInfo(popr, true) - dAtA := proto.MarshalTextString(p) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &RequestInfo{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -2678,11 +2638,11 @@ func TestRequestInfoProtoText(t *testing.T) { func TestRequestInfoProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestInfo(popr, true) - dAtA := proto.CompactTextString(p) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &RequestInfo{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -2692,11 +2652,11 @@ func TestRequestInfoProtoCompactText(t *testing.T) { func TestRequestSetOptionProtoText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestSetOption(popr, true) - dAtA := proto.MarshalTextString(p) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &RequestSetOption{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -2706,11 +2666,11 @@ func TestRequestSetOptionProtoText(t *testing.T) { func TestRequestSetOptionProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestSetOption(popr, true) - dAtA := proto.CompactTextString(p) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &RequestSetOption{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -2720,11 +2680,11 @@ func TestRequestSetOptionProtoCompactText(t *testing.T) { func TestRequestInitChainProtoText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestInitChain(popr, true) - dAtA := proto.MarshalTextString(p) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &RequestInitChain{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -2734,11 +2694,11 @@ func TestRequestInitChainProtoText(t *testing.T) { func TestRequestInitChainProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestInitChain(popr, true) - dAtA := proto.CompactTextString(p) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &RequestInitChain{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -2748,11 +2708,11 @@ func TestRequestInitChainProtoCompactText(t *testing.T) { func TestRequestQueryProtoText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestQuery(popr, true) - dAtA := proto.MarshalTextString(p) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &RequestQuery{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -2762,11 +2722,11 @@ func TestRequestQueryProtoText(t *testing.T) { func TestRequestQueryProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestQuery(popr, true) - dAtA := proto.CompactTextString(p) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &RequestQuery{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -2776,11 +2736,11 @@ func TestRequestQueryProtoCompactText(t *testing.T) { func TestRequestBeginBlockProtoText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestBeginBlock(popr, true) - dAtA := proto.MarshalTextString(p) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &RequestBeginBlock{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -2790,11 +2750,11 @@ func TestRequestBeginBlockProtoText(t *testing.T) { func TestRequestBeginBlockProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestBeginBlock(popr, true) - dAtA := proto.CompactTextString(p) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &RequestBeginBlock{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -2804,11 +2764,11 @@ func TestRequestBeginBlockProtoCompactText(t *testing.T) { func TestRequestCheckTxProtoText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestCheckTx(popr, true) - dAtA := proto.MarshalTextString(p) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &RequestCheckTx{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -2818,11 +2778,11 @@ func TestRequestCheckTxProtoText(t *testing.T) { func TestRequestCheckTxProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestCheckTx(popr, true) - dAtA := proto.CompactTextString(p) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &RequestCheckTx{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -2832,11 +2792,11 @@ func TestRequestCheckTxProtoCompactText(t *testing.T) { func TestRequestDeliverTxProtoText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestDeliverTx(popr, true) - dAtA := proto.MarshalTextString(p) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &RequestDeliverTx{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -2846,11 +2806,11 @@ func TestRequestDeliverTxProtoText(t *testing.T) { func TestRequestDeliverTxProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestDeliverTx(popr, true) - dAtA := proto.CompactTextString(p) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &RequestDeliverTx{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -2860,11 +2820,11 @@ func TestRequestDeliverTxProtoCompactText(t *testing.T) { func TestRequestEndBlockProtoText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestEndBlock(popr, true) - dAtA := proto.MarshalTextString(p) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &RequestEndBlock{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -2874,11 +2834,11 @@ func TestRequestEndBlockProtoText(t *testing.T) { func TestRequestEndBlockProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestEndBlock(popr, true) - dAtA := proto.CompactTextString(p) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &RequestEndBlock{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -2888,11 +2848,11 @@ func TestRequestEndBlockProtoCompactText(t *testing.T) { func TestRequestCommitProtoText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestCommit(popr, true) - dAtA := proto.MarshalTextString(p) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &RequestCommit{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -2902,11 +2862,11 @@ func TestRequestCommitProtoText(t *testing.T) { func TestRequestCommitProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestCommit(popr, true) - dAtA := proto.CompactTextString(p) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &RequestCommit{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -2916,11 +2876,11 @@ func TestRequestCommitProtoCompactText(t *testing.T) { func TestResponseProtoText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponse(popr, true) - dAtA := proto.MarshalTextString(p) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &Response{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -2930,11 +2890,11 @@ func TestResponseProtoText(t *testing.T) { func TestResponseProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponse(popr, true) - dAtA := proto.CompactTextString(p) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &Response{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -2944,11 +2904,11 @@ func TestResponseProtoCompactText(t *testing.T) { func TestResponseExceptionProtoText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseException(popr, true) - dAtA := proto.MarshalTextString(p) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &ResponseException{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -2958,11 +2918,11 @@ func TestResponseExceptionProtoText(t *testing.T) { func TestResponseExceptionProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseException(popr, true) - dAtA := proto.CompactTextString(p) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &ResponseException{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -2972,11 +2932,11 @@ func TestResponseExceptionProtoCompactText(t *testing.T) { func TestResponseEchoProtoText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseEcho(popr, true) - dAtA := proto.MarshalTextString(p) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &ResponseEcho{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -2986,11 +2946,11 @@ func TestResponseEchoProtoText(t *testing.T) { func TestResponseEchoProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseEcho(popr, true) - dAtA := proto.CompactTextString(p) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &ResponseEcho{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -3000,11 +2960,11 @@ func TestResponseEchoProtoCompactText(t *testing.T) { func TestResponseFlushProtoText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseFlush(popr, true) - dAtA := proto.MarshalTextString(p) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &ResponseFlush{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -3014,11 +2974,11 @@ func TestResponseFlushProtoText(t *testing.T) { func TestResponseFlushProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseFlush(popr, true) - dAtA := proto.CompactTextString(p) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &ResponseFlush{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -3028,11 +2988,11 @@ func TestResponseFlushProtoCompactText(t *testing.T) { func TestResponseInfoProtoText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseInfo(popr, true) - dAtA := proto.MarshalTextString(p) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &ResponseInfo{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -3042,11 +3002,11 @@ func TestResponseInfoProtoText(t *testing.T) { func TestResponseInfoProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseInfo(popr, true) - dAtA := proto.CompactTextString(p) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &ResponseInfo{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -3056,11 +3016,11 @@ func TestResponseInfoProtoCompactText(t *testing.T) { func TestResponseSetOptionProtoText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseSetOption(popr, true) - dAtA := proto.MarshalTextString(p) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &ResponseSetOption{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -3070,11 +3030,11 @@ func TestResponseSetOptionProtoText(t *testing.T) { func TestResponseSetOptionProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseSetOption(popr, true) - dAtA := proto.CompactTextString(p) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &ResponseSetOption{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -3084,11 +3044,11 @@ func TestResponseSetOptionProtoCompactText(t *testing.T) { func TestResponseInitChainProtoText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseInitChain(popr, true) - dAtA := proto.MarshalTextString(p) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &ResponseInitChain{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -3098,11 +3058,11 @@ func TestResponseInitChainProtoText(t *testing.T) { func TestResponseInitChainProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseInitChain(popr, true) - dAtA := proto.CompactTextString(p) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &ResponseInitChain{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -3112,11 +3072,11 @@ func TestResponseInitChainProtoCompactText(t *testing.T) { func TestResponseQueryProtoText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseQuery(popr, true) - dAtA := proto.MarshalTextString(p) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &ResponseQuery{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -3126,11 +3086,11 @@ func TestResponseQueryProtoText(t *testing.T) { func TestResponseQueryProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseQuery(popr, true) - dAtA := proto.CompactTextString(p) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &ResponseQuery{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -3140,11 +3100,11 @@ func TestResponseQueryProtoCompactText(t *testing.T) { func TestResponseBeginBlockProtoText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseBeginBlock(popr, true) - dAtA := proto.MarshalTextString(p) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &ResponseBeginBlock{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -3154,11 +3114,11 @@ func TestResponseBeginBlockProtoText(t *testing.T) { func TestResponseBeginBlockProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseBeginBlock(popr, true) - dAtA := proto.CompactTextString(p) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &ResponseBeginBlock{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -3168,11 +3128,11 @@ func TestResponseBeginBlockProtoCompactText(t *testing.T) { func TestResponseCheckTxProtoText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseCheckTx(popr, true) - dAtA := proto.MarshalTextString(p) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &ResponseCheckTx{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -3182,11 +3142,11 @@ func TestResponseCheckTxProtoText(t *testing.T) { func TestResponseCheckTxProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseCheckTx(popr, true) - dAtA := proto.CompactTextString(p) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &ResponseCheckTx{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -3196,11 +3156,11 @@ func TestResponseCheckTxProtoCompactText(t *testing.T) { func TestResponseDeliverTxProtoText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseDeliverTx(popr, true) - dAtA := proto.MarshalTextString(p) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &ResponseDeliverTx{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -3210,11 +3170,11 @@ func TestResponseDeliverTxProtoText(t *testing.T) { func TestResponseDeliverTxProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseDeliverTx(popr, true) - dAtA := proto.CompactTextString(p) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &ResponseDeliverTx{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -3224,11 +3184,11 @@ func TestResponseDeliverTxProtoCompactText(t *testing.T) { func TestResponseEndBlockProtoText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseEndBlock(popr, true) - dAtA := proto.MarshalTextString(p) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &ResponseEndBlock{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -3238,11 +3198,11 @@ func TestResponseEndBlockProtoText(t *testing.T) { func TestResponseEndBlockProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseEndBlock(popr, true) - dAtA := proto.CompactTextString(p) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &ResponseEndBlock{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -3252,11 +3212,11 @@ func TestResponseEndBlockProtoCompactText(t *testing.T) { func TestResponseCommitProtoText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseCommit(popr, true) - dAtA := proto.MarshalTextString(p) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &ResponseCommit{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -3266,11 +3226,11 @@ func TestResponseCommitProtoText(t *testing.T) { func TestResponseCommitProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseCommit(popr, true) - dAtA := proto.CompactTextString(p) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &ResponseCommit{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -3280,11 +3240,11 @@ func TestResponseCommitProtoCompactText(t *testing.T) { func TestConsensusParamsProtoText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedConsensusParams(popr, true) - dAtA := proto.MarshalTextString(p) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &ConsensusParams{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -3294,11 +3254,11 @@ func TestConsensusParamsProtoText(t *testing.T) { func TestConsensusParamsProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedConsensusParams(popr, true) - dAtA := proto.CompactTextString(p) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &ConsensusParams{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -3308,11 +3268,11 @@ func TestConsensusParamsProtoCompactText(t *testing.T) { func TestBlockSizeProtoText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedBlockSize(popr, true) - dAtA := proto.MarshalTextString(p) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &BlockSize{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -3322,11 +3282,11 @@ func TestBlockSizeProtoText(t *testing.T) { func TestBlockSizeProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedBlockSize(popr, true) - dAtA := proto.CompactTextString(p) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &BlockSize{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -3336,11 +3296,11 @@ func TestBlockSizeProtoCompactText(t *testing.T) { func TestTxSizeProtoText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedTxSize(popr, true) - dAtA := proto.MarshalTextString(p) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &TxSize{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -3350,11 +3310,11 @@ func TestTxSizeProtoText(t *testing.T) { func TestTxSizeProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedTxSize(popr, true) - dAtA := proto.CompactTextString(p) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &TxSize{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -3364,11 +3324,11 @@ func TestTxSizeProtoCompactText(t *testing.T) { func TestBlockGossipProtoText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedBlockGossip(popr, true) - dAtA := proto.MarshalTextString(p) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &BlockGossip{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -3378,11 +3338,11 @@ func TestBlockGossipProtoText(t *testing.T) { func TestBlockGossipProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedBlockGossip(popr, true) - dAtA := proto.CompactTextString(p) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &BlockGossip{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -3392,11 +3352,11 @@ func TestBlockGossipProtoCompactText(t *testing.T) { func TestHeaderProtoText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedHeader(popr, true) - dAtA := proto.MarshalTextString(p) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &Header{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -3406,11 +3366,11 @@ func TestHeaderProtoText(t *testing.T) { func TestHeaderProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedHeader(popr, true) - dAtA := proto.CompactTextString(p) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &Header{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -3420,11 +3380,11 @@ func TestHeaderProtoCompactText(t *testing.T) { func TestValidatorProtoText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedValidator(popr, true) - dAtA := proto.MarshalTextString(p) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &Validator{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -3434,11 +3394,11 @@ func TestValidatorProtoText(t *testing.T) { func TestValidatorProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedValidator(popr, true) - dAtA := proto.CompactTextString(p) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &Validator{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -3448,11 +3408,11 @@ func TestValidatorProtoCompactText(t *testing.T) { func TestSigningValidatorProtoText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedSigningValidator(popr, true) - dAtA := proto.MarshalTextString(p) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &SigningValidator{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -3462,11 +3422,11 @@ func TestSigningValidatorProtoText(t *testing.T) { func TestSigningValidatorProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedSigningValidator(popr, true) - dAtA := proto.CompactTextString(p) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &SigningValidator{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -3476,11 +3436,11 @@ func TestSigningValidatorProtoCompactText(t *testing.T) { func TestPubKeyProtoText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedPubKey(popr, true) - dAtA := proto.MarshalTextString(p) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &PubKey{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -3490,11 +3450,11 @@ func TestPubKeyProtoText(t *testing.T) { func TestPubKeyProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedPubKey(popr, true) - dAtA := proto.CompactTextString(p) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &PubKey{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -3504,11 +3464,11 @@ func TestPubKeyProtoCompactText(t *testing.T) { func TestEvidenceProtoText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedEvidence(popr, true) - dAtA := proto.MarshalTextString(p) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &Evidence{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -3518,11 +3478,11 @@ func TestEvidenceProtoText(t *testing.T) { func TestEvidenceProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedEvidence(popr, true) - dAtA := proto.CompactTextString(p) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &Evidence{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { @@ -3532,10 +3492,10 @@ func TestEvidenceProtoCompactText(t *testing.T) { func TestRequestSize(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequest(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) + 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) } @@ -3546,7 +3506,7 @@ func TestRequestSize(t *testing.T) { if size2 != size { t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - size3 := proto.Size(p) + 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) } @@ -3554,10 +3514,10 @@ func TestRequestSize(t *testing.T) { func TestRequestEchoSize(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestEcho(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) + 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) } @@ -3568,7 +3528,7 @@ func TestRequestEchoSize(t *testing.T) { if size2 != size { t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - size3 := proto.Size(p) + 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) } @@ -3576,10 +3536,10 @@ func TestRequestEchoSize(t *testing.T) { func TestRequestFlushSize(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestFlush(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) + 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) } @@ -3590,7 +3550,7 @@ func TestRequestFlushSize(t *testing.T) { if size2 != size { t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - size3 := proto.Size(p) + 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) } @@ -3598,10 +3558,10 @@ func TestRequestFlushSize(t *testing.T) { func TestRequestInfoSize(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestInfo(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) + 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) } @@ -3612,7 +3572,7 @@ func TestRequestInfoSize(t *testing.T) { if size2 != size { t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - size3 := proto.Size(p) + 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) } @@ -3620,10 +3580,10 @@ func TestRequestInfoSize(t *testing.T) { func TestRequestSetOptionSize(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestSetOption(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) + 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) } @@ -3634,7 +3594,7 @@ func TestRequestSetOptionSize(t *testing.T) { if size2 != size { t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - size3 := proto.Size(p) + 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) } @@ -3642,10 +3602,10 @@ func TestRequestSetOptionSize(t *testing.T) { func TestRequestInitChainSize(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestInitChain(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) + 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) } @@ -3656,7 +3616,7 @@ func TestRequestInitChainSize(t *testing.T) { if size2 != size { t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - size3 := proto.Size(p) + 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) } @@ -3664,10 +3624,10 @@ func TestRequestInitChainSize(t *testing.T) { func TestRequestQuerySize(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestQuery(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) + 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) } @@ -3678,7 +3638,7 @@ func TestRequestQuerySize(t *testing.T) { if size2 != size { t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - size3 := proto.Size(p) + 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) } @@ -3686,10 +3646,10 @@ func TestRequestQuerySize(t *testing.T) { func TestRequestBeginBlockSize(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestBeginBlock(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) + 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) } @@ -3700,7 +3660,7 @@ func TestRequestBeginBlockSize(t *testing.T) { if size2 != size { t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - size3 := proto.Size(p) + 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) } @@ -3708,10 +3668,10 @@ func TestRequestBeginBlockSize(t *testing.T) { func TestRequestCheckTxSize(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestCheckTx(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) + 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) } @@ -3722,7 +3682,7 @@ func TestRequestCheckTxSize(t *testing.T) { if size2 != size { t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - size3 := proto.Size(p) + 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) } @@ -3730,10 +3690,10 @@ func TestRequestCheckTxSize(t *testing.T) { func TestRequestDeliverTxSize(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestDeliverTx(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) + 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) } @@ -3744,7 +3704,7 @@ func TestRequestDeliverTxSize(t *testing.T) { if size2 != size { t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - size3 := proto.Size(p) + 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) } @@ -3752,10 +3712,10 @@ func TestRequestDeliverTxSize(t *testing.T) { func TestRequestEndBlockSize(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestEndBlock(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) + 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) } @@ -3766,7 +3726,7 @@ func TestRequestEndBlockSize(t *testing.T) { if size2 != size { t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - size3 := proto.Size(p) + 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) } @@ -3774,10 +3734,10 @@ func TestRequestEndBlockSize(t *testing.T) { func TestRequestCommitSize(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRequestCommit(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) + 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) } @@ -3788,7 +3748,7 @@ func TestRequestCommitSize(t *testing.T) { if size2 != size { t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - size3 := proto.Size(p) + 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) } @@ -3796,10 +3756,10 @@ func TestRequestCommitSize(t *testing.T) { func TestResponseSize(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponse(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) + 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) } @@ -3810,7 +3770,7 @@ func TestResponseSize(t *testing.T) { if size2 != size { t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - size3 := proto.Size(p) + 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) } @@ -3818,10 +3778,10 @@ func TestResponseSize(t *testing.T) { func TestResponseExceptionSize(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseException(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) + 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) } @@ -3832,7 +3792,7 @@ func TestResponseExceptionSize(t *testing.T) { if size2 != size { t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - size3 := proto.Size(p) + 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) } @@ -3840,10 +3800,10 @@ func TestResponseExceptionSize(t *testing.T) { func TestResponseEchoSize(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseEcho(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) + 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) } @@ -3854,7 +3814,7 @@ func TestResponseEchoSize(t *testing.T) { if size2 != size { t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - size3 := proto.Size(p) + 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) } @@ -3862,10 +3822,10 @@ func TestResponseEchoSize(t *testing.T) { func TestResponseFlushSize(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseFlush(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) + 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) } @@ -3876,7 +3836,7 @@ func TestResponseFlushSize(t *testing.T) { if size2 != size { t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - size3 := proto.Size(p) + 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) } @@ -3884,10 +3844,10 @@ func TestResponseFlushSize(t *testing.T) { func TestResponseInfoSize(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseInfo(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) + 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) } @@ -3898,7 +3858,7 @@ func TestResponseInfoSize(t *testing.T) { if size2 != size { t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - size3 := proto.Size(p) + 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) } @@ -3906,10 +3866,10 @@ func TestResponseInfoSize(t *testing.T) { func TestResponseSetOptionSize(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseSetOption(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) + 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) } @@ -3920,7 +3880,7 @@ func TestResponseSetOptionSize(t *testing.T) { if size2 != size { t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - size3 := proto.Size(p) + 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) } @@ -3928,10 +3888,10 @@ func TestResponseSetOptionSize(t *testing.T) { func TestResponseInitChainSize(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseInitChain(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) + 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) } @@ -3942,7 +3902,7 @@ func TestResponseInitChainSize(t *testing.T) { if size2 != size { t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - size3 := proto.Size(p) + 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) } @@ -3950,10 +3910,10 @@ func TestResponseInitChainSize(t *testing.T) { func TestResponseQuerySize(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseQuery(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) + 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) } @@ -3964,7 +3924,7 @@ func TestResponseQuerySize(t *testing.T) { if size2 != size { t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - size3 := proto.Size(p) + 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) } @@ -3972,10 +3932,10 @@ func TestResponseQuerySize(t *testing.T) { func TestResponseBeginBlockSize(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseBeginBlock(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) + 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) } @@ -3986,7 +3946,7 @@ func TestResponseBeginBlockSize(t *testing.T) { if size2 != size { t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - size3 := proto.Size(p) + 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) } @@ -3994,10 +3954,10 @@ func TestResponseBeginBlockSize(t *testing.T) { func TestResponseCheckTxSize(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseCheckTx(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) + 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) } @@ -4008,7 +3968,7 @@ func TestResponseCheckTxSize(t *testing.T) { if size2 != size { t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - size3 := proto.Size(p) + 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) } @@ -4016,10 +3976,10 @@ func TestResponseCheckTxSize(t *testing.T) { func TestResponseDeliverTxSize(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseDeliverTx(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) + 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) } @@ -4030,7 +3990,7 @@ func TestResponseDeliverTxSize(t *testing.T) { if size2 != size { t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - size3 := proto.Size(p) + 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) } @@ -4038,10 +3998,10 @@ func TestResponseDeliverTxSize(t *testing.T) { func TestResponseEndBlockSize(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseEndBlock(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) + 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) } @@ -4052,7 +4012,7 @@ func TestResponseEndBlockSize(t *testing.T) { if size2 != size { t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - size3 := proto.Size(p) + 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) } @@ -4060,10 +4020,10 @@ func TestResponseEndBlockSize(t *testing.T) { func TestResponseCommitSize(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResponseCommit(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) + 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) } @@ -4074,7 +4034,7 @@ func TestResponseCommitSize(t *testing.T) { if size2 != size { t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - size3 := proto.Size(p) + 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) } @@ -4082,10 +4042,10 @@ func TestResponseCommitSize(t *testing.T) { func TestConsensusParamsSize(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedConsensusParams(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) + 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) } @@ -4096,7 +4056,7 @@ func TestConsensusParamsSize(t *testing.T) { if size2 != size { t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - size3 := proto.Size(p) + 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) } @@ -4104,10 +4064,10 @@ func TestConsensusParamsSize(t *testing.T) { func TestBlockSizeSize(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedBlockSize(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) + 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) } @@ -4118,7 +4078,7 @@ func TestBlockSizeSize(t *testing.T) { if size2 != size { t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - size3 := proto.Size(p) + 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) } @@ -4126,10 +4086,10 @@ func TestBlockSizeSize(t *testing.T) { func TestTxSizeSize(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedTxSize(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) + 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) } @@ -4140,7 +4100,7 @@ func TestTxSizeSize(t *testing.T) { if size2 != size { t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - size3 := proto.Size(p) + 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) } @@ -4148,10 +4108,10 @@ func TestTxSizeSize(t *testing.T) { func TestBlockGossipSize(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedBlockGossip(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) + 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) } @@ -4162,7 +4122,7 @@ func TestBlockGossipSize(t *testing.T) { if size2 != size { t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - size3 := proto.Size(p) + 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) } @@ -4170,10 +4130,10 @@ func TestBlockGossipSize(t *testing.T) { func TestHeaderSize(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedHeader(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) + 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) } @@ -4184,7 +4144,7 @@ func TestHeaderSize(t *testing.T) { if size2 != size { t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - size3 := proto.Size(p) + 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) } @@ -4192,10 +4152,10 @@ func TestHeaderSize(t *testing.T) { func TestValidatorSize(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedValidator(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) + 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) } @@ -4206,7 +4166,7 @@ func TestValidatorSize(t *testing.T) { if size2 != size { t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - size3 := proto.Size(p) + 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) } @@ -4214,10 +4174,10 @@ func TestValidatorSize(t *testing.T) { func TestSigningValidatorSize(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedSigningValidator(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) + 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) } @@ -4228,7 +4188,7 @@ func TestSigningValidatorSize(t *testing.T) { if size2 != size { t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - size3 := proto.Size(p) + 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) } @@ -4236,10 +4196,10 @@ func TestSigningValidatorSize(t *testing.T) { func TestPubKeySize(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedPubKey(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) + 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) } @@ -4250,7 +4210,7 @@ func TestPubKeySize(t *testing.T) { if size2 != size { t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - size3 := proto.Size(p) + 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) } @@ -4258,10 +4218,10 @@ func TestPubKeySize(t *testing.T) { func TestEvidenceSize(t *testing.T) { seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedEvidence(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) + 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) } @@ -4272,7 +4232,7 @@ func TestEvidenceSize(t *testing.T) { if size2 != size { t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - size3 := proto.Size(p) + 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) } diff --git a/consensus/replay.go b/consensus/replay.go index dd940998f..bb1f2e46d 100644 --- a/consensus/replay.go +++ b/consensus/replay.go @@ -227,7 +227,7 @@ func (h *Handshaker) NBlocks() int { func (h *Handshaker) Handshake(proxyApp proxy.AppConns) error { // Handshake is done via ABCI Info on the query conn. - res, err := proxyApp.Query().InfoSync(abci.RequestInfo{version.Version}) + res, err := proxyApp.Query().InfoSync(abci.RequestInfo{Version: version.Version}) if err != nil { return fmt.Errorf("Error calling Info: %v", err) } @@ -269,7 +269,7 @@ func (h *Handshaker) ReplayBlocks(state sm.State, appHash []byte, appBlockHeight validators := types.TM2PB.Validators(state.Validators) csParams := types.TM2PB.ConsensusParams(h.genDoc.ConsensusParams) req := abci.RequestInitChain{ - Time: h.genDoc.GenesisTime.Unix(), // TODO + Time: h.genDoc.GenesisTime, ChainId: h.genDoc.ChainID, ConsensusParams: csParams, Validators: validators, diff --git a/consensus/replay_test.go b/consensus/replay_test.go index da526d249..fa0ec0408 100644 --- a/consensus/replay_test.go +++ b/consensus/replay_test.go @@ -376,7 +376,7 @@ func testHandshakeReplay(t *testing.T, nBlocks int, mode uint) { defer proxyApp.Stop() // get the latest app hash from the app - res, err := proxyApp.Query().InfoSync(abci.RequestInfo{""}) + res, err := proxyApp.Query().InfoSync(abci.RequestInfo{Version: ""}) if err != nil { t.Fatal(err) } diff --git a/docs/app-dev/abci-spec.md b/docs/app-dev/abci-spec.md index bd2ba4394..0e5eb0044 100644 --- a/docs/app-dev/abci-spec.md +++ b/docs/app-dev/abci-spec.md @@ -108,8 +108,11 @@ See below for more details on the message types and how they are used. ### InitChain - **Request**: - - `Validators ([]Validator)`: Initial genesis validators - - `AppStateBytes ([]byte)`: Serialized initial application state + - `Time (google.protobuf.Timestamp)`: Genesis time. + - `ChainID (string)`: ID of the blockchain. + - `ConsensusParams (ConsensusParams)`: Initial consensus-critical parameters. + - `Validators ([]Validator)`: Initial genesis validators. + - `AppStateBytes ([]byte)`: Serialized initial application state. Amino-encoded JSON bytes. - **Response**: - `ConsensusParams (ConsensusParams)`: Initial consensus-critical parameters. @@ -263,7 +266,8 @@ See below for more details on the message types and how they are used. - **Fields**: - `ChainID (string)`: ID of the blockchain - `Height (int64)`: Height of the block in the chain - - `Time (int64)`: Unix time of the block + - `Time (google.protobuf.Timestamp)`: Time of the block. It is the proposer's + local time when block was created. - `NumTxs (int32)`: Number of transactions in the block - `TotalTxs (int64)`: Total number of transactions in the blockchain until now @@ -318,6 +322,7 @@ See below for more details on the message types and how they are used. "duplicate/vote". - `Validator (Validator`: The offending validator - `Height (int64)`: Height when the offense was committed - - `Time (int64)`: Unix time of the block at height `Height` + - `Time (google.protobuf.Timestamp)`: Time of the block at height `Height`. + It is the proposer's local time when block was created. - `TotalVotingPower (int64)`: Total voting power of the validator set at height `Height` diff --git a/mempool/mempool_test.go b/mempool/mempool_test.go index acaa17eec..c0f66051f 100644 --- a/mempool/mempool_test.go +++ b/mempool/mempool_test.go @@ -117,7 +117,7 @@ func TestTxsAvailable(t *testing.T) { func TestSerialReap(t *testing.T) { app := counter.NewCounterApplication(true) - app.SetOption(abci.RequestSetOption{"serial", "on"}) + app.SetOption(abci.RequestSetOption{Key: "serial", Value: "on"}) cc := proxy.NewLocalClientCreator(app) mempool := newMempoolWithApp(cc) diff --git a/proxy/app_conn_test.go b/proxy/app_conn_test.go index 3c556d4f0..44936056a 100644 --- a/proxy/app_conn_test.go +++ b/proxy/app_conn_test.go @@ -142,7 +142,7 @@ func TestInfo(t *testing.T) { proxy := NewAppConnTest(cli) t.Log("Connected") - resInfo, err := proxy.InfoSync(types.RequestInfo{""}) + resInfo, err := proxy.InfoSync(types.RequestInfo{Version: ""}) if err != nil { t.Errorf("Unexpected error: %v", err) } diff --git a/rpc/client/mock/abci.go b/rpc/client/mock/abci.go index c8ca060c6..4502c087a 100644 --- a/rpc/client/mock/abci.go +++ b/rpc/client/mock/abci.go @@ -23,7 +23,7 @@ var ( ) func (a ABCIApp) ABCIInfo() (*ctypes.ResultABCIInfo, error) { - return &ctypes.ResultABCIInfo{a.App.Info(abci.RequestInfo{version.Version})}, nil + return &ctypes.ResultABCIInfo{a.App.Info(abci.RequestInfo{Version: version.Version})}, nil } func (a ABCIApp) ABCIQuery(path string, data cmn.HexBytes) (*ctypes.ResultABCIQuery, error) { @@ -31,7 +31,7 @@ func (a ABCIApp) ABCIQuery(path string, data cmn.HexBytes) (*ctypes.ResultABCIQu } func (a ABCIApp) ABCIQueryWithOptions(path string, data cmn.HexBytes, opts client.ABCIQueryOptions) (*ctypes.ResultABCIQuery, error) { - q := a.App.Query(abci.RequestQuery{data, path, opts.Height, opts.Trusted}) + q := a.App.Query(abci.RequestQuery{Data: data, Path: path, Height: opts.Height, Prove: opts.Trusted}) return &ctypes.ResultABCIQuery{q}, nil } diff --git a/rpc/core/abci.go b/rpc/core/abci.go index 100176195..3f399be80 100644 --- a/rpc/core/abci.go +++ b/rpc/core/abci.go @@ -93,7 +93,7 @@ func ABCIQuery(path string, data cmn.HexBytes, height int64, trusted bool) (*cty // } // ``` func ABCIInfo() (*ctypes.ResultABCIInfo, error) { - resInfo, err := proxyAppQuery.InfoSync(abci.RequestInfo{version.Version}) + resInfo, err := proxyAppQuery.InfoSync(abci.RequestInfo{Version: version.Version}) if err != nil { return nil, err } diff --git a/state/execution.go b/state/execution.go index f38f5e0bb..f57b6e4dd 100644 --- a/state/execution.go +++ b/state/execution.go @@ -207,7 +207,7 @@ func execBlockOnProxyApp(logger log.Logger, proxyAppConn proxy.AppConnConsensus, } // End block - abciResponses.EndBlock, err = proxyAppConn.EndBlockSync(abci.RequestEndBlock{block.Height}) + abciResponses.EndBlock, err = proxyAppConn.EndBlockSync(abci.RequestEndBlock{Height: block.Height}) if err != nil { logger.Error("Error in proxyAppConn.EndBlock", "err", err) return nil, err diff --git a/state/execution_test.go b/state/execution_test.go index d214ae4f2..516ca2ed5 100644 --- a/state/execution_test.go +++ b/state/execution_test.go @@ -168,7 +168,7 @@ func TestUpdateValidators(t *testing.T) { "adding a validator is OK", types.NewValidatorSet([]*types.Validator{val1}), - []abci.Validator{{[]byte{}, types.TM2PB.PubKey(pubkey2), 20}}, + []abci.Validator{{Address: []byte{}, PubKey: types.TM2PB.PubKey(pubkey2), Power: 20}}, types.NewValidatorSet([]*types.Validator{val1, val2}), false, @@ -177,7 +177,7 @@ func TestUpdateValidators(t *testing.T) { "updating a validator is OK", types.NewValidatorSet([]*types.Validator{val1}), - []abci.Validator{{[]byte{}, types.TM2PB.PubKey(pubkey1), 20}}, + []abci.Validator{{Address: []byte{}, PubKey: types.TM2PB.PubKey(pubkey1), Power: 20}}, types.NewValidatorSet([]*types.Validator{types.NewValidator(pubkey1, 20)}), false, @@ -186,7 +186,7 @@ func TestUpdateValidators(t *testing.T) { "removing a validator is OK", types.NewValidatorSet([]*types.Validator{val1, val2}), - []abci.Validator{{[]byte{}, types.TM2PB.PubKey(pubkey2), 0}}, + []abci.Validator{{Address: []byte{}, PubKey: types.TM2PB.PubKey(pubkey2), Power: 0}}, types.NewValidatorSet([]*types.Validator{val1}), false, @@ -196,7 +196,7 @@ func TestUpdateValidators(t *testing.T) { "removing a non-existing validator results in error", types.NewValidatorSet([]*types.Validator{val1}), - []abci.Validator{{[]byte{}, types.TM2PB.PubKey(pubkey2), 0}}, + []abci.Validator{{Address: []byte{}, PubKey: types.TM2PB.PubKey(pubkey2), Power: 0}}, types.NewValidatorSet([]*types.Validator{val1}), true, @@ -206,7 +206,7 @@ func TestUpdateValidators(t *testing.T) { "adding a validator with negative power results in error", types.NewValidatorSet([]*types.Validator{val1}), - []abci.Validator{{[]byte{}, types.TM2PB.PubKey(pubkey2), -100}}, + []abci.Validator{{Address: []byte{}, PubKey: types.TM2PB.PubKey(pubkey2), Power: -100}}, types.NewValidatorSet([]*types.Validator{val1}), true, @@ -262,7 +262,7 @@ func state(nVals, height int) (State, dbm.DB) { SaveState(stateDB, s) for i := 1; i < height; i++ { - s.LastBlockHeight += 1 + s.LastBlockHeight++ SaveState(stateDB, s) } return s, stateDB diff --git a/types/protobuf.go b/types/protobuf.go index 0e1e446db..0ed3d0c43 100644 --- a/types/protobuf.go +++ b/types/protobuf.go @@ -38,7 +38,7 @@ func (tm2pb) Header(header *Header) abci.Header { ChainID: header.ChainID, Height: header.Height, - Time: header.Time.Unix(), + Time: header.Time, NumTxs: int32(header.NumTxs), // XXX: overflow TotalTxs: header.TotalTxs, @@ -131,7 +131,7 @@ func (tm2pb) Evidence(ev Evidence, valSet *ValidatorSet, evTime time.Time) abci. Type: evType, Validator: TM2PB.Validator(val), Height: ev.Height(), - Time: evTime.Unix(), + Time: evTime, TotalVotingPower: valSet.TotalVotingPower(), } } From fe5b0d70749eec50674b1702c3cf9b5e32e5e7cd Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Fri, 27 Jul 2018 13:52:42 -0400 Subject: [PATCH 29/44] consensus: fix test for blocks with evidence --- consensus/common_test.go | 8 +-- consensus/reactor_test.go | 117 +++++++++++++++++++++++++++++++------- 2 files changed, 100 insertions(+), 25 deletions(-) diff --git a/consensus/common_test.go b/consensus/common_test.go index 2df226ba1..992b6fcd6 100644 --- a/consensus/common_test.go +++ b/consensus/common_test.go @@ -17,14 +17,14 @@ import ( bc "github.com/tendermint/tendermint/blockchain" cfg "github.com/tendermint/tendermint/config" cstypes "github.com/tendermint/tendermint/consensus/types" + cmn "github.com/tendermint/tendermint/libs/common" + dbm "github.com/tendermint/tendermint/libs/db" + "github.com/tendermint/tendermint/libs/log" mempl "github.com/tendermint/tendermint/mempool" "github.com/tendermint/tendermint/p2p" "github.com/tendermint/tendermint/privval" sm "github.com/tendermint/tendermint/state" "github.com/tendermint/tendermint/types" - cmn "github.com/tendermint/tendermint/libs/common" - dbm "github.com/tendermint/tendermint/libs/db" - "github.com/tendermint/tendermint/libs/log" "github.com/tendermint/tendermint/abci/example/counter" "github.com/tendermint/tendermint/abci/example/kvstore" @@ -429,7 +429,7 @@ func randGenesisDoc(numValidators int, randPower bool, minPower int64) (*types.G func randGenesisState(numValidators int, randPower bool, minPower int64) (sm.State, []types.PrivValidator) { genDoc, privValidators := randGenesisDoc(numValidators, randPower, minPower) s0, _ := sm.MakeGenesisState(genDoc) - db := dbm.NewMemDB() + db := dbm.NewMemDB() // remove this ? sm.SaveState(db, s0) return s0, privValidators } diff --git a/consensus/reactor_test.go b/consensus/reactor_test.go index 90def612b..63dd9075f 100644 --- a/consensus/reactor_test.go +++ b/consensus/reactor_test.go @@ -4,15 +4,21 @@ import ( "context" "fmt" "os" + "path" "runtime" "runtime/pprof" "sync" "testing" "time" + abcicli "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" + 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" cfg "github.com/tendermint/tendermint/config" @@ -94,49 +100,118 @@ func TestReactorBasic(t *testing.T) { // Ensure we can process blocks with evidence func TestReactorWithEvidence(t *testing.T) { - N := 4 - css := randConsensusNet(N, "consensus_reactor_test", newMockTickerFunc(true), newCounter) - evpool := mockEvidencePool{ - t: t, - ev: []types.Evidence{types.NewMockGoodEvidence(1, 1, []byte("somone"))}, - } - for i := 0; i < N; i++ { - css[i].evpool = evpool + nValidators := 4 + testName := "consensus_reactor_test" + tickerFunc := newMockTickerFunc(true) + appFunc := newCounter + + // heed the advice from https://www.sandimetz.com/blog/2016/1/20/the-wrong-abstraction + // to unroll unwieldy abstractions. Here we duplicate the code from: + // css := randConsensusNet(N, "consensus_reactor_test", newMockTickerFunc(true), newCounter) + + genDoc, privVals := randGenesisDoc(nValidators, false, 30) + css := make([]*ConsensusState, nValidators) + logger := consensusLogger() + for i := 0; i < nValidators; i++ { + stateDB := dbm.NewMemDB() // each state needs its own db + state, _ := sm.LoadStateFromDBOrGenesisDoc(stateDB, genDoc) + thisConfig := ResetConfig(cmn.Fmt("%s_%d", testName, i)) + ensureDir(path.Dir(thisConfig.Consensus.WalFile()), 0700) // dir for wal + app := appFunc() + vals := types.TM2PB.Validators(state.Validators) + app.InitChain(abci.RequestInitChain{Validators: vals}) + + pv := privVals[i] + // duplicate code from: + // css[i] = newConsensusStateWithConfig(thisConfig, state, privVals[i], app) + + blockDB := dbm.NewMemDB() + blockStore := bc.NewBlockStore(blockDB) + + // one for mempool, one for consensus + mtx := new(sync.Mutex) + proxyAppConnMem := abcicli.NewLocalClient(mtx, app) + proxyAppConnCon := abcicli.NewLocalClient(mtx, app) + + // Make Mempool + mempool := mempl.NewMempool(thisConfig.Mempool, proxyAppConnMem, 0) + mempool.SetLogger(log.TestingLogger().With("module", "mempool")) + if thisConfig.Consensus.WaitForTxs() { + mempool.EnableTxsAvailable() + } + + // mock the evidence pool + // everyone includes evidence of another double signing + vIdx := (i + 1) % nValidators + evpool := newMockEvidencePool(privVals[vIdx].GetAddress()) + + // Make ConsensusState + blockExec := sm.NewBlockExecutor(stateDB, log.TestingLogger(), proxyAppConnCon, mempool, evpool) + cs := NewConsensusState(thisConfig.Consensus, state, blockExec, blockStore, mempool, evpool) + cs.SetLogger(log.TestingLogger().With("module", "consensus")) + cs.SetPrivValidator(pv) + + eventBus := types.NewEventBus() + eventBus.SetLogger(log.TestingLogger().With("module", "events")) + eventBus.Start() + cs.SetEventBus(eventBus) + + cs.SetTimeoutTicker(tickerFunc()) + cs.SetLogger(logger.With("validator", i, "module", "consensus")) + + css[i] = cs } - reactors, eventChans, eventBuses := startConsensusNet(t, css, N) + + reactors, eventChans, eventBuses := startConsensusNet(t, css, nValidators) defer stopConsensusNet(log.TestingLogger(), reactors, eventBuses) - // wait till everyone makes the first new block - timeoutWaitGroup(t, N, func(j int) { - <-eventChans[j] + + // wait till everyone makes the first new block with no evidence + timeoutWaitGroup(t, nValidators, func(j int) { + blockI := <-eventChans[j] + block := blockI.(types.EventDataNewBlock).Block + assert.True(t, len(block.Evidence.Evidence) == 0) }, css) // second block should have evidence - timeoutWaitGroup(t, N, func(j int) { - <-eventChans[j] + timeoutWaitGroup(t, nValidators, func(j int) { + blockI := <-eventChans[j] + block := blockI.(types.EventDataNewBlock).Block + assert.True(t, len(block.Evidence.Evidence) > 0) }, css) } +// mock evidence pool returns no evidence for block 1, +// and returnes one piece for all higher blocks. The one piece +// is for a given validator at block 1. type mockEvidencePool struct { height int ev []types.Evidence - t *testing.T } -func (m mockEvidencePool) PendingEvidence() []types.Evidence { +func newMockEvidencePool(val []byte) *mockEvidencePool { + return &mockEvidencePool{ + ev: []types.Evidence{types.NewMockGoodEvidence(1, 1, val)}, + } +} + +func (m *mockEvidencePool) PendingEvidence() []types.Evidence { if m.height > 0 { return m.ev } return nil } -func (m mockEvidencePool) AddEvidence(types.Evidence) error { return nil } -func (m mockEvidencePool) Update(block *types.Block, state sm.State) { - m.height += 1 - +func (m *mockEvidencePool) AddEvidence(types.Evidence) error { return nil } +func (m *mockEvidencePool) Update(block *types.Block, state sm.State) { if m.height > 0 { - require.True(m.t, len(block.Evidence.Evidence) > 0) + if len(block.Evidence.Evidence) == 0 { + panic("block has no evidence") + } } + m.height += 1 } +//------------------------------------ + // Ensure a testnet sends proposal heartbeats and makes blocks when there are txs func TestReactorProposalHeartbeats(t *testing.T) { N := 4 From 7634073718e124bf9864f43c1afe7bd02c446b67 Mon Sep 17 00:00:00 2001 From: Anton Kaliaev Date: Sat, 28 Jul 2018 09:09:53 +0400 Subject: [PATCH 30/44] revert "make `/status` RPC endpoint resistant to consensus halt" Refs #1772 Reasons: - this was a bad patch for something not well understood Lessons learned: - nobody should be modifying code without understanding the problem first. it will only result in more technical debt and code rot. - we never hide information when we suspect a bug or we'not sure what's going on. --- rpc/core/status.go | 45 ++--------------------------------------- rpc/core/status_test.go | 39 ----------------------------------- 2 files changed, 2 insertions(+), 82 deletions(-) delete mode 100644 rpc/core/status_test.go diff --git a/rpc/core/status.go b/rpc/core/status.go index 137aaf422..4cb7667b7 100644 --- a/rpc/core/status.go +++ b/rpc/core/status.go @@ -104,20 +104,11 @@ func Status() (*ctypes.ResultStatus, error) { return result, nil } -const consensusTimeout = time.Second - func validatorAtHeight(h int64) *types.Validator { - lastBlockHeight, vals := getValidatorsWithTimeout( - consensusState, - consensusTimeout, - ) - - if lastBlockHeight == -1 { - return nil - } - privValAddress := pubKey.Address() + lastBlockHeight, vals := consensusState.GetValidators() + // if we're still at height h, search in the current validator set if lastBlockHeight == h { for _, val := range vals { @@ -140,35 +131,3 @@ func validatorAtHeight(h int64) *types.Validator { return nil } - -type validatorRetriever interface { - GetValidators() (int64, []*types.Validator) -} - -// NOTE: Consensus might halt, but we still need to process RPC requests (at -// least for endpoints whole output does not depend on consensus state). -func getValidatorsWithTimeout( - vr validatorRetriever, - t time.Duration, -) (int64, []*types.Validator) { - resultCh := make(chan struct { - lastBlockHeight int64 - vals []*types.Validator - }) - go func() { - h, v := vr.GetValidators() - resultCh <- struct { - lastBlockHeight int64 - vals []*types.Validator - }{h, v} - }() - select { - case res := <-resultCh: - return res.lastBlockHeight, res.vals - case <-time.After(t): - if logger != nil { - logger.Error("Timed out querying validators from consensus", "timeout", t) - } - return -1, []*types.Validator{} - } -} diff --git a/rpc/core/status_test.go b/rpc/core/status_test.go deleted file mode 100644 index e44ffed0f..000000000 --- a/rpc/core/status_test.go +++ /dev/null @@ -1,39 +0,0 @@ -package core - -import ( - "testing" - "time" - - "github.com/tendermint/tendermint/types" -) - -func TestGetValidatorsWithTimeout(t *testing.T) { - height, vs := getValidatorsWithTimeout( - testValidatorReceiver{}, - time.Millisecond, - ) - - if height != -1 { - t.Errorf("expected negative height") - } - - if len(vs) != 0 { - t.Errorf("expected no validators") - } -} - -type testValidatorReceiver struct{} - -func (tr testValidatorReceiver) GetValidators() (int64, []*types.Validator) { - vs := []*types.Validator{} - - for i := 0; i < 3; i++ { - v, _ := types.RandValidator(true, 10) - - vs = append(vs, v) - } - - time.Sleep(time.Millisecond) - - return 10, vs -} From 188e4592731878c893d0a11fc4723747a232ca35 Mon Sep 17 00:00:00 2001 From: VenkatDatta Date: Sun, 29 Jul 2018 11:16:53 +0530 Subject: [PATCH 31/44] Removed unnecessary onStart call (#2098) * Removed unnecessary onStart & onStop calls in reactor * Refactor OnStart & OnStop in reactor * Removed redundant OnStart func in reactor --- blockchain/reactor.go | 4 ---- consensus/reactor.go | 4 ---- evidence/reactor.go | 5 ----- p2p/pex/pex_reactor.go | 4 ---- 4 files changed, 17 deletions(-) diff --git a/blockchain/reactor.go b/blockchain/reactor.go index eadeedc91..f00df50c3 100644 --- a/blockchain/reactor.go +++ b/blockchain/reactor.go @@ -109,9 +109,6 @@ func (bcR *BlockchainReactor) SetLogger(l log.Logger) { // OnStart implements cmn.Service. func (bcR *BlockchainReactor) OnStart() error { - if err := bcR.BaseReactor.OnStart(); err != nil { - return err - } if bcR.fastSync { err := bcR.pool.Start() if err != nil { @@ -124,7 +121,6 @@ func (bcR *BlockchainReactor) OnStart() error { // OnStop implements cmn.Service. func (bcR *BlockchainReactor) OnStop() { - bcR.BaseReactor.OnStop() bcR.pool.Stop() } diff --git a/consensus/reactor.go b/consensus/reactor.go index 3eb1d73aa..58ff42ae2 100644 --- a/consensus/reactor.go +++ b/consensus/reactor.go @@ -58,9 +58,6 @@ func NewConsensusReactor(consensusState *ConsensusState, fastSync bool) *Consens // broadcasted to other peers and starting state if we're not in fast sync. func (conR *ConsensusReactor) OnStart() error { conR.Logger.Info("ConsensusReactor ", "fastSync", conR.FastSync()) - if err := conR.BaseReactor.OnStart(); err != nil { - return err - } conR.subscribeToBroadcastEvents() @@ -77,7 +74,6 @@ func (conR *ConsensusReactor) OnStart() error { // OnStop implements BaseService by unsubscribing from events and stopping // state. func (conR *ConsensusReactor) OnStop() { - conR.BaseReactor.OnStop() conR.unsubscribeFromBroadcastEvents() conR.conS.Stop() if !conR.FastSync() { diff --git a/evidence/reactor.go b/evidence/reactor.go index bf11ac105..cfe47364c 100644 --- a/evidence/reactor.go +++ b/evidence/reactor.go @@ -44,11 +44,6 @@ func (evR *EvidenceReactor) SetLogger(l log.Logger) { evR.evpool.SetLogger(l) } -// OnStart implements cmn.Service -func (evR *EvidenceReactor) OnStart() error { - return evR.BaseReactor.OnStart() -} - // GetChannels implements Reactor. // It returns the list of channels for this reactor. func (evR *EvidenceReactor) GetChannels() []*p2p.ChannelDescriptor { diff --git a/p2p/pex/pex_reactor.go b/p2p/pex/pex_reactor.go index 5c4894ce4..2929d9336 100644 --- a/p2p/pex/pex_reactor.go +++ b/p2p/pex/pex_reactor.go @@ -113,9 +113,6 @@ func NewPEXReactor(b AddrBook, config *PEXReactorConfig) *PEXReactor { // OnStart implements BaseService func (r *PEXReactor) OnStart() error { - if err := r.BaseReactor.OnStart(); err != nil { - return err - } err := r.book.Start() if err != nil && err != cmn.ErrAlreadyStarted { return err @@ -139,7 +136,6 @@ func (r *PEXReactor) OnStart() error { // OnStop implements BaseService func (r *PEXReactor) OnStop() { - r.BaseReactor.OnStop() r.book.Stop() } From f00b52b71025694017dfd5dc046d14b073a084ad Mon Sep 17 00:00:00 2001 From: Dev Ojha Date: Sat, 28 Jul 2018 22:48:37 -0700 Subject: [PATCH 32/44] libs/autofile/group_test: Remove unnecessary logging (#2100) Previously we logged `Testing for i ` for all i in [0,100). This was unnecessary. This changes it to just log the value for i on error messages, to reduce the unnecessary verbosity in log files. --- libs/autofile/group_test.go | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/libs/autofile/group_test.go b/libs/autofile/group_test.go index 72581f9e2..c7e8725cf 100644 --- a/libs/autofile/group_test.go +++ b/libs/autofile/group_test.go @@ -147,14 +147,13 @@ func TestSearch(t *testing.T) { // Now search for each number for i := 0; i < 100; i++ { - t.Log("Testing for i", i) gr, match, err := g.Search("INFO", makeSearchFunc(i)) - require.NoError(t, err, "Failed to search for line") - assert.True(t, match, "Expected Search to return exact match") + require.NoError(t, err, "Failed to search for line, tc #%d", i) + assert.True(t, match, "Expected Search to return exact match, tc #%d", i) line, err := gr.ReadLine() - require.NoError(t, err, "Failed to read line after search") + require.NoError(t, err, "Failed to read line after search, tc #%d", i) if !strings.HasPrefix(line, fmt.Sprintf("INFO %v ", i)) { - t.Fatal("Failed to get correct line") + t.Fatalf("Failed to get correct line, tc #%d", i) } // Make sure we can continue to read from there. cur := i + 1 @@ -165,16 +164,16 @@ func TestSearch(t *testing.T) { // OK! break } else { - t.Fatal("Got EOF after the wrong INFO #") + t.Fatalf("Got EOF after the wrong INFO #, tc #%d", i) } } else if err != nil { - t.Fatal("Error reading line", err) + t.Fatalf("Error reading line, tc #%d, err:\n%s", i, err) } if !strings.HasPrefix(line, "INFO ") { continue } if !strings.HasPrefix(line, fmt.Sprintf("INFO %v ", cur)) { - t.Fatalf("Unexpected INFO #. Expected %v got:\n%v", cur, line) + t.Fatalf("Unexpected INFO #. Expected %v got:\n%v, tc #%d", cur, line, i) } cur++ } From fef4fe1c667d91c2b75f8d0cba388ceda1929b6e Mon Sep 17 00:00:00 2001 From: Zaki Manian Date: Sat, 28 Jul 2018 22:49:42 -0700 Subject: [PATCH 33/44] Link to "The latest gossip on BFT consensus" (#2102) The paper is such a useful resource to anyone building on Tendermint. It should be linked in the ReadMe. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6268e0547..94d8d7f01 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ 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 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)". ## A Note on Production Readiness From 231cdc1320d3c5299432081d55db10c2b3b6cff8 Mon Sep 17 00:00:00 2001 From: Dev Ojha Date: Sun, 29 Jul 2018 16:05:27 -0700 Subject: [PATCH 34/44] ci: Reduce log output in test_cover (#2105) This commit makes it such that circle CI only shows the module whose tests it is currently running in the log, unless a test fails. For each failing test, it will display the name of all failing tests, along with their log output. This is done to make our log output far more scrollable. We lose no information in debugging. --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e76499712..8d321e9e6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -147,7 +147,7 @@ jobs: for pkg in $(go list github.com/tendermint/tendermint/... | circleci tests split --split-by=timings); do id=$(basename "$pkg") - GOCACHE=off go test -v -timeout 5m -race -coverprofile=/tmp/workspace/profiles/$id.out -covermode=atomic "$pkg" | tee "/tmp/logs/$id-$RANDOM.log" + GOCACHE=off go test -timeout 5m -race -coverprofile=/tmp/workspace/profiles/$id.out -covermode=atomic "$pkg" | tee "/tmp/logs/$id-$RANDOM.log" done - persist_to_workspace: root: /tmp/workspace From 0c7338c5f037fc17621427a778a9bf19b1abb2e4 Mon Sep 17 00:00:00 2001 From: Anton Kaliaev Date: Mon, 30 Jul 2018 19:29:40 +0400 Subject: [PATCH 35/44] abci: Change validators to last_commit_info in RequestBeginBlock (#2074) * change validators to last_commit_info in RequestBeginBlock * do not send pubkeys with RequestBeginBlock Refs #1856 --- CHANGELOG_PENDING.md | 1 + abci/types/types.pb.go | 947 +++++++++++++++++++++++-------------- abci/types/types.proto | 12 +- abci/types/typespb_test.go | 124 +++++ docs/app-dev/abci-spec.md | 17 +- state/execution.go | 11 +- state/execution_test.go | 2 +- types/protobuf.go | 9 +- types/protobuf_test.go | 21 + 9 files changed, 783 insertions(+), 361 deletions(-) diff --git a/CHANGELOG_PENDING.md b/CHANGELOG_PENDING.md index 5bb79e4f6..76d06b496 100644 --- a/CHANGELOG_PENDING.md +++ b/CHANGELOG_PENDING.md @@ -7,6 +7,7 @@ BREAKING CHANGES: - [tools] Removed `make ensure_deps` in favor of `make get_vendor_deps` - [p2p] Remove salsa and ripemd primitives, in favor of using chacha as a stream cipher, and hkdf - [abci] Changed time format from int64 to google.protobuf.Timestamp +- [abci] Changed Validators to LastCommitInfo in RequestBeginBlock FEATURES: - [tools] Added `make check_dep` diff --git a/abci/types/types.pb.go b/abci/types/types.pb.go index 9a2b511b2..ac71d91c8 100644 --- a/abci/types/types.pb.go +++ b/abci/types/types.pb.go @@ -59,7 +59,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_2c69c6b96b429b1c, []int{0} + return fileDescriptor_types_d8da2202f45d32c0, []int{0} } func (m *Request) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -481,7 +481,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_2c69c6b96b429b1c, []int{1} + return fileDescriptor_types_d8da2202f45d32c0, []int{1} } func (m *RequestEcho) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -527,7 +527,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_2c69c6b96b429b1c, []int{2} + return fileDescriptor_types_d8da2202f45d32c0, []int{2} } func (m *RequestFlush) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -567,7 +567,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_2c69c6b96b429b1c, []int{3} + return fileDescriptor_types_d8da2202f45d32c0, []int{3} } func (m *RequestInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -616,7 +616,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_2c69c6b96b429b1c, []int{4} + return fileDescriptor_types_d8da2202f45d32c0, []int{4} } func (m *RequestSetOption) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -674,7 +674,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_2c69c6b96b429b1c, []int{5} + return fileDescriptor_types_d8da2202f45d32c0, []int{5} } func (m *RequestInitChain) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -752,7 +752,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_2c69c6b96b429b1c, []int{6} + return fileDescriptor_types_d8da2202f45d32c0, []int{6} } func (m *RequestQuery) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -809,21 +809,22 @@ func (m *RequestQuery) GetProve() bool { return false } +// NOTE: validators here have empty pubkeys. type RequestBeginBlock struct { - Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` - Header Header `protobuf:"bytes,2,opt,name=header" json:"header"` - Validators []SigningValidator `protobuf:"bytes,3,rep,name=validators" json:"validators"` - ByzantineValidators []Evidence `protobuf:"bytes,4,rep,name=byzantine_validators,json=byzantineValidators" json:"byzantine_validators"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` + Header Header `protobuf:"bytes,2,opt,name=header" json:"header"` + LastCommitInfo LastCommitInfo `protobuf:"bytes,3,opt,name=last_commit_info,json=lastCommitInfo" json:"last_commit_info"` + ByzantineValidators []Evidence `protobuf:"bytes,4,rep,name=byzantine_validators,json=byzantineValidators" json:"byzantine_validators"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } 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_2c69c6b96b429b1c, []int{7} + return fileDescriptor_types_d8da2202f45d32c0, []int{7} } func (m *RequestBeginBlock) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -866,11 +867,11 @@ func (m *RequestBeginBlock) GetHeader() Header { return Header{} } -func (m *RequestBeginBlock) GetValidators() []SigningValidator { +func (m *RequestBeginBlock) GetLastCommitInfo() LastCommitInfo { if m != nil { - return m.Validators + return m.LastCommitInfo } - return nil + return LastCommitInfo{} } func (m *RequestBeginBlock) GetByzantineValidators() []Evidence { @@ -891,7 +892,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_2c69c6b96b429b1c, []int{8} + return fileDescriptor_types_d8da2202f45d32c0, []int{8} } func (m *RequestCheckTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -938,7 +939,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_2c69c6b96b429b1c, []int{9} + return fileDescriptor_types_d8da2202f45d32c0, []int{9} } func (m *RequestDeliverTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -985,7 +986,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_2c69c6b96b429b1c, []int{10} + return fileDescriptor_types_d8da2202f45d32c0, []int{10} } func (m *RequestEndBlock) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1031,7 +1032,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_2c69c6b96b429b1c, []int{11} + return fileDescriptor_types_d8da2202f45d32c0, []int{11} } func (m *RequestCommit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1084,7 +1085,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_2c69c6b96b429b1c, []int{12} + return fileDescriptor_types_d8da2202f45d32c0, []int{12} } func (m *Response) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1537,7 +1538,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_2c69c6b96b429b1c, []int{13} + return fileDescriptor_types_d8da2202f45d32c0, []int{13} } func (m *ResponseException) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1584,7 +1585,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_2c69c6b96b429b1c, []int{14} + return fileDescriptor_types_d8da2202f45d32c0, []int{14} } func (m *ResponseEcho) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1630,7 +1631,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_2c69c6b96b429b1c, []int{15} + return fileDescriptor_types_d8da2202f45d32c0, []int{15} } func (m *ResponseFlush) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1673,7 +1674,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_2c69c6b96b429b1c, []int{16} + return fileDescriptor_types_d8da2202f45d32c0, []int{16} } func (m *ResponseInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1745,7 +1746,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_2c69c6b96b429b1c, []int{17} + return fileDescriptor_types_d8da2202f45d32c0, []int{17} } func (m *ResponseSetOption) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1807,7 +1808,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_2c69c6b96b429b1c, []int{18} + return fileDescriptor_types_d8da2202f45d32c0, []int{18} } func (m *ResponseInitChain) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1869,7 +1870,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_2c69c6b96b429b1c, []int{19} + return fileDescriptor_types_d8da2202f45d32c0, []int{19} } func (m *ResponseQuery) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1965,7 +1966,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_2c69c6b96b429b1c, []int{20} + return fileDescriptor_types_d8da2202f45d32c0, []int{20} } func (m *ResponseBeginBlock) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2018,7 +2019,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_2c69c6b96b429b1c, []int{21} + return fileDescriptor_types_d8da2202f45d32c0, []int{21} } func (m *ResponseCheckTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2113,7 +2114,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_2c69c6b96b429b1c, []int{22} + return fileDescriptor_types_d8da2202f45d32c0, []int{22} } func (m *ResponseDeliverTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2204,7 +2205,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_2c69c6b96b429b1c, []int{23} + return fileDescriptor_types_d8da2202f45d32c0, []int{23} } func (m *ResponseEndBlock) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2266,7 +2267,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_2c69c6b96b429b1c, []int{24} + return fileDescriptor_types_d8da2202f45d32c0, []int{24} } func (m *ResponseCommit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2317,7 +2318,7 @@ 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_2c69c6b96b429b1c, []int{25} + return fileDescriptor_types_d8da2202f45d32c0, []int{25} } func (m *ConsensusParams) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2367,7 +2368,7 @@ func (m *ConsensusParams) GetBlockGossip() *BlockGossip { return nil } -// BlockSize contain limits on the block size. +// 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"` MaxTxs int32 `protobuf:"varint,2,opt,name=max_txs,json=maxTxs,proto3" json:"max_txs,omitempty"` @@ -2381,7 +2382,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_2c69c6b96b429b1c, []int{26} + return fileDescriptor_types_d8da2202f45d32c0, []int{26} } func (m *BlockSize) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2431,7 +2432,7 @@ func (m *BlockSize) GetMaxGas() int64 { return 0 } -// TxSize contain limits on the tx size. +// 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"` @@ -2444,7 +2445,7 @@ 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_2c69c6b96b429b1c, []int{27} + return fileDescriptor_types_d8da2202f45d32c0, []int{27} } func (m *TxSize) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2501,7 +2502,7 @@ 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_2c69c6b96b429b1c, []int{28} + return fileDescriptor_types_d8da2202f45d32c0, []int{28} } func (m *BlockGossip) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2537,6 +2538,61 @@ func (m *BlockGossip) GetBlockPartSizeBytes() int32 { return 0 } +type LastCommitInfo struct { + CommitRound int32 `protobuf:"varint,1,opt,name=commit_round,json=commitRound,proto3" json:"commit_round,omitempty"` + Validators []SigningValidator `protobuf:"bytes,2,rep,name=validators" json:"validators"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_d8da2202f45d32c0, []int{29} +} +func (m *LastCommitInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *LastCommitInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_LastCommitInfo.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 *LastCommitInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_LastCommitInfo.Merge(dst, src) +} +func (m *LastCommitInfo) XXX_Size() int { + return m.Size() +} +func (m *LastCommitInfo) XXX_DiscardUnknown() { + xxx_messageInfo_LastCommitInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_LastCommitInfo proto.InternalMessageInfo + +func (m *LastCommitInfo) GetCommitRound() int32 { + if m != nil { + return m.CommitRound + } + return 0 +} + +func (m *LastCommitInfo) GetValidators() []SigningValidator { + if m != nil { + return m.Validators + } + return nil +} + // just the minimum the app might need type Header struct { // basics @@ -2561,7 +2617,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_2c69c6b96b429b1c, []int{29} + return fileDescriptor_types_d8da2202f45d32c0, []int{30} } func (m *Header) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2667,7 +2723,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_2c69c6b96b429b1c, []int{30} + return fileDescriptor_types_d8da2202f45d32c0, []int{31} } func (m *Validator) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2730,7 +2786,7 @@ func (m *SigningValidator) Reset() { *m = SigningValidator{} } func (m *SigningValidator) String() string { return proto.CompactTextString(m) } func (*SigningValidator) ProtoMessage() {} func (*SigningValidator) Descriptor() ([]byte, []int) { - return fileDescriptor_types_2c69c6b96b429b1c, []int{31} + return fileDescriptor_types_d8da2202f45d32c0, []int{32} } func (m *SigningValidator) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2785,7 +2841,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_2c69c6b96b429b1c, []int{32} + return fileDescriptor_types_d8da2202f45d32c0, []int{33} } func (m *PubKey) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2843,7 +2899,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_2c69c6b96b429b1c, []int{33} + return fileDescriptor_types_d8da2202f45d32c0, []int{34} } func (m *Evidence) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2966,6 +3022,8 @@ func init() { golang_proto.RegisterType((*TxSize)(nil), "types.TxSize") proto.RegisterType((*BlockGossip)(nil), "types.BlockGossip") golang_proto.RegisterType((*BlockGossip)(nil), "types.BlockGossip") + proto.RegisterType((*LastCommitInfo)(nil), "types.LastCommitInfo") + golang_proto.RegisterType((*LastCommitInfo)(nil), "types.LastCommitInfo") proto.RegisterType((*Header)(nil), "types.Header") golang_proto.RegisterType((*Header)(nil), "types.Header") proto.RegisterType((*Validator)(nil), "types.Validator") @@ -3487,14 +3545,9 @@ func (this *RequestBeginBlock) Equal(that interface{}) bool { if !this.Header.Equal(&that1.Header) { return false } - if len(this.Validators) != len(that1.Validators) { + if !this.LastCommitInfo.Equal(&that1.LastCommitInfo) { return false } - for i := range this.Validators { - if !this.Validators[i].Equal(&that1.Validators[i]) { - return false - } - } if len(this.ByzantineValidators) != len(that1.ByzantineValidators) { return false } @@ -4489,6 +4542,41 @@ func (this *BlockGossip) Equal(that interface{}) bool { } return true } +func (this *LastCommitInfo) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*LastCommitInfo) + if !ok { + that2, ok := that.(LastCommitInfo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.CommitRound != that1.CommitRound { + return false + } + if len(this.Validators) != len(that1.Validators) { + return false + } + for i := range this.Validators { + if !this.Validators[i].Equal(&that1.Validators[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} func (this *Header) Equal(that interface{}) bool { if that == nil { return this == nil @@ -5507,18 +5595,14 @@ func (m *RequestBeginBlock) MarshalTo(dAtA []byte) (int, error) { return 0, err } i += n15 - if len(m.Validators) > 0 { - for _, msg := range m.Validators { - dAtA[i] = 0x1a - i++ - i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } + dAtA[i] = 0x1a + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.LastCommitInfo.Size())) + n16, err := m.LastCommitInfo.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } + i += n16 if len(m.ByzantineValidators) > 0 { for _, msg := range m.ByzantineValidators { dAtA[i] = 0x22 @@ -5654,11 +5738,11 @@ func (m *Response) MarshalTo(dAtA []byte) (int, error) { var l int _ = l if m.Value != nil { - nn16, err := m.Value.MarshalTo(dAtA[i:]) + nn17, err := m.Value.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += nn16 + i += nn17 } if m.XXX_unrecognized != nil { i += copy(dAtA[i:], m.XXX_unrecognized) @@ -5672,11 +5756,11 @@ func (m *Response_Exception) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintTypes(dAtA, i, uint64(m.Exception.Size())) - n17, err := m.Exception.MarshalTo(dAtA[i:]) + n18, err := m.Exception.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n17 + i += n18 } return i, nil } @@ -5686,11 +5770,11 @@ func (m *Response_Echo) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintTypes(dAtA, i, uint64(m.Echo.Size())) - n18, err := m.Echo.MarshalTo(dAtA[i:]) + n19, err := m.Echo.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n18 + i += n19 } return i, nil } @@ -5700,11 +5784,11 @@ func (m *Response_Flush) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1a i++ i = encodeVarintTypes(dAtA, i, uint64(m.Flush.Size())) - n19, err := m.Flush.MarshalTo(dAtA[i:]) + n20, err := m.Flush.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n19 + i += n20 } return i, nil } @@ -5714,11 +5798,11 @@ func (m *Response_Info) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x22 i++ i = encodeVarintTypes(dAtA, i, uint64(m.Info.Size())) - n20, err := m.Info.MarshalTo(dAtA[i:]) + n21, err := m.Info.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n20 + i += n21 } return i, nil } @@ -5728,11 +5812,11 @@ func (m *Response_SetOption) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x2a i++ i = encodeVarintTypes(dAtA, i, uint64(m.SetOption.Size())) - n21, err := m.SetOption.MarshalTo(dAtA[i:]) + n22, err := m.SetOption.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n21 + i += n22 } return i, nil } @@ -5742,11 +5826,11 @@ func (m *Response_InitChain) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x32 i++ i = encodeVarintTypes(dAtA, i, uint64(m.InitChain.Size())) - n22, err := m.InitChain.MarshalTo(dAtA[i:]) + n23, err := m.InitChain.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n22 + i += n23 } return i, nil } @@ -5756,11 +5840,11 @@ func (m *Response_Query) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x3a i++ i = encodeVarintTypes(dAtA, i, uint64(m.Query.Size())) - n23, err := m.Query.MarshalTo(dAtA[i:]) + n24, err := m.Query.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n23 + i += n24 } return i, nil } @@ -5770,11 +5854,11 @@ func (m *Response_BeginBlock) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x42 i++ i = encodeVarintTypes(dAtA, i, uint64(m.BeginBlock.Size())) - n24, err := m.BeginBlock.MarshalTo(dAtA[i:]) + n25, err := m.BeginBlock.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n24 + i += n25 } return i, nil } @@ -5784,11 +5868,11 @@ func (m *Response_CheckTx) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x4a i++ i = encodeVarintTypes(dAtA, i, uint64(m.CheckTx.Size())) - n25, err := m.CheckTx.MarshalTo(dAtA[i:]) + n26, err := m.CheckTx.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n25 + i += n26 } return i, nil } @@ -5798,11 +5882,11 @@ func (m *Response_DeliverTx) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x52 i++ i = encodeVarintTypes(dAtA, i, uint64(m.DeliverTx.Size())) - n26, err := m.DeliverTx.MarshalTo(dAtA[i:]) + n27, err := m.DeliverTx.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n26 + i += n27 } return i, nil } @@ -5812,11 +5896,11 @@ func (m *Response_EndBlock) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x5a i++ i = encodeVarintTypes(dAtA, i, uint64(m.EndBlock.Size())) - n27, err := m.EndBlock.MarshalTo(dAtA[i:]) + n28, err := m.EndBlock.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n27 + i += n28 } return i, nil } @@ -5826,11 +5910,11 @@ func (m *Response_Commit) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x62 i++ i = encodeVarintTypes(dAtA, i, uint64(m.Commit.Size())) - n28, err := m.Commit.MarshalTo(dAtA[i:]) + n29, err := m.Commit.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n28 + i += n29 } return i, nil } @@ -6010,11 +6094,11 @@ func (m *ResponseInitChain) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintTypes(dAtA, i, uint64(m.ConsensusParams.Size())) - n29, err := m.ConsensusParams.MarshalTo(dAtA[i:]) + n30, err := m.ConsensusParams.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n29 + i += n30 } if len(m.Validators) > 0 { for _, msg := range m.Validators { @@ -6296,11 +6380,11 @@ func (m *ResponseEndBlock) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintTypes(dAtA, i, uint64(m.ConsensusParamUpdates.Size())) - n30, err := m.ConsensusParamUpdates.MarshalTo(dAtA[i:]) + n31, err := m.ConsensusParamUpdates.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n30 + i += n31 } if len(m.Tags) > 0 { for _, msg := range m.Tags { @@ -6366,31 +6450,31 @@ func (m *ConsensusParams) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintTypes(dAtA, i, uint64(m.BlockSize.Size())) - n31, err := m.BlockSize.MarshalTo(dAtA[i:]) + n32, err := m.BlockSize.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n31 + i += n32 } if m.TxSize != nil { dAtA[i] = 0x12 i++ i = encodeVarintTypes(dAtA, i, uint64(m.TxSize.Size())) - n32, err := m.TxSize.MarshalTo(dAtA[i:]) + n33, err := m.TxSize.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n32 + i += n33 } if m.BlockGossip != nil { dAtA[i] = 0x1a i++ i = encodeVarintTypes(dAtA, i, uint64(m.BlockGossip.Size())) - n33, err := m.BlockGossip.MarshalTo(dAtA[i:]) + n34, err := m.BlockGossip.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n33 + i += n34 } if m.XXX_unrecognized != nil { i += copy(dAtA[i:], m.XXX_unrecognized) @@ -6491,6 +6575,44 @@ func (m *BlockGossip) MarshalTo(dAtA []byte) (int, error) { return i, nil } +func (m *LastCommitInfo) 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 *LastCommitInfo) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.CommitRound != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.CommitRound)) + } + if len(m.Validators) > 0 { + for _, msg := range m.Validators { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + func (m *Header) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -6520,11 +6642,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))) - n34, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i:]) + n35, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i:]) if err != nil { return 0, err } - i += n34 + i += n35 if m.NumTxs != 0 { dAtA[i] = 0x20 i++ @@ -6556,11 +6678,11 @@ func (m *Header) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x4a i++ i = encodeVarintTypes(dAtA, i, uint64(m.Proposer.Size())) - n35, err := m.Proposer.MarshalTo(dAtA[i:]) + n36, err := m.Proposer.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n35 + i += n36 if m.XXX_unrecognized != nil { i += copy(dAtA[i:], m.XXX_unrecognized) } @@ -6591,11 +6713,11 @@ func (m *Validator) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintTypes(dAtA, i, uint64(m.PubKey.Size())) - n36, err := m.PubKey.MarshalTo(dAtA[i:]) + n37, err := m.PubKey.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n36 + i += n37 if m.Power != 0 { dAtA[i] = 0x18 i++ @@ -6625,11 +6747,11 @@ func (m *SigningValidator) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintTypes(dAtA, i, uint64(m.Validator.Size())) - n37, err := m.Validator.MarshalTo(dAtA[i:]) + n38, err := m.Validator.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n37 + i += n38 if m.SignedLastBlock { dAtA[i] = 0x10 i++ @@ -6703,11 +6825,11 @@ func (m *Evidence) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintTypes(dAtA, i, uint64(m.Validator.Size())) - n38, err := m.Validator.MarshalTo(dAtA[i:]) + n39, err := m.Validator.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n38 + i += n39 if m.Height != 0 { dAtA[i] = 0x18 i++ @@ -6716,11 +6838,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))) - n39, 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 += n39 + i += n40 if m.TotalVotingPower != 0 { dAtA[i] = 0x28 i++ @@ -6920,20 +7042,14 @@ func NewPopulatedRequestBeginBlock(r randyTypes, easy bool) *RequestBeginBlock { } v7 := NewPopulatedHeader(r, easy) this.Header = *v7 + v8 := NewPopulatedLastCommitInfo(r, easy) + this.LastCommitInfo = *v8 if r.Intn(10) != 0 { - v8 := r.Intn(5) - this.Validators = make([]SigningValidator, v8) - for i := 0; i < v8; i++ { - v9 := NewPopulatedSigningValidator(r, easy) - this.Validators[i] = *v9 - } - } - if r.Intn(10) != 0 { - v10 := r.Intn(5) - this.ByzantineValidators = make([]Evidence, v10) - for i := 0; i < v10; i++ { - v11 := NewPopulatedEvidence(r, easy) - this.ByzantineValidators[i] = *v11 + v9 := r.Intn(5) + this.ByzantineValidators = make([]Evidence, v9) + for i := 0; i < v9; i++ { + v10 := NewPopulatedEvidence(r, easy) + this.ByzantineValidators[i] = *v10 } } if !easy && r.Intn(10) != 0 { @@ -6944,9 +7060,9 @@ func NewPopulatedRequestBeginBlock(r randyTypes, easy bool) *RequestBeginBlock { func NewPopulatedRequestCheckTx(r randyTypes, easy bool) *RequestCheckTx { this := &RequestCheckTx{} - v12 := r.Intn(100) - this.Tx = make([]byte, v12) - for i := 0; i < v12; i++ { + v11 := r.Intn(100) + this.Tx = make([]byte, v11) + for i := 0; i < v11; i++ { this.Tx[i] = byte(r.Intn(256)) } if !easy && r.Intn(10) != 0 { @@ -6957,9 +7073,9 @@ func NewPopulatedRequestCheckTx(r randyTypes, easy bool) *RequestCheckTx { func NewPopulatedRequestDeliverTx(r randyTypes, easy bool) *RequestDeliverTx { this := &RequestDeliverTx{} - v13 := r.Intn(100) - this.Tx = make([]byte, v13) - for i := 0; i < v13; i++ { + v12 := r.Intn(100) + this.Tx = make([]byte, v12) + for i := 0; i < v12; i++ { this.Tx[i] = byte(r.Intn(256)) } if !easy && r.Intn(10) != 0 { @@ -7117,9 +7233,9 @@ func NewPopulatedResponseInfo(r randyTypes, easy bool) *ResponseInfo { if r.Intn(2) == 0 { this.LastBlockHeight *= -1 } - v14 := r.Intn(100) - this.LastBlockAppHash = make([]byte, v14) - for i := 0; i < v14; i++ { + v13 := r.Intn(100) + this.LastBlockAppHash = make([]byte, v13) + for i := 0; i < v13; i++ { this.LastBlockAppHash[i] = byte(r.Intn(256)) } if !easy && r.Intn(10) != 0 { @@ -7145,11 +7261,11 @@ func NewPopulatedResponseInitChain(r randyTypes, easy bool) *ResponseInitChain { this.ConsensusParams = NewPopulatedConsensusParams(r, easy) } if r.Intn(10) != 0 { - v15 := r.Intn(5) - this.Validators = make([]Validator, v15) - for i := 0; i < v15; i++ { - v16 := NewPopulatedValidator(r, easy) - this.Validators[i] = *v16 + v14 := r.Intn(5) + this.Validators = make([]Validator, v14) + for i := 0; i < v14; i++ { + v15 := NewPopulatedValidator(r, easy) + this.Validators[i] = *v15 } } if !easy && r.Intn(10) != 0 { @@ -7167,19 +7283,19 @@ func NewPopulatedResponseQuery(r randyTypes, easy bool) *ResponseQuery { if r.Intn(2) == 0 { this.Index *= -1 } + v16 := r.Intn(100) + this.Key = make([]byte, v16) + for i := 0; i < v16; i++ { + this.Key[i] = byte(r.Intn(256)) + } v17 := r.Intn(100) - this.Key = make([]byte, v17) + this.Value = make([]byte, v17) for i := 0; i < v17; i++ { - this.Key[i] = byte(r.Intn(256)) + this.Value[i] = byte(r.Intn(256)) } v18 := r.Intn(100) - this.Value = make([]byte, v18) + this.Proof = make([]byte, v18) for i := 0; i < v18; i++ { - this.Value[i] = byte(r.Intn(256)) - } - v19 := r.Intn(100) - this.Proof = make([]byte, v19) - for i := 0; i < v19; i++ { this.Proof[i] = byte(r.Intn(256)) } this.Height = int64(r.Int63()) @@ -7195,11 +7311,11 @@ func NewPopulatedResponseQuery(r randyTypes, easy bool) *ResponseQuery { func NewPopulatedResponseBeginBlock(r randyTypes, easy bool) *ResponseBeginBlock { this := &ResponseBeginBlock{} if r.Intn(10) != 0 { - v20 := r.Intn(5) - this.Tags = make([]common.KVPair, v20) - for i := 0; i < v20; i++ { - v21 := common.NewPopulatedKVPair(r, easy) - this.Tags[i] = *v21 + v19 := r.Intn(5) + this.Tags = make([]common.KVPair, v19) + for i := 0; i < v19; i++ { + v20 := common.NewPopulatedKVPair(r, easy) + this.Tags[i] = *v20 } } if !easy && r.Intn(10) != 0 { @@ -7211,9 +7327,9 @@ func NewPopulatedResponseBeginBlock(r randyTypes, easy bool) *ResponseBeginBlock func NewPopulatedResponseCheckTx(r randyTypes, easy bool) *ResponseCheckTx { this := &ResponseCheckTx{} this.Code = uint32(r.Uint32()) - v22 := r.Intn(100) - this.Data = make([]byte, v22) - for i := 0; i < v22; i++ { + v21 := r.Intn(100) + this.Data = make([]byte, v21) + for i := 0; i < v21; i++ { this.Data[i] = byte(r.Intn(256)) } this.Log = string(randStringTypes(r)) @@ -7227,11 +7343,11 @@ func NewPopulatedResponseCheckTx(r randyTypes, easy bool) *ResponseCheckTx { this.GasUsed *= -1 } if r.Intn(10) != 0 { - v23 := r.Intn(5) - this.Tags = make([]common.KVPair, v23) - for i := 0; i < v23; i++ { - v24 := common.NewPopulatedKVPair(r, easy) - this.Tags[i] = *v24 + v22 := r.Intn(5) + this.Tags = make([]common.KVPair, v22) + for i := 0; i < v22; i++ { + v23 := common.NewPopulatedKVPair(r, easy) + this.Tags[i] = *v23 } } if !easy && r.Intn(10) != 0 { @@ -7243,9 +7359,9 @@ func NewPopulatedResponseCheckTx(r randyTypes, easy bool) *ResponseCheckTx { func NewPopulatedResponseDeliverTx(r randyTypes, easy bool) *ResponseDeliverTx { this := &ResponseDeliverTx{} this.Code = uint32(r.Uint32()) - v25 := r.Intn(100) - this.Data = make([]byte, v25) - for i := 0; i < v25; i++ { + v24 := r.Intn(100) + this.Data = make([]byte, v24) + for i := 0; i < v24; i++ { this.Data[i] = byte(r.Intn(256)) } this.Log = string(randStringTypes(r)) @@ -7259,11 +7375,11 @@ func NewPopulatedResponseDeliverTx(r randyTypes, easy bool) *ResponseDeliverTx { this.GasUsed *= -1 } if r.Intn(10) != 0 { - v26 := r.Intn(5) - this.Tags = make([]common.KVPair, v26) - for i := 0; i < v26; i++ { - v27 := common.NewPopulatedKVPair(r, easy) - this.Tags[i] = *v27 + v25 := r.Intn(5) + this.Tags = make([]common.KVPair, v25) + for i := 0; i < v25; i++ { + v26 := common.NewPopulatedKVPair(r, easy) + this.Tags[i] = *v26 } } if !easy && r.Intn(10) != 0 { @@ -7275,22 +7391,22 @@ func NewPopulatedResponseDeliverTx(r randyTypes, easy bool) *ResponseDeliverTx { func NewPopulatedResponseEndBlock(r randyTypes, easy bool) *ResponseEndBlock { this := &ResponseEndBlock{} if r.Intn(10) != 0 { - v28 := r.Intn(5) - this.ValidatorUpdates = make([]Validator, v28) - for i := 0; i < v28; i++ { - v29 := NewPopulatedValidator(r, easy) - this.ValidatorUpdates[i] = *v29 + v27 := r.Intn(5) + this.ValidatorUpdates = make([]Validator, v27) + for i := 0; i < v27; i++ { + v28 := NewPopulatedValidator(r, easy) + this.ValidatorUpdates[i] = *v28 } } if r.Intn(10) != 0 { this.ConsensusParamUpdates = NewPopulatedConsensusParams(r, easy) } if r.Intn(10) != 0 { - v30 := r.Intn(5) - this.Tags = make([]common.KVPair, v30) - for i := 0; i < v30; i++ { - v31 := common.NewPopulatedKVPair(r, easy) - this.Tags[i] = *v31 + v29 := r.Intn(5) + this.Tags = make([]common.KVPair, v29) + for i := 0; i < v29; i++ { + v30 := common.NewPopulatedKVPair(r, easy) + this.Tags[i] = *v30 } } if !easy && r.Intn(10) != 0 { @@ -7301,9 +7417,9 @@ func NewPopulatedResponseEndBlock(r randyTypes, easy bool) *ResponseEndBlock { func NewPopulatedResponseCommit(r randyTypes, easy bool) *ResponseCommit { this := &ResponseCommit{} - v32 := r.Intn(100) - this.Data = make([]byte, v32) - for i := 0; i < v32; i++ { + v31 := r.Intn(100) + this.Data = make([]byte, v31) + for i := 0; i < v31; i++ { this.Data[i] = byte(r.Intn(256)) } if !easy && r.Intn(10) != 0 { @@ -7377,6 +7493,26 @@ func NewPopulatedBlockGossip(r randyTypes, easy bool) *BlockGossip { return this } +func NewPopulatedLastCommitInfo(r randyTypes, easy bool) *LastCommitInfo { + this := &LastCommitInfo{} + this.CommitRound = int32(r.Int31()) + if r.Intn(2) == 0 { + this.CommitRound *= -1 + } + if r.Intn(10) != 0 { + v32 := r.Intn(5) + this.Validators = make([]SigningValidator, v32) + for i := 0; i < v32; i++ { + v33 := NewPopulatedSigningValidator(r, easy) + this.Validators[i] = *v33 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 3) + } + return this +} + func NewPopulatedHeader(r randyTypes, easy bool) *Header { this := &Header{} this.ChainID = string(randStringTypes(r)) @@ -7384,8 +7520,8 @@ func NewPopulatedHeader(r randyTypes, easy bool) *Header { if r.Intn(2) == 0 { this.Height *= -1 } - v33 := github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) - this.Time = *v33 + v34 := github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + this.Time = *v34 this.NumTxs = int32(r.Int31()) if r.Intn(2) == 0 { this.NumTxs *= -1 @@ -7394,23 +7530,23 @@ func NewPopulatedHeader(r randyTypes, easy bool) *Header { if r.Intn(2) == 0 { this.TotalTxs *= -1 } - v34 := r.Intn(100) - this.LastBlockHash = make([]byte, v34) - for i := 0; i < v34; i++ { - this.LastBlockHash[i] = byte(r.Intn(256)) - } v35 := r.Intn(100) - this.ValidatorsHash = make([]byte, v35) + this.LastBlockHash = make([]byte, v35) for i := 0; i < v35; i++ { - this.ValidatorsHash[i] = byte(r.Intn(256)) + this.LastBlockHash[i] = byte(r.Intn(256)) } v36 := r.Intn(100) - this.AppHash = make([]byte, v36) + this.ValidatorsHash = make([]byte, v36) for i := 0; i < v36; i++ { + this.ValidatorsHash[i] = byte(r.Intn(256)) + } + v37 := r.Intn(100) + this.AppHash = make([]byte, v37) + for i := 0; i < v37; i++ { this.AppHash[i] = byte(r.Intn(256)) } - v37 := NewPopulatedValidator(r, easy) - this.Proposer = *v37 + v38 := NewPopulatedValidator(r, easy) + this.Proposer = *v38 if !easy && r.Intn(10) != 0 { this.XXX_unrecognized = randUnrecognizedTypes(r, 10) } @@ -7419,13 +7555,13 @@ func NewPopulatedHeader(r randyTypes, easy bool) *Header { func NewPopulatedValidator(r randyTypes, easy bool) *Validator { this := &Validator{} - v38 := r.Intn(100) - this.Address = make([]byte, v38) - for i := 0; i < v38; i++ { + v39 := r.Intn(100) + this.Address = make([]byte, v39) + for i := 0; i < v39; i++ { this.Address[i] = byte(r.Intn(256)) } - v39 := NewPopulatedPubKey(r, easy) - this.PubKey = *v39 + v40 := NewPopulatedPubKey(r, easy) + this.PubKey = *v40 this.Power = int64(r.Int63()) if r.Intn(2) == 0 { this.Power *= -1 @@ -7438,8 +7574,8 @@ func NewPopulatedValidator(r randyTypes, easy bool) *Validator { func NewPopulatedSigningValidator(r randyTypes, easy bool) *SigningValidator { this := &SigningValidator{} - v40 := NewPopulatedValidator(r, easy) - this.Validator = *v40 + v41 := NewPopulatedValidator(r, easy) + this.Validator = *v41 this.SignedLastBlock = bool(bool(r.Intn(2) == 0)) if !easy && r.Intn(10) != 0 { this.XXX_unrecognized = randUnrecognizedTypes(r, 3) @@ -7450,9 +7586,9 @@ func NewPopulatedSigningValidator(r randyTypes, easy bool) *SigningValidator { func NewPopulatedPubKey(r randyTypes, easy bool) *PubKey { this := &PubKey{} this.Type = string(randStringTypes(r)) - v41 := r.Intn(100) - this.Data = make([]byte, v41) - for i := 0; i < v41; i++ { + v42 := r.Intn(100) + this.Data = make([]byte, v42) + for i := 0; i < v42; i++ { this.Data[i] = byte(r.Intn(256)) } if !easy && r.Intn(10) != 0 { @@ -7464,14 +7600,14 @@ func NewPopulatedPubKey(r randyTypes, easy bool) *PubKey { func NewPopulatedEvidence(r randyTypes, easy bool) *Evidence { this := &Evidence{} this.Type = string(randStringTypes(r)) - v42 := NewPopulatedValidator(r, easy) - this.Validator = *v42 + v43 := NewPopulatedValidator(r, easy) + this.Validator = *v43 this.Height = int64(r.Int63()) if r.Intn(2) == 0 { this.Height *= -1 } - v43 := github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) - this.Time = *v43 + v44 := github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + this.Time = *v44 this.TotalVotingPower = int64(r.Int63()) if r.Intn(2) == 0 { this.TotalVotingPower *= -1 @@ -7501,9 +7637,9 @@ func randUTF8RuneTypes(r randyTypes) rune { return rune(ru + 61) } func randStringTypes(r randyTypes) string { - v44 := r.Intn(100) - tmps := make([]rune, v44) - for i := 0; i < v44; i++ { + v45 := r.Intn(100) + tmps := make([]rune, v45) + for i := 0; i < v45; i++ { tmps[i] = randUTF8RuneTypes(r) } return string(tmps) @@ -7525,11 +7661,11 @@ func randFieldTypes(dAtA []byte, r randyTypes, fieldNumber int, wire int) []byte switch wire { case 0: dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) - v45 := r.Int63() + v46 := r.Int63() if r.Intn(2) == 0 { - v45 *= -1 + v46 *= -1 } - dAtA = encodeVarintPopulateTypes(dAtA, uint64(v45)) + dAtA = encodeVarintPopulateTypes(dAtA, uint64(v46)) case 1: dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) @@ -7778,12 +7914,8 @@ func (m *RequestBeginBlock) Size() (n int) { } l = m.Header.Size() n += 1 + l + sovTypes(uint64(l)) - if len(m.Validators) > 0 { - for _, e := range m.Validators { - l = e.Size() - n += 1 + l + sovTypes(uint64(l)) - } - } + l = m.LastCommitInfo.Size() + n += 1 + l + sovTypes(uint64(l)) if len(m.ByzantineValidators) > 0 { for _, e := range m.ByzantineValidators { l = e.Size() @@ -8290,6 +8422,24 @@ func (m *BlockGossip) Size() (n int) { return n } +func (m *LastCommitInfo) Size() (n int) { + var l int + _ = l + if m.CommitRound != 0 { + n += 1 + sovTypes(uint64(m.CommitRound)) + } + if len(m.Validators) > 0 { + for _, e := range m.Validators { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + func (m *Header) Size() (n int) { var l int _ = l @@ -9583,7 +9733,7 @@ func (m *RequestBeginBlock) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field LastCommitInfo", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9607,8 +9757,7 @@ func (m *RequestBeginBlock) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Validators = append(m.Validators, SigningValidator{}) - if err := m.Validators[len(m.Validators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.LastCommitInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -12440,6 +12589,107 @@ func (m *BlockGossip) Unmarshal(dAtA []byte) error { } return nil } +func (m *LastCommitInfo) 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: LastCommitInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LastCommitInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CommitRound", wireType) + } + m.CommitRound = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CommitRound |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Validators", 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 + } + m.Validators = append(m.Validators, SigningValidator{}) + if err := m.Validators[len(m.Validators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + 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 *Header) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -13356,131 +13606,134 @@ var ( ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") ) -func init() { proto.RegisterFile("abci/types/types.proto", fileDescriptor_types_2c69c6b96b429b1c) } +func init() { proto.RegisterFile("abci/types/types.proto", fileDescriptor_types_d8da2202f45d32c0) } func init() { - golang_proto.RegisterFile("abci/types/types.proto", fileDescriptor_types_2c69c6b96b429b1c) -} - -var fileDescriptor_types_2c69c6b96b429b1c = []byte{ - // 1911 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x58, 0x4b, 0x73, 0x24, 0x47, - 0x11, 0x56, 0xcf, 0xbb, 0x73, 0x24, 0x8d, 0xb6, 0xb4, 0x2b, 0xcd, 0x8e, 0x41, 0xda, 0xe8, 0x20, - 0xd6, 0x5a, 0x2c, 0x8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b, 0x3e, - 0xac, 0xc5, 0xa2, 0x35, 0xe9, 0x43, 0x03, 0x7f, 0x6b, 0x47, 0x74, 0x57, 0xa5, 0xce, 0xed, 0xc2, - 0x41, 0x92, 0x37, 0x5c, 0x31, 0x23, 0x29, 0x74, 0x9f, 0xc5, 0x66, 0xce, 0x05, 0x0b, 0xf1, 0x72, - 0x9b, 0x65, 0xee, 0xfb, 0x50, 0xf1, 0xe5, 0xf5, 0x74, 0x2b, 0x26, 0x06, 0x4d, 0xa8, 0x5f, 0xd0, - 0xd9, 0x9c, 0x19, 0x6f, 0x42, 0x3b, 0x13, 0x29, 0xa4, 0x0b, 0x4d, 0x97, 0x71, 0x4e, 0x6d, 0xd6, - 0xd5, 0xee, 0x69, 0x7b, 0xba, 0x19, 0x93, 0xc6, 0x3a, 0xac, 0x66, 0xe3, 0x24, 0xa3, 0x88, 0xb1, - 0x80, 0x8a, 0x17, 0x2c, 0xe4, 0x18, 0x00, 0x91, 0x62, 0x44, 0x1a, 0xef, 0xc1, 0x46, 0x31, 0x08, - 0xc8, 0x06, 0x54, 0x9f, 0xb3, 0xcb, 0x48, 0x12, 0x97, 0xe4, 0x76, 0x74, 0x21, 0x19, 0xc5, 0xba, - 0x19, 0xdd, 0xee, 0x17, 0x95, 0x44, 0x39, 0x89, 0x03, 0x72, 0x04, 0x35, 0x4c, 0x24, 0xa9, 0xdd, - 0x3e, 0xec, 0xf5, 0x55, 0x96, 0xf5, 0xe3, 0x2c, 0xeb, 0x3f, 0x8d, 0xb3, 0x6c, 0xd0, 0xfa, 0xe2, - 0xe5, 0xee, 0xca, 0xaf, 0xfe, 0xb1, 0xab, 0x99, 0x52, 0x83, 0xdc, 0xc5, 0x9f, 0x92, 0x3a, 0xde, - 0xc8, 0xb1, 0xa2, 0x73, 0x9a, 0x92, 0x3e, 0xb5, 0xc8, 0x31, 0x6c, 0x4c, 0x7c, 0x8f, 0x33, 0x8f, - 0xcf, 0xf9, 0x28, 0xa0, 0x21, 0x75, 0x79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x57, 0xb6, - 0xde, 0xb2, 0x19, 0x6a, 0xf0, 0xb5, 0xff, 0xfc, 0x6b, 0x47, 0xfb, 0xed, 0xd5, 0x8e, 0xf6, 0xfb, - 0xab, 0x1d, 0xed, 0x8b, 0xab, 0x1d, 0xed, 0x4f, 0x57, 0x3b, 0xda, 0x3f, 0xaf, 0x76, 0xb4, 0x3f, - 0x7c, 0xb9, 0xa3, 0x8d, 0x1b, 0x32, 0xfc, 0xdf, 0xf9, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x9c, - 0x90, 0xd5, 0xfd, 0x18, 0x16, 0x00, 0x00, + golang_proto.RegisterFile("abci/types/types.proto", fileDescriptor_types_d8da2202f45d32c0) +} + +var fileDescriptor_types_d8da2202f45d32c0 = []byte{ + // 1959 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x58, 0x4f, 0x73, 0x1b, 0x49, + 0x15, 0xf7, 0xc8, 0xb2, 0xa4, 0x79, 0xb2, 0x2d, 0xa7, 0x9d, 0xd8, 0x8a, 0x16, 0xec, 0x30, 0x45, + 0x65, 0x1d, 0xd6, 0x2b, 0x83, 0x97, 0x6c, 0x39, 0xbb, 0xb0, 0x85, 0xe5, 0x0d, 0x2b, 0xd7, 0x2e, + 0x60, 0x26, 0xd9, 0x50, 0xc5, 0x45, 0xd5, 0xd2, 0xb4, 0x47, 0x53, 0x91, 0x66, 0x66, 0xa7, 0x5b, + 0x5e, 0x39, 0x1f, 0x81, 0xda, 0xa2, 0xb8, 0x71, 0xe6, 0xc6, 0x17, 0xa0, 0x8a, 0x23, 0x27, 0x6a, + 0x8f, 0x1c, 0xa0, 0xe0, 0x14, 0xc0, 0x5b, 0x5c, 0xf8, 0x04, 0x1c, 0xa9, 0xd7, 0xdd, 0xf3, 0xd7, + 0xa3, 0x54, 0x12, 0x6e, 0x5c, 0xa4, 0xee, 0x7e, 0xef, 0xf5, 0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40, 0xc3, 0x66, 0x3c, 0x44, 0x37, 0x22, 0x47, 0x60, 0xb2, 0xf9, 0x88, 0xa9, 0x14, + 0x6a, 0x14, 0x12, 0x94, 0xe2, 0x79, 0x18, 0xd3, 0x31, 0x94, 0x13, 0x66, 0x72, 0x2f, 0x97, 0xfe, + 0x37, 0x8b, 0x42, 0xd9, 0xfc, 0xbf, 0x9f, 0xcf, 0xff, 0x37, 0x0b, 0xbc, 0x05, 0x00, 0xb8, 0x97, + 0x03, 0x80, 0xe2, 0xc6, 0x39, 0x04, 0x78, 0x50, 0x82, 0x00, 0xc5, 0xe3, 0x2f, 0x80, 0x80, 0x07, + 0x25, 0x10, 0xd0, 0xbe, 0xf6, 0xad, 0x52, 0x0c, 0xd8, 0xcf, 0x63, 0x40, 0x51, 0x9d, 0x02, 0x08, + 0x7c, 0xaf, 0x0c, 0x04, 0x6e, 0x17, 0x64, 0x16, 0xa2, 0xc0, 0x3b, 0xd7, 0x50, 0x60, 0xab, 0x20, + 0x5a, 0x02, 0x03, 0x0f, 0x72, 0xf9, 0x19, 0x4a, 0x75, 0x2b, 0x4f, 0xd0, 0xe4, 0xdd, 0xeb, 0x08, + 0xb2, 0x5d, 0xbc, 0xda, 0x32, 0x08, 0x39, 0x28, 0x40, 0xc8, 0xad, 0xe2, 0x29, 0x0b, 0x18, 0x92, + 0x22, 0xc1, 0x3d, 0x8c, 0xfb, 0x82, 0xa7, 0x61, 0x8e, 0x60, 0x51, 0x14, 0x44, 0x3a, 0x55, 0xab, + 0x89, 0xb5, 0x87, 0x99, 0x28, 0xf5, 0xaf, 0x17, 0xa0, 0x86, 0x74, 0xfa, 0x8c, 0x77, 0x59, 0xbf, + 0x36, 0x52, 0x59, 0x19, 0xd1, 0xd9, 0x2c, 0x66, 0xea, 0x2c, 0x96, 0x01, 0x93, 0x4a, 0x0e, 0x4c, + 0xc8, 0xb7, 0xe0, 0x86, 0x4c, 0x23, 0xd2, 0x2e, 0x83, 0x5c, 0x5a, 0x6b, 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, 0x52, 0x68, 0xc8, 0x05, 0x24, + 0xde, 0x85, 0x56, 0x16, 0xb3, 0x11, 0x83, 0x15, 0x44, 0xac, 0xa5, 0x88, 0x8d, 0xfd, 0xc4, 0x9b, + 0xd0, 0x4a, 0x15, 0x56, 0x7c, 0x0a, 0x36, 0xd6, 0xd3, 0x65, 0xc9, 0x78, 0x1b, 0x1a, 0x09, 0x9a, + 0x2b, 0x08, 0xa9, 0x53, 0x05, 0xe2, 0xd8, 0xac, 0x87, 0x51, 0x10, 0x06, 0x9c, 0x45, 0xba, 0x4c, + 0x5b, 0x94, 0x0a, 0x12, 0x3e, 0xcb, 0x03, 0x33, 0x21, 0x62, 0xe9, 0x41, 0x1d, 0x27, 0x62, 0x9c, + 0xeb, 0x2a, 0x3f, 0x9e, 0x92, 0x7d, 0xa8, 0x87, 0xb3, 0xe1, 0x00, 0x11, 0x2e, 0x1f, 0x32, 0x67, + 0xb3, 0xe1, 0xc7, 0xec, 0x32, 0xee, 0x77, 0x42, 0x39, 0x93, 0x18, 0x17, 0x7c, 0xce, 0x22, 0xed, + 0xbc, 0x6a, 0x62, 0x09, 0xd8, 0x28, 0xde, 0x35, 0xf9, 0x2e, 0x98, 0x89, 0x7e, 0x85, 0xd0, 0x2d, + 0x9e, 0x39, 0x65, 0xc4, 0x42, 0x88, 0x7b, 0xae, 0xcf, 0x9c, 0x41, 0x6a, 0x5b, 0x79, 0xae, 0x86, + 0xdd, 0x52, 0x84, 0x4f, 0x62, 0xe3, 0x5a, 0xdf, 0x86, 0x9a, 0x3a, 0x23, 0xe6, 0x13, 0xdc, 0x39, + 0x2e, 0xb6, 0x70, 0x5c, 0x9a, 0x63, 0xfe, 0x6c, 0x40, 0x23, 0x6e, 0xa2, 0x4a, 0x85, 0x72, 0x87, + 0xae, 0xbc, 0xec, 0xa1, 0x17, 0x75, 0xa2, 0xb1, 0x47, 0x56, 0x5f, 0xd9, 0x23, 0xf7, 0x81, 0x28, + 0xc7, 0xbb, 0x08, 0x84,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0xd3, 0xd5, 0x8e, 0xf1, 0x8f, 0xab, 0x1d, 0xe3, + 0x0f, 0x5f, 0xed, 0x18, 0xc3, 0x9a, 0x74, 0xff, 0x77, 0xfe, 0x1b, 0x00, 0x00, 0xff, 0xff, 0xc1, + 0xc2, 0x93, 0xfb, 0x94, 0x16, 0x00, 0x00, } diff --git a/abci/types/types.proto b/abci/types/types.proto index 7f87628e1..6e6b1cd36 100644 --- a/abci/types/types.proto +++ b/abci/types/types.proto @@ -71,10 +71,11 @@ message RequestQuery { bool prove = 4; } +// NOTE: validators here have empty pubkeys. message RequestBeginBlock { bytes hash = 1; Header header = 2 [(gogoproto.nullable)=false]; - repeated SigningValidator validators = 3 [(gogoproto.nullable)=false]; + LastCommitInfo last_commit_info = 3 [(gogoproto.nullable)=false]; repeated Evidence byzantine_validators = 4 [(gogoproto.nullable)=false]; } @@ -203,14 +204,14 @@ message ConsensusParams { BlockGossip block_gossip = 3; } -// BlockSize contain limits on the block size. +// BlockSize contains limits on the block size. message BlockSize { int32 max_bytes = 1; int32 max_txs = 2; int64 max_gas = 3; } -// TxSize contain limits on the tx size. +// TxSize contains limits on the tx size. message TxSize { int32 max_bytes = 1; int64 max_gas = 2; @@ -223,6 +224,11 @@ message BlockGossip { int32 block_part_size_bytes = 1; } +message LastCommitInfo { + int32 commit_round = 1; + repeated SigningValidator validators = 2 [(gogoproto.nullable)=false]; +} + //---------------------------------------- // Blockchain Types diff --git a/abci/types/typespb_test.go b/abci/types/typespb_test.go index db88ed394..33a368af4 100644 --- a/abci/types/typespb_test.go +++ b/abci/types/typespb_test.go @@ -1646,6 +1646,62 @@ func TestBlockGossipMarshalTo(t *testing.T) { } } +func TestLastCommitInfoProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLastCommitInfo(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &LastCommitInfo{} + 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 TestLastCommitInfoMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLastCommitInfo(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 := &LastCommitInfo{} + 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 TestHeaderProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) @@ -2448,6 +2504,24 @@ func TestBlockGossipJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } +func TestLastCommitInfoJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLastCommitInfo(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 := &LastCommitInfo{} + 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 TestHeaderJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) @@ -3350,6 +3424,34 @@ func TestBlockGossipProtoCompactText(t *testing.T) { } } +func TestLastCommitInfoProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLastCommitInfo(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &LastCommitInfo{} + 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 TestLastCommitInfoProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLastCommitInfo(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &LastCommitInfo{} + 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 TestHeaderProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) @@ -4128,6 +4230,28 @@ func TestBlockGossipSize(t *testing.T) { } } +func TestLastCommitInfoSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLastCommitInfo(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 TestHeaderSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) diff --git a/docs/app-dev/abci-spec.md b/docs/app-dev/abci-spec.md index 0e5eb0044..770740b86 100644 --- a/docs/app-dev/abci-spec.md +++ b/docs/app-dev/abci-spec.md @@ -160,9 +160,8 @@ See below for more details on the message types and how they are used. - **Request**: - `Hash ([]byte)`: The block's hash. This can be derived from the block header. - - `Header (struct{})`: The block header - - `Validators ([]SigningValidator)`: List of validators in the current validator - set and whether or not they signed a vote in the LastCommit + - `Header (struct{})`: The block header. + - `LastCommitInfo (LastCommitInfo)`: Info about the last commit. - `ByzantineValidators ([]Evidence)`: List of evidence of validators that acted maliciously - **Response**: @@ -171,8 +170,9 @@ See below for more details on the message types and how they are used. - Signals the beginning of a new block. Called prior to any DeliverTxs. - The header is expected to at least contain the Height. - - The `Validators` and `ByzantineValidators` can be used to - determine rewards and punishments for the validators. + - The `LastCommitInfo` and `ByzantineValidators` can be used to determine + rewards and punishments for the validators. NOTE validators here do not + include pubkeys. ### CheckTx @@ -326,3 +326,10 @@ See below for more details on the message types and how they are used. It is the proposer's local time when block was created. - `TotalVotingPower (int64)`: Total voting power of the validator set at height `Height` + +### LastCommitInfo + +- **Fields**: + - `CommitRound (int32)`: Commit round. + - `Validators ([]SigningValidator)`: List of validators in the current + validator set and whether or not they signed a vote. diff --git a/state/execution.go b/state/execution.go index f57b6e4dd..54e1ec73a 100644 --- a/state/execution.go +++ b/state/execution.go @@ -188,9 +188,12 @@ func execBlockOnProxyApp(logger log.Logger, proxyAppConn proxy.AppConnConsensus, // Begin block _, err := proxyAppConn.BeginBlockSync(abci.RequestBeginBlock{ - Hash: block.Hash(), - Header: types.TM2PB.Header(&block.Header), - Validators: signVals, + Hash: block.Hash(), + Header: types.TM2PB.Header(&block.Header), + LastCommitInfo: abci.LastCommitInfo{ + CommitRound: int32(block.LastCommit.Round()), + Validators: signVals, + }, ByzantineValidators: byzVals, }) if err != nil { @@ -245,7 +248,7 @@ func getBeginBlockValidatorInfo(block *types.Block, lastValSet *types.ValidatorS vote = block.LastCommit.Precommits[i] } val := abci.SigningValidator{ - Validator: types.TM2PB.Validator(val), + Validator: types.TM2PB.ValidatorWithoutPubKey(val), SignedLastBlock: vote != nil, } signVals[i] = val diff --git a/state/execution_test.go b/state/execution_test.go index 516ca2ed5..53c5c882b 100644 --- a/state/execution_test.go +++ b/state/execution_test.go @@ -293,7 +293,7 @@ func (app *testApp) Info(req abci.RequestInfo) (resInfo abci.ResponseInfo) { } func (app *testApp) BeginBlock(req abci.RequestBeginBlock) abci.ResponseBeginBlock { - app.Validators = req.Validators + app.Validators = req.LastCommitInfo.Validators app.ByzantineValidators = req.ByzantineValidators return abci.ResponseBeginBlock{} } diff --git a/types/protobuf.go b/types/protobuf.go index 0ed3d0c43..01d4ebf0c 100644 --- a/types/protobuf.go +++ b/types/protobuf.go @@ -50,6 +50,13 @@ func (tm2pb) Header(header *Header) abci.Header { } } +func (tm2pb) ValidatorWithoutPubKey(val *Validator) abci.Validator { + return abci.Validator{ + Address: val.PubKey.Address(), + Power: val.VotingPower, + } +} + // XXX: panics on unknown pubkey type func (tm2pb) Validator(val *Validator) abci.Validator { return abci.Validator{ @@ -129,7 +136,7 @@ func (tm2pb) Evidence(ev Evidence, valSet *ValidatorSet, evTime time.Time) abci. return abci.Evidence{ Type: evType, - Validator: TM2PB.Validator(val), + Validator: TM2PB.ValidatorWithoutPubKey(val), Height: ev.Height(), Time: evTime, TotalVotingPower: valSet.TotalVotingPower(), diff --git a/types/protobuf_test.go b/types/protobuf_test.go index 6ee79b906..8711974e3 100644 --- a/types/protobuf_test.go +++ b/types/protobuf_test.go @@ -102,6 +102,9 @@ func TestABCIEvidence(t *testing.T) { ) assert.Equal(t, "duplicate/vote", abciEv.Type) + + // test we do not send pubkeys + assert.Empty(t, abciEv.Validator.PubKey) } type pubKeyEddie struct{} @@ -120,3 +123,21 @@ func TestABCIValidatorFromPubKeyAndPower(t *testing.T) { assert.Panics(t, func() { TM2PB.ValidatorFromPubKeyAndPower(nil, 10) }) assert.Panics(t, func() { TM2PB.ValidatorFromPubKeyAndPower(pubKeyEddie{}, 10) }) } + +func TestABCIValidatorWithoutPubKey(t *testing.T) { + pkEd := ed25519.GenPrivKey().PubKey() + + abciVal := TM2PB.ValidatorWithoutPubKey(&Validator{ + Address: pkEd.Address(), + PubKey: pkEd, + VotingPower: 10, + }) + + // pubkey must be nil + tmValExpected := abci.Validator{ + Address: pkEd.Address(), + Power: 10, + } + + assert.Equal(t, tmValExpected, abciVal) +} From 62b8ee270d55c562ac5262d3c456f9e0ad74efe9 Mon Sep 17 00:00:00 2001 From: Anton Kaliaev Date: Tue, 31 Jul 2018 20:28:19 +0400 Subject: [PATCH 36/44] [docs] Validator's address can be skipped (#2117) Refs #1712 --- docs/app-dev/app-development.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/app-dev/app-development.md b/docs/app-dev/app-development.md index a795673f1..d3f22362b 100644 --- a/docs/app-dev/app-development.md +++ b/docs/app-dev/app-development.md @@ -365,14 +365,14 @@ ResponseBeginBlock requestBeginBlock(RequestBeginBlock req) { ### EndBlock -The EndBlock request can be used to run some code at the end of every -block. Additionally, the response may contain a list of validators, -which can be used to update the validator set. To add a new validator or -update an existing one, simply include them in the list returned in the -EndBlock response. To remove one, include it in the list with a `power` -equal to `0`. Tendermint core will take care of updating the validator -set. Note the change in voting power must be strictly less than 1/3 per -block if you want a light client to be able to prove the transition +The EndBlock request can be used to run some code at the end of every block. +Additionally, the response may contain a list of validators, which can be used +to update the validator set. To add a new validator or update an existing one, +simply include them in the list returned in the EndBlock response. To remove +one, include it in the list with a `power` equal to `0`. Validator's `address` +field can be left empty. Tendermint core will take care of updating the +validator set. Note the change in voting power must be strictly less than 1/3 +per block if you want a light client to be able to prove the transition externally. See the [light client docs](https://godoc.org/github.com/tendermint/tendermint/lite#hdr-How_We_Track_Validators) for details on how it tracks validators. From 2608249e5ba280ba3912099d7b8f89516b049fb1 Mon Sep 17 00:00:00 2001 From: ValarDragon Date: Mon, 30 Jul 2018 12:24:39 -0700 Subject: [PATCH 37/44] libs/common: Refactor tempfile code into its own file --- libs/common/os.go | 55 ----------------------------------- libs/common/tempfile.go | 63 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+), 55 deletions(-) create mode 100644 libs/common/tempfile.go diff --git a/libs/common/os.go b/libs/common/os.go index 00f4da57b..b8419764e 100644 --- a/libs/common/os.go +++ b/libs/common/os.go @@ -8,7 +8,6 @@ import ( "os" "os/exec" "os/signal" - "path/filepath" "strings" "syscall" ) @@ -124,60 +123,6 @@ func MustWriteFile(filePath string, contents []byte, mode os.FileMode) { } } -// WriteFileAtomic creates a temporary file with data and the perm given and -// swaps it atomically with filename if successful. -func WriteFileAtomic(filename string, data []byte, perm os.FileMode) error { - var ( - dir = filepath.Dir(filename) - tempFile = filepath.Join(dir, "write-file-atomic-"+RandStr(32)) - // Override in case it does exist, create in case it doesn't and force kernel - // flush, which still leaves the potential of lingering disk cache. - flag = os.O_WRONLY | os.O_CREATE | os.O_SYNC | os.O_TRUNC - ) - - f, err := os.OpenFile(tempFile, flag, perm) - if err != nil { - return err - } - // Clean up in any case. Defer stacking order is last-in-first-out. - defer os.Remove(f.Name()) - defer f.Close() - - if n, err := f.Write(data); err != nil { - return err - } else if n < len(data) { - return io.ErrShortWrite - } - // Close the file before renaming it, otherwise it will cause "The process - // cannot access the file because it is being used by another process." on windows. - f.Close() - - return os.Rename(f.Name(), filename) -} - -//-------------------------------------------------------------------------------- - -func Tempfile(prefix string) (*os.File, string) { - file, err := ioutil.TempFile("", prefix) - if err != nil { - PanicCrisis(err) - } - return file, file.Name() -} - -func Tempdir(prefix string) (*os.File, string) { - tempDir := os.TempDir() + "/" + prefix + RandStr(12) - err := EnsureDir(tempDir, 0700) - if err != nil { - panic(Fmt("Error creating temp dir: %v", err)) - } - dir, err := os.Open(tempDir) - if err != nil { - panic(Fmt("Error opening temp dir: %v", err)) - } - return dir, tempDir -} - //-------------------------------------------------------------------------------- func Prompt(prompt string, defaultValue string) (string, error) { diff --git a/libs/common/tempfile.go b/libs/common/tempfile.go new file mode 100644 index 000000000..94abd2c77 --- /dev/null +++ b/libs/common/tempfile.go @@ -0,0 +1,63 @@ +package common + +import ( + "io" + "io/ioutil" + "os" + "path/filepath" +) + +// WriteFileAtomic creates a temporary file with data and the perm given and +// swaps it atomically with filename if successful. +func WriteFileAtomic(filename string, data []byte, perm os.FileMode) error { + var ( + dir = filepath.Dir(filename) + // Create in case it doesn't exist and force kernel + // flush, which still leaves the potential of lingering disk cache. + // Never overwrites files + flag = os.O_WRONLY | os.O_CREATE | os.O_SYNC | os.O_TRUNC | os.O_EXCL + ) + + tempFile := filepath.Join(dir, "write-file-atomic-"+RandStr(32)) + f, err := os.OpenFile(tempFile, flag, perm) + if err != nil { + return err + } + // Clean up in any case. Defer stacking order is last-in-first-out. + defer os.Remove(f.Name()) + defer f.Close() + + if n, err := f.Write(data); err != nil { + return err + } else if n < len(data) { + return io.ErrShortWrite + } + // Close the file before renaming it, otherwise it will cause "The process + // cannot access the file because it is being used by another process." on windows. + f.Close() + + return os.Rename(f.Name(), filename) +} + +//-------------------------------------------------------------------------------- + +func Tempfile(prefix string) (*os.File, string) { + file, err := ioutil.TempFile("", prefix) + if err != nil { + PanicCrisis(err) + } + return file, file.Name() +} + +func Tempdir(prefix string) (*os.File, string) { + tempDir := os.TempDir() + "/" + prefix + RandStr(12) + err := EnsureDir(tempDir, 0700) + if err != nil { + panic(Fmt("Error creating temp dir: %v", err)) + } + dir, err := os.Open(tempDir) + if err != nil { + panic(Fmt("Error opening temp dir: %v", err)) + } + return dir, tempDir +} From be642754f5da7a27b9534a5239bff1d3be10a286 Mon Sep 17 00:00:00 2001 From: ValarDragon Date: Mon, 30 Jul 2018 14:06:48 -0700 Subject: [PATCH 38/44] libs/cmn/writefileatomic: Handle file already exists gracefully (#2113) This uses the stdlib's method of creating a tempfile in our write file atomimc method, with a few modifications. We use a 64 bit number rather than 32 bit, and therefore a corresponding LCG. This is to reduce collision probability. (Note we currently used 32 bytes previously, so this is likely a concern) We handle reseeding the LCG in such a way that multiple threads are even less likely to reuse the same seed. --- CHANGELOG_PENDING.md | 1 + libs/common/os_test.go | 42 ----------- libs/common/tempfile.go | 109 ++++++++++++++++++++++++--- libs/common/tempfile_test.go | 138 +++++++++++++++++++++++++++++++++++ 4 files changed, 238 insertions(+), 52 deletions(-) create mode 100644 libs/common/tempfile_test.go diff --git a/CHANGELOG_PENDING.md b/CHANGELOG_PENDING.md index 76d06b496..481f5b452 100644 --- a/CHANGELOG_PENDING.md +++ b/CHANGELOG_PENDING.md @@ -22,5 +22,6 @@ IMPROVEMENTS: - [common] bit array functions which take in another parameter are now thread safe BUG FIXES: +- [common] \#2109 Safely handle cases where atomic write files already exist - [privval] fix a deadline for accepting new connections in socket private validator. diff --git a/libs/common/os_test.go b/libs/common/os_test.go index 3edd6496e..bf65f0c99 100644 --- a/libs/common/os_test.go +++ b/libs/common/os_test.go @@ -1,52 +1,10 @@ package common import ( - "bytes" - "io/ioutil" "os" "testing" ) -func TestWriteFileAtomic(t *testing.T) { - var ( - data = []byte(RandStr(RandIntn(2048))) - old = RandBytes(RandIntn(2048)) - perm os.FileMode = 0600 - ) - - f, err := ioutil.TempFile("/tmp", "write-atomic-test-") - if err != nil { - t.Fatal(err) - } - defer os.Remove(f.Name()) - - if err = ioutil.WriteFile(f.Name(), old, 0664); err != nil { - t.Fatal(err) - } - - if err = WriteFileAtomic(f.Name(), data, perm); err != nil { - t.Fatal(err) - } - - rData, err := ioutil.ReadFile(f.Name()) - if err != nil { - t.Fatal(err) - } - - if !bytes.Equal(data, rData) { - t.Fatalf("data mismatch: %v != %v", data, rData) - } - - stat, err := os.Stat(f.Name()) - if err != nil { - t.Fatal(err) - } - - if have, want := stat.Mode().Perm(), perm; have != want { - t.Errorf("have %v, want %v", have, want) - } -} - func TestGoPath(t *testing.T) { // restore original gopath upon exit path := os.Getenv("GOPATH") diff --git a/libs/common/tempfile.go b/libs/common/tempfile.go index 94abd2c77..bc1343e5d 100644 --- a/libs/common/tempfile.go +++ b/libs/common/tempfile.go @@ -1,28 +1,117 @@ package common import ( + fmt "fmt" "io" "io/ioutil" "os" "path/filepath" + "strconv" + "strings" + "sync" + "time" ) -// WriteFileAtomic creates a temporary file with data and the perm given and +const ( + atomicWriteFilePrefix = "write-file-atomic-" + // Maximum number of atomic write file conflicts before we start reseeding + // (reduced from golang's default 10 due to using an increased randomness space) + atomicWriteFileMaxNumConflicts = 5 + // Maximum number of attempts to make at writing the write file before giving up + // (reduced from golang's default 10000 due to using an increased randomness space) + atomicWriteFileMaxNumWriteAttempts = 1000 + // LCG constants from Donald Knuth MMIX + // This LCG's has a period equal to 2**64 + lcgA = 6364136223846793005 + lcgC = 1442695040888963407 + // Create in case it doesn't exist and force kernel + // flush, which still leaves the potential of lingering disk cache. + // Never overwrites files + atomicWriteFileFlag = os.O_WRONLY | os.O_CREATE | os.O_SYNC | os.O_TRUNC | os.O_EXCL +) + +var ( + atomicWriteFileRand uint64 + atomicWriteFileRandMu sync.Mutex +) + +func writeFileRandReseed() uint64 { + // Scale the PID, to minimize the chance that two processes seeded at similar times + // don't get the same seed. Note that PID typically ranges in [0, 2**15), but can be + // up to 2**22 under certain configurations. We left bit-shift the PID by 20, so that + // a PID difference of one corresponds to a time difference of 2048 seconds. + // The important thing here is that now for a seed conflict, they would both have to be on + // the correct nanosecond offset, and second-based offset, which is much less likely than + // just a conflict with the correct nanosecond offset. + return uint64(time.Now().UnixNano() + int64(os.Getpid()<<20)) +} + +// Use a fast thread safe LCG for atomic write file names. +// Returns a string corresponding to a 64 bit int. +// If it was a negative int, the leading number is a 0. +func randWriteFileSuffix() string { + atomicWriteFileRandMu.Lock() + r := atomicWriteFileRand + if r == 0 { + r = writeFileRandReseed() + } + + // Update randomness according to lcg + r = r*lcgA + lcgC + + atomicWriteFileRand = r + atomicWriteFileRandMu.Unlock() + // Can have a negative name, replace this in the following + suffix := strconv.Itoa(int(r)) + if string(suffix[0]) == "-" { + // Replace first "-" with "0". This is purely for UI clarity, + // as otherwhise there would be two `-` in a row. + suffix = strings.Replace(suffix, "-", "0", 1) + } + return suffix +} + +// WriteFileAtomic creates a temporary file with data and provided perm and // swaps it atomically with filename if successful. -func WriteFileAtomic(filename string, data []byte, perm os.FileMode) error { +func WriteFileAtomic(filename string, data []byte, perm os.FileMode) (err error) { + // This implementation is inspired by the golang stdlibs method of creating + // tempfiles. Notable differences are that we use different flags, a 64 bit LCG + // and handle negatives differently. + // The core reason we can't use golang's TempFile is that we must write + // to the file synchronously, as we need this to persist to disk. + // We also open it in write-only mode, to avoid concerns that arise with read. var ( dir = filepath.Dir(filename) - // Create in case it doesn't exist and force kernel - // flush, which still leaves the potential of lingering disk cache. - // Never overwrites files - flag = os.O_WRONLY | os.O_CREATE | os.O_SYNC | os.O_TRUNC | os.O_EXCL + f *os.File ) - tempFile := filepath.Join(dir, "write-file-atomic-"+RandStr(32)) - f, err := os.OpenFile(tempFile, flag, perm) - if err != nil { - return err + nconflict := 0 + // Limit the number of attempts to create a file. Something is seriously + // wrong if it didn't get created after 1000 attempts, and we don't want + // an infinite loop + i := 0 + for ; i < atomicWriteFileMaxNumWriteAttempts; i++ { + name := filepath.Join(dir, atomicWriteFilePrefix+randWriteFileSuffix()) + f, err = os.OpenFile(name, atomicWriteFileFlag, perm) + // If the file already exists, try a new file + if os.IsExist(err) { + // If the files exists too many times, start reseeding as we've + // likely hit another instances seed. + if nconflict++; nconflict > atomicWriteFileMaxNumConflicts { + atomicWriteFileRandMu.Lock() + atomicWriteFileRand = writeFileRandReseed() + atomicWriteFileRandMu.Unlock() + } + continue + } else if err != nil { + return err + } + break } + if i == atomicWriteFileMaxNumWriteAttempts { + return fmt.Errorf("Could not create atomic write file after %d attempts", i) + } + // Clean up in any case. Defer stacking order is last-in-first-out. defer os.Remove(f.Name()) defer f.Close() diff --git a/libs/common/tempfile_test.go b/libs/common/tempfile_test.go new file mode 100644 index 000000000..51da90913 --- /dev/null +++ b/libs/common/tempfile_test.go @@ -0,0 +1,138 @@ +package common + +// Need access to internal variables, so can't use _test package + +import ( + "bytes" + fmt "fmt" + "io/ioutil" + "os" + testing "testing" + + "github.com/stretchr/testify/require" +) + +func TestWriteFileAtomic(t *testing.T) { + var ( + data = []byte(RandStr(RandIntn(2048))) + old = RandBytes(RandIntn(2048)) + perm os.FileMode = 0600 + ) + + f, err := ioutil.TempFile("/tmp", "write-atomic-test-") + if err != nil { + t.Fatal(err) + } + defer os.Remove(f.Name()) + + if err = ioutil.WriteFile(f.Name(), old, 0664); err != nil { + t.Fatal(err) + } + + if err = WriteFileAtomic(f.Name(), data, perm); err != nil { + t.Fatal(err) + } + + rData, err := ioutil.ReadFile(f.Name()) + if err != nil { + t.Fatal(err) + } + + if !bytes.Equal(data, rData) { + t.Fatalf("data mismatch: %v != %v", data, rData) + } + + stat, err := os.Stat(f.Name()) + if err != nil { + t.Fatal(err) + } + + if have, want := stat.Mode().Perm(), perm; have != want { + t.Errorf("have %v, want %v", have, want) + } +} + +// This tests atomic write file when there is a single duplicate file. +// Expected behavior is for a new file to be created, and the original write file to be unaltered. +func TestWriteFileAtomicDuplicateFile(t *testing.T) { + var ( + defaultSeed uint64 = 1 + testString = "This is a glorious test string" + expectedString = "Did the test file's string appear here?" + + fileToWrite = "/tmp/TestWriteFileAtomicDuplicateFile-test.txt" + ) + // Create a file at the seed, and reset the seed. + atomicWriteFileRand = defaultSeed + firstFileRand := randWriteFileSuffix() + atomicWriteFileRand = defaultSeed + fname := "/tmp/" + atomicWriteFilePrefix + firstFileRand + f, err := os.OpenFile(fname, atomicWriteFileFlag, 0777) + defer os.Remove(fname) + // Defer here, in case there is a panic in WriteFileAtomic. + defer os.Remove(fileToWrite) + + require.Nil(t, err) + f.WriteString(testString) + WriteFileAtomic(fileToWrite, []byte(expectedString), 0777) + // Check that the first atomic file was untouched + firstAtomicFileBytes, err := ioutil.ReadFile(fname) + require.Nil(t, err, "Error reading first atomic file") + require.Equal(t, []byte(testString), firstAtomicFileBytes, "First atomic file was overwritten") + // Check that the resultant file is correct + resultantFileBytes, err := ioutil.ReadFile(fileToWrite) + require.Nil(t, err, "Error reading resultant file") + require.Equal(t, []byte(expectedString), resultantFileBytes, "Written file had incorrect bytes") + + // Check that the intermediate write file was deleted + // Get the second write files' randomness + atomicWriteFileRand = defaultSeed + _ = randWriteFileSuffix() + secondFileRand := randWriteFileSuffix() + _, err = os.Stat("/tmp/" + atomicWriteFilePrefix + secondFileRand) + require.True(t, os.IsNotExist(err), "Intermittent atomic write file not deleted") +} + +// This tests atomic write file when there are many duplicate files. +// Expected behavior is for a new file to be created under a completely new seed, +// and the original write files to be unaltered. +func TestWriteFileAtomicManyDuplicates(t *testing.T) { + var ( + defaultSeed uint64 = 2 + testString = "This is a glorious test string, from file %d" + expectedString = "Did any of the test file's string appear here?" + + fileToWrite = "/tmp/TestWriteFileAtomicDuplicateFile-test.txt" + ) + // Initialize all of the atomic write files + atomicWriteFileRand = defaultSeed + for i := 0; i < atomicWriteFileMaxNumConflicts+2; i++ { + fileRand := randWriteFileSuffix() + fname := "/tmp/" + atomicWriteFilePrefix + fileRand + f, err := os.OpenFile(fname, atomicWriteFileFlag, 0777) + require.Nil(t, err) + f.WriteString(fmt.Sprintf(testString, i)) + defer os.Remove(fname) + } + + atomicWriteFileRand = defaultSeed + // Defer here, in case there is a panic in WriteFileAtomic. + defer os.Remove(fileToWrite) + + WriteFileAtomic(fileToWrite, []byte(expectedString), 0777) + // Check that all intermittent atomic file were untouched + atomicWriteFileRand = defaultSeed + for i := 0; i < atomicWriteFileMaxNumConflicts+2; i++ { + fileRand := randWriteFileSuffix() + fname := "/tmp/" + atomicWriteFilePrefix + fileRand + firstAtomicFileBytes, err := ioutil.ReadFile(fname) + require.Nil(t, err, "Error reading first atomic file") + require.Equal(t, []byte(fmt.Sprintf(testString, i)), firstAtomicFileBytes, + "atomic write file %d was overwritten", i) + } + + // Check that the resultant file is correct + resultantFileBytes, err := ioutil.ReadFile(fileToWrite) + require.Nil(t, err, "Error reading resultant file") + require.Equal(t, []byte(expectedString), resultantFileBytes, "Written file had incorrect bytes") +} From a83eed104c13813fb5b4f9b94e40470f88f2f863 Mon Sep 17 00:00:00 2001 From: ValarDragon Date: Mon, 30 Jul 2018 16:19:33 -0700 Subject: [PATCH 39/44] libs/cmn: Remove Tempfile, Tempdir, switch to ioutil variants (#2114) Our Tempfile was just a wrapper on ioutil that panicked instead of error. Our Tempdir was a less safe variant of ioutil's Tempdir. --- CHANGELOG_PENDING.md | 2 +- consensus/common_test.go | 7 +++++-- libs/autofile/autofile_test.go | 9 +++++++-- libs/common/tempfile.go | 24 ------------------------ libs/db/backend_test.go | 5 +++-- libs/db/common_test.go | 6 +++--- privval/priv_validator_test.go | 32 +++++++++++++++++++------------- 7 files changed, 38 insertions(+), 47 deletions(-) diff --git a/CHANGELOG_PENDING.md b/CHANGELOG_PENDING.md index 481f5b452..a65c6e45c 100644 --- a/CHANGELOG_PENDING.md +++ b/CHANGELOG_PENDING.md @@ -22,6 +22,6 @@ IMPROVEMENTS: - [common] bit array functions which take in another parameter are now thread safe BUG FIXES: -- [common] \#2109 Safely handle cases where atomic write files already exist +- [common] Safely handle cases where atomic write files already exist [#2109](https://github.com/tendermint/tendermint/issues/2109) - [privval] fix a deadline for accepting new connections in socket private validator. diff --git a/consensus/common_test.go b/consensus/common_test.go index 992b6fcd6..f4855992d 100644 --- a/consensus/common_test.go +++ b/consensus/common_test.go @@ -378,8 +378,11 @@ func randConsensusNetWithPeers(nValidators, nPeers int, testName string, tickerF if i < nValidators { privVal = privVals[i] } else { - _, tempFilePath := cmn.Tempfile("priv_validator_") - privVal = privval.GenFilePV(tempFilePath) + tempFile, err := ioutil.TempFile("", "priv_validator_") + if err != nil { + panic(err) + } + privVal = privval.GenFilePV(tempFile.Name()) } app := appFunc() diff --git a/libs/autofile/autofile_test.go b/libs/autofile/autofile_test.go index b39fb7cf3..67397380b 100644 --- a/libs/autofile/autofile_test.go +++ b/libs/autofile/autofile_test.go @@ -1,6 +1,7 @@ package autofile import ( + "io/ioutil" "os" "sync/atomic" "syscall" @@ -13,10 +14,14 @@ import ( func TestSIGHUP(t *testing.T) { // First, create an AutoFile writing to a tempfile dir - file, name := cmn.Tempfile("sighup_test") - if err := file.Close(); err != nil { + file, err := ioutil.TempFile("", "sighup_test") + if err != nil { t.Fatalf("Error creating tempfile: %v", err) } + if err := file.Close(); err != nil { + t.Fatalf("Error closing tempfile: %v", err) + } + name := file.Name() // Here is the actual AutoFile af, err := OpenAutoFile(name) if err != nil { diff --git a/libs/common/tempfile.go b/libs/common/tempfile.go index bc1343e5d..a5bb7a5b5 100644 --- a/libs/common/tempfile.go +++ b/libs/common/tempfile.go @@ -3,7 +3,6 @@ package common import ( fmt "fmt" "io" - "io/ioutil" "os" "path/filepath" "strconv" @@ -127,26 +126,3 @@ func WriteFileAtomic(filename string, data []byte, perm os.FileMode) (err error) return os.Rename(f.Name(), filename) } - -//-------------------------------------------------------------------------------- - -func Tempfile(prefix string) (*os.File, string) { - file, err := ioutil.TempFile("", prefix) - if err != nil { - PanicCrisis(err) - } - return file, file.Name() -} - -func Tempdir(prefix string) (*os.File, string) { - tempDir := os.TempDir() + "/" + prefix + RandStr(12) - err := EnsureDir(tempDir, 0700) - if err != nil { - panic(Fmt("Error creating temp dir: %v", err)) - } - dir, err := os.Open(tempDir) - if err != nil { - panic(Fmt("Error opening temp dir: %v", err)) - } - return dir, tempDir -} diff --git a/libs/db/backend_test.go b/libs/db/backend_test.go index 493ed83f9..b31b4d74a 100644 --- a/libs/db/backend_test.go +++ b/libs/db/backend_test.go @@ -2,6 +2,7 @@ package db import ( "fmt" + "io/ioutil" "os" "path/filepath" "testing" @@ -17,8 +18,8 @@ func cleanupDBDir(dir, name string) { func testBackendGetSetDelete(t *testing.T, backend DBBackendType) { // Default - dir, dirname := cmn.Tempdir(fmt.Sprintf("test_backend_%s_", backend)) - defer dir.Close() + dirname, err := ioutil.TempDir("", fmt.Sprintf("test_backend_%s_", backend)) + require.Nil(t, err) db := NewDB("testdb", backend, dirname) // A nonexistent key should return nil, even if the key is empty diff --git a/libs/db/common_test.go b/libs/db/common_test.go index 027b8ee53..68420cd2b 100644 --- a/libs/db/common_test.go +++ b/libs/db/common_test.go @@ -2,12 +2,12 @@ package db import ( "fmt" + "io/ioutil" "sync" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - cmn "github.com/tendermint/tendermint/libs/common" ) //---------------------------------------- @@ -61,9 +61,9 @@ func checkValuePanics(t *testing.T, itr Iterator) { } func newTempDB(t *testing.T, backend DBBackendType) (db DB) { - dir, dirname := cmn.Tempdir("db_common_test") + dirname, err := ioutil.TempDir("", "db_common_test") + require.Nil(t, err) db = NewDB("testdb", backend, dirname) - dir.Close() return db } diff --git a/privval/priv_validator_test.go b/privval/priv_validator_test.go index 7c9c93fcf..127f5c1f3 100644 --- a/privval/priv_validator_test.go +++ b/privval/priv_validator_test.go @@ -3,6 +3,7 @@ package privval import ( "encoding/base64" "fmt" + "io/ioutil" "os" "testing" "time" @@ -11,22 +12,22 @@ import ( "github.com/stretchr/testify/require" "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/crypto/ed25519" - cmn "github.com/tendermint/tendermint/libs/common" "github.com/tendermint/tendermint/types" ) func TestGenLoadValidator(t *testing.T) { assert := assert.New(t) - _, tempFilePath := cmn.Tempfile("priv_validator_") - privVal := GenFilePV(tempFilePath) + tempFile, err := ioutil.TempFile("", "priv_validator_") + require.Nil(t, err) + privVal := GenFilePV(tempFile.Name()) height := int64(100) privVal.LastHeight = height privVal.Save() addr := privVal.GetAddress() - privVal = LoadFilePV(tempFilePath) + privVal = LoadFilePV(tempFile.Name()) assert.Equal(addr, privVal.GetAddress(), "expected privval addr to be the same") assert.Equal(height, privVal.LastHeight, "expected privval.LastHeight to have been saved") } @@ -34,7 +35,9 @@ func TestGenLoadValidator(t *testing.T) { func TestLoadOrGenValidator(t *testing.T) { assert := assert.New(t) - _, tempFilePath := cmn.Tempfile("priv_validator_") + tempFile, err := ioutil.TempFile("", "priv_validator_") + require.Nil(t, err) + tempFilePath := tempFile.Name() if err := os.Remove(tempFilePath); err != nil { t.Error(err) } @@ -91,8 +94,9 @@ func TestUnmarshalValidator(t *testing.T) { func TestSignVote(t *testing.T) { assert := assert.New(t) - _, tempFilePath := cmn.Tempfile("priv_validator_") - privVal := GenFilePV(tempFilePath) + tempFile, err := ioutil.TempFile("", "priv_validator_") + require.Nil(t, err) + privVal := GenFilePV(tempFile.Name()) block1 := types.BlockID{[]byte{1, 2, 3}, types.PartSetHeader{}} block2 := types.BlockID{[]byte{3, 2, 1}, types.PartSetHeader{}} @@ -101,7 +105,7 @@ func TestSignVote(t *testing.T) { // sign a vote for first time vote := newVote(privVal.Address, 0, height, round, voteType, block1) - err := privVal.SignVote("mychainid", vote) + err = privVal.SignVote("mychainid", vote) assert.NoError(err, "expected no error signing vote") // try to sign the same vote again; should be fine @@ -132,8 +136,9 @@ func TestSignVote(t *testing.T) { func TestSignProposal(t *testing.T) { assert := assert.New(t) - _, tempFilePath := cmn.Tempfile("priv_validator_") - privVal := GenFilePV(tempFilePath) + tempFile, err := ioutil.TempFile("", "priv_validator_") + require.Nil(t, err) + privVal := GenFilePV(tempFile.Name()) block1 := types.PartSetHeader{5, []byte{1, 2, 3}} block2 := types.PartSetHeader{10, []byte{3, 2, 1}} @@ -141,7 +146,7 @@ func TestSignProposal(t *testing.T) { // sign a proposal for first time proposal := newProposal(height, round, block1) - err := privVal.SignProposal("mychainid", proposal) + err = privVal.SignProposal("mychainid", proposal) assert.NoError(err, "expected no error signing proposal") // try to sign the same proposal again; should be fine @@ -170,8 +175,9 @@ func TestSignProposal(t *testing.T) { } func TestDifferByTimestamp(t *testing.T) { - _, tempFilePath := cmn.Tempfile("priv_validator_") - privVal := GenFilePV(tempFilePath) + tempFile, err := ioutil.TempFile("", "priv_validator_") + require.Nil(t, err) + privVal := GenFilePV(tempFile.Name()) block1 := types.PartSetHeader{5, []byte{1, 2, 3}} height, round := int64(10), 1 From 08ad162daaef7309203653864017153211b80887 Mon Sep 17 00:00:00 2001 From: Zarko Milosevic Date: Tue, 31 Jul 2018 21:19:57 +0300 Subject: [PATCH 40/44] docs: Modify blockchain spec to reflect validator set changes (#2107) --- docs/spec/blockchain/blockchain.md | 38 +++++++++++++++++------------- docs/spec/blockchain/state.md | 5 ++-- 2 files changed, 25 insertions(+), 18 deletions(-) diff --git a/docs/spec/blockchain/blockchain.md b/docs/spec/blockchain/blockchain.md index eb34f4c87..e3171818a 100644 --- a/docs/spec/blockchain/blockchain.md +++ b/docs/spec/blockchain/blockchain.md @@ -52,7 +52,8 @@ type Header struct { // application ResultsHash []byte // SimpleMerkle of []abci.Result from prevBlock AppHash []byte // Arbitrary state digest - ValidatorsHash []byte // SimpleMerkle of the ValidatorSet + ValidatorsHash []byte // SimpleMerkle of the current ValidatorSet + NextValidatorsHash []byte // SimpleMerkle of the next ValidatorSet ConsensusParamsHash []byte // SimpleMerkle of the ConsensusParams // consensus @@ -160,9 +161,12 @@ We refer to certain globally available objects: `block` is the block under consideration, `prevBlock` is the `block` at the previous height, and `state` keeps track of the validator set, the consensus parameters -and other results from the application. +and other results from the application. At the point when `block` is the block under consideration, +the current version of the `state` corresponds to the state +after executing transactions from the `prevBlock`. Elements of an object are accessed as expected, -ie. `block.Header`. See [here](https://github.com/tendermint/tendermint/blob/master/docs/spec/blockchain/state.md) for the definition of `state`. +ie. `block.Header`. +See [here](https://github.com/tendermint/tendermint/blob/master/docs/spec/blockchain/state.md) for the definition of `state`. ### Header @@ -278,7 +282,14 @@ block.ValidatorsHash == SimpleMerkleRoot(state.Validators) Simple Merkle root of the current validator set that is committing the block. This can be used to validate the `LastCommit` included in the next block. -May be updated by the application. + +### NextValidatorsHash + +```go +block.NextValidatorsHash == SimpleMerkleRoot(state.NextValidators) +``` +Simple Merkle root of the next validator set that will be the validator set that commits the next block. +Modifications to the validator set are defined by the application. ### ConsensusParamsHash @@ -407,25 +418,20 @@ set (TODO). Execute is defined as: ```go Execute(s State, app ABCIApp, block Block) State { - TODO: just spell out ApplyBlock here - and remove ABCIResponses struct. - abciResponses := app.ApplyBlock(block) + // Fuction ApplyBlock executes block of transactions against the app and returns the new root hash of the app state, + // modifications to the validator set and the changes of the consensus parameters. + AppHash, ValidatorChanges, ConsensusParamChanges := app.ApplyBlock(block) return State{ LastResults: abciResponses.DeliverTxResults, - AppHash: abciResponses.AppHash, - Validators: UpdateValidators(state.Validators, abciResponses.ValidatorChanges), + AppHash: AppHash, LastValidators: state.Validators, - ConsensusParams: UpdateConsensusParams(state.ConsensusParams, abci.Responses.ConsensusParamChanges), + Validators: state.NextValidators, + NextValidators: UpdateValidators(state.NextValidators, ValidatorChanges), + ConsensusParams: UpdateConsensusParams(state.ConsensusParams, ConsensusParamChanges), } } -type ABCIResponses struct { - DeliverTxResults []Result - ValidatorChanges []Validator - ConsensusParamChanges ConsensusParams - AppHash []byte -} ``` diff --git a/docs/spec/blockchain/state.md b/docs/spec/blockchain/state.md index 3b374f70a..df86cd450 100644 --- a/docs/spec/blockchain/state.md +++ b/docs/spec/blockchain/state.md @@ -3,7 +3,7 @@ ## State The state contains information whose cryptographic digest is included in block headers, and thus is -necessary for validating new blocks. For instance, the set of validators and the results of +necessary for validating new blocks. For instance, the validators set and the results of transactions are never included in blocks, but their Merkle roots are - the state keeps track of them. Note that the `State` object itself is an implementation detail, since it is never @@ -18,8 +18,9 @@ type State struct { LastResults []Result AppHash []byte - Validators []Validator LastValidators []Validator + Validators []Validator + NextValidators []Validator ConsensusParams ConsensusParams } From 6fb2f44cc33027e3e70963b5029dc64314975bcf Mon Sep 17 00:00:00 2001 From: Dev Ojha Date: Tue, 31 Jul 2018 13:09:01 -0700 Subject: [PATCH 41/44] p2p: Connect to peers from a seed node immediately (#2115) This is to reduce wait times when initially connecting. This still runs checks such as whether you still want additional peers. A test case has been created, which fails if this change is not included. --- CHANGELOG_PENDING.md | 1 + p2p/pex/pex_reactor.go | 28 +++++--- p2p/pex/pex_reactor_test.go | 129 ++++++++++++++++++++++++++++-------- 3 files changed, 121 insertions(+), 37 deletions(-) diff --git a/CHANGELOG_PENDING.md b/CHANGELOG_PENDING.md index a65c6e45c..e85a6ed64 100644 --- a/CHANGELOG_PENDING.md +++ b/CHANGELOG_PENDING.md @@ -20,6 +20,7 @@ IMPROVEMENTS: - only process one block at a time to avoid starving - [crypto] Switch hkdfchachapoly1305 to xchachapoly1305 - [common] bit array functions which take in another parameter are now thread safe +- [p2p] begin connecting to peers as soon a seed node provides them to you ([#2093](https://github.com/tendermint/tendermint/issues/2093)) BUG FIXES: - [common] Safely handle cases where atomic write files already exist [#2109](https://github.com/tendermint/tendermint/issues/2109) diff --git a/p2p/pex/pex_reactor.go b/p2p/pex/pex_reactor.go index 2929d9336..c59b3797d 100644 --- a/p2p/pex/pex_reactor.go +++ b/p2p/pex/pex_reactor.go @@ -74,6 +74,8 @@ type PEXReactor struct { requestsSent *cmn.CMap // ID->struct{}: unanswered send requests lastReceivedRequests *cmn.CMap // ID->time.Time: last time peer requested from us + seedAddrs []*p2p.NetAddress + attemptsToDial sync.Map // address (string) -> {number of attempts (int), last time dialed (time.Time)} } @@ -120,10 +122,13 @@ func (r *PEXReactor) OnStart() error { // return err if user provided a bad seed address // or a host name that we cant resolve - if err := r.checkSeeds(); err != nil { + seedAddrs, err := r.checkSeeds() + if err != nil { return err } + r.seedAddrs = seedAddrs + // Check if this node should run // in seed/crawler mode if r.config.SeedMode { @@ -281,7 +286,6 @@ func (r *PEXReactor) RequestAddrs(p Peer) { // request for this peer and deletes the open request. // If there's no open request for the src peer, it returns an error. func (r *PEXReactor) ReceiveAddrs(addrs []*p2p.NetAddress, src Peer) error { - id := string(src.ID()) if !r.requestsSent.Has(id) { return cmn.NewError("Received unsolicited pexAddrsMessage") @@ -297,6 +301,13 @@ func (r *PEXReactor) ReceiveAddrs(addrs []*p2p.NetAddress, src Peer) error { err := r.book.AddAddress(netAddr, srcAddr) r.logErrAddrBook(err) + + // If this address came from a seed node, try to connect to it without waiting. + for _, seedAddr := range r.seedAddrs { + if seedAddr.Equals(srcAddr) { + r.ensurePeers() + } + } } return nil } @@ -468,18 +479,18 @@ func (r *PEXReactor) dialPeer(addr *p2p.NetAddress) { } // check seed addresses are well formed -func (r *PEXReactor) checkSeeds() error { +func (r *PEXReactor) checkSeeds() ([]*p2p.NetAddress, error) { lSeeds := len(r.config.Seeds) if lSeeds == 0 { - return nil + return nil, nil } - _, errs := p2p.NewNetAddressStrings(r.config.Seeds) + netAddrs, errs := p2p.NewNetAddressStrings(r.config.Seeds) for _, err := range errs { if err != nil { - return err + return nil, err } } - return nil + return netAddrs, nil } // randomly dial seeds until we connect to one or exhaust them @@ -488,13 +499,12 @@ func (r *PEXReactor) dialSeeds() { if lSeeds == 0 { return } - seedAddrs, _ := p2p.NewNetAddressStrings(r.config.Seeds) perm := cmn.RandPerm(lSeeds) // perm := r.Switch.rng.Perm(lSeeds) for _, i := range perm { // dial a random seed - seedAddr := seedAddrs[i] + seedAddr := r.seedAddrs[i] err := r.Switch.DialPeerWithAddress(seedAddr, false) if err == nil { return diff --git a/p2p/pex/pex_reactor_test.go b/p2p/pex/pex_reactor_test.go index 8d54693fe..36f38c570 100644 --- a/p2p/pex/pex_reactor_test.go +++ b/p2p/pex/pex_reactor_test.go @@ -211,31 +211,26 @@ func TestPEXReactorUsesSeedsIfNeeded(t *testing.T) { defer os.RemoveAll(dir) // nolint: errcheck // 1. create seed - seed := p2p.MakeSwitch( - cfg, - 0, - "127.0.0.1", - "123.123.123", - func(i int, sw *p2p.Switch) *p2p.Switch { - book := NewAddrBook(filepath.Join(dir, "addrbook0.json"), false) - book.SetLogger(log.TestingLogger()) - sw.SetAddrBook(book) - - sw.SetLogger(log.TestingLogger()) - - r := NewPEXReactor(book, &PEXReactorConfig{}) - r.SetLogger(log.TestingLogger()) - sw.AddReactor("pex", r) - return sw - }, - ) - seed.AddListener( - p2p.NewDefaultListener("tcp://"+seed.NodeInfo().ListenAddr, "", false, log.TestingLogger()), - ) + seed := testCreateSeed(dir, 0, []*p2p.NetAddress{}, []*p2p.NetAddress{}) require.Nil(t, seed.Start()) defer seed.Stop() // 2. create usual peer with only seed configured. + peer := testCreatePeerWithSeed(dir, 1, seed) + require.Nil(t, peer.Start()) + defer peer.Stop() + + // 3. check that the peer connects to seed immediately + assertPeersWithTimeout(t, []*p2p.Switch{peer}, 10*time.Millisecond, 3*time.Second, 1) +} + +func TestConnectionSpeedForPeerReceivedFromSeed(t *testing.T) { + // directory to store address books + dir, err := ioutil.TempDir("", "pex_reactor") + require.Nil(t, err) + defer os.RemoveAll(dir) // nolint: errcheck + + // 1. create peer peer := p2p.MakeSwitch( cfg, 1, @@ -250,20 +245,34 @@ func TestPEXReactorUsesSeedsIfNeeded(t *testing.T) { r := NewPEXReactor( book, - &PEXReactorConfig{ - Seeds: []string{seed.NodeInfo().NetAddress().String()}, - }, + &PEXReactorConfig{}, ) r.SetLogger(log.TestingLogger()) sw.AddReactor("pex", r) return sw }, ) + peer.AddListener( + p2p.NewDefaultListener("tcp://"+peer.NodeInfo().ListenAddr, "", false, log.TestingLogger()), + ) require.Nil(t, peer.Start()) defer peer.Stop() - // 3. check that the peer connects to seed immediately - assertPeersWithTimeout(t, []*p2p.Switch{peer}, 10*time.Millisecond, 3*time.Second, 1) + // 2. Create seed which knows about the peer + seed := testCreateSeed(dir, 2, []*p2p.NetAddress{peer.NodeInfo().NetAddress()}, []*p2p.NetAddress{peer.NodeInfo().NetAddress()}) + require.Nil(t, seed.Start()) + defer seed.Stop() + + // 3. create another peer with only seed configured. + secondPeer := testCreatePeerWithSeed(dir, 3, seed) + require.Nil(t, secondPeer.Start()) + defer secondPeer.Stop() + + // 4. check that the second peer connects to seed immediately + assertPeersWithTimeout(t, []*p2p.Switch{secondPeer}, 10*time.Millisecond, 3*time.Second, 1) + + // 5. check that the second peer connects to the first peer immediately + assertPeersWithTimeout(t, []*p2p.Switch{secondPeer}, 10*time.Millisecond, 1*time.Second, 2) } func TestPEXReactorCrawlStatus(t *testing.T) { @@ -401,6 +410,7 @@ func assertPeersWithTimeout( outbound, inbound, _ := s.NumPeers() if outbound+inbound < nPeers { allGood = false + break } } remaining -= checkPeriod @@ -417,14 +427,77 @@ func assertPeersWithTimeout( numPeersStr += fmt.Sprintf("%d => {outbound: %d, inbound: %d}, ", i, outbound, inbound) } t.Errorf( - "expected all switches to be connected to at least one peer (switches: %s)", - numPeersStr, + "expected all switches to be connected to at least %d peer(s) (switches: %s)", + nPeers, numPeersStr, ) return } } } +// Creates a seed which knows about the provided addresses / source address pairs. +// Starting and stopping the seed is left to the caller +func testCreateSeed(dir string, id int, knownAddrs, srcAddrs []*p2p.NetAddress) *p2p.Switch { + seed := p2p.MakeSwitch( + cfg, + id, + "127.0.0.1", + "123.123.123", + func(i int, sw *p2p.Switch) *p2p.Switch { + book := NewAddrBook(filepath.Join(dir, "addrbookSeed.json"), false) + book.SetLogger(log.TestingLogger()) + for j := 0; j < len(knownAddrs); j++ { + book.AddAddress(knownAddrs[j], srcAddrs[j]) + book.MarkGood(knownAddrs[j]) + } + sw.SetAddrBook(book) + + sw.SetLogger(log.TestingLogger()) + + r := NewPEXReactor(book, &PEXReactorConfig{}) + r.SetLogger(log.TestingLogger()) + sw.AddReactor("pex", r) + return sw + }, + ) + seed.AddListener( + p2p.NewDefaultListener("tcp://"+seed.NodeInfo().ListenAddr, "", false, log.TestingLogger()), + ) + return seed +} + +// Creates a peer which knows about the provided seed. +// Starting and stopping the peer is left to the caller +func testCreatePeerWithSeed(dir string, id int, seed *p2p.Switch) *p2p.Switch { + peer := p2p.MakeSwitch( + cfg, + id, + "127.0.0.1", + "123.123.123", + func(i int, sw *p2p.Switch) *p2p.Switch { + book := NewAddrBook(filepath.Join(dir, fmt.Sprintf("addrbook%d.json", id)), false) + book.SetLogger(log.TestingLogger()) + sw.SetAddrBook(book) + + sw.SetLogger(log.TestingLogger()) + + r := NewPEXReactor( + book, + &PEXReactorConfig{ + Seeds: []string{seed.NodeInfo().NetAddress().String()}, + }, + ) + r.SetLogger(log.TestingLogger()) + sw.AddReactor("pex", r) + return sw + }, + ) + peer.AddListener( + p2p.NewDefaultListener("tcp://"+peer.NodeInfo().ListenAddr, "", false, log.TestingLogger()), + ) + return peer +} + func createReactor(conf *PEXReactorConfig) (r *PEXReactor, book *addrBook) { // directory to store address book dir, err := ioutil.TempDir("", "pex_reactor") From dde96b75ce3684283f980b968b9edb29ecdff973 Mon Sep 17 00:00:00 2001 From: Dev Ojha Date: Wed, 1 Aug 2018 02:57:31 -0700 Subject: [PATCH 42/44] abci: Update readme for building protoc (#2124) --- abci/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/abci/README.md b/abci/README.md index 6de9f7069..493d862f0 100644 --- a/abci/README.md +++ b/abci/README.md @@ -29,7 +29,7 @@ The two guides to focus on are the `Application Development Guide` and `Using AB To compile the protobuf file, run: ``` -make protoc +cd $GOPATH/src/github.com/tendermint/tendermint/; make protoc_abci ``` See `protoc --help` and [the Protocol Buffers site](https://developers.google.com/protocol-buffers) From 023bb99eb07916f20e867b928a19f7e0efc790f9 Mon Sep 17 00:00:00 2001 From: Dev Ojha Date: Wed, 1 Aug 2018 12:06:30 -0700 Subject: [PATCH 43/44] p2p: Add test vectors for deriving secrets (#2120) These test vectors are needed for comparison with the Rust implementation. To implement this effectively, a "RandBool" method was added to cmn.Rand. --- libs/common/random.go | 11 +++ p2p/conn/secret_connection_test.go | 68 +++++++++++++++++++ ...TestDeriveSecretsAndChallengeGolden.golden | 32 +++++++++ 3 files changed, 111 insertions(+) create mode 100644 p2p/conn/testdata/TestDeriveSecretsAndChallengeGolden.golden diff --git a/libs/common/random.go b/libs/common/random.go index 51bfd15c4..4b0594d0e 100644 --- a/libs/common/random.go +++ b/libs/common/random.go @@ -109,6 +109,10 @@ func RandInt63n(n int64) int64 { return grand.Int63n(n) } +func RandBool() bool { + return grand.Bool() +} + func RandFloat32() float32 { return grand.Float32() } @@ -274,6 +278,13 @@ func (r *Rand) Intn(n int) int { return i } +// Bool returns a uniformly random boolean +func (r *Rand) Bool() bool { + // See https://github.com/golang/go/issues/23804#issuecomment-365370418 + // for reasoning behind computing like this + return r.Int63()%2 == 0 +} + // Perm returns a pseudo-random permutation of n integers in [0, n). func (r *Rand) Perm(n int) []int { r.Lock() diff --git a/p2p/conn/secret_connection_test.go b/p2p/conn/secret_connection_test.go index 27dca034a..75ed8fe02 100644 --- a/p2p/conn/secret_connection_test.go +++ b/p2p/conn/secret_connection_test.go @@ -1,8 +1,16 @@ package conn import ( + "bufio" + "encoding/hex" + "flag" "fmt" "io" + "log" + "os" + "path/filepath" + "strconv" + "strings" "testing" "github.com/stretchr/testify/assert" @@ -208,6 +216,66 @@ func TestSecretConnectionReadWrite(t *testing.T) { } +// Run go test -update from within this module +// to update the golden test vector file +var update = flag.Bool("update", false, "update .golden files") + +func TestDeriveSecretsAndChallengeGolden(t *testing.T) { + goldenFilepath := filepath.Join("testdata", t.Name()+".golden") + if *update { + t.Logf("Updating golden test vector file %s", goldenFilepath) + data := createGoldenTestVectors(t) + cmn.WriteFile(goldenFilepath, []byte(data), 0644) + } + f, err := os.Open(goldenFilepath) + if err != nil { + log.Fatal(err) + } + defer f.Close() + scanner := bufio.NewScanner(f) + for scanner.Scan() { + line := scanner.Text() + params := strings.Split(line, ",") + randSecretVector, err := hex.DecodeString(params[0]) + require.Nil(t, err) + randSecret := new([32]byte) + copy((*randSecret)[:], randSecretVector) + locIsLeast, err := strconv.ParseBool(params[1]) + require.Nil(t, err) + expectedRecvSecret, err := hex.DecodeString(params[2]) + require.Nil(t, err) + expectedSendSecret, err := hex.DecodeString(params[3]) + require.Nil(t, err) + expectedChallenge, err := hex.DecodeString(params[4]) + require.Nil(t, err) + + recvSecret, sendSecret, challenge := deriveSecretAndChallenge(randSecret, locIsLeast) + require.Equal(t, expectedRecvSecret, (*recvSecret)[:], "Recv Secrets aren't equal") + require.Equal(t, expectedSendSecret, (*sendSecret)[:], "Send Secrets aren't equal") + require.Equal(t, expectedChallenge, (*challenge)[:], "challenges aren't equal") + } +} + +// Creates the data for a test vector file. +// The file format is: +// Hex(diffie_hellman_secret), loc_is_least, Hex(recvSecret), Hex(sendSecret), Hex(challenge) +func createGoldenTestVectors(t *testing.T) string { + data := "" + for i := 0; i < 32; i++ { + randSecretVector := cmn.RandBytes(32) + randSecret := new([32]byte) + copy((*randSecret)[:], randSecretVector) + data += hex.EncodeToString((*randSecret)[:]) + "," + locIsLeast := cmn.RandBool() + data += strconv.FormatBool(locIsLeast) + "," + recvSecret, sendSecret, challenge := deriveSecretAndChallenge(randSecret, locIsLeast) + data += hex.EncodeToString((*recvSecret)[:]) + "," + data += hex.EncodeToString((*sendSecret)[:]) + "," + data += hex.EncodeToString((*challenge)[:]) + "\n" + } + return data +} + func BenchmarkSecretConnection(b *testing.B) { b.StopTimer() fooSecConn, barSecConn := makeSecretConnPair(b) diff --git a/p2p/conn/testdata/TestDeriveSecretsAndChallengeGolden.golden b/p2p/conn/testdata/TestDeriveSecretsAndChallengeGolden.golden new file mode 100644 index 000000000..eb69b29fe --- /dev/null +++ b/p2p/conn/testdata/TestDeriveSecretsAndChallengeGolden.golden @@ -0,0 +1,32 @@ +9fe4a5a73df12dbd8659b1d9280873fe993caefec6b0ebc2686dd65027148e03,true,80a83ad6afcb6f8175192e41973aed31dd75e3c106f813d986d9567a4865eb2f,96362a04f628a0666d9866147326898bb0847b8db8680263ad19e6336d4eed9e,2632c3fd20f456c5383ed16aa1d56dc7875a2b0fc0d5ff053c3ada8934098c69 +0716764b370d543fee692af03832c16410f0a56e4ddb79604ea093b10bb6f654,false,84f2b1e8658456529a2c324f46c3406c3c6fecd5fbbf9169f60bed8956a8b03d,cba357ae33d7234520d5742102a2a6cdb39b7db59c14a58fa8aadd310127630f,576643a8fcc1a4cf866db900f4a150dbe35d44a1b3ff36e4911565c3fa22fc32 +358dd73aae2c5b7b94b57f950408a3c681e748777ecab2063c8ca51a63588fa8,false,c2e2f664c8ee561af8e1e30553373be4ae23edecc8c6bd762d44b2afb7f2a037,d1563f428ac1c023c15d8082b2503157fe9ecbde4fb3493edd69ebc299b4970c,89fb6c6439b12fe11a4c604b8ad883f7dc76be33df590818fe5eb15ddb01face +0958308bdb583e639dd399a98cd21077d834b4b5e30771275a5a73a62efcc7e0,false,523c0ae97039173566f7ab4b8f271d8d78feef5a432d618e58ced4f80f7c1696,c1b743401c6e4508e62b8245ea7c3252bbad082e10af10e80608084d63877977,d7c52adf12ebc69677aec4bd387b0c5a35570fe61cb7b8ae55f3ab14b1b79be0 +d93d134e72f58f177642ac30f36b2d3cd4720aa7e60feb1296411a9009cf4524,false,47a427bcc1ef6f0ce31dbf343bc8bbf49554b4dd1e2330fd97d0df23ecdbba10,73e23adb7801179349ecf9c8cdf64d71d64a9f1145ba6730e5d029f99eaf8840,a8fdcb77f591bfba7b8483aa15ae7b42054ba68625d51dec005896dfe910281f +6104474c791cda24d952b356fb41a5d273c0ce6cc87d270b1701d0523cd5aa13,true,1cb4397b9e478430321af4647da2ccbef62ff8888542d31cca3f626766c8080f,673b23318826bd31ad1a4995c6e5095c4b092f5598aa0a96381a3e977bc0eaf9,4a25a25c5f75d6cc512f2ba8c1546e6263e9ef8269f0c046c37838cc66aa83e6 +8a6002503c15cab763e27c53fc449f6854a210c95cdd67e4466b0f2cb46b629c,false,f01ff06aef356c87f8d2646ff9ed8b855497c2ca00ea330661d84ef421a67e63,4f59bb23090010614877265a1597f1a142fa97b7208e1d554435763505f36f6a,1aadcb1c8b5993da102cebcb60c545b03197c98137064530840f45d917ad300e +31a57c6b1fe33beb1f7ebbbfc06d58c4f307cd355b6f9753e58f3edec16c7559,false,13e126c4cb240349dccf0dc843977671d34a1daffd0517d06ed66b703344db22,d491431906a306af45ecf9f1977e32d7f65a79f5139f931760416de27554b687,5ea7e8e3d5a30503423341609d360d246b61a9159fc07f253a46e357977cd745 +71a3c79718b824627faeefdce887d9465b353bd962cc5e97c5b5dfedab457ef9,true,e2e8eea547dcee7eafa89ae41f48ab049beac24935fad75258924fd5273d23cb,45d2e839bf36a3616cbe8a9bdbd4e7b288bf5bf1e6e79c07995eb2b18eb2eaff,7ee50e0810bc9f98e56bc46de5da22d84b3efa52fe5d85db4b2344530ef17ed8 +2e9dba2eb4f9019c2628ff5899744469c26caf793636f30ddb76601751aee968,false,8bfc3b314e4468d4e19c9d28b7bfd5b5532263105273b0fe80801f6146313993,b77d2b223e27038f978ab87a725859f6995f903056bdbd594ab04f0b2cbad517,9032be49a9cbcd1de6fee332f8f24ebf545c05e0175b98c564e7d1e69630ae20 +81322b22c835efb26d78051f3a3840a9d01aa558c019ecfa26483b5c5535728c,true,61eacb7e9665e362ef492ef950cea58f8bc67434ab7ee5545139147adf395da4,0f600ef0c358cae938969f434c2ec0ce3be632fdf5246b7bb8ee3ff294036ecd,a7026b4c21fe225ecd775ae81249405c6f492882eb85f3f8e2232f11e515561e +826b86c5e8cb4173ff2d05c48e3537140c5e0f26f7866bbcd4e57616806e1be2,true,ae44dabd077d227c8d898930a7705a2b785c8849121282106c045bb58b66eb36,24b2c1b1e2a9ebe387df6dfb9fbde6c681e4eeb0a33bb1c3df3789087f56ffe3,b37a64ea97431b25cb271c4c8435f6dd97118b35da57168f3c3c269920f7bbc1 +18b5a7b973d4b263072e69515c5b6ed22191c3d6e851aaba872904672f8344ec,true,ce402af2fb93b6ef18cd406f7c437d3cbfb09141b7a02116b1cfbabbf75ad84a,c86bdb1709ef0f4a31a818843660f83338b9db77e262bb7c6546138e51c6046b,11fcd8e59c4e7f6050d3cd332337db794ae31260c159e409af3ed8f4d6523bf4 +26d10c56872b72bb76ae7c7b3f074afb3d4a364e5e3f8c661be9b4f5a522ea75,true,1c9782a8485c4ecb13904ec551a7f9300ecd687abfbe63c91c7fd583f84a7a4d,ae3f4ccd0dfee8b514f67db2e923714d324935b9ae9e488d088ebb79569d8cc4,8139a3ab728b0e765e4d90549ab8eed7e1048a83267eafa7442208a7f627558a +558838dfcfe94105c46a4ade4548e6c96271d33e6c752661356cc66024615bae,true,d5a38625be74177318072cf877f2427ce2327e9b58d2eb134d0ac52c9126572f,dead938f77007e3164b6eee4cd153433d03ca5d9ec64f41aa6b2d6a069edeeda,4a081a356361da429c564cf7ac8e217121bbe8c5ee5c9632bae0b7ddbe94f9d4 +f4a3f6a93a4827a59682fd8bf1a8e4fd9aaff01a337a86e1966c8fff0e746014,true,39a0aea2a8ac7f0524d63e395a25b98fc3844ed039f20b11058019dca2b3840f,6ff53243426ded506d22501ae0f989d9946b86a8bb2550d7ed6e90fdf41d0e7c,8784e728bf12f465ed20dc6f0e1d949a68e5795d4799536427a6f859547b7fd6 +1717020e1c4fca1b4926dba16671c0c04e4f19c621c646cb4525fa533b1c205c,false,b9a909767f3044608b4e314b149a729bef199f8311310e1ecd2072e5659b7194,7baf0ff4b980919cf545312f45234976f0b6c574aac5b772024f73248aad7538,99a18e1e4b039ef3777a8fdd0d9ffaccaf3b4523b6d26adacfe91cc5fcd9977e +de769062be27b2a4248dd5be315960c8d231738417ece670c2d6a1c52877b59e,true,cc6c2086718b21813513894546e85766d34c754e81fd6a19c12fc322ffb9b1c3,5a7da7500191c65a5f1fbb2a6122717edc70ca0469baf2bbbd6ca8255b93c077,8c0d32091dc687f1399c754a617d224742726bece848b50c35b4db5f0469ace7 +7c5549f36767e02ebf49a4616467199459aa6932dcc091f182f822185659559a,true,d8335e606128b0c621ff6cda99dc62babf4a4436c574c5c478c20122712727d0,0a7c673cccd6f7fd4ed1673f7d0f2cb08961faced123ca901b74581d5bdc8b25,16ac1eb2a39384716c7d490272d87e76c10665fdb331e1883435de175ce4460e +ecf8261ebda248dc7796f98987efe1b7be363a59037c9e61044490d08a077610,true,53def80fcdba01367c0ea36459b57409f59a771f57a8259b54f24785e5656b7d,90140870b3b1e84c9dcf7836eac0581b16fe0a40307619d267c6f871e1efce6a,c6d1836b66c1a722a377c7eb058995a0ef8711839c6d6a0cdd6ad1ff70f935a5 +21c0ef76ce0eae9391ceabfb08a861899db55ac4ccf010ed672599669c6938f2,false,8af5482cc015093f261d5b7ce87035dda41d8318b9960b52cca3e5f0d3f61808,f4d5338bcb57262e1034f01ed3858ca1e5d66a73f18588e72f3dc8c6a730be0c,7ba82c2820c95e3354d9a6ab4920ebcd7938ce19e25930fee58439246b0321b1 +05f3b66d6b0fe906137e60b4719083a2465106badedcdae3a4c91c46c5367340,false,e5c9e074e95c2896fa4093830e96e9cf159b8dcba2ead21f37237cf6e9a9aaa2,b3a0a50309b4ca23cd34363fd8df30e73ec4a275973986c2e11a53752eff0a3b,358a62056ff05f27185b9952d291c6346171937f6811cafbacddd82e17010f39 +fef0251cff7c5d1ba0514f1820a8265453365fd9f5bb8a92f955dc007a40e730,true,e35a0aff6e9060a39c15d276a1337f1948d0be0aef81fcd563a6783115b5283d,20a8efe83474253d70e5fd847df0cd26222cd39e9210687b68c0a23b73429108,2989fab4278b32f4f40dc02227ab30e10f62e15ab7aa7382da769b1d084e33df +1b7bb172baa2753ec9c3e81a7a9b4c6ef10f9ed7afcafa975395f095eca63a54,false,a98257203987d0c4d260d8feef841466977276612e268b69b5ce4191af161b29,ea177a20d6c1f73f9667090568f9197943037d6586f7e2d6b7b81756fc71df5f,844eff318ef4c6ee45f158c1946ff999e40ffac70883ab6d6b90995f246e69a2 +5ee9b60a25753066d0ecc1155ca6afcc6b853ba558c9533c134a93b82e756856,true,9889460b95ca9545864a4a5194891b7d475362428d6d797532da10bf1fc92076,a7a96739abd8eceb6751afc98df68e29f7af16fbfda3d4710df9c35b6dcdb4d5,998326285c90a2ea2e1f6c6dac79530742645e3dd1b2b42a0733388a99cab81b +a102613781872f88a949d82cb5efcc2e0f437010a950d71b87929ecb480af3b3,false,e099080a55b9b29ccecbbb0d91dbe49defcc217efd1de0588e0836ce5970d327,319293b8660a3cea9879487645ddadda72a5c60079c9154bb0dbb8a0c9cda79e,4d567f1b1a1b304347cf7b129e4c7a05aa57e2bbb8ea335db9e33d05fab12e4d +1d4538180d06f37c43e8caa2d0d80aa7c5d701c8c3e31508704131427837f5cc,true,73afeeb46efc03d2b9f20fc271752528e52b8931287296a7e4367c96bccb32bd,59dc4b69d9ccf6f77715e47fb9bf454f1b90bbd05f1d2bbd07c7d6666f31c91f,ac59d735dfcdc3a0a4ce5a10f09dea8c6afd47de9c0308dc817e3789c8aee963 +e4c480af1b0e3487a331761f64eb3f020a2b8ffa25ad17e00f57aa7ec2c5e84d,true,1145e9f001c70d364e97fcdbc88a2a3d6aecdd975212923820f90a0b215f11f6,b802ac7ef21c8abaeae024c76e3fa70a2a82f73e0bb7c7fe76752ad1742af2e6,0a95876e30617e32ae25acd3af97c37dc075825f800def3f2bf3f68a268744e9 +3a7a83dd657dd6277bcfa957534f40d9b559039aad752066a8d7ed9a6d9c0ab5,false,f90a251ad2338b19cfee6a7965f6f5098136974abb99b3d24553fa6117384978,e422ed7567e5602731b3d980106d0546ef4a4da5eb7175d66a452df12d37bad2,b086bed71dfb6662cb10e2b4fb16a7c22394f488e822fc19697db6077f6caf6f +273e8560c2b1734e863a6542bded7a6fcbfb49a12770bd8866d4863dceea3ae9,false,3b7849a362e7b7ba8c8b8a0cd00df5180604987dbda6c03f37d9a09fdb27fb28,e6cdf4d767df0f411e970da8dda6acd3c2c34ce63908d8a6dbf3715daa0318e4,359a4a39fbdffc808161a48a3ffbe77fc6a03ff52324c22510a42e46c08a6f22 +9b4f8702991be9569b6c0b07a2173104d41325017b27d68fa5af91cdab164c4d,true,598323677db11ece050289f31881ee8caacb59376c7182f9055708b2a4673f84,7675adc1264b6758beb097a991f766f62796f78c1cfa58a4de3d81c36434d3ae,d5d8d610ffd85b04cbe1c73ff5becd5917c513d9625b001f51d486d0dadcefe3 +e1a686ba0169eb97379ebf9d22e073819450ee5ad5f049c8e93016e8d2ec1430,false,ffe461e6075865cde2704aa148fd29bcf0af245803f446cb6153244f25617993,46df6c25fa0344e662490c4da0bddca626644e67e66705840ef08aae35c343fa,e9a56d75acad4272ab0c49ee5919a4e86e6c5695ef065704c1e592d4e7b41a10 From eaa137512cddbb691bb301102c8355ea2a4e47e9 Mon Sep 17 00:00:00 2001 From: Dev Ojha Date: Wed, 1 Aug 2018 15:19:21 -0700 Subject: [PATCH 44/44] adr: Encoding for cryptography at launch (#2121) --- docs/architecture/adr-015-crypto-encoding.md | 80 ++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 docs/architecture/adr-015-crypto-encoding.md diff --git a/docs/architecture/adr-015-crypto-encoding.md b/docs/architecture/adr-015-crypto-encoding.md new file mode 100644 index 000000000..983411270 --- /dev/null +++ b/docs/architecture/adr-015-crypto-encoding.md @@ -0,0 +1,80 @@ +# ADR 015: Crypto encoding + +## Context + +We must standardize our method for encoding public keys and signatures on chain. +Currently we amino encode the public keys and signatures. +The reason we are using amino here is primarily due to ease of support in +parsing for other languages. +We don't need its upgradability properties in cryptosystems, as a change in +the crypto that requires adapting the encoding, likely warrants being deemed +a new cryptosystem. +(I.e. using new public parameters) + +## Decision + +### Public keys + +For public keys, we will continue to use amino encoding on the canonical +representation of the pubkey. +(Canonical as defined by the cryptosystem itself) +This has two significant drawbacks. +Amino encoding is less space-efficient, due to requiring support for upgradability. +Amino encoding support requires forking protobuf and adding this new interface support +option in the langauge of choice. + +The reason for continuing to use amino however is that people can create code +more easily in languages that already have an up to date amino library. +It is possible that this will change in the future, if it is deemed that +requiring amino for interacting with tendermint cryptography is unneccessary. + +The arguments for space efficiency here are refuted on the basis that there are +far more egregious wastages of space in the SDK. +The space requirement of the public keys doesn't cause many problems beyond +increasing the space attached to each validator / account. + +The alternative to using amino here would be for us to create an enum type. +Switching to just an enum type is worthy of investigation post-launch. +For referrence, part of amino encoding interfaces is basically a 4 byte enum +type definition. +Enum types would just change that 4 bytes to be a varuint, and it would remove +the protobuf overhead, but it would be hard to integrate into the existing API. + +### Signatures + +Signatures should be switched to be `[]byte`. +Spatial efficiency in the signatures is quite important, +as it directly affects the gas cost of every transaction, +and the throughput of the chain. +Signatures don't need to encode what type they are for (unlike public keys) +since public keys must already be known. +Therefore we can validate the signature without needing to encode its type. + +When placed in state, signatures will still be amino encoded, but it will be the +primitive type `[]byte` getting encoded. + +#### Ed25519 +Use the canonical representation for signatures. + +#### Secp256k1 +There isn't a clear canonical representation here. +Signatures have two elements `r,s`. +We should encode these bytes as `r || s`, where `r` and `s` are both exactly +32 bytes long. +This is basically Ethereum's encoding, but without the leading recovery bit. + +## Status + +Proposed. The signature section seems to be agreed upon for the most part. +Needs decision on Enum types. + +## Consequences + +### Positive +* More space efficient signatures + +### Negative +* We have an amino dependency for cryptography. + +### Neutral +* No change to public keys \ No newline at end of file