Commit Graph

493 Commits

Author SHA1 Message Date
Mark Rushakoff
64908e1559
build(deps): use latest commit of CometBFT v0.37.x branch (#15787) 2023-04-11 19:16:52 +00:00
Mark Rushakoff
0b09920c0a
test(store): ensure busy manager goroutine is finished (#15788)
## 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
2023-04-11 16:33:39 +00:00
khanh-notional
d5a618db6a
feat: More flexibility for CacheMultiStoreWithVersion (#15683)
## 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)
2023-04-10 20:30:28 +00:00
dependabot[bot]
7720bc4cb6
build(deps): Bump golang.org/x/crypto from 0.7.0 to 0.8.0 (#15733)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-04-07 16:25:45 +00:00
Mark Rushakoff
22bfecfe38
style: fix linting issues in store module (#15724)
## 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
2023-04-06 21:58:52 +00:00
Julien Robert
3f3beb319e
ci: bump go version (#15716) 2023-04-06 09:55:19 +02:00
Jacob Gadikian
b009a75eea
style: make lint-fix everything (#15631)
Co-authored-by: Julien Robert <julien@rbrt.fr>
2023-03-30 17:27:39 +00:00
dependabot[bot]
1316329316
build(deps): Bump cosmossdk.io/log from 0.1.1-0.20230329182155-367f0dc1194d to 1.0.0 (#15619) 2023-03-30 10:40:58 +00:00
dependabot[bot]
f3110e9d53
build(deps): Bump github.com/cosmos/gogoproto from 1.4.6 to 1.4.7 (#15617)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-03-30 11:05:17 +02:00
Marko
1f2875d445
style: gofumpt linting (#15605) 2023-03-30 06:27:38 +00:00
Aleksandr Bezobchuk
ee9774af27
feat: auto-set block timestamp for historical queries (#15448) 2023-03-28 15:10:26 +00:00
dependabot[bot]
ae8bd416a3
build(deps): Bump cosmossdk.io/math from 1.0.0-rc.0 to 1.0.0 (#15532)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
2023-03-23 15:44:09 +00:00
Facundo Medica
370acbb659
style: gofumpt everything (#15518) 2023-03-22 20:20:46 +00:00
dependabot[bot]
d53b29b1d1
build(deps): Bump google.golang.org/grpc from 1.53.0 to 1.54.0 (#15511)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-03-22 19:01:51 +00:00
dependabot[bot]
4995cd130a
build(deps): Bump github.com/mattn/go-isatty from 0.0.17 to 0.0.18 (#15509)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-03-22 17:42:29 +00:00
dependabot[bot]
320171461f
build(deps): Bump github.com/hashicorp/go-hclog from 1.4.0 to 1.5.0 in /store (#15498)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
2023-03-21 17:31:24 +00:00
Marko
6522dd1731
chore: update to core 0.6.1 (#15497) 2023-03-21 15:53:58 +00:00
Julien Robert
b3552f2183
test(store): skip PluginTestSuiteon non linux machine (#15488) 2023-03-21 08:49:36 +00:00
Julien Robert
3894b283a1
chore: fix changelog due to previous PR (#15446) 2023-03-17 15:46:56 +01:00
yihuang
8944ab6781
feat!: limit the length of key/value (#14645)
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Marko <marbar3778@yahoo.com>
2023-03-17 14:15:13 +00:00
cool-developer
44ed13dff7
chore: update store iavl with changesets (#15432)
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Marko <marbar3778@yahoo.com>
2023-03-17 13:28:58 +00:00
dependabot[bot]
8f54a47607
build(deps): Bump google.golang.org/protobuf from 1.29.1 to 1.30.0 (#15425)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-03-16 19:21:24 +00:00
Julien Robert
a53aee4eea
chore: clean-up after go-plugin system pr (#15402) 2023-03-14 23:03:48 +00:00
cipherZ
825245db1b
docs: replace Tendermint references in docs with CometBFT (#15339)
Co-authored-by: Julien Robert <julien@rbrt.fr>
2023-03-14 20:41:35 +01:00
Ergels Gaxhaj
6f3f2c9b16
refactor!: ADR-038 go-plugin system (#14207)
Co-authored-by: HuangYi <huang@crypto.com>
Co-authored-by: Ryan Christoffersen <12519942+ryanchristo@users.noreply.github.com>
2023-03-14 18:09:30 +00:00
dependabot[bot]
1cc0080bda
build(deps): Bump google.golang.org/protobuf from 1.29.0 to 1.29.1 (#15392)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-03-14 16:35:27 +00:00
dependabot[bot]
82151e2946
build(deps): Bump cosmossdk.io/log from 0.0.0-20230313123454-0fe816b71a62 to 0.1.0 (#15371)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-03-13 15:07:47 +00:00
dependabot[bot]
2e5f6f3b4e
build(deps): Bump cosmossdk.io/math from 1.0.0-beta.6.0.20230216172121-959ce49135e4 to 1.0.0-rc.0 (#15370)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-03-13 15:38:47 +01:00
Julien Robert
ea8c76eb65
feat: add filtering to logger (#15212) 2023-03-13 13:16:20 +00:00
dependabot[bot]
b2188e9326
build(deps): Bump github.com/golang/protobuf from 1.5.2 to 1.5.3 (#15310)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-03-08 21:16:24 +00:00
dependabot[bot]
1e73883f66
build(deps): Bump google.golang.org/protobuf from 1.28.2-0.20230222093303-bc1253ad3743 to 1.29.0 (#15307)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
2023-03-08 20:33:15 +00:00
dependabot[bot]
3c89493cd2
build(deps): Bump github.com/prometheus/common from 0.41.0 to 0.42.0 (#15308) 2023-03-08 19:24:24 +01:00
dependabot[bot]
c33cb83cc8
build(deps): Bump golang.org/x/crypto from 0.6.0 to 0.7.0 (#15275) 2023-03-06 23:08:05 +00:00
dependabot[bot]
5e55f56d39
build(deps): Bump github.com/cometbft/cometbft from 0.37.0-rc4 to 0.37.0 (#15283) 2023-03-06 22:07:16 +00:00
Julien Robert
fd76793378
chore: remove unnecessary condition (#15277) 2023-03-06 20:06:52 +00:00
Mark Rushakoff
f151bf627a
refactor(log): require destination in calls to NewLogger (#15262) 2023-03-06 19:05:49 +00:00
Chill Validation
183dde8d00
fix: snapshot recover from exporter error (#13935)
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>
2023-03-06 16:44:26 +00:00
dependabot[bot]
dcd92eedd3
build(deps): Bump github.com/cometbft/cometbft from 0.37.0-rc3 to 0.37.0-rc4 (#15260)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-03-03 17:22:49 +00:00
dependabot[bot]
23ef32a35c
build(deps): Bump github.com/prometheus/common from 0.40.0 to 0.41.0 (#15229)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
2023-03-01 17:59:14 +00:00
Julien Robert
41c8529ff9
chore: bump cometbft to v0.37.0-rc3 (#15220) 2023-03-01 16:30:41 +01:00
Julien Robert
5d559dd265
feat!: use cosmossdk.io/log logger (#15011) 2023-02-27 21:36:22 +00:00
dependabot[bot]
b1603227e5
build(deps): Bump github.com/stretchr/testify from 1.8.1 to 1.8.2 (#15172)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-02-27 19:49:52 +00:00
dependabot[bot]
d1625654ae
build(deps): Bump github.com/cosmos/cosmos-db from 0.0.0-20221226095112-f3c38ecb5e32 to 1.0.0-rc.1 in /core (#15180)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-27 18:58:45 +00:00
Mark Rushakoff
caf94106cb
refactor(store): extract (*Store).saveChunk method (#15144) 2023-02-27 10:17:17 +00:00
Mark Rushakoff
b378be9e31
test: use t.Parallel to speed up pruning tests (#15139) 2023-02-23 19:51:02 +00:00
Julien Robert
27f3c729a3
build(deps): bump to tagged version of CometBFT (#15118) 2023-02-21 23:35:56 +01:00
dependabot[bot]
25de9de537
build(deps): Bump github.com/cosmos/gogoproto from 1.4.5 to 1.4.6 (#15111)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-21 14:45:43 +00:00
dependabot[bot]
32a683f902
build(deps): Bump github.com/cosmos/iavl from 0.20.0-alpha3 to 0.21.0-alpha.1 in /store (#15078)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-02-20 13:20:19 +00:00
Julien Robert
067ee92d4d
refactor: simply errors (#15067) 2023-02-20 12:03:40 +00:00
dependabot[bot]
f69b9ff58f
build(deps): Bump github.com/prometheus/common from 0.39.0 to 0.40.0 (#15069)
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 />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/prometheus/common&package-manager=go_modules&previous-version=0.39.0&new-version=0.40.0)](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>
2023-02-20 11:28:00 +00:00