Commit Graph

135 Commits

Author SHA1 Message Date
M. J. Fromberger
f939f962b1 Remove master from versions and copy it from the latest. (#7980) 2022-02-23 13:58:33 -08:00
Callum Waters
e81b0e290e spec: merge spec repo into tendermint repo (#7804) 2022-02-17 13:02:48 +01:00
Callum Waters
7fb4e04b02 Merge branch 'master' of github.com:tendermint/spec into callum/merge-spec 2022-02-11 14:10:50 +01:00
Sam Kleinman
2c90a86a27 tests: reduce timeout to 4m from 8m (#7681) 2022-01-24 17:47:53 -05:00
M. J. Fromberger
aea428d322 build: Make sure to test packages with external tests (#7608)
The test filter was looking for "TestGoFiles", which does not include tests in
a separate package (e.g., "package foo_test" for "package foo").
This caused several packages not to be tested in CI, including:

  github.com/tendermint/tendermint/abci/client
  github.com/tendermint/tendermint/crypto
  github.com/tendermint/tendermint/crypto/tmhash
  github.com/tendermint/tendermint/internal/eventbus
  github.com/tendermint/tendermint/internal/evidence
  github.com/tendermint/tendermint/internal/inspect
  github.com/tendermint/tendermint/internal/jsontypes
  github.com/tendermint/tendermint/internal/libs/protoio
  github.com/tendermint/tendermint/internal/libs/sync
  github.com/tendermint/tendermint/internal/p2p/pex
  github.com/tendermint/tendermint/internal/pubsub
  github.com/tendermint/tendermint/internal/pubsub/query
  github.com/tendermint/tendermint/internal/pubsub/query/syntax
  github.com/tendermint/tendermint/internal/state/indexer
  github.com/tendermint/tendermint/internal/state/indexer/block/kv
  github.com/tendermint/tendermint/libs/json
  github.com/tendermint/tendermint/libs/log
  github.com/tendermint/tendermint/libs/os
  github.com/tendermint/tendermint/light
  github.com/tendermint/tendermint/light/provider/http
  github.com/tendermint/tendermint/privval/grpc
  github.com/tendermint/tendermint/proto/tendermint/blocksync
  github.com/tendermint/tendermint/proto/tendermint/consensus
  github.com/tendermint/tendermint/proto/tendermint/statesync
  github.com/tendermint/tendermint/rpc/client
  github.com/tendermint/tendermint/rpc/client/mock
  github.com/tendermint/tendermint/test/e2e/tests
  github.com/tendermint/tendermint/test/fuzz/mempool
  github.com/tendermint/tendermint/test/fuzz/p2p/secretconnection
  github.com/tendermint/tendermint/test/fuzz/rpc/jsonrpc/server

Updates #7626 and #7634.
2022-01-18 18:36:46 -08:00
M. J. Fromberger
8c52956007 Revert CI test timeout. (#7375)
I increased this while messing around with another PR, and
forgot to remove it before merging.
2021-12-03 14:13:24 +00:00
Sam Kleinman
b3be1d7d7a ci: move test execution to makefile (#7372) 2021-12-02 16:22:27 -05:00
M. J. Fromberger
26b887b883 build: update location of proto builder image (#7296)
Updates #7272.
2021-11-19 18:45:38 +00:00
M. J. Fromberger
be628fce3b build: Update the builder image location. (#364)
Point Makefile to ghcr.io instead of DockerHub.
2021-11-19 07:57:30 -08:00
William Banfield
1c34d17240 proto: rebuild the proto files from the spec repository (#7291)
* proto: rebuild the proto files from the spec repository

* remove proto checks
2021-11-17 00:06:19 +00:00
William Banfield
a00de7199f update proto generation and testing pipelines (#358)
This pull request aims to make it possible to generate, format, and lint the protos within this repo.
To accomplish that end, the Dockerfile containing common tools for building the tendermint protos has been moved into this repository and several accompanying changes were made to streamline the proto generation process.
2021-11-16 14:34:42 -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
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
M. J. Fromberger
6538776e6a build: Fix build-docker to include the full context. (#7114)
Fixes #7068. The build-docker rule relies on being able to run make
build-linux, but did not pull the Makefile into the build context.
There are various ways to fix this, but this was probably the smallest.
2021-10-12 22:29:06 +00:00
M. J. Fromberger
962caeae65 Make doc site index default to the latest release (#7023)
Fix the order of lines in docs/versions so that v0.34 is last (the current release).

Related changes:

- Update docs/DOCS_README.md to reflect the current state of how we publish the site.
- Fix the build-docs target in Makefile to not perturb the package-lock.json during the build.
- Fix the Makefile rule to not clobber package-lock.json.
2021-09-29 08:38:52 -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
William Banfield
0bf7813c4e fix makefile test target to rely on test makefile (#6746)
The Makefile at the root of the repo [includes](cd19ef244e/Makefile (L61)) the Makefile under the `test` package. This fix removes the target defined in the root Makefile in favor of the included one.
2021-07-20 18:00:51 +00:00
William Banfield
f70396c6fd add and run make target for generating existing mocks (#6732)
There are many `//go:generate mockery` lines in the source code.
This change adds a make target to invoke these mock generations.
This change also invokes the mock invocations and adds the resulting mocks to the repo.

Related to #5274
2021-07-18 00:46:04 +00:00
William Banfield
d882f31569 use tools.go pattern for managing linter (#6643) 2021-07-07 14:52:10 -04: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
Marko
2d57043aa4 tooling: remove tools/Makefile (#6102)
Co-authored-by: Tess Rinearson <tess.rinearson@gmail.com>
2021-02-12 09:34:33 +00:00
Erik Grinaker
ac49ea8bb7 Makefile: always pull image in proto-gen-docker. (#5953)
The `proto-gen-docker` target didn't pull an updated Docker image, and would use a local image if present which could be outdated and produce wrong results.
2021-01-23 16:46:53 +00:00
Marko
09cf0bcb01 privval: add grpc (#5725)
Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
2021-01-06 10:49:30 -08:00
Erik Grinaker
d8ae450784 Makefile: use git 2.20-compatible branch detection (#5778)
`Makefile` used `git branch --show-current` for branch detection. This option was introduced in Git 2.22. However, the current Debian release (Buster), which is used by the `golang:1.15` Docker image, uses Git 2.20. This gives spurious errors e.g. when running the E2E tests:

```
error: unknown option `show-current'
```

This PR changes the branch detection to be compatible with Git 2.20. The behavior appears to be the same as `git branch --show-current`, both when on a branch, on a tag, and on a detached HEAD.
2020-12-10 09:45:35 +00:00
Marko
8a80b97865 UX: version configuration (#5740)
## Description

- when not on a tag `tendermint version` will return "unreleased-`branchName`-`commitHash`"

Closes: #XXX
2020-12-03 15:18:08 +00:00
Marko
27e8cea9ce ci: remove circle (#5714)
* remove circle

* remove prefix
2020-11-24 19:11:40 +00: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
Marko
0e9798f39f ci: use gh pages (#5609) 2020-11-03 18:37:01 +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
Alessio Treglia
93b9bab932 simplified reproducible buildsystem (#5477) 2020-10-09 11:23:09 +02:00
Cyrus Goh
46252a9b69 docs: docs-staging → master (#5468)
## Description

- Makefile: branches and path prefixes from `versions` work on `docs-staging` https://github.com/tendermint/tendermint/pull/5467
- Expects to have:
   - https://docs.tendermint.com/master
   - https://docs.tendermint.com/v0.32
   - https://docs.tendermint.com/v0.33
2020-10-06 07:36:46 +00:00
Marko
0aecda68fc ux: use docker to format proto files (#5384)
## Description

Add a cmd to docker image and use it to format our proto files. This avoids developers the need to install clang-format

Closes: #XXX
2020-09-22 21:42:55 +00:00
Marko
cbe72db7be makefile: add options for other DBs (#5357)
## Description

This PR adds support for badgerdb, rocksdb and boltdb within the build options. 

RocksDB builds correctly.

```
 make build TENDERMINT_BUILD_OPTIONS=rocksdb    
CGO_ENABLED=1 go build -mod=readonly -ldflags "-X github.com/tendermint/tendermint/version.GitCommit=`git rev-parse --short=8 HEAD` -s -w " -trimpath -tags 'tendermint rocksdb' -o build/tendermint ./cmd/tendermint/

tendermint on  master [$!] via 🐹 v1.15.2 took 19s 
```

Closes: #5355
2020-09-15 08:27:14 +00:00
Marko
297573269a docs: versioned (#5241)
## Description

Version docs, unfortunately because there is no dropdown in the theme the way one could go see docs related to v0.32 is through `/master`

I am not the biggest fan of this approach but unfortunately it all we have until https://github.com/cosmos/vuepress-theme-cosmos/issues/91 is completed

Closes: #XXX
2020-08-24 14:57:15 +00:00
Marko
8ca24e2f5a ci: fix net pipeline (#5272) 2020-08-20 17:24:11 +02:00
Marko
022b255ed6 add build into make build-docker (#5253)
## Description

add make build-linux into `make build-docker` it is not documented that the cmd depends on the build folder so this aids in helping the user. 

Closes: #XXX
2020-08-17 13:59:57 +00:00
Anton Kaliaev
a14ff5cb30 rpc: refactor lib folder (#4836)
Closes https://github.com/tendermint/tendermint/issues/3857

Moves `lib/` folder to `jsonrpc/`.

Renames:

**packages**

`rpc` package -> `jsonrpc` package
`rpcclient` package -> `client` package
`rpcserver` package -> `server` package

**structs and interfaces**

```
JSONRPCClient to Client
JSONRPCRequestBatch to RequestBatch
JSONRPCCaller to Caller
```

**functions**

```
StartHTTPServer to Serve
StartHTTPAndTLSServer to ServeTLS

rpc/jsonrpc/client: rename NewURIClient to NewURI

NewJSONRPCClient to New
NewJSONRPCClientWithHTTPClient to NewWithHTTPClient
NewWSClient to NewWS
```

**misc**

- unexpose `ResponseWriterWrapper`
- remove unused http_params.go
2020-05-13 16:40:57 +04:00
Alessio Treglia
8c6d1e669f Makefile: parse TENDERMINT_BUILD_OPTIONS (#4738)
Reduce the number of targets and make the buildsystem more
flexible by parsing the TENDERMINT_BUILD_OPTIONS command
line variable (a-la Debian, inspired by dpkg-buildpackage's
DEB_BUILD_OPTIONS), e.g:

 $ make install TENDERMINT_BUILD_OPTIONS='cleveldb'

replaces the old:

 $ make install_c

Options can be mix&match'd, e.g.:

 $ make install TENDERMINT_BUILD_OPTIONS='cleveldb race nostrip'

Three options are available:
- nostrip: don't strip debugging symbols nor DWARF tables.
- cleveldb: use cleveldb as db backend instead of goleveldb;
  it switches on the CGO_ENABLED Go environment variale.
- race: pass -race to go build and enable data race detection.

This changeset is a port of gaia pull request: cosmos/gaia#363.
2020-04-25 20:16:58 +02:00
Marko
f5651d2b61 proto: use docker to generate stubs (#4615)
* proto: use docker to generate stubs

- provide an option to developers to use docker to generate proto stubs

closes #4579

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>
2020-03-30 16:48:48 +02:00
Marko
b14c0e579e tools: remove need to install buf (#4605)
* tools: remove need to install buf

- using buf docker image instead of needing devs to install it

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

* fix ci for lint and break checking
2020-03-27 06:47:39 +01: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
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
Erik Grinaker
5f5e0e1d02 makefile: place phony markers after targets (#4408)
The .PHONY targets in the Makefile are usually placed far away from the actual targets, and thus aren't always updated. Placing the .PHONY targets right next to the targets they cover make them more visible and thus more likely to be updated when necessary.
2020-02-14 14:41:18 +01:00
Marko
2b709e79e7 make: remove sentry setup cmds (#4383)
* make: remove sentry setup cmds

removal of make comands for sentry setup. it was unclear if they were being maintained and there has not been a mention of people using them

- closes #4379

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

* remove depreacted readme

* add not being maintained section to docs
2020-02-12 12:45:24 +01: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
Marko
9b9f1beef3 docs: update guides proto paths (#4365)
* update guides with correct path to libs/kv proto files

* Apply suggestions from code review

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

* format something to rerun ci

Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
2020-02-03 18:15:27 +01:00
Marko
6d91c1faf4 evidence: introduce time.Duration to evidence params (#4254)
* evidence: introduce time.Duration to evidence params

- add time.duration to evidence
- this pr is taking pr #2606 and updating it to use both time and height

- closes #2565

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

* fix testing and genesis cfg in signer harness

* remove debugging fmt

* change maxageheight to maxagenumblocks, rename other things to block instead of height

* further check of duration

* check duration to not send peers outdated evidence

* change some lines, onward and upward

* refactor evidence package

* add a changelog pending entry

* make mockbadevidence have time and use it

* add what could possibly be called a test case

* remove mockbadevidence and mockgoodevidence in favor of mockevidence

* add a comment for err that is returned

* add a changelog for removal of good & bad evidence

* add a test for adding evidence

* fix test

* add ev to types in testcase

* Update evidence/pool_test.go

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

* Update evidence/pool_test.go

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

* fix tests

* fix linting

Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
2020-01-08 10:46:37 +01:00
Marko
22280400a6 docs: link fixes in readme (#4268)
- fixed some links in the readme
- deleted some unused things from themakefile

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>
2019-12-21 20:48:34 +01:00
Marko
dfebac86f7 libs/common: refactor libs/common 01 (#4230)
* libs/common: Refactor libs/common 01

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

* regenerate proto files, move intslice to where its used

* update kv.KVPair(s) to kv.Pair(s)

* add changelog entry

* make intInSlice private
2019-12-10 12:40:01 +01:00
Anton Kaliaev
d7d61e9a6c tools.mk: install protoc
- works only for Linux / Mac 64bit
- you need to call it manually - make protoc
- on Mac, brew install protoc might be favorable
2019-11-22 12:59:08 +04:00