## Description
Without this change, there were intermittent failures due to a non-empty t.TempDir() directory at the end of a test:
```console
$ go test -run=LoadChunk$ ./snapshots/ -count=220 -failfast
--- FAIL: TestManager_LoadChunk (0.01s)
testing.go:1225: TempDir RemoveAll cleanup: unlinkat /var/folders/.../T/TestManager_LoadChunk1472891739/001: directory not empty
FAIL
FAIL cosmossdk.io/store/snapshots 0.177s
```
With this change, I can no longer reproduce the flaky failure:
```console
$ go test -run=LoadChunk$ ./snapshots/ -count=1000 -failfast
ok cosmossdk.io/store/snapshots 15.722s
```
---
### 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] 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
- [x] 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 all author checklist items have been addressed
- [ ] confirmed that this PR does not change production code
## Description
Closes: [cosmos/gaia#2313](https://github.com/cosmos/gaia/issues/2313)
The gaia v9 upgrade causes node to errors out when querying historical states before the upgrade. This is because we added a new module store in the upgrade which is the `provider module store`. Thus, every times we load the multi store for querying at a height prior to the upgrade, we try to load the `provider module store` and fail since it has not existed before the upgrade.
I make changes to `CacheMultiStoreWithVersion` so that if we fail to load any module store at a given height, we check if that module store has existed at that height or not (using `getCommitInfo()`), we can ignore the error if the store hasn't existed at that given height.
---
### 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/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)
## Description
- Return an exported type rather than an unexported type, from an exported function
- Assign error values to _
- Add reason to nolint directive
- Remove ineffectual assignment
- Remove checked cast to same type as value
---
### 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] 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~~
- [ ] ~~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 all author checklist items have been addressed
- [ ] confirmed that this PR does not change production code
Co-authored-by: Marko <marbar3778@yahoo.com>
Co-authored-by: Emmanuel T Odeke <emmanuel@orijtech.com>
Co-authored-by: Marko <marko@baricevic.me>
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.39.0 to 0.40.0.
<details>
<summary>Commits</summary>
<ul>
<li><a href="2c9877d792"><code>2c9877d</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/prometheus/common/issues/444">#444</a> from abursavich/expfmt-eof</li>
<li><a href="d888bfa06f"><code>d888bfa</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/prometheus/common/issues/443">#443</a> from abursavich/expfmt-decode</li>
<li><a href="d074dea0fc"><code>d074dea</code></a> expfmt: only ignore io.EOF errors in TextParse.startOfLine</li>
<li><a href="5be97a0535"><code>5be97a0</code></a> expfmt: only call TextParser.TextToMetricFamilies once from textDecoder</li>
<li><a href="f9c1994be0"><code>f9c1994</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/prometheus/common/issues/440">#440</a> from zenador/sparsehistograms</li>
<li><a href="18a421471c"><code>18a4214</code></a> Update comments according to code review</li>
<li><a href="4e9e3f5f46"><code>4e9e3f5</code></a> Continue to use json-iterator to improve marshalling of SamplePair</li>
<li><a href="f71df30fee"><code>f71df30</code></a> Continue to use json-iterator to improve marshalling of SampleHistogramPair</li>
<li><a href="eda7de1dd2"><code>eda7de1</code></a> Start to use json-iterator to improve marshalling of HistogramBucket</li>
<li><a href="01880dc50b"><code>01880dc</code></a> Add benchmarks for marshalling</li>
<li>Additional commits viewable in <a href="https://github.com/prometheus/common/compare/v0.39.0...v0.40.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>