* 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>
* 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>
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.
* 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>
* 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>
* 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>
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
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
{,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
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
* 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
- 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
* 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
* 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
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