Commit Graph

85 Commits

Author SHA1 Message Date
mergify[bot] 4368a18d42
disable url parameter in swagger-ui page (backport #11202) (#11207)
* disable url parameter in swagger-ui page (#11202)

Closes: #11201
Solution:
- update swagger-ui to recent release
- add option `queryConfigEnabled: false`

(cherry picked from commit cb6fea997c)

# Conflicts:
#	client/docs/statik/statik.go
#	client/docs/swagger-ui/swagger-ui-bundle.js
#	client/docs/swagger-ui/swagger-ui-bundle.js.map
#	client/docs/swagger-ui/swagger-ui-es-bundle-core.js
#	client/docs/swagger-ui/swagger-ui-es-bundle-core.js.map
#	client/docs/swagger-ui/swagger-ui-es-bundle.js
#	client/docs/swagger-ui/swagger-ui-es-bundle.js.map
#	client/docs/swagger-ui/swagger-ui-standalone-preset.js
#	client/docs/swagger-ui/swagger-ui-standalone-preset.js.map
#	client/docs/swagger-ui/swagger-ui.js
#	client/docs/swagger-ui/swagger-ui.js.map

* fix conflicts

* override swagger-ui after resolve conflicts

Co-authored-by: yihuang <huang@crypto.com>
Co-authored-by: marbar3778 <marbar3778@yahoo.com>
2022-02-21 11:53:38 +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
Robert Zaremba 70089844f7
scripts: indent multiline commands (#8706) 2021-02-25 20:57:41 +00:00
MD Aleem 81cc5c1194
gRPC gateway issue with colons in the account url path (#8649)
* add allow_colon_final_segments flag

* add test

* Update x/auth/client/rest/rest_test.go

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-02-22 11:30:45 +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
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 ed7bd245b8
Add script to generate proto-docs (#8238)
* init protobuf-docs

* update template

* update docs/core/README.md

* update proto files

* update template

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-12-31 16:10:13 +00:00
Amaury a8e58bcfe3
Fix proto-swagger-gen (#8184)
* Fix proto-swagger-gen

* Fix script

* Run script

Co-authored-by: Anil Kumar Kammari <anil@vitwit.com>
Co-authored-by: SaReN <sahithnarahari@gmail.com>
2020-12-21 11:31:18 +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
Amaury Martiny 55242a659c
Add ADR 031 BaseApp and codec infrastructure (#7519)
* Refactor RegisterQueryServices -> RegisterServices

* Cleaner proto files

* Fix tests

* Add MsgServer

* Fix lint

* Remove MsgServer from configurator for now

* Remove useless file

* Fix build

* typo

* Add router

* Fix test

* WIP

* Add router

* Remove test helper

* Add beginning of test

* Move test to simapp?

* ServiceMsg implement sdk.Msg

* Add handler by MsgServiceRouter

* Correct signature

* Add full test

* use TxEncoder

* Update baseapp/msg_service_router.go

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

* Push changes

* WIP on ServiceMsg unpacking

* Make TestMsgService test pass

* Fix tests

* Tidying up

* Tidying up

* Tidying up

* Add JSON test

* Add comments

* Tidying

* Lint

* Register MsgRequest interface

* Rename

* Fix tests

* RegisterCustomTypeURL

* Add changelog entries

* Put in features

* Update baseapp/msg_service_router.go

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

* Update baseapp/msg_service_router.go

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

* Update baseapp/msg_service_router.go

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

* Update baseapp/msg_service_router.go

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

* Update baseapp/msg_service_router.go

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

* Update baseapp/msg_service_router.go

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

* Update baseapp/msg_service_router.go

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

* Address review comments

* Address nit

* Fix lint

* Update codec/types/interface_registry.go

Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>

* godoc

Co-authored-by: Aaron Craelius <aaronc@users.noreply.github.com>
Co-authored-by: Aaron Craelius <aaron@regen.network>
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>
2020-10-15 13:07:59 +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
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
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
atheeshp f87624e9de
Add Grpc gateway annotations (#6918)
* grpc for bank module

* edit module.go

* added annotations for x/auth query proto

* generated gw file

* added grpc gateway for x/staking query proto

* added annotations for evidence

* added annotations for gov query proto

* added annotations

* added annotations for slashing module

* updated annotations

* added annotations for staking module

* added annotations for upgrade query

* annotations added for x/ibc/channel query proto

* added annotations for ibc/connection query proto

* updated annotations

* updated annotations

* annotation changes

* ommitted ibc module

* updated go.mod

* fixed lint issue

* review changes

* review changes

* review changes

* review changes

* go sum changes

* updated annotations

* annotation changes

* Fix proto lint issues

* review changes

* review changes

* review changes

* discussion changes

* review changes

* grpc for bank module

* edit module.go

* added annotations for x/auth query proto

* generated gw file

* added grpc gateway for x/staking query proto

* added annotations for evidence

* added annotations for gov query proto

* added annotations

* added annotations for slashing module

* updated annotations

* added annotations for staking module

* added annotations for upgrade query

* annotations added for x/ibc/channel query proto

* added annotations for ibc/connection query proto

* updated annotations

* updated annotations

* annotation changes

* ommitted ibc module

* updated go.mod

* fixed lint issue

* review changes

* review changes

* review changes

* review changes

* go sum changes

* updated annotations

* annotation changes

* Fix proto lint issues

* review changes

* review changes

* review changes

* discussion changes

* review changes

* fixed conflicts

* review changes

* updated gw files

* lint

* lint

* lint

* added missing annotations

* review changes

* review changes

* review changes

* review changes

Co-authored-by: SaReN <sahithnarahari@gmail.com>
Co-authored-by: Anil Kumar Kammari <anil@vitwit.com>
2020-08-14 10:05:35 +00:00
Amaury Martiny 69bbb8b327
Rename proto Req/Res to Pagination (#6796)
* Rename proto Req to Pagination

* Change Res to Pagination

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-20 16:51:16 +00:00
Amaury Martiny 5c0e3b4de5
x/auth/ante: Migrate tests to use the new client.TxConfig (#6661)
* WIP: using encoding config

* Make it compile, test fails

* test should be okay

* Make tests pass

* Add comments

* Convert more tests

* Make TestAnteHandlerSigErrors work

* Make first 2 tests pass

* TestAnteHandlerAccountNumbers

* Use table tests

* Remove print

* Use test table

* TestAnteHandlerSigErrors

* TestAnteHandlerAccountNumbers

* TestAnteHandlerAccountNumbers

* Refactor TestAccount

* Refactor getSignBytes

* TestAnteHandlerAccountNumbersAtBlockHeightZero

* TestAnteHandlerSequences

* TestAnteHandlerFees

* TestAnteHandlerMultiSigner

* TestAnteHandlerBadSignBytes

* TestAnteHandlerSetPubKey

* TestAnteHandlerSigLimitExceeded

* TestCustomSignatureVerificationGasConsumer

* TestAnteHandlerReCheck

* Make all tests pass

* Refactor a little bit more

* Fee test

* SetupTest

* All tests pass

* Refactor to RunTestCase

* Don't use StdFee

* Revert some little stuff

* Finish up last couple of test cases

* Less verbose

* s/TxGenerator/TxConfig

* Add comments

* Indent

* Move KeyTestPubAddr to testdata

* Move testdata to /testutil

* Revert to use signature: nil step in signing

* Add comments

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-07-20 08:30:12 -04:00
Aaron Craelius 99ea4b759a
Fix testdata proto-gen (#6568) 2020-07-01 15:26:29 +00: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
Aaron Craelius e94b6736ed
Merge PR #6325: Add GRPCRouter 2020-06-03 09:33:51 -04:00
Anil Kumar Kammari 34d9ed52b3
Fix proto-gen (#6229) 2020-05-15 14:57:20 +00:00
Aaron Craelius 49ae8800d1
Merge PR #6214: Add Tx, SignDoc, etc. proto types from #6111 2020-05-14 15:27:48 -04:00
Aaron Craelius 386217209d
Merge PR #6076: Proto Any init + evidence 2020-05-05 10:28:20 -04:00
Alexander Bezobchuk 26d6e49d6a
Merge PR #5491: Protobuf Introduction + Types 2020-01-24 10:32:00 -05:00
Alexander Bezobchuk 7d42f62f90
Merge PR #4902: Changelog Flow Updates 2019-08-13 16:00:28 -04:00
Alessio Treglia 71d71f2206
Remove gaia (#4347)
Gaia is removed from cosmos-sdk repository.

Few changes were required to make sure no packages depend on gaia subpackages.

CI config is amended accordingly.

Unnecessary targets are removed from Makefile.

Simulations run through a lightweight version of gaia renamed to simapp.

Closes: #4104
2019-05-18 10:42:24 +02:00
Alessio Treglia 805de8b9f5 Merge PR #4343: Update go to 1.12.5 2019-05-15 11:17:20 -04:00
Alessio Treglia df362ff3e6
Upgrade Go to 1.12.4 (#4261) 2019-05-03 11:33:41 +01:00
Alessio Treglia 74ea92a990
New Makefile for gaia (#4110)
Amend targets naming convention as per [1]:
- Switch from underscore '_' separated naming scheme to dash '-'
  separated naming scheme.
- Replace test with check.

Simulations now live in their own Make module.

[1] https://www.gnu.org/prep/standards/html_node/Standard-Targets.html
2019-04-15 14:00:28 +01:00
Alessio Treglia 1505c2b2e6
Move tools to contrib (#4073)
Also rename sdkch to clog
2019-04-09 10:41:00 +01:00
Frank Yang 9e7440a92c Merge PR #4064: Remove dep/vendor from documentation and version cmd
* Remove `dep` and `vendor` from documentation
* Replace vendor with go.sum hash in version command
2019-04-08 11:00:17 -04:00
Frank Yang 055d219301 Add `GO111MODULE=on` to environment. (#4042) 2019-04-04 15:38:02 +01:00
Alessio Treglia cdf2b7a7c5
gometalinter -> golangci-lint migration (#3933)
{,scripts/}Makefile:
- Remove gometalinter, install golangci-lint.
- Remove distinction between tools and devtools.
  Just tools is enough.
- test_lint -> lint
  Migrating away from underscore separated names.
- Remove unnecessary targets.
- Drop tendermint/lint. Incompatbile with golangci-lint
  and no longer necessary anyway.
- Fix misleading message in go-mod-cache.
- New ci-target to avoid download tools twice.
- Run tests with -mod=readonly.

Port tools/gometalinter.json to .golangci.yml
Update CircleCI config accordingly.

Closes: #3896
2019-03-19 17:52:43 +01:00
Alessio Treglia 6ce4d5efd1
replace dep with go mod (#3907)
Replace sha1sum with jack's gosum and get rid of
vendor-deps.
Also don't compute hash on vendor/ contents.
Instead hash go.sum.

Disable unconvert lint check. It does not
work very well with go mod.

Remove update_vendor_deps once and for all.

Upgrade to go 1.12

Closes: #3919 #3630
2019-03-18 13:45:25 +01:00
Alessio Treglia 45d59b0792 Merge PR #3464: Upgrade to go 1.11.5 2019-02-01 02:20:58 +01:00
Alessio Treglia 26ee435a61 Upgrade gometalinter (#3439) 2019-01-29 16:02:39 -08:00
Christopher Goes 9320dbb2da
Merge PR #3428: Simulate from a genesis file 2019-01-29 23:53:42 +01:00
Jack Zampolin af60c75dd3 Merge PR #3352: Reenable simulation tests 2019-01-24 22:01:32 +01:00
mircea-c b8de70add8 Merge PR #3220: Extended running time for multi-sim test
* Added dependencies block anchor to simplify
* Increased blocks to 1000 and removed cache restore
* Made the period a parameter in the script
* Renamed the jobs because git is confused
* Specify period on long sim
2019-01-04 16:40:39 +01:00
Alessio Treglia 0c0bff7ea0 Fix Makefile's all target (#3085)
- Rename get_dev_tools to devtools
- tools and devtools now create a stamp after execution so
  that they are not executed twice on the same pipeline
- Add clean target to remove stamps
2018-12-20 10:03:59 -08:00
Zach 5241c3c7c1 go one.eleven.four (#3169) 2018-12-19 11:41:59 -08:00
Zach 26fc5163e3 Update go version in docs (#3123) 2018-12-18 12:48:30 -08:00
Jae Kwon 40a30b738f
Update gas costs to more reasonable numbers for GoS (#3052) 2018-12-10 02:48:19 -08:00
Christopher Goes b2b026b5e0
Merge PR #2930: Simulation spring cleaning
* Update PENDING.md
* Add simple period for expensive invariants
* Remove individual module simulations
* Simulate a few more blocks
* Add README explaining reason for shell scripts
* Deduplicate scripts, log exact replication command on failure
* Refactor invariants to take sdk.Context instead of baseapp.BaseApp
* Reference all issues in PENDING.md entry
* Remove no longer used simulation.RandSetup
* Bug fixes
* Address @rigelrozanski comments
* Fix typo
2018-11-29 16:17:10 +01:00
Zach f7e22cb4d3 Merge PR #2828: Reorganize install scripts & add ARM 2018-11-28 17:52:07 +01:00
Greg Szabo 2e0dfc31af Added goimports tool to get_tools. Fixed get_tools build. (#2889)
* Added goimports tool to get_tools. Get_tools now only builds new versions if binaries are missing.
* Added the goimports format command from yutianwu's PR
* goimports install typo fix
2018-11-26 14:20:43 -05:00
Christopher Goes ad121f1498 Add a flag to export for zero-height start (#2827)
Closes #2812

This PR adds the flag --for-zero-height to gaiad export, which runs several alterations to the application state to prepare for restarting a new chain in a consistent fashion.

It also:

* Moves Gaia's export code to cmd/gaia/app/export.go for cleaner separation.
* Fixes an inconsistency where we treated the initChainer as happening at height -1 - it should now happen at height 0, since the first header sent by Tendermint has height 1.
* Runs the runtime invariant checks on start (in initChainer)
* Adds a few auxiliary functions to clear slashing periods
* Removes the Height field from Delegation objects in x/stake, which was not used anywhere
2018-11-26 04:21:23 -08:00
Christopher Goes 7f68cee3d6
Merge PR #2803: Update ubuntu install script 2018-11-15 12:00:49 +01:00
zramsay be53c7c706 install script, go version variable 2018-11-14 15:14:13 -05:00