Commit Graph

173 Commits

Author SHA1 Message Date
M. J. Fromberger
cf337cc3f2 Add configuration updates for Tendermint v0.36. (#8310)
* v36: remove [fastsync] and [blocksync] config sections
* v36: remove [blocksync], consolidate rename
* v36: remove gRPC options from [rpc]
* v36: add top-level mode setting
* v36: remove deprecated per-node consensus timeouts
* v36: remove vestigial mempool.wal-dir setting
* v36: add queue-type setting
* v36: add p2p connection limits
* v36: add or update statsync.fetchers
* v36: add statesync.use-p2p setting
2022-04-11 14:49:17 -07:00
M. J. Fromberger
9ec30ecc0c Add configuration diff tool. (#8298)
* Add diff outputs as testdata.
* Normalize all samples to kebabs.
2022-04-11 12:41:27 -07:00
M. J. Fromberger
4743a7ad0d confix: clean up and document transformations (#8301)
Right now the confix tool works up to v0.35. This change is preparation for
extending the tool to handle additional changes in v0.36.

Mostly this is adding documentation. The one functional change is to fix the
name of the moved "fast-sync" parameter, which was renamed "enable".

- Document the origin of each transformation step.
- Update fast-sync target name.
2022-04-10 19:37:54 -07:00
M. J. Fromberger
322bb460dd keymigrate: fix decoding of block-hash row keys (#8294) 2022-04-09 07:20:08 -07:00
M. J. Fromberger
26b5672a54 Add a tool to update old config files to the latest version (#8281) 2022-04-08 19:40:03 -07:00
M. J. Fromberger
f3858e52de scmigrate: ensure target key is correctly renamed (#8276)
Prior to v0.35, the keys for seen-commit records included the applicable
height.  In v0.35 and beyond, we only keep the record for the latest height,
and its key does not include the height.

Update the seen-commit migration to ensure that the record we retain after
migration is correctly renamed to omit the height from its key.

Update the test cases to check for this condition after migrating.
2022-04-07 15:09:09 -07:00
Sam Kleinman
9e643f3628 migration: remove stale seen commits (#8205) 2022-03-29 12:31:37 -04:00
William Banfield
cc838a5a19 ABCI++: Update new protos to use enum instead of bool (#8158)
closes: #8039 

This pull request updates the new ABCI++ protos to use `enum`s in place of `bool`s. `enums` may be preferred over `bool` because an `enum` can be udpated to include new statuses in the future, whereas a `bool` cannot and is fixed as just `true` or `false` over the whole lifecycle of the API.
2022-03-21 16:57:34 +00:00
Thane Thomson
72bbe64da7 proto: update proto generation to use buf (#7975)
* Hard-code go_package option for .proto files

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Automatically relocate generated ABCI types after proto-gen

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Skip building gogoproto (i.e. only build our types)

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Remove unnecessary proto generation scripts

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Upgrade buf config from v1beta1 to v1

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Add simple proto generation script

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Replace buf-based protobuf generation with simple protoc-based approach

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Remove custom buf-based Docker image generation config and Dockerfile

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Adopt Cosmos SDK's approach to Protobuf linting and breakage checking in CI

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Suppress command echo when running proto checks

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Fix proto-check workflow YAML indentation

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Restore proto-format target

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Replace custom BASH script with make equivalent

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Remove proto linting/breaking changes CI checks after discussion today

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Remove dangling reference to CI workflow that no longer exists

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Update contributing guidelines relating to protos

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Use buf instead for generating protos

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Remove unused buf config for gogoprotobuf

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Add reminder for if we migrate fully to buf

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Restore protopackage script for #8065

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Fix permissions on protopackage script

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Update contributing guidelines to show building of protos using buf

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Fix breaking changes check and add disclaimer

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Expand on contributing guidelines for clarity

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Re-remove old proto workflows

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Add buf-based proto linting workflow in CI

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Superficially reorder proto targets

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Fix proto lints

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Fix GA workflow YAML indentation

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Temporarily use forked version of mlc

Use forked version of markdown-link-check until
https://github.com/gaurav-nelson/github-action-markdown-link-check/pull/126
lands.

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Temporarily disable markdown link checker

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Remove gogo protos - superseded by version from buf registry

Signed-off-by: Thane Thomson <connect@thanethomson.com>
2022-03-11 14:10:46 -05:00
William Banfield
9accc1a531 abci++ tooling: proto synchronization (#8065)
This PR implements a hack. It does effectively 2 things:
1. It checks in a set of protos, suffixed with `.intermediate` that allow the abci proto generation to proceed.
2. Adds a script / makefile to enable the generation. 

The script is pretty simple. It copies over the 'intermediate' files over to be the `.proto` files for the `abci/types.proto` file and the `types/types.proto` files, generates all the protos, and then reverts all of the changes made to the `*.proto` files and the `*.pb.go` files, except for the single abci file. 

If this is too ugly, I'm happy to tweak it, but my goal here is to have some working version of the protos that currently build the abci code so that we can coordinate changes to the code and not have them all sit in different branches that make breaking changes across each other.

The end goal is to have the `.intermediate` files disappear completely, since they should be moving towards containing everything that the `.proto` files contain.
2022-03-04 20:09:49 +00:00
M. J. Fromberger
cd0472014a Add command-line tool to manually subscribe to an event stream. (#8015)
This tool is an aid to debugging, and demonstrates the API of the eventstream
helper package. It subscribes to the event stream of a running node with the
ADR 075 event log enabled, and writes matching events to stdout as JSON.
2022-02-25 13:23:39 -08:00
M. J. Fromberger
bd6fce13ae Update release instructions for documentation. (#7846)
* Add linkpatch tool to rewrite documentation URLs.
* Update instructions for creating backport branches.

Updates #7675.
2022-02-21 07:26:48 -08:00
M. J. Fromberger
7878ca6a8a Delete the custom libs/json (tmjson) package. (#7673)
There are no further uses of this package anywhere in Tendermint.
All the uses in the Cosmos SDK are for types that now work correctly with the
standard encoding/json package.
2022-01-24 08:15:34 -08:00
Sam Kleinman
3c8955e4b8 errors: formating cleanup (#7507) 2022-01-04 16:11:28 -05:00
William Banfield
d5df412b26 proto: update the mechanism for generating protos from spec repo (#7269)
This pull request updates the `protocgen.sh` script to insert the `go_package` option to all of the downloaded proto files. A related pull request into the spec repo removes this options from the .proto files: https://github.com/tendermint/spec/pull/358

This pull requests, along with the related spec PR, aim to move the creation of the `tendermintdev/docker-build-proto` container into the spec repo. This change also relies on several fixes to that container that are made in the PR into the spec repo.
2021-11-15 20:06:15 +00:00
Callum Waters
68ca65f5d7 pex: remove legacy proto messages (#7147)
This PR implements the proto changes made in https://github.com/tendermint/spec/pull/352, removing the legacy messages that were used in the pex reactor.
2021-10-22 12:07:46 +00:00
Marko
19ec4a5322 tools: clone proto files from spec (#6976)
## Description

clone proto files from spec in order to have them in a single location

closes https://github.com/tendermint/spec/issues/343
2021-10-18 08:22:02 +00:00
M. J. Fromberger
006e6108a1 Fix the protobuf generation script. (#7127)
This should have been part of #7121, but I missed it.
2021-10-15 12:18:53 +00:00
William Banfield
c201e3b54d scripts: fix authors script to take a ref (#7051)
This script is referenced from the release documentation, we should make sure it's functional. This is helpful in generating the "Special Thanks" section of the changelog.
2021-10-04 19:47:50 +00: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
William Banfield
4e96c6b234 tools: add mockery to tools.go and remove mockery version strings (#6787)
This change aims to keep versions of mockery consistent across developer laptops.

This change adds mockery to the `tools.go` file so that its version can be managed consistently in the `go.mod` file.

Additionally, this change temporarily disables adding mockery's version number to generated files. There is an outstanding issue against the mockery project related to the version string behavior when running from `go get`. I have created a pull request to fix this issue in the mockery project.
see: https://github.com/vektra/mockery/issues/397
2021-07-30 20:47:15 +00:00
Marko
96863decca deps: remove pkg errors (#6666)
## Description

remove pkg/errors since we use the provided fmt.Errorf
2021-07-07 11:39:19 +00:00
Sam Kleinman
a855f96946 p2p: renames for reactors and routing layer internal moves (#6547) 2021-06-08 08:17:09 -04:00
Sam Kleinman
0c2c0afaf8 db: migration script for key format change (#6355) 2021-04-16 11:53:43 -04:00
Tess Rinearson
f97a498cee scripts: make linkifier default to 'pull' rather than 'issue' (#5689) 2020-11-19 14:23:08 +01:00
Marko
39e81807a3 buf: modify buf.yml, add buf generate (#5653) 2020-11-17 10:30:35 +01:00
Marko
95cff1efb4 proto: buf for everything (#5650)
## Description

- remove installation of protoc
- use buf protoc to generate proto stubs

prior to approving could someone test locally. I restarted my docker instance and its been stuck for 20+ minutes

Closes: #XXX
2020-11-12 11:15:18 +00:00
Tess Rinearson
8ae5c60637 scripts: move build.sh into scripts 2020-11-06 01:02:52 +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
Marko
346aa14db5 fix lint failures with 1.31 (#5489) 2020-10-13 10:22:53 +02:00
Erik Grinaker
b894f07380 test: remove P2P tests (#5453) 2020-10-05 17:52:01 +02:00
Erik Grinaker
a6b22cfa97 circleci: remove Gitian reproducible_builds job (#5462) 2020-10-05 17:16:05 +02:00
Marko
42e4e8b58e lint: add markdown linter (#5254) 2020-08-17 16:40:50 +02:00
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.
2020-07-08 15:47:01 +00:00
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
2020-07-01 15:13:11 +00:00
Cyrus Goh
5d4eee2eea docs: update .vuepress/config.js (#5043)
## Description

![image](https://user-images.githubusercontent.com/1021101/86193320-7aa13200-bb00-11ea-95ac-aa6468ab7f46.png)


### Next steps:
- [x] bump vuepress-theme-cosmos version
- [x] tweak config.js
- [x] update color variables
- [x] sh, shell → bash for syntax highlighting
2020-07-01 06:43:35 +00:00
Marko
73e22a3c5a abci: proto files follow same path (#5039)
## Description

have the defined abci proto types follow the same directory structure as in abci folder.

Closes: #XXX
2020-06-23 05:38:50 +00:00
Marko
dedf0d2350 proto: folder structure adhere to buf (#5025) 2020-06-22 10:00:51 +02:00
Marko
a12bfca93d proto: move all proto dirs to /proto (#5012)
## Description

This PR moves all proto files under one dir (`/proto`). The script to generate adding functionality to copy the files that still need to be in the same place. (abci & rpc)

renames every proto package from `tendermint.proto.<pkg_name>` to `tendermint.<pkg_name>`

Removes unneeded types in privval proto directory

Closes: #XXX
2020-06-16 14:41:36 +00:00
Ismail Khoffi
4774a8ec61 non breaking signbytes (#5008)
* test-vectors for backwards compatibility:

 - copy & paste test-vectors from v0.33.5 to ensure
 backwards compatibility for vote's SignBytes

* WIP: everything besides time seems to match :-/

* almost

* Found the culprit: field nums weren't consecutive ints ...

* fix order of partset header too

* this last votes-related test can easily be fixed

* some minor changes and fix last failing test

* move proto types back to stdtime, fix various linting

* use libs/protoio

* remvoe commented code

* add comments

* fix tests

* uncomment testscases

* dont ignore error panic

* fix signable test

* fix happy path testing

* fix comment

Co-authored-by: Marko Baricevic <marbar3778@yahoo.com>
2020-06-15 21:54:58 +02:00
Anton Kaliaev
a8d8600308 [block#LastResultsHash] add Events + GasWanted/Used (#4845)
Closes #1007
2020-06-12 12:49:14 +04:00
Erik Grinaker
db8f1b3df3 migrate all JSON to new JSON encoder (#4975)
Uses new JSON encoder in #4955 for all JSON. Branched off of #4968.
2020-06-08 12:22:59 +00:00
Marko
b4aca980e9 proto: change to use gogofaster (#4957) 2020-06-05 14:18:44 +02:00
Marko
a88537bb88 ints: stricter numbers (#4939) 2020-06-04 16:34:56 +02:00
Marko
cf4e056a33 abci: remove python examples
## Description

remove unused and unmaintained python examples of abci

Closes: #XXX
2020-05-12 09:52:04 +00:00
Anton Kaliaev
f31f4327b5 privval: remove deprecated OldFilePV
The old format was deprecated in v0.28. It's time we remove it.
2020-04-28 08:51:51 +00:00
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
2020-03-23 09:19:26 +01:00
Marko
48f073d796 privval: return error on getpubkey (#4534)
closes #3602

Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
2020-03-12 11:10:36 +04:00
mergify[bot]
4c8e3c8145 fix: proto-breakage (#4506)
* fix: fix proto-breakage

- this is amed to fix proto breakage for consumers

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>

* fix for importing third_party everywhere

* undo change

* test breakage change

* test ssh

* test https

* change ssh to https

* fix phony
2020-03-05 08:41:36 +00:00
Marko
31fd99a91a proto: add buf and protogen script (#4369)
* proto: add buf and protogen script

- add buf with minimal changes
- add protogen script to easier generate proto files

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>

* add protoc needs

* add some needed shell cmds

* remove buf from tools as it is not needed everytime

* add proto lint and breakage to ci

* add section in changelog and upgrading files

* address pr comments

* remove space in circle config

* remove spaces in makefile comment

* add section on contributing on how to work with proto

* bump buf to 0.7

* test bufbuild image

* test install make in bufbuild image

* revert to tendermintdev image

* Update Makefile

Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com>

Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
2020-02-11 10:31:15 +01:00