Commit Graph

321 Commits

Author SHA1 Message Date
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
Alexander Bezobchuk 91ff9fa417
buildsystem: simplify Makefile and ci automation (#7189)
Move images into contrib/images/.

Replace "bad tag" cosmos-sdk/simapp with cosmos-sdk/simd-env.
'simapp' is a misnomer as the images serves only as host
environment for the binaries that are in fact built by the
developer on their machine.

Remove the build-docker-local-simapp target altogether
from the Makefile in favor of an inline conditional statement
that causes the image to be rebuilt if and only if it had not
been built before.

simd binary won't run as root anymore as root privileges
are dropped upon simd binary installation.

Co-authored-by: Marko Baricevic <marbar3778@yahoo.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-08-31 15:39:05 +02:00
atheeshp d02cd16219
Add swagger for gRPC REST (#7075)
* swagger gen command added

* proto file changed

* Add filter for swagger files

* Remove loop

* Add go-swagger installation

* Add swagger mixer command

* add swagger options

* remove files

* Fix swagger-combine

* Fix description

* remove unnecessary config option

* remove go-swagger dependency

* refactor

* Add proto-gen-swagger installation tool

* fix tool

* refactor

* don't push individual swagger files to repo

* refactor

* Fix doc

* move proto-swagger-gen to a separate target

* Fix permissions

* Add ibc swagger gen

* Update swagger generation doc

* cleanup

* gofmt

* refactor

* update Makefile

Co-authored-by: anilCSE <anil@vitwit.com>
Co-authored-by: Federico Kunze <federico.kunze94@gmail.com>
2020-08-28 18:49:08 +00:00
SaReN 831b3d0574
Fix liveness test (#7095)
Co-authored-by: Jonathan Gimeno <jgimeno@gmail.com>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-08-26 12:21:15 +02:00
Federico Kunze a6defabb3d
simulations: exit on fail and print error (#7127) 2020-08-21 09:04:33 +01:00
colin axnér be0cc63808
Migrate IBC tendermint header to proto (#7120)
* gen header proto file

* fix tm type to proto conversion issues

* fix tendermint type tests

* fix remaining tests

* fix lint

* Update x/ibc/07-tendermint/types/header.go

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>

* Update x/ibc/07-tendermint/types/header.go

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>

* apply @fedekunze review suggestions

* fix build

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-08-20 11:46:11 -04:00
Federico Kunze 81ec5668cc
fix proto tools (#7090)
* fix proto tools

* go get

* fix proto-tools

Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
Co-authored-by: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com>
2020-08-19 14:30:48 +00:00
Marko 8de96d16f9
tendermint: update to rc3 (#6892)
* modify light imports

* change abci.header to tmproto.header

* use rc

* rc

* fix import

* Merge PR #6893: fix key imports

* fix rc2

* tendermint: update 3 (#6899)

* tendermint: update 4 (#6919)

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

* tendermint: update 5 (#6923)

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>

* bump to latest master

* tendermint: update (#6972)

Co-authored-by: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com>
Co-authored-by: Cory Levinson <cjlevinson@gmail.com>

* Update x/ibc/07-tendermint/types/test_utils.go

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>

* address comment

* go mod

* bring back things

* fix test

* update tm proto files

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com>
Co-authored-by: Cory Levinson <cjlevinson@gmail.com>
Co-authored-by: Federico Kunze <federico.kunze94@gmail.com>
2020-08-14 13:58:53 -04:00
colin axnér 79cee06967
Migrate Tendermint client state to proto (#6932)
* add tm client state proto file

* migrate tm client state to proto

* bump ics23 dep

* add issue link to makefile
2020-08-04 16:31:50 +00:00
Aaron Craelius 7e2eea84c6
Fix the one remaining proto tx bug and flip the switch (#6902)
* Fix the one remaining proto tx bug and flip the switch

* Update github CI

* Wrap TxDecoder errors

* Add test

* Cleanup
2020-07-30 18:58:26 +00:00
Marko cf078c0c88
ci: push nightly builds (#6517) 2020-07-29 21:55:58 +02:00
Aaron Craelius 0a498d8c18
Add protobuf Tx unit tests (#6614)
* Enable proto tx by default and add test_amino build flag.

* Enable proto TxDecoder

* update makefile

* fix conflicts

* Revert AminoCodec change

* Make test-unit-amino default for now

* Make test-unit-amino default for now

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: sahith-narahari <sahithnarahari@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-23 17:31:42 +00:00
Alexander Bezobchuk 0ccc48d2a3
CLI/Tests: Remove Fixtures (#6799)
* remove fixtures

* setup tests

* update x/mint

* cli: update x/staking commands

* tests: convert x/staking CLI tests

* tests: fix x/auth CLI tests

* cli updates

* fix buiild

* fix build

* Update x/gov/client/cli/cli_test.go

Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>

* remove GenerateOrBroadcastTx

* move TestCLIQueryConn

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
2020-07-21 13:54:07 +00:00
Alessio Treglia 57ffe14631
Makefile: build simd with ledger support (#6629)
Makefile: parse COSMOS_BUILD_OPTIONS

Look for build options in the make's COSMOS_BUILD_OPTIONS
variable. This allows one to build simd with ledger support.

References:
* https://github.com/cosmos/gaia/pull/363
* https://github.com/tendermint/tendermint/pull/4738

fix tiny typo in nolint: statement that causes golangci-lint to
misbehave.
2020-07-07 19:10:11 +02:00
Alexander Bezobchuk 8670a10564
Merge PR #6595: Single Binary & Command Refactor 2020-07-07 11:40:46 -04:00
Alessio Treglia 80e53a4d89
buildsystem: various small improvements (#6598)
Follow-up of #6101.

- Makefile:

Set all as actual default target.

- contrib/devtools/Makefile:

The buf target was running unconditionally.

Install protoc-gen-gocosmos along with protoc.
2020-07-03 20:50:14 +02:00
Cory 4e73e0f817
Update proto files & definitions in accordance with ADR023 (#6413)
* consolidate proto files into single directory, turn on PACKAGE_DIRECTORY_MATCH linting

* add third_party root for third party proto files

* move ibc proto files to top level folder, rename .proto files to types.proto as before

* update protocgen script, and run code generation

* move vesting proto definition to cosmos namespace, rename from types.proto in alignment with buf.build naming conventions

* update Makefile so proto dependencies are set with new structure when updated

* add comment for sed usage in makefile

* remove unused aliases of proto generated types

* add settings.json instructions to contributing.md for including protobuf paths

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Aaron Craelius <aaron@regen.network>
2020-06-18 10:04:26 -07:00
Alexander Bezobchuk 6a05b83069
Merge PR #6426: Migrate API Server 2020-06-15 13:39:09 -04:00
Alexander Bezobchuk 7871910359
Simapp Localnet (#6421)
* Setup localnet

* Fix compose

* Fix file perms

* Fix build

* Codec + lint updates

* lint++
2020-06-12 16:23:08 +00:00
Alessio Treglia 65ea305336
x/auth: add sign-batch command (#6350)
The command processes list of transactions from file
(one StdTx each line), generate signed transactions
or signatures and print their JSON encoding, delimited
by '\n'. As the signatures are generated, the command
increments the sequence number automatically.

Author: @jgimeno
Reviewed-by: @alessio
2020-06-08 17:19:29 +02:00
Aaron Craelius 43947ca2ef
Add RegisterQueryService to AppModule (#6336)
* Add RegisterQueryService to AppModule

* Update CHANGELOG.md

* Update CHANGELOG.md

* Wire up BaseApp, fix tests

* Add mock test

* add missing file

* Update types/module/module.go

* Update CHANGELOG.md

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-06-06 07:59:57 +00:00
SaReN 39f53ac22f
client: rename CliContext to Context (#6290)
* Refactor CliContext as Context

* Fix lint issues

* Fix goimports

* Fix gov tests

* Resolved ci-lint issues

* Add changelog

* Rename cliCtx to clientCtx

* Fix mocks and routes

* Add changelog

* Update changelog

* Apply suggestions from code review

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

* merge client/rpc/ro{ot,utes}.go

* Update docs

* client/rpc: remove redundant client/rpc.RegisterRPCRoutes

* regenerate mocks

* Update ADRs

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-06-01 12:46:03 +00:00
Aaron Craelius 850419fffd
Tx CLI proto module interface (#5989)
* WIP

* WIP

* WIP on removing x/auth dependency from client/tx

* Revert unneeded changes

* Simplify cli tx UX

* Wire up bank tx REST routes

* Fix assignment issue

* Wire up bank NewSendTxCmd

* fix lint

* revert file

* revert file

* fix simcli

* Refactor AccountRetriever

* Fix build

* Fix build

* Fix build

* Fix integration tests

* Fix tests

* Docs, linting

* Linting

* WIP on all modules

* Implement other module new tx cmd's

* Fix cmd's

* Refactor existing GetTxCmd

* Fix cmd

* Removing deprecated code

* Update ADR 020 & CHANGELOG

* Lint

* Lint

* Lint

* Lint

* Lint

* Lint

* Lint

* Fix client/tx tests

* Fix mocks

* Fix tests

* Lint fixes

* REST tx migration

* Wire up REST

* Linting

* Update CHANGELOG, docs

* Fix tests

* lint

* Address review feedback

* Update CHANGELOG.md

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

* Update CHANGELOG.md

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

* group vars

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-05-21 21:29:34 +00:00
Aaron Craelius 70767c87c4
Update x/gov to use Any (#6147)
* Update x/gov to use Any

* Fixes

* Remove MsgSubmitProposalLegacy

* Update CHANGELOG.md

* Add RegisterInterfaces for x/distribution, x/params, & x/upgrade

* Fix query JSON issue

* Fix gov tests

* Revert custom Any Equals

* Re-remove types

* Rename receivers

* Fix imports in gov

* Sort imports

* Make amino JSON signing work with Any

* Run proto-gen

* Create full amino wrapper

* Fix errors

* Fixes

* Fix tests

* Test fixes

* Fix tests

* Linting

* Update ADR 019 and CHANGELOG

* Updated ADR 019

* Extract Marshal/UnmarshalProposal

* fix error

* lint

* linting

* linting

* Update client/keys/parse.go

Co-authored-by: Marko <marbar3778@yahoo.com>

* linting

* Update docs/architecture/adr-019-protobuf-state-encoding.md

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

* Update docs/architecture/adr-019-protobuf-state-encoding.md

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

* Address review feedback

* Add godocs

* Fix errors

* fix errors

* revert file

* Address review feedback

* Address review feedback

* Stacktrace debug flag

* Fix tests

* Address review feedback

Co-authored-by: sahith-narahari <sahithnarahari@gmail.com>
Co-authored-by: Marko <marbar3778@yahoo.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-05-19 20:17:29 +00:00
Aaron Craelius 386217209d
Merge PR #6076: Proto Any init + evidence 2020-05-05 10:28:20 -04:00