Bumps [github.com/cosmos/ledger-cosmos-go](https://github.com/cosmos/ledger-cosmos-go) from 0.11.1 to 0.12.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/cosmos/ledger-cosmos-go/releases">github.com/cosmos/ledger-cosmos-go's releases</a>.</em></p>
<blockquote>
<h2>Update deps</h2>
<ul>
<li>Update dependencies:</li>
<li>Depends on zondax/ledger-go instead of cosmos/ledger-go</li>
<li>Include updates from zondax/ledger-go and zondax/hid (fixing mac build issue)</li>
<li>Update copyrights</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="a105dbb4ed"><code>a105dbb</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/cosmos/ledger-cosmos-go/issues/34">#34</a> from cosmos/updates</li>
<li><a href="543eb77c2c"><code>543eb77</code></a> update deps</li>
<li><a href="d852bb596e"><code>d852bb5</code></a> update copyright</li>
<li><a href="036a277666"><code>036a277</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/cosmos/ledger-cosmos-go/issues/25">#25</a> from cosmos/dependabot/go_modules/github.com/stretchr/...</li>
<li><a href="940cd3bd0d"><code>940cd3b</code></a> Bump github.com/stretchr/testify from 1.7.1 to 1.8.0</li>
<li><a href="e736b9afa7"><code>e736b9a</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/cosmos/ledger-cosmos-go/issues/26">#26</a> from Zondax/update/ledger-go</li>
<li><a href="998c2b9ed7"><code>998c2b9</code></a> update ledger-go to 0.12.2</li>
<li><a href="343ae35a1a"><code>343ae35</code></a> Bump github.com/stretchr/testify from 1.3.0 to 1.7.1 (<a href="https://github-redirect.dependabot.com/cosmos/ledger-cosmos-go/issues/20">#20</a>)</li>
<li><a href="af7b6f9472"><code>af7b6f9</code></a> migrate to github actions (<a href="https://github-redirect.dependabot.com/cosmos/ledger-cosmos-go/issues/19">#19</a>)</li>
<li><a href="9d8c40fbe7"><code>9d8c40f</code></a> all: use named returns for proper defers + fix fmt.Errorf misuse (<a href="https://github-redirect.dependabot.com/cosmos/ledger-cosmos-go/issues/18">#18</a>)</li>
<li>See full diff in <a href="https://github.com/cosmos/ledger-cosmos-go/compare/v0.11.1...v0.12.0">compare view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
</details>
## Description
Closes:
#13830#13827
- Rosetta `/network/status` response:
* populates `oldest_block_identifier` with `EarliestBlockHeight` from rpc syncInfo
* tries to populate `genesis_block_identifier` with block of height 1
* if block is not queryable, sets value of `InitialHeight` from genesis doc
* if not queryable sets same value as `oldest_block_identifier`
- Wrap `github.com/tendermint/tendermint/rpc/jsonrpc/types` errors to rosetta errors
- Split services into its own go files (account, block, mempool, network)
---
### 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/main/CONTRIBUTING.md#pr-targeting))
- [x] provided a link to the relevant issue or specification
- [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/main/docs/building-modules)
- [x] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#testing)
- [x] added a changelog entry to `CHANGELOG.md`
- [x] 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)
## Description
- Use tools methodology to use canonically versioned tools/binaries (e.g. golangci-lint)
- This makes it so that all environments and developers use the same versions of tools (no need to rely on hacky docker containers)
- Update makefile
- Address linting errors
---
### 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/main/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/main/docs/building-modules)
- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/main/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)
{,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
This is basically copying over @anton's great script!
Also had to run `make format` to make this pass `test_lint`.
This PR also makes the make commands for tools further align
with the tendermint implementation.
* Adds a Min function to Int, and uses that in the slash function
* Adds a getHeight helper function to iavlstore
* Adds a splitPath function to baseapp
* Changes cyclo param from 10 to 11
Gocyclo is a code complexity linter. It uses cyclomatic complexity.
Cyclomatic complexity essentially measures the number of different
paths code could go through. (The conditional in a for loop counts
as adding one path) It looks at this on a per-function level. The
idea that this would be enforcing is that if there are too many
different paths code can go through in a function, it needs to be
better split up. (A function with too many code paths is hard to
reason about)
The complexity which we want the linter to start failing on is
configurable. The default is 10. Change the "Cyclo" parameter in
`tools/gometalinter.json` to try other values.
* tools: Add unparam linter
unparam detects unused parameters in functions, and a parameter to
a function which only ever takes on one value. The latter is an
indication that more tests are required.
There are many nolints in this PR, as I believe that writing tests
to fix alot of these situations is out of scope for this PR / it
will be changed in future commits. There are some nolints for
when we have to comply to normal api's.
* crypto/keys no longer used by x/gov/client/rest/rest.go
* tools: Add ineffassign linter
This errors on assignments that don't actually do anything. i.e.
x, err := myFunc(1)
y, err = myFunc(2)
This will call out that the first function's call error was never
used.
* Fix makefile, add misspell to makefile