Sergio Mena
27297a447c
Rebased to master the existing `ProcessProposal` PR ( #7752 )
* Rebased and git-squashed the commits in PR #7091
- add processproposal proto/boilerplate/logic
- mockery
- gofmt
- fix test
- gofmt
- move UNKNOWN response behaviour to reject
* Fixed build of some UTs
* Addressed William's comment on context
* Adapted TestProcessProposal
* BaseApp needs to ACCEPT vote extensions by default
* Added missing ProcessProposal to socket_server.go
* Re-renamed TwoThirdPrevote... to Valid...
* Addressed William's comment on ProcessProposal error
* Addressed Callum's comments
* fmt
Co-authored-by: mconcat <monoidconcat@gmail.com>
3 years ago
mconcat
d2afb91e99
ABCI Vote Extension 2 ( #6885 )
* add proto, add boilerplates
* add canonical
* fix tests
* add vote signing test
* Update internal/consensus/msgs_test.go
* modify state execution in progress
* add extension signing
* add extension signing
* VoteExtension -> ExtendVote
* modify state execution in progress
* add extension signing
* verify in progress
* modify CommitSig
* fix test
* apply review
* update data structures
* Apply suggestions from code review
* Add comments
* fix test
* VoteExtensionSigned => VoteExtensionToSigned
* Apply suggestions from code review
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
* *Signed -> *ToSign
* add Vote to RequestExtendVote
* add example VoteExtension
* apply reviews
* fix vote
* Apply suggestions from code review
Co-authored-by: Dev Ojha <ValarDragon@users.noreply.github.com>
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
* fix typo, modify proto
* add abcipp_kvstore.go
* add extension test
* fix test
* fix test
* fix test
* fit lint
* uncomment test
* refactor test in progress
* gofmt
* apply review
* fix lint
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Dev Ojha <ValarDragon@users.noreply.github.com>
3 years ago
mconcat
29f7573762
abci: Vote Extension 1 ( #6646 )
* add proto, add boilerplates
* add canonical
* fix tests
* add vote signing test
* Update internal/consensus/msgs_test.go
* modify state execution in progress
* add extension signing
* VoteExtension -> ExtendVote
* apply review
* update data structures
* Add comments
* Apply suggestions from code review
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
* *Signed -> *ToSign
* add Vote to RequestExtendVote
* apply reviews
* Apply suggestions from code review
Co-authored-by: Dev Ojha <ValarDragon@users.noreply.github.com>
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
* fix typo, modify proto
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Dev Ojha <ValarDragon@users.noreply.github.com>
3 years ago
Marko
ff498ff333
abci: PrepareProposal ( #6544 )
3 years ago
M. J. Fromberger
c8e8a62084
abci/client: simplify client interface ( #7607 )
This change has two main effects:
1. Remove most of the Async methods from the abci.Client interface.
Remaining are FlushAsync, CommitTxAsync, and DeliverTxAsync.
2. Rename the synchronous methods to remove the "Sync" suffix.
The rest of the change is updating the implementations, subsets, and mocks of
the interface, along with the call sites that point to them.
* Fix stringly-typed mock stubs.
* Rename helper method.
3 years ago
Sam Kleinman
2a348cc1e9
logging: remove reamining instances of SetLogger interface ( #7572 )
3 years ago
Sam Kleinman
332163ede6
testing: remove background contexts ( #7509 )
3 years ago
Sam Kleinman
f2cc496f09
testing: pass testing.T to assert and require always, assertion cleanup ( #7508 )
3 years ago
Sam Kleinman
3c8955e4b8
errors: formating cleanup ( #7507 )
3 years ago
Sam Kleinman
5c0abb5367
testing: use scoped logger for all public packages ( #7504 )
3 years ago
dependabot[bot]
7705c9d086
build(deps): Bump google.golang.org/grpc from 1.42.0 to 1.43.0 ( #7455 )
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go ) from 1.42.0 to 1.43.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/grpc/grpc-go/releases ">google.golang.org/grpc's releases</a>.</em></p>
<blockquote>
<h2>Release 1.43.0</h2>
<h1>API Changes</h1>
<ul>
<li>grpc: stabilize <code>WithConnectParams</code> <code>DialOption</code> (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4915 ">#4915</a>)
<ul>
<li>Special Thanks: <a href="https://github.com/hypnoglow "><code>@hypnoglow</code></a></li>
</ul>
</li>
</ul>
<h1>Behavior Changes</h1>
<ul>
<li>status: support wrapped errors in <code>FromContextError</code> (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4977 ">#4977</a>)
<ul>
<li>Special Thanks: <a href="https://github.com/bestbeforetoday "><code>@bestbeforetoday</code></a></li>
</ul>
</li>
<li>config: remove the environment variable to disable retry support (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4922 ">#4922</a>)</li>
</ul>
<h1>New Features</h1>
<ul>
<li>balancer: new field <code>Authority</code> in <code>BuildOptions</code> for server name to use in the authentication handshake with a remote load balancer (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4969 ">#4969</a>)</li>
</ul>
<h1>Bug Fixes</h1>
<ul>
<li>xds/resolver: fix possible <code>ClientConn</code> leak upon resolver initialization failure (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4900 ">#4900</a>)</li>
<li>client: fix <code>nil</code> panic in rare race conditions with the pick first LB policy (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4971 ">#4971</a>)</li>
<li>xds: improve RPC error messages when xDS connection errors occur (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5032 ">#5032</a>, <a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5054 ">#5054</a>)</li>
<li>transport: do not create stream object in the face of illegal stream IDs (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4873 ">#4873</a>)
<ul>
<li>Special Thanks: <a href="https://github.com/uds5501 "><code>@uds5501</code></a></li>
</ul>
</li>
</ul>
<h1>Documentation</h1>
<ul>
<li>client: clarify errors to indicate whether compressed or uncompressed messages exceeded size limits (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4918 ">#4918</a>)
<ul>
<li>Special Thanks: <a href="https://github.com/uds5501 "><code>@uds5501</code></a></li>
</ul>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="14c11384b7
"><code>14c1138</code></a> Change version to 1.43.0 (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5039 ">#5039</a>)</li>
<li><a href="ae29ac3e1e
"><code>ae29ac3</code></a> xds/client: send NewStream errors to the watchers (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5032 ">#5032</a>)</li>
<li><a href="296afc2e57
"><code>296afc2</code></a> transport: better error message when per-RPC creds fail (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5033 ">#5033</a>)</li>
<li><a href="e15d978c82
"><code>e15d978</code></a> xds/client: send connection errors to all watchers (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5054 ">#5054</a>)</li>
<li><a href="46e883a9ab
"><code>46e883a</code></a> Backport "xds/c2p: replace C2P resolver env var with experimental scheme suff...</li>
<li><a href="3786ae1778
"><code>3786ae1</code></a> xds/resolver: Add support for cluster specifier plugins (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4987 ">#4987</a>)</li>
<li><a href="512e89474b
"><code>512e894</code></a> rls: support extra_keys and constant_keys (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4995 ">#4995</a>)</li>
<li><a href="f3bbd12084
"><code>f3bbd12</code></a> xds/bootstrap_config: add a string function to server config (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5031 ">#5031</a>)</li>
<li><a href="46935b9650
"><code>46935b9</code></a> fix possible nil before casting (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5017 ">#5017</a>)</li>
<li><a href="c2bccd0b15
"><code>c2bccd0</code></a> xds/kokoro: install go 1.17, and retry go build (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5015 ">#5015</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/grpc/grpc-go/compare/v1.42.0...v1.43.0 ">compare view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=google.golang.org/grpc&package-manager=go_modules&previous-version=1.42.0&new-version=1.43.0 )](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores )
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
</details>
3 years ago
Sam Kleinman
6ab62fe7b6
service: remove stop method and use contexts ( #7292 )
3 years ago
Sam Kleinman
d7606777cf
libs/service: pass logger explicitly ( #7288 )
This is a very small change, but removes a method from the
`service.Service` interface (a win!) and forces callers to explicitly
pass loggers in to objects during construction rather than (later)
injecting them. There's not a real need for this kind of lazy
construction of loggers, and I think a decent potential for confusion
for mutable loggers.
The main concern I have is that this changes the constructor API for
ABCI clients. I think this is fine, and I suspect that as we plumb
contexts through, and make changes to the RPC services there'll be a
number of similar sorts of changes to various (quasi) public
interfaces, which I think we should welcome.
3 years ago
dependabot[bot]
2af7d8defd
build(deps): Bump google.golang.org/grpc from 1.41.0 to 1.42.0 ( #7200 )
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go ) from 1.41.0 to 1.42.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/grpc/grpc-go/releases ">google.golang.org/grpc's releases</a>.</em></p>
<blockquote>
<h2>Release 1.42.0</h2>
<h1>Behavior Changes</h1>
<ul>
<li>grpc: Dial("unix://relative-path") no longer works (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4817 ">#4817</a>)
<ul>
<li>use "unix://absolute-path" or "unix:relative-path" instead in accordance with <a href="https://github.com/grpc/grpc/blob/master/doc/naming.md#name-syntax ">our documentation</a></li>
</ul>
</li>
<li>xds/csds: use new field <code>GenericXdsConfig</code> instead of <code>PerXdsConfig</code> (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4898 ">#4898</a>)</li>
</ul>
<h1>New Features</h1>
<ul>
<li>grpc: support <code>grpc.WithAuthority</code> when secure credentials are used (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4817 ">#4817</a>)</li>
<li>creds/google: add NewDefaultCredentialsWithOptions() to support custom per-RPC creds (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4830 ">#4830</a>)</li>
<li>authz: create file watcher interceptor for gRPC SDK API (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4760 ">#4760</a>)</li>
<li>attributes: add <code>Equal</code> method (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4855 ">#4855</a>)</li>
<li>resolver: add <code>AddressMap</code> and <code>State.BalancerAttributes</code> (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4855 ">#4855</a>)</li>
<li>resolver: Add <code>URL</code> field to <code>Target</code> to store parsed dial target (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4817 ">#4817</a>)</li>
<li>grpclb: add a <code>target_name</code> field to lb config to specify target when used as a child policy (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4847 ">#4847</a>)</li>
<li>grpclog: support formatting log output as JSON (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4854 ">#4854</a>)</li>
</ul>
<h1>Bug Fixes</h1>
<ul>
<li>server: add missing conn.Close if the connection dies before reading the HTTP/2 preface (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4837 ">#4837</a>)</li>
<li>grpclb: recover if addresses are received after an empty server list was received previously (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4879 ">#4879</a>)</li>
<li>authz: support empty principals and fix rbac authenticated matcher (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4883 ">#4883</a>)</li>
<li>xds/rds: NACK the RDS response if it contains unknown cluster specifier (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4788 ">#4788</a>)</li>
<li>xds/priority: do not switch to low priority when high priority is in Idle (e.g. ringhash) (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4889 ">#4889</a>)</li>
</ul>
<h1>Documentation</h1>
<ul>
<li>grpc: stabilize WithDefaultServiceConfig and improve godoc (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4888 ">#4888</a>)</li>
<li>status: clarify FromError docstring (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4880 ">#4880</a>)</li>
<li>examples: add example illustrating the use of unix abstract sockets (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4848 ">#4848</a>)</li>
<li>examples: update load balancing example to use loadBalancingConfig (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4887 ">#4887</a>)</li>
<li>doc: promote WithDisableRetry to stable; clarify retry is enabled by default (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4901 ">#4901</a>)</li>
</ul>
<h1>API Changes</h1>
<ul>
<li>credentials: Mark <code>TransportCredentials.OverrideServerName</code> method as deprecated (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4817 ">#4817</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="aff571cc86
"><code>aff571c</code></a> Change version to 1.42.0 (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4910 ">#4910</a>)</li>
<li><a href="2d7bdf2d23
"><code>2d7bdf2</code></a> xds: Set RBAC on by default (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4909 ">#4909</a>)</li>
<li><a href="d47437c91e
"><code>d47437c</code></a> xds: Fix invert functionality for header matcher (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4902 ">#4902</a>)</li>
<li><a href="9fa2698264
"><code>9fa2698</code></a> xds/csds: populate new GenericXdsConfig field (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4898 ">#4898</a>)</li>
<li><a href="6e8625df63
"><code>6e8625d</code></a> doc: promote WithDisableRetry to stable; clarify retry is enabled by default ...</li>
<li><a href="f1d87c14c2
"><code>f1d87c1</code></a> client: properly disable retry if GRPC_GO_RETRY=off (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4899 ">#4899</a>)</li>
<li><a href="03753f593c
"><code>03753f5</code></a> creds/google: fix CFE cluster name check (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4893 ">#4893</a>)</li>
<li><a href="4f21cde702
"><code>4f21cde</code></a> authz: support empty principals and fix rbac authenticated matcher (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4883 ">#4883</a>)</li>
<li><a href="f00baa6c3c
"><code>f00baa6</code></a> resolver: replace AddressMap.Range with Keys (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4891 ">#4891</a>)</li>
<li><a href="2a312458e6
"><code>2a31245</code></a> client: don't force passthrough as default resolver (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4890 ">#4890</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/grpc/grpc-go/compare/v1.41.0...v1.42.0 ">compare view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=google.golang.org/grpc&package-manager=go_modules&previous-version=1.41.0&new-version=1.42.0 )](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores )
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
</details>
3 years ago
Sharad Chand
8441b3715a
migrate away from deprecated ioutil APIs ( #7175 )
Co-authored-by: Callum Waters <cmwaters19@gmail.com>
Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
3 years ago
M. J. Fromberger
cf7537ea5f
cleanup: Reduce and normalize import path aliasing. ( #6975 )
The code in the Tendermint repository makes heavy use of import aliasing.
This is made necessary by our extensive reuse of common base package names, and
by repetition of similar names across different subdirectories.
Unfortunately we have not been very consistent about which packages we alias in
various circumstances, and the aliases we use vary. In the spirit of the advice
in the style guide and https://github.com/golang/go/wiki/CodeReviewComments#imports ,
his change makes an effort to clean up and normalize import aliasing.
This change makes no API or behavioral changes. It is a pure cleanup intended
o help make the code more readable to developers (including myself) trying to
understand what is being imported where.
Only unexported names have been modified, and the changes were generated and
applied mechanically with gofmt -r and comby, respecting the lexical and
syntactic rules of Go. Even so, I did not fix every inconsistency. Where the
changes would be too disruptive, I left it alone.
The principles I followed in this cleanup are:
- Remove aliases that restate the package name.
- Remove aliases where the base package name is unambiguous.
- Move overly-terse abbreviations from the import to the usage site.
- Fix lexical issues (remove underscores, remove capitalization).
- Fix import groupings to more closely match the style guide.
- Group blank (side-effecting) imports and ensure they are commented.
- Add aliases to multiple imports with the same base package name.
3 years ago
Sam Kleinman
9dfdc62eb7
proxy: move proxy package to internal ( #6953 )
3 years ago
Marko
363ea56680
abci: remove counter app ( #6684 )
* remove counter app
* remove unneeeded ci
* lint fix
* modify tx sizes
* cleanup docs
* Update abci/cmd/abci-cli/abci-cli.go
Co-authored-by: Callum Waters <cmwaters19@gmail.com>
* Update docs/app-dev/getting-started.md
Co-authored-by: Callum Waters <cmwaters19@gmail.com>
* Update docs/app-dev/getting-started.md
Co-authored-by: Callum Waters <cmwaters19@gmail.com>
* bring back comment
* migrate to kvstore and not persistent
* remove unused func
* test persistent
Co-authored-by: Callum Waters <cmwaters19@gmail.com>
3 years ago
Aleksandr Bezobchuk
09a6ad7b1e
types: Refactor EventAttribute ( #6408 )
4 years ago
Ismail Khoffi
ee70430255
libs: remove most of libs/rand ( #6364 )
4 years ago
Sam Kleinman
19393f0c28
test: clean up databases in tests ( #6304 )
4 years ago
Anton Kaliaev
e13b4386ff
abci: modify Client interface and socket client ( #5673 )
`abci.Client`:
- Sync and Async methods now accept a context for cancellation
* grpc client uses context to cancel both Sync and Async requests
* local client ignores context parameter
* socket client uses context to cancel Sync requests and to drop Async requests before sending them if context was cancelled prior to that
- Async methods return an error
* socket client returns an error immediately if queue is full for Async requests
* local client always returns nil error
* grpc client returns an error if context was cancelled before we got response or the receiving queue had a space for response (do not confuse with the sending queue from the socket client)
- specify clients semantics in [doc.go](https://raw.githubusercontent.com/tendermint/tendermint/27112fffa62276bc016d56741f686f0f77931748/abci/client/doc.go )
`mempool.TxInfo`
- add optional `Context` to `TxInfo`, which can be used to cancel `CheckTx` request
Closes #5190
4 years ago
Marko
e0950515ff
test/e2e: fix secp failures ( #5649 )
4 years ago
Marko
c6f8f0aefc
crypto: add in secp256k1 support ( #5500 )
Secp256k1 was removed in the protobuf migration, this pr adds it back in order to provide this functionality for users (band)
Closes : #5495
4 years ago
Marko
346aa14db5
fix lint failures with 1.31 ( #5489 )
4 years ago
Marko
82e4693cc5
abci: remove setOption ( #5447 )
Remove Response/Request SetOption from ABCI.
Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
4 years ago
QuantumExplorer
ecd3cbc2bd
fix a few typos ( #5402 )
4 years ago
Callum Waters
c752e2e586
abci: update evidence ( #5324 )
4 years ago
Marko
42e4e8b58e
lint: add markdown linter ( #5254 )
4 years ago
Marko
6ccccb0933
lint: errcheck ( #5091 )
## Description
add more error checks to tests
gonna do a third PR that tackles the non test cases
4 years ago
Erik Grinaker
66ed8ec39d
proto: reorganize Protobuf schemas ( #5102 )
Reorganizes the Protobuf schemas. It is mostly bikeshedding, so if something is contentious or causes a lot of extra work then I'm fine with reverting. Some Protobuf and Go import paths will change.
* Move `abci/types/types.proto` to `abci/types.proto`.
* Move `crypto/keys/types.proto` and `crypto/merkle/types.proto` to `crypto/keys.proto` and `crypto/proof.proto`.
* Drop the use of `msgs` in filenames, as "message" is a very overloaded term (all Protobuf types are messages, and we also have `message Message`). Use `types.proto` as a catch-all, and otherwise name files by conceptual grouping instead of message kind.
4 years ago
Marko
7e2cc1db5e
linter: (1/2) enable errcheck ( #5064 )
## Description
partially cleanup in preparation for errcheck
i ignored a bunch of defer errors in tests but with the update to go 1.14 we can use `t.Cleanup(func() { if err := <>; err != nil {..}}` to cover those errors, I will do this in pr number two of enabling errcheck.
ref #5059
4 years ago
Erik Grinaker
04b8cf7879
deps: bump tm-db to 0.6.0 ( #5058 )
4 years ago
Anton Kaliaev
0c7fd316eb
abci/example/kvstore: decrease val power by 1 upon equivocation ( #5056 )
in `persistent_kvstore`
4 years ago
Marko
5412426ae8
indexer: remove index filtering ( #5006 )
Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
4 years ago
Marko
dedf0d2350
proto: folder structure adhere to buf ( #5025 )
4 years ago
Marko
31a361d119
proto: move keys to oneof ( #4983 )
5 years ago
Marko
b9af87c4ea
state: proto migration ( #4951 )
5 years ago
Marko
7c576f02ab
keys: change to []bytes ( #4950 )
5 years ago
Marko
99d88cbe2f
crypto: remove key suffixes ( #4941 )
## Description
- remove keyname suffix from keys
Closes : #2228
5 years ago
Erik Grinaker
0566646373
test/abci: use random socket names to avoid collisions ( #4885 )
Fixes these test failures:
```
=== RUN TestKVStore
### Testing KVStore
I[2020-05-25|13:32:31.303] Starting ABCIServer service module=abci-server impl=ABCIServer
TestKVStore: example_test.go:48:
Error Trace: example_test.go:48
example_test.go:28
Error: Received unexpected error:
listen unix test.sock: bind: address already in use
Test: TestKVStore
Messages: Error starting socket server
--- FAIL: TestKVStore (0.00s)
```
5 years ago
Marko
cf4e056a33
abci: remove python examples
## Description
remove unused and unmaintained python examples of abci
Closes: #XXX
5 years ago
Erik Grinaker
81c2798df0
abci: fix protobuf lint issues
Fix some linter issues to conform with the Protobuf style guide.
The state sync enum changes are ok to break since it's not released yet. Personally I find the uppercase kind of ugly, but that's what the guide says. Couldn't find a way to generate camel case in Go, short of specifying custom names for each and every enum variant.
Another option would be to simply disable the enum case lint.
5 years ago
Erik Grinaker
569981325a
add ABCI interface for state sync snapshots ( #4704 )
Adds the ABCI interface for [state sync](https://github.com/tendermint/tendermint/issues/828 ) as outlined in [ADR-053](https://github.com/tendermint/tendermint/blob/master/docs/architecture/adr-053-state-sync-prototype.md ), and bumps ABCIVersion to `0.17.0`.
The interface adds a new ABCI connection which Tendermint can use to query and load snapshots from the app (for serving snapshots to other nodes), and to offer and apply snapshots to the app (for state syncing a local node from peers).
Split out from the original PR in #4645 , state sync reactor will be submitted as a separate PR. The interface is implemented by the Cosmos SDK in https://github.com/cosmos/cosmos-sdk/pull/5803 .
5 years ago
Diep Pham
843d63f935
indexer: allow indexing an event at runtime ( #4466 )
The PR added a new field `index` to event attribute, that will cause indexer service to index the event if set to true.
5 years ago
Erik Grinaker
4298bbcc4e
add support for block pruning via ABCI Commit response ( #4588 )
* Added BlockStore.DeleteBlock()
* Added initial block pruner prototype
* wip
* Added BlockStore.PruneBlocks()
* Added consensus setting for block pruning
* Added BlockStore base
* Error on replay if base does not have blocks
* Handle missing blocks when sending VoteSetMaj23Message
* Error message tweak
* Properly update blockstore state
* Error message fix again
* blockchain: ignore peer missing blocks
* Added FIXME
* Added test for block replay with truncated history
* Handle peer base in blockchain reactor
* Improved replay error handling
* Added tests for Store.PruneBlocks()
* Fix non-RPC handling of truncated block history
* Panic on missing block meta in needProofBlock()
* Updated changelog
* Handle truncated block history in RPC layer
* Added info about earliest block in /status RPC
* Reorder height and base in blockchain reactor messages
* Updated changelog
* Fix tests
* Appease linter
* Minor review fixes
* Non-empty BlockStores should always have base > 0
* Update code to assume base > 0 invariant
* Added blockstore tests for pruning to 0
* Make sure we don't prune below the current base
* Added BlockStore.Size()
* config: added retain_blocks recommendations
* Update v1 blockchain reactor to handle blockstore base
* Added state database pruning
* Propagate errors on missing validator sets
* Comment tweaks
* Improved error message
Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com>
* use ABCI field ResponseCommit.retain_height instead of retain-blocks config option
* remove State.RetainHeight, return value instead
* fix minor issues
* rename pruneHeights() to pruneBlocks()
* noop to fix GitHub borkage
Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
5 years ago
Marko
044f1bf288
format: add format cmd & goimport repo ( #4586 )
* format: add format cmd & goimport repo
- replaced format command
- added goimports to format command
- ran goimports
Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>
* fix outliers & undo proto file changes
5 years ago
Erik Grinaker
c33576e72a
example/kvstore: return ABCI query height ( #4509 )
* example/kvstore: return ABCI query height
* CHANGELOG: added PR link
* Updated tests
5 years ago
Marko
6b71b928be
dep: update tm-db to 0.4.0 ( #4289 )
* dep: update tm-db to 0.4.0
- update 0.4.0 as it is a breaking change and cannot be handled by depndabot
Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>
* more work towards error handling
* error and emtpy bytes handling
* work on tests
* add changelog entry, change some error handling
* address some pr comments
* panic in a few more places
* move error higher up
* redo some error handling
* fix some bz == nil to len(bz) == 0
* change statebytes
5 years ago
Marko
9bd0f9e634
lint: golint issue fixes ( #4258 )
* lint: golint issue fixes
- on my local machine golint is a lot stricter than the bot so slowly going through and fixing things.
Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>
* more fixes from golint
* remove isPeerPersistentFn
* add changelog entry
5 years ago