Commit Graph

345 Commits

Author SHA1 Message Date
Aleksandr Bezobchuk ffef0ba417
chore: v0.45.x bump min go version to 1.17 (#11686) 2022-04-19 14:01:10 -04:00
mergify[bot] a4644a3797
fix: cgosecp256k1 verification (backport #11298) (#11360)
* fix: cgosecp256k1 verification (#11298)

## Description

Closes: #10747

- update secp256k1 cgo fork,
- debug verify bytes

```
benchmark                     old ns/op     new ns/op     delta
BenchmarkKeyGeneration-10     407           413           +1.35%
BenchmarkSigning-10           95099         36754         -61.35%
BenchmarkVerification-10      215551        48053         -77.71%

benchmark                     old allocs     new allocs     delta
BenchmarkKeyGeneration-10     2              2              +0.00%
BenchmarkSigning-10           83             4              -95.18%
BenchmarkVerification-10      74             1              -98.65%

benchmark                     old bytes     new bytes     delta
BenchmarkKeyGeneration-10     96            96            +0.00%
BenchmarkSigning-10           5283          196           -96.29%
BenchmarkVerification-10      3537          32            -99.10%
```

---

### Author Checklist

*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*

I have...

- [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] added `!` to the type prefix if API or client breaking change
- [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] provided a link to the relevant issue or specification
- [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules)
- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing)
- [ ] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [ ] updated the relevant documentation or specification
- [ ] reviewed "Files changed" and left comments if necessary
- [ ] confirmed all CI checks have passed

### Reviewers Checklist

*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*

I have...

- [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)

(cherry picked from commit 361c837e52)

# Conflicts:
#	CHANGELOG.md
#	crypto/keys/secp256k1/internal/secp256k1/README.md

* fix conflicts

Co-authored-by: Marko <marbar3778@yahoo.com>
2022-03-11 12:09:50 +01:00
mergify[bot] 3ae5e0c38a
build: fix build environment for the liveness test (backport #10551) (#10552)
* build: fix build environment for the liveness test (#10551)

Extracted from #10210.

Make the test more reproducible, so that it does not require coordination
between the build container and the run container.

- Use layers to more advantage.
- Include bash in the run container.
- Put writable output onto a volume.

(cherry picked from commit 70a3a90f68)

# Conflicts:
#	Makefile

* fix conflict

Co-authored-by: M. J. Fromberger <michael.j.fromberger@gmail.com>
Co-authored-by: Robert Zaremba <robert@zaremba.ch>
2021-11-15 23:45:29 +01:00
Robert Zaremba 3ee70996bf
fix(CI): add golangci-lint to dependencies (#10112) (#10172)
* fix(CI): add golangci-lint to dependencies (#10112)

* fix(CI): add golangci-lint to dependencies

* update github workflow

* tidy go.mod

* add missing entries to go.mod

* update deps

* add missing run command

* remove golint and use revive instead

* fix workflow setup

* lint only changed files

* gofmt go tags

* update comments

* make lint-go

Co-authored-by: Marko <marbar3778@yahoo.com>
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

* Update .golangci.yml

* Update .golangci.yml

* fix go.mod

Co-authored-by: Marko <marbar3778@yahoo.com>
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2021-09-17 00:34:36 +02:00
mergify[bot] 370134ce01
fix(build): set a right version for the app (backport #9965) (#9967)
* fix(build): set a right version for the app (#9965)

<!--
The default pull request template is for types feat, fix, or refactor.
For other templates, add one of the following parameters to the url:
- template=docs.md
- template=other.md
-->

## Description

Closes: #9964

+ Fixing `app version` command
+ fixing format issue in the Makefile.

---

### Author Checklist

*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*

I have...

- [x] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [x] added `!` to the type prefix if API or client breaking change
- [x] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting))
- [x] provided a link to the relevant issue or specification
- [x] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules)
- [x] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing)
- [x] added a changelog entry to `CHANGELOG.md`
- [x] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [x] updated the relevant documentation or specification
- [x] reviewed "Files changed" and left comments if necessary
- [x] confirmed all CI checks have passed

### Reviewers Checklist

*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*

I have...

- [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)

(cherry picked from commit 0b3112f3b4)

# Conflicts:
#	CHANGELOG.md
#	Makefile

* fix merge conflict

* linter

* Update Makefile

Co-authored-by: Robert Zaremba <robert@zaremba.ch>
2021-08-19 00:02:43 +02:00
Robert Zaremba a55b6ed9be
fix: make proto-format (#9470) 2021-06-07 14:45:55 +00:00
Ryan Christoffersen cb66c99eab
chore: add markdownlint to lint commands (#9353)
* add markdownlint config

* update make lint commands

* update markdownlint config

* run make lint-fix

* fix empty link

* resuse docker container

* run lint-fix

* do not echo commands

Co-authored-by: ryanchrypto <12519942+ryanchrypto@users.noreply.github.com>
2021-05-27 15:31:04 +00:00
Robert Zaremba 8c1fe4b166
test: fix mockgen version (#9127)
* setup: update mockgen

* Add expect ConsensusVersion in app_test

* fix ChainAnteDecorators tests

* remove types/handler.go from autogenerating mocks

* adding a note

* adding note

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Marko <marbar3778@yahoo.com>
2021-05-25 09:18:59 +00:00
Robert Zaremba 3e4d81c3d3
Fix proto format (#9279)
* makefile: fix proto-format

* reformat all proto files

* regenerating proto

* remove dangling semicolon
2021-05-07 21:33:17 +00:00
Robert Zaremba 71b7fb829e
setup: reuses proto container (#9192)
* setup: reuses proto container

* push docker image

* set image name

* revert and use latest

Co-authored-by: marbar3778 <marbar3778@yahoo.com>
Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
2021-04-26 11:15:46 +00:00
Hanjun Kim 9b41ba7fb5
Use Docker to generate swagger files (#9064)
* use docker for proto-swagger-gen

fixes #7933

* fix deprecated commands and flags

see https://docs.buf.build/faq/ for detail

* run proto-gen and proto-swagger-gen

* add changelog entry
2021-04-07 10:31:39 +00:00
Jonathan Gimeno 09f9a5573e
fix make protoc error (#8799) 2021-03-05 15:23:01 +00:00
Robert Zaremba 32f454aa10
Makefile: fix build_tags update (#8725)
Previously, we set build_tags before updating the options for DB backend.
This does't work with BadgerDB - it BUILD_TAGS which must be included in build_tags.

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-03-01 08:31:09 +00:00
Marko 2c18d8a28b
add tm version to makefile (#8689) 2021-02-24 19:43:12 +00:00
Riccardo Montagnin e2f510afcc
Compatibility with the ARM architecture (#8396)
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Jonathan Gimeno <jgimeno@gmail.com>
2021-01-27 11:07:45 +00:00
SaReN 57f5e96570
Rosetta API implementation (#7695)
Ref: #7492

Co-authored-by: Jonathan Gimeno <jgimeno@gmail.com>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Frojdi Dymylja <33157909+fdymylja@users.noreply.github.com>
Co-authored-by: Robert Zaremba <robert@zaremba.ch>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2021-01-21 09:33:02 +00:00
Marko df7f0b2741
docs: deploy to github pages (#8321) 2021-01-13 18:41:50 +01:00
Anil Kumar Kammari 6a9b0caa57
Add grpc gateway missing endpoints to swagger docs (#8232)
* Add missing endpoints

* Fix swagger gen

* update

* Update static.go

* Fix format

* Fix tests
2021-01-01 13:45:09 -03:00
MD Aleem b6c8d5ea9f
Add tx broadcast gRPC endpoint (#7852)
* WIP tx/broadcast grpc endpoint

* fix lint

* fix proto lint

* Update service.proto

* resolve conflicts

* update service.proto

* Update service.proto

* review changes

* proto lint

* Switch to txraw

* Add check breaking at the end

* Fix broadcast

* Send Msg on SetupSuite

* Remove proto-check-breaking

* 1 validator in test

* Add grpc server tests for broadcast

* Fix grpc server tests

* Add some changes

* Add ress comments

* Add table tests for tx service

* Add test for mode

* Add simulate tests

* Add build flag back

* Revert custom stringer for enum

* Remove stray logs

* Use /txs/{hash}

Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
2020-12-02 17:50:40 +00:00
MD Aleem c58a8923a0
gRPC-gateway routes as alternative to legacy tendermint REST endpoints (#7965)
* WIP

* WIP setup

* WIP setup testsuite

* add node_info

* add GetLatestBlock,GetBlockByHeight grpc endpoints

* add GetValidatorSetByHeight, GetLatestValidatorSet

* fix lint

* fix tests

* proto format

* Update Makefile

* review changes

* Makefile format

* handle nil pagination

* rename query.go to service.go

* format Makefile

* format Makefile

* review changes

* review changes

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-11-25 15:58:11 +00:00
Alessio Treglia 9c47612b5d
Makefile: use docker run --rm whenever possible (#8026)
Remove terminated containers once their execution
has finished. This saves the users a bit of disk
space.

Closes: #8023
2020-11-25 11:23:37 +00:00
Amaury a8ef4a380d
All Makefile proto commands use Docker (#7931)
* Update tooling around docker

* Run commands

* Remove swagger gen for now

* Update proto-gen-any

* Fix indentn

* Use CURDIR

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-11-13 16:36:58 +00:00
Marko 104a2031ab
docker: proto (#7893)
* migrate fully to buf

* run protoc-gen-cosmos in script

* migrate to docker container

* Update Makefile

Co-authored-by: Alessio Treglia <alessio@tendermint.com>

* Update scripts/protocgen.sh

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
2020-11-12 09:49:46 +00:00
Cory 56c08d1117
Bump to tendermint v0.34-rc6 (#7828)
* bump to tendermint v0.34-rc6

* update go.mod

* tendermint version is now accessible as tmversion.TMCoreSemVer

* add changelog entry

Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
2020-11-06 10:13:52 +00:00
Akhil Kumar P 8014fc688e
Fix clang-format to specific version (#7350)
* Update clang-format install script

* Address PR comments

* Update clang-format install command

* Format makefile

* Use docker for formatting proto

* Comment out delimiter config

* Update contributing.md and .clang-format

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Marko <marbar3778@yahoo.com>
2020-10-27 10:04:34 +00:00
Alessio Treglia bd3a29bdc1
fix check-test-* targets (#7675)
Closes: #7673
2020-10-26 15:08:13 +00:00
Robert Zaremba 55d7d0c9d1
tests: add command to compile all test files (#7364)
* tests: add command to compile all test files

test-build-check will compile and use go cache mechanism to
check if ALL files compiles without running any test.

ref: 7362

* update comment

* makefile: remove update-swagger-docs

* Makefile: redoing the test check command

* Update Makefile

* Update Makefile

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-10-21 20:51:15 +00:00
Cory 505d424a3b
[IAVL]: Bump to v0.15.0-rc4 (#7549)
* iavl 0.15.0-rc4 version bump

* update comments on error modes for store.LoadStore

* update CONFIO_URL in makefile

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-10-19 18:38:17 +00:00
Alessio Treglia 06c068713d
Makefile: fix db-specific ldflags (#7554)
Closes: #7534
2020-10-17 12:09:06 +01:00
Marko 2323f1ac0e
tendermint: update sdk to rc5 (#7527)
* update sdk to rc5

* Update baseapp/params.go

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
2020-10-14 06:20:52 +00:00
Alessio Treglia 1832ab2c92
Makefile: s/TENDERMINT/COSMOS/ (#7486) 2020-10-08 15:32:18 +01:00
Alessio Treglia 1671c87b0a
Remove reproducible builder image (#7484)
The image has been moved to gh/tendemrint/images.
2020-10-08 15:00:34 +01:00
Cyrus Goh ee80f10cc6
docs: docs-staging → master (#7446)
* Fix package-lock

* Fix package-lock

* update package-lock

* bump docs theme to 1.0.171

* Fix typo, chinese character in URL
* update dead doc links

* bump docs theme to 1.0.172

* [favicons] add favicons

* makefile: change build-docs target for shells other than bash

Co-authored-by: Denis Fadeev <denis@fadeev.org>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: vms <vince19972@gmail.com>
Co-authored-by: Helder Moreira <helder@tendermint.com>
Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-10-05 13:38:38 +00:00
Alessio Treglia 6c1c2cce04
Makefile: simplify and clean-up (#7453)
The simd target is removed in favor of build/install targets:

- build runs go build ./... with all appropriate flags and args.
- install runs go install ./... with all approriate flags and args.

localnet-start now depends on build-linux [1].

[1] This should hopefully put a smile on @alexanderbez's face!

Remove unused install scripts and snapcraft build files.
2020-10-05 10:22:18 +02:00
Cory 1e95292e0d
fix comment bug in make build-docs (#7420) 2020-09-30 19:18:19 +00:00
Cory a2c67450ec
Add versioned docs to build-docs task (#7413)
* add launchpad & master versioned doc-builds

* Update Makefile

Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
2020-09-30 16:12:57 +00:00
Alessio Treglia 04ff40a8df
types: start grouping tests in test suites (#7395)
Ref #7362
2020-09-27 23:51:14 +02:00
Alessio Treglia 0ddb2bd74f
Makefile: enable alt dbs conditional compilation (#7396)
Co-authored-by: Marko <marbar3778@yahoo.com>
2020-09-25 16:29:29 +01:00
Marko fc66cf79d8
fix dockerfile (#7393) 2020-09-25 16:07:05 +02:00
Robert Zaremba f52cce2909
Makefile: drop gofmt in favor of golangci-lint (#7260)
* setup: update linter make jobs

* go lint: remove wsl from golangci-lint config

* rollback to use disable-all

* bring back vendor rules

* lint fails on golangci-lint error

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-09-23 15:29:21 +00:00
Anil Kumar Kammari a722933ade
Fix sawgger gen output dir (#7374)
* Fix sawgger gen output dir

* Fix lint

* Update make clean

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-09-23 14:16:47 +00:00
Anil Kumar Kammari ca7b31dd5d
Register swagger API (#7246)
* init

* Fix statik gen

* Fix swagger

* Change swagger url

* Fix swagger serve

* remove ibc swagger from legacy docs

* Add old routes config

* Move swagger api to app.go

* add godoc

* Fix inputs

* Fix swagger dir

* Fix statik

* refactor

* fmt

* fix doc

* Fix swagger config check
2020-09-19 00:34:56 +00:00
Alessio Treglia 36d30f9e83
reintroduce rule to cross-build a linux binary (#7334)
closes: #7333
2020-09-17 10:08:20 +01:00
Alessio Treglia 7ada179aef
enable -race on go test (#7305)
Introduce 'norace' build tag that is used to
filter out test files containing test cases
or test suites that, if run with the -race
flag on would cause race conditions.

Supersede #7300.
2020-09-15 10:43:46 +01:00
Alessio Treglia f640ad6cea
Makefile: reorganise test rules (#7290)
Adding a new test suite is now as easy as write a oneliner.

Format test output with tparse if available:
 go get github.com/mfridman/tparse

Ref #7287
2020-09-14 13:00:33 +01:00
Alessio Treglia 606956b668
Reproducible buildsystem (#7247)
Provide a simple Docker-based mechanism for application
developers to provide reproducible builds. Unlike gaia's
current reproducible buildsystem, this does not depend on
external tools, e.g. `gitian-builder`.

`build-simd-linux` now builds `simd` in a deterministic
Linux container.
2020-09-13 20:55:35 +01:00
Alessio Treglia 32eccde501
cosmovisor: various small improvements (#7275)
{,cosmosvisor/}Makefile: Add Makefile to cosmovisor/
subdirectory and integrate build target into the
top-directory Makefile.

cosmovisor/:

Create Golang-idiomatic cmd/ subdirectory to make
`cosmosvisor` binary (instead of a binary named `cmd`)
automatically installable with `go get`.

Minor changes to error handling:

- Plain error strings bring more value than the whole
  stacktrace in case of dumb configuration errors.

- Output errors to /dev/stderr instead of /dev/stdout.

Remove dependency on github.com/pkg/errors.
2020-09-11 10:42:11 +01:00
Robert Zaremba 93dd06ad4c
Makefile: use go install in the build target (#7248)
go install also caches dependency packages and
it's faster than go build.

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-09-09 12:31:39 +01:00
Anil Kumar Kammari a9547b54ff
Add proto formatting tool (#7266)
* Add proto format option

* Add clang format options

* Fix proto format

* Fix fmt

* Fix SpacesInSquareBrackets to match with SpacesInSquareBrackets setting
2020-09-08 22:06:54 +00:00
Robert Zaremba 9856327d95
Merge PR #7251: Cleanup of evidence types 2020-09-08 09:33:53 -07:00