Commit Graph

440 Commits

Author SHA1 Message Date
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>
2021-10-28 10:34:07 -07:00
Sam Kleinman
93eb940dcd config: WriteConfigFile should return error (#7169) 2021-10-27 08:46:18 -04:00
Sam Kleinman
cb39e2f917 node,blocksync,config: remove support for running nodes with blocksync disabled (#7159)
We stopped testing these configurations a while ago, and it doesn't
really make sense to allow nodes to run in this configuration. This
drops support for non-blocksync nodes and cleans up the
configuration/tests accordingly.

Closes: #6908
2021-10-26 14:35:14 +00:00
M. J. Fromberger
86f00135dd rpc: Remove the deprecated gRPC interface to the RPC service (#7121)
This change removes the partial gRPC interface to the RPC service, which was
deprecated in resolution of #6718.

Details:
- rpc: Remove the client and server interfaces and proto definitions.
- Remove the gRPC settings from the config library.
- Remove gRPC setup for the RPC service in the node startup.
- Fix various test helpers to remove gRPC bits.
- Remove the --rpc.grpc-laddr flag from the CLI.

Note that to satisfy the protobuf interface check, this change also includes a
temporary edit to buf.yaml, that I will revert after this is merged.
2021-10-13 15:01:01 -07:00
Callum Waters
4ca130d226 cli: allow node operator to rollback last state (#7033) 2021-10-08 09:15:13 +02:00
Sam Kleinman
5bf30bb049 p2p: cleanup transport interface (#7071)
This is another batch of things to cleanup in the legacy P2P system.
2021-10-06 19:17:44 +00:00
Callum Waters
60a6c6fb1a e2e: allow running of single node using the e2e app (#6982) 2021-09-27 15:43:07 +02:00
Sam Kleinman
bb8ffcb95b store: move pacakge to internal (#6978) 2021-09-23 11:46:42 -04:00
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.
2021-09-23 07:52:07 -07:00
Sam Kleinman
1c4950dbd2 state: move package to internal (#6964) 2021-09-22 13:04:25 -04:00
Sam Kleinman
07d10184a1 inspect: remove duplicated construction path (#6966) 2021-09-22 12:32:49 -04:00
William Banfield
dc0e04d243 rename configuration parameters to use the new blocksync nomenclature (#6896)
The 0.35 release cycle renamed the 'fastsync' functionality to 'blocksync'. This change brings the configuration parameters in line with that change. Namely, it updates the configuration file `[fastsync]` field to be `[blocksync]` and changes the command line flag and config file parameters `--fast-sync` and `fast-sync` to `--enable-block-sync` and `enable-block-sync` respectively.

Error messages were added to help users encountering these changes be able to quickly make the needed update to their files/scripts.

When using the old command line argument for fast-sync, the following is printed

```
./build/tendermint start --proxy-app=kvstore --consensus.create-empty-blocks=false --fast-sync=false
ERROR: invalid argument "false" for "--fast-sync" flag: --fast-sync has been deprecated, please use --enable-block-sync
```

When using one of the old config file parameters, the following is printed:
```
./build/tendermint start --proxy-app=kvstore --consensus.create-empty-blocks=false
ERROR: error in config file: a configuration parameter named 'fast-sync' was found in the configuration file. The 'fast-sync' parameter has been renamed to 'enable-block-sync', please update the 'fast-sync' field in your configuration file to 'enable-block-sync'
```
2021-09-08 13:58:12 +00:00
M. J. Fromberger
41a361ed8d psql: add documentation and simplify constructor API (#6856)
Add documentation comments to the psql event sink package, and simplify the
constructor function so that it does not return the SQL database handle.  The
handle is needed for testing, so expose that via a separate method on the
concrete type.

Update the tests and existing usage for the change. This change does not affect
the behaviour of the sink, so there are no functional changes, only syntactic
updates.
2021-08-24 17:18:27 -04:00
William Banfield
bc2b529b95 inspect: add inspect mode for debugging crashed tendermint node (#6785)
EDIT: Updated, see [comment below]( https://github.com/tendermint/tendermint/pull/6785#issuecomment-897793175)

This change adds a sketch of the `Debug` mode. 

This change adds a `Debug` struct to the node package. This `Debug` struct is intended to be created and started by a command in the `cmd` directory. The `Debug` struct runs the RPC server on the data directories: both the state store and the block store.

This change required a good deal of refactoring. Namely, a new `rpc.go` file was added to the `node` package. This file encapsulates functions for starting RPC servers used by nodes. A potential additional change is to further factor this code into shared code _in_ the `rpc` package. 

Minor API tweaks were also made that seemed appropriate such as the mechanism for fetching routes from the `rpc/core` package.

Additional work is required to register the `Debug` service as a command in the `cmd` directory but I am looking for feedback on if this direction seems appropriate before diving much further.

closes: #5908
2021-08-24 18:12:06 +00:00
Sam Kleinman
d8642a941e cmd: remove deprecated snakes (#6854)
just following up on a deprecation.
2021-08-24 16:06:27 +00:00
Sam Kleinman
66084a01dc commands: add key migration cli (#6790) 2021-08-10 14:58:21 -04:00
JayT106
e87b0391cb cli/indexer: Reindex events (#6676) 2021-07-28 00:04:54 +02:00
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>
2021-07-12 14:55:32 +00:00
Marko
0e9bec1b53 pkg: expose p2p functions (#6627)
## Description

Expose p2p functions for use in the sdk. 

These functions could also be copied over to the sdk. I dont have a preference of which is better.
2021-07-02 15:04:42 +00:00
Tanya Bouman
09ec247646 cmd/tendermint/commands: replace $HOME/.some/test/dir with t.TempDir (#6623)
* cmd/tendermint/commands: replace $HOME/.some/test/dir with t.TempDir

* update changelog

Co-authored-by: Marko <marbar3778@yahoo.com>
2021-06-28 14:38:15 +00:00
Sam Kleinman
ae5f98881b p2p: make NodeID and NetAddress public (#6583) 2021-06-24 09:59:14 -04:00
Sam Kleinman
a6b30faf35 libs/time: move types/time into libs (#6595) 2021-06-17 16:02:31 -04:00
Callum Waters
c0f7fb08c0 config: add root dir to priv validator (#6585) 2021-06-16 17:13:14 +02:00
Sam Kleinman
a855f96946 p2p: renames for reactors and routing layer internal moves (#6547) 2021-06-08 08:17:09 -04:00
Aleksandr Bezobchuk
3635c7a382 logger: refactor Tendermint logger by using zerolog (#6534) 2021-06-07 08:30:48 -04:00
Sam Kleinman
00c284d9d7 node: change package interface (#6540) 2021-06-04 11:36:30 -04:00
Callum Waters
618c945d54 simplify initialization of light client (#6530) 2021-06-03 15:57:55 +02:00
Sam Kleinman
7bf84d9d7f config: seperate priv validator config into seperate section (#6462)
Addresses a beginning component of #6255
2021-05-31 13:16:46 +00:00
Marko
1709e49813 version: revert version through ldflag only (#6494)
## Description

Add version back to versions, but allow it to be overridden via a ldflag.

Reason:

Many users are not setting the ldflag causing issues with tooling that relies on it (cosmjs)

closes #6488

cc @webmaster128
2021-05-28 14:22:31 +00:00
Sam Kleinman
fa891c5a4b node: cleanup pex initialization (#6467) 2021-05-14 10:05:59 -04:00
Callum Waters
358d1a28b8 node: remove mode defaults. Make node mode explicit (#6282) 2021-04-02 09:31:25 +02:00
Callum Waters
9f7051d38a node: implement tendermint modes (#6241)
Co-authored-by: dongsam <dongsamb@gmail.com>
Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
2021-03-18 11:17:53 +01:00
Marko
efd2fde474 privval: add ctx to privval interface (#6240)
## Description

- Add `context.Context` to Privval interface

This pr does not introduce context into our custom privval connection protocol because this will be removed in the next release. When this pr is released.
2021-03-16 14:41:03 +00:00
Callum Waters
418e2c140f e2e: integrate light clients (#6196) 2021-03-05 14:24:45 +01:00
Anton Kaliaev
4540bef665 localnet: fix localnet by excluding self from persistent peers list (#6209)
Closes #6205
2021-03-05 12:58:52 +00:00
Marko
e2384a00ce privval: return errors on loadFilePV (#6185)
## Description

- return errors on `loadFilePv`

closes #6182
2021-03-01 09:10:09 +00:00
Anton Kaliaev
e9e5026dac rpc/client/http: drop endpoint arg from New and add WSOptions (#6176)
also

- replace `MaxReconnectAttempts`, `ReadWait`, `WriteWait` and `PingPeriod` options with `WSOptions` in `WSClient` (rpc/jsonrpc/client/ws_client.go).
- set default write wait to 10s for `WSClient`(rpc/jsonrpc/client/ws_client.go)
- unexpose `WSEvents`(rpc/client/http.go)

Closes #6162
2021-02-25 06:57:31 +00:00
Aleksandr Bezobchuk
6912c34b58 cmd: ignore missing wal in debug kill command (#6160)
closes: #6159
2021-02-22 13:24:56 +00:00
Callum Waters
29360f955c light: improve timeout functionality (#6145) 2021-02-18 23:49:24 +01:00
Callum Waters
162f67cf26 correct spelling to US english (#6077) 2021-02-11 18:59:18 +01:00
Aleksandr Bezobchuk
bd8a9372d2 consensus: Groom Logs (#5917)
Executed a local network using simapp and looked for logs that seemed superfluous. This isn't by any means an exhaustive grooming, but should drastically help legibility of logs.


ref: #5912
2021-01-27 20:53:24 +00:00
Marko
70bb8cc8b7 proto: seperate native and proto types (#5994)
## Description

Separate protobuf and domain types. We should avoid using protobuf in our core logic. 

ref #5460
2021-01-27 20:14:27 +00:00
Marko
f05788e632 privval: Query validator key (#5876)
## Description

- Query validator key when a remote signer is used. This is supported gRPC remote signing and filePV only. 


Closes: #3009
2021-01-12 10:06:33 +00:00
Callum Waters
385ea1db7d store: use db iterators for pruning and range-based queries (#5848) 2021-01-08 13:12:54 +01:00
Marko
09cf0bcb01 privval: add grpc (#5725)
Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
2021-01-06 10:49:30 -08:00
Callum Waters
3283a84ab2 cmd: hyphen case cli and config (#5777) 2020-12-11 13:14:04 +01:00
Anton Kaliaev
28e79a4d02 cmd: modify gen_node_key to print key to STDOUT (#5772)
closes: #5770
closes: #5769

also, include node ID in the output (#5769) and modify NodeKey to use
value semantics (it makes perfect sense for NodeKey to not be a
pointer).
2020-12-10 11:02:35 +04:00
Marko
bf35cc6443 cmd: add support for --key (#5612)
Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
2020-11-09 15:22:36 +01:00
Marko
d0db59e16c ci: add goreleaser (#5527)
Co-authored-by: Erik Grinaker <erik@interchain.berlin>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-10-27 13:54:53 +01:00
Anton Kaliaev
7121f68f25 light/rpc: fix ABCIQuery (#5375)
Closes #5106
2020-10-12 16:36:37 +04:00