Commit Graph

76 Commits

Author SHA1 Message Date
mergify[bot] f2d94445c0
feat: add query.GenericFilteredPaginated (backport #12253) (#12371) 2022-06-28 12:42:01 -04:00
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] 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
mergify[bot] 8a9589a8de
style: lint go and markdown (backport #10060) (#10473)
* style: lint go and markdown (#10060)

## Description

+ fixing `x/bank/migrations/v44.migrateDenomMetadata` - we could potentially put a wrong data in a new key if the old keys have variable length.
+ linting the code

Putting in the same PR because i found the issue when running a linter.

Depends on: #10112

---

### 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))
- [ ] 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)
- [ ] 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 479485f95d)

# Conflicts:
#	CODING_GUIDELINES.md
#	CONTRIBUTING.md
#	STABLE_RELEASES.md
#	contrib/rosetta/README.md
#	cosmovisor/README.md
#	crypto/keyring/keyring.go
#	db/README.md
#	docs/404.md
#	docs/DOCS_README.md
#	docs/architecture/adr-038-state-listening.md
#	docs/architecture/adr-040-storage-and-smt-state-commitments.md
#	docs/architecture/adr-043-nft-module.md
#	docs/architecture/adr-044-protobuf-updates-guidelines.md
#	docs/architecture/adr-046-module-params.md
#	docs/migrations/pre-upgrade.md
#	docs/migrations/rest.md
#	docs/ru/README.md
#	docs/run-node/rosetta.md
#	docs/run-node/run-node.md
#	docs/run-node/run-testnet.md
#	go.mod
#	scripts/module-tests.sh
#	snapshots/README.md
#	store/streaming/README.md
#	store/streaming/file/README.md
#	store/v2/flat/store.go
#	store/v2/smt/store.go
#	x/auth/ante/sigverify.go
#	x/auth/middleware/basic.go
#	x/auth/spec/01_concepts.md
#	x/auth/spec/05_vesting.md
#	x/auth/spec/07_client.md
#	x/authz/spec/05_client.md
#	x/bank/spec/README.md
#	x/crisis/spec/05_client.md
#	x/distribution/spec/README.md
#	x/epoching/keeper/keeper.go
#	x/epoching/spec/03_to_improve.md
#	x/evidence/spec/07_client.md
#	x/feegrant/spec/README.md
#	x/gov/spec/01_concepts.md
#	x/gov/spec/07_client.md
#	x/group/internal/orm/spec/01_table.md
#	x/mint/spec/06_client.md
#	x/slashing/spec/09_client.md
#	x/slashing/spec/README.md
#	x/staking/spec/09_client.md
#	x/upgrade/spec/04_client.md

* fix conflicts

* remove unnecessary files

Co-authored-by: Robert Zaremba <robert@zaremba.ch>
2021-11-11 21:29:29 +01:00
Andrei Ivasko 3fd376bd56
feat: Non-zero Default Fees (#9371)
<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺
v                               ✰  Thanks for creating a PR! ✰
v    Before smashing the submit button please review the checkboxes.
v    If a checkbox is n/a - please still include it but + a little note why
☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >  -->

## Description

<!-- Add a description of the changes that this PR introduces and the files that
are the most critical to review.
-->

closes: #9106

---

Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

- [x] Targeted PR against correct branch (see [CONTRIBUTING.md](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md).
- [ ] Wrote unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing)
- [ ] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`)
- [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code).
- [ ] Added a relevant changelog entry to the `Unreleased` section in `CHANGELOG.md`
- [ ] Re-reviewed `Files changed` in the Github PR explorer
- [ ] Review `Codecov Report` in the comment section below once CI passes
2021-06-25 10:41:32 +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
Riccardo Montagnin 44a41383f4
Fix the liveliness test Docker error (#9396) 2021-05-26 13:55:24 +00:00
Andrea Giacobino 25ecec6c15
rosetta: upgrade to newest version (#9314)
* feat:  update rosetta sdk to v0.6.10 

embed from v1.0.0 release branch of the library: https://github.com/tendermint/cosmos-rosetta-gateway/tree/release/v1.0.0

closes:
https://github.com/cosmos/cosmos-sdk/issues/9300

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2021-05-15 00:18:59 +02:00
Amaury dfe3e7a8d7
Remove ServiceMsgs from ADR-031 (#9139)
* wip

* wip

* wip

* wip on refactoring adr 031 type URLs

* Fix msg_service_router

* Fix gov client queries

* Fix some modules tests

* Remove all instances of "*.Msg/*"

* Uncomment code

* Remove commented code

* // simulation.NewWeightedOperation(

* Fix CopyTx

* Fix more tests

* Fix x/gov test

* proto.MessageName->sdk.MsgName

* Fix authz tests

* Use MsgRoute in feegrant and staking/authz

* Fix more tests

* Fix sims?

* Add norace tag

* Add CL

* rebuild rosetta api test data

* Update ADR

* Rename MsgRoute -> MsgTypeURL

* Fix codec registration

* Remove sdk.GetLegacySignBytes

* Update types/tx_msg.go

* Update x/authz/simulation/operations.go

* Move LegacyMsg to legacytx

* Update CHANGELOG.md

Co-authored-by: Aaron Craelius <aaron@regen.network>

* Remove NewAnyWithCustomTypeURL

* Keep support for ServiceMsgs

* Fix TxBody UnpackInterfaces

* Fix test

* Address review

* Remove support for ServiceMsg typeURLs

* Fix lint

* Update changelog

* Fix tests

* Use sdk.MsgTypeURL everywhere

* Fix tests

* Fix rosetta, run make rosetta-data

* Fix rosetta thanks to froydi

* Address reviews

* Fix test

* Remove stray log

* Update CL

Co-authored-by: Aaron Craelius <aaronc@users.noreply.github.com>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Aaron Craelius <aaron@regen.network>
2021-04-30 11:00:47 +00:00
Sunny Aggarwal cd8186e8e4 fix rosetta-test 2021-04-09 13:32:14 -04: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
Frojdi Dymylja 29ff333007
cosmos-reflection: extend to support writing by reflection clients (#8965)
Co-authored-by: SaReN <sahithnarahari@gmail.com>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2021-04-07 00:33:54 +01:00
SaReN 0effd3a9d3
Paginate supply queries (#8798)
* paginate grpc query

* fix lint

* update tests

* remove GetTotalSupply

* fix test

* remove GetTotalSupply

* add changelog

* update changelog

* update rosetta data

* update limit

* update genesis

* add max limit to query

* fix lint

* go imports

* Update types/query/pagination.go

* update supply

Co-authored-by: Marko <marbar3778@yahoo.com>
2021-04-06 14:43:08 +00:00
Jonathan Gimeno 7ac436d2f7
Improve set supply (#8950)
* temp commit

* remove set supply

* fix supply

* remove keys

* improve supply set

* update changelog

* improve linter

* update setSupply to get only one coin

* update genesis

* remove dirt

* save only supply

* go fmt

* update rosetta test bootstrap

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Frojdi Dymylja <33157909+fdymylja@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-03-25 10:03:13 +00:00
Frojdi Dymylja 288f8dda4b
[rosetta] implement balance tracking and redo tx construction (#8729)
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Robert Zaremba <robert@zaremba.ch>
2021-03-11 15:01:29 +00:00
Amaury c1b567f44c
Refactor store keys for variable-length addresses (#8363)
* Change account store key in x/bank

* Fix pagination test

* Fix merge master

* Fix staking keys.go

* Use bech32 in val state change map

* Fix sortNoLongerBonded

* Use length-prefix function

* Use length prefix function

* Fix test accountStore

* Fix ExamplePaginate

* Fix staking keys

* Use shorter balances prefix

* Do slashing keys

* Fix gov keys

* Fix x/gov tests

* Fix x/distrib

* Address reviews

* add change log entry

* Add changelog

* Fix failing tests

* Fix sim tests

* fix after-export sim

* Fix lint

* Address review

* Fix x/authz

* Fix global config in test

* Update x/staking/keeper/val_state_change.go

Co-authored-by: Robert Zaremba <robert@zaremba.ch>

* Address comments

* Fix comments

* Address review

* Fix authz test

* Update comment

* Rename to LengthPrefixedAddressStoreKey

* Use variable

* Rename function

* Fix test build

* chore: update rosetta CI (#8453)

* Rename again

* Rename yet again

* Update feegrant keys

* Add function to create prefix

Co-authored-by: Robert Zaremba <robert@zaremba.ch>
Co-authored-by: Frojdi Dymylja <33157909+fdymylja@users.noreply.github.com>
Co-authored-by: Aaron Craelius <aaron@regen.network>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-02-01 13:17:44 +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 ce5db9e4bd
fix proto generation (#8361)
* fix proto generation

* merge grpc_gateway into gocosmos_out

* change env variable names
2021-01-18 12:41:34 -03:00
Jonathan Gimeno 0f5b9ea23c
contrib: fix path for statik files (#8248) 2021-01-04 20:02:29 +00:00
Aleksandr Bezobchuk 5291a8ff31
Refactor Logging using Zerolog (#8072)
* init commit

* server: use flags

* server: godoc++

* updates

* baseapp: update logging

* logging updates

* x/bank: update logging

* logging updates

* lint++

* logging updates

* logging updates

* logging updates

* logging updates

* cl++
2020-12-03 23:17:21 +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
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 1671c87b0a
Remove reproducible builder image (#7484)
The image has been moved to gh/tendemrint/images.
2020-10-08 15:00:34 +01:00
Amaury Martiny 22b47f426e
Fix installation of gocosmos (#7410)
* Run `make proto-gen` with correct version

* Run with correct gocosmos

* Install gocosmos with go.mod

* Add check go.mod

* Remove comment

* Update contrib/devtools/proto-tools-installer.sh

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-10-01 13:25:23 +00:00
Alessio Treglia 56e3bc1945
proto tools install script (#7294)
Follow up of #7266 (comment)

Replace the convoluted Makefile in contrib/devtools/
with a separate (almost) idempotent install script.
2020-09-14 14:30:12 +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
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
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 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
SaReN bcd9675762
Add liveness script (#7081) 2020-08-18 05:51:08 -04:00
Aditya 277ad71c05
add gateway to tools (#7058) 2020-08-14 19:28:45 -04: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 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
Marko b671bff594
proto: update docs (#6537)
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-07-01 15:53:11 +02:00
Alexander Bezobchuk 9bf3ff75f5
Merge PR #6489: Test Network Testing Framework 2020-06-26 12:30:49 -04:00
Alexander Bezobchuk 821b298f1a
Liveness CI Test (#6445)
* Initial commit

* More updates

* Fix tests

* CLI test updates

* Updates

* Updates

* Add liveness test workflow

* tmp

* Update workflow

* fix

* fix

* fix

* remove tmp change
2020-06-16 03:58:51 -04:00
Alessio Treglia a8a455a6f7
Makefiles: various improvements (#6101)
Don't reinstall proto tools unconditionally every time
one runs make.

On most Linux systems, /usr/local is writable by root only.
Allow users to customise installation directory by passing
PREFIX to make command line, e.g.:

 $ make PREFIX=~/.local
2020-04-30 21:30:30 +02:00
SaReN 3b71198b25
Merge PR #6033: Add setup for cli_test 2020-04-29 11:52:30 -04:00
Alessio Treglia 6469447d52
add pre-commit hook (#6041)
* add pre-commit hook

Co-authored-by: Gianguido Sora <gsora@users.noreply.github.com>

* add go tools installation notes

* Update CONTRIBUTING.md

* run both go mod and golangci-lint

* silence which

* add go.mod go.sum after go mod tidy

* update README

* look up golangci-lint specifically in GOPATH/bin

* don't run golangci-lint

* exclude proto files

Co-authored-by: Gianguido Sora <gsora@users.noreply.github.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-04-28 14:51:42 +00:00
Marko 56c5868975
Merge PR #5610: proto: migrate x/distr to use hybrid codec 2020-02-11 09:58:37 -05:00
Erik Grinaker 05e40d3ff3
Merge PR #5612: Makefile: remove golangci-lint installation 2020-02-04 13:43:48 -05:00
Alexander Bezobchuk 26d6e49d6a
Merge PR #5491: Protobuf Introduction + Types 2020-01-24 10:32:00 -05:00
Alessio Treglia 5a94f34ded Merge PR #5105: Upgrade golangci-lint to latest release (1.19.1) 2019-09-27 20:44:34 -07:00
Alexander Bezobchuk ab81c798c6
Merge PR #5084: Sanitize tools Makefile 2019-09-20 13:27:12 -04:00
Alessio Treglia 849e2fb638 Merge PR #5025: Standardize and clean up Makefile
* Attempt to standardise Makefile's conventions

Use check- prefix for test- targets to adhere to
Make's standard naming convention [1].

Snake-case names are abandoned in favor of
kebab-case naming convention.

[1] https://www.gnu.org/prep/standards/html_node/Standard-Targets.html

* Replace check- with test-

* Remove goimports from tools

* Update circleci config

* Update workflow steps names to match Makefile

* Fix circleci config

* s/check_statik/update-swagger-docs/
2019-09-11 08:13:11 -07:00
Alessio Treglia e6068a88ff
Update golangci-lint to match release used by golangci bot (#5030) 2019-09-11 11:16:16 +02:00
Alexander Bezobchuk 7d42f62f90
Merge PR #4902: Changelog Flow Updates 2019-08-13 16:00:28 -04:00