Commit Graph

141 Commits

Author SHA1 Message Date
Aaron Craelius
5c90246b3f
feat(log): remove core dependency and update core interface to be dependency free (#21045)
Co-authored-by: marbar3778 <marbar3778@yahoo.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
2024-07-26 11:00:27 +00:00
Tuan Tran
023ed3558d
chore(docs): fix comments that do not start with the name of the exported element (#20999) 2024-07-19 16:21:01 +00:00
Marko
9436bcb7f2
chore: various cleanup (#20864) 2024-07-18 09:12:58 +00:00
testinginprod
11b8f1108c
feat(stf): change router service to extract the router at runtime rather than build time (#20724)
Co-authored-by: unknown unknown <unknown@unknown>
2024-06-20 13:45:26 +00:00
cool-developer
7edd86813f
feat(store/v1): async pruning iavl (#20321)
Co-authored-by: Matt Kocubinski <mkocubinski@gmail.com>
2024-06-18 15:21:04 +00:00
Marko
1b47dc91a3
chore: move logger to core (#20388) 2024-05-28 12:30:09 +00:00
Marko
c2f6c19aaf
revert: bank change module to account change (#20427) 2024-05-21 08:02:11 +00:00
yihuang
1f06f5bec6
fix: nil pointer panic when store don't exists in historical version (#20425) 2024-05-20 09:13:42 +00:00
Kien Trinh
0c91044220
refactor: remove directive errors comparison (#20344) 2024-05-10 19:09:21 +00:00
Marko
62b0b26d0c
chore: migrate sdk.Msg to transaction.type (#20273)
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Hieu Vu <72878483+hieuvubk@users.noreply.github.com>
2024-05-10 10:23:22 +00:00
Alexander Peters
65d820b202
chore(store): Better error message (#20308) 2024-05-07 14:07:34 +00:00
Marko
0dfb54e36a
refactor! : bump comet to v1 (#19726)
Co-authored-by: yihuang <yi.codeplayer@gmail.com>
2024-05-06 14:12:00 +00:00
Cosmos SDK
b795646c9b
chore: fix spelling errors (#20278)
Co-authored-by: github-merge-queue <118344674+github-merge-queue@users.noreply.github.com>
2024-05-04 20:24:41 +00:00
Marko
94338e516d
chore: bring back store v1 to main (#20263) 2024-05-03 12:21:16 +00:00
Aleksandr Bezobchuk
03bca7b791
feat(store/v2): Merge Feature Branch (#18150)
Co-authored-by: cool-developer <51834436+cool-develope@users.noreply.github.com>
Co-authored-by: yihuang <huang@crypto.com>
2023-10-18 18:03:43 +00:00
Julien Robert
22925c7d8b
refactor(store): add missing error checks in store (#17794) 2023-09-20 11:30:41 +00:00
Marko
682a9acd83
chore: change prune logging info to debug (#17560)
Co-authored-by: marbar3778 <marbar3778@yahoo.com>
2023-08-28 15:54:22 +00:00
ruthishvitwit
fd7e549a3c
chore: enable errcheck linter (#16406) 2023-07-12 08:58:27 +00:00
cool-developer
cc1325c30c
chore: store audit typo (#16840) 2023-07-05 15:19:47 +00:00
Jacob Gadikian
f0aec3f30d
style: use thelper (#16777) 2023-07-03 13:33:05 +00:00
Jacob Gadikian
6afece635c
style: add gci linter (#16605) 2023-06-22 15:35:51 +00:00
Chill Validation
d1e685b4db
fix: StateSync Restore by excluding memory store (#16449) 2023-06-07 23:13:23 +00:00
cool-developer
3e18f4088b
feat: update store module for new iavl (#15568)
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Marko <marbar3778@yahoo.com>
2023-06-06 19:08:35 +00:00
Marko
d1a337eb78
refactor(Store): remove abci query req and res deps from store (#16321) 2023-05-30 15:50:23 +00:00
Aleksandr Bezobchuk
6cee22df52
feat!: Comet v0.38 Integration (#15519)
Co-authored-by: marbar3778 <marbar3778@yahoo.com>
Co-authored-by: cool-developer <51834436+cool-develope@users.noreply.github.com>
Co-authored-by: Aaron Craelius <aaron@regen.network>
Co-authored-by: Matt Kocubinski <mkocubinski@gmail.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
2023-05-24 16:09:19 +00:00
cool-developer
56705deb22
feat(store): add working hash (#15712)
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Marko <marbar3778@yahoo.com>
2023-04-13 09:18:36 +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
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
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
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
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
Julien Robert
fd76793378
chore: remove unnecessary condition (#15277) 2023-03-06 20:06:52 +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
Facundo Medica
4a6a1e3cb8
refactor: fix lint issues + gofumpt (#15062) 2023-02-19 10:31:49 +00:00
Julien Robert
a7ac29e3f4
chore: rename log pkg and add zerolog (#14955) 2023-02-08 11:32:22 +00:00
Marko
281017ae90
refactor: use cosmos-sdk/log throughout (#14909)
## Description

removes the dependency of tendermint/utils/log from countless locations. This is in effort of reducing Tendermint's lib usage in the sdk 

this is nonbreaking as the interface is the same. To eliminate tm/utils/log in the sdk we need a few more things. Once we have fully removed the tendermint logger, I would propose we break the interface and define our own for our use case, when we pass the logger to tendermint in the node.New() function we can wrap our logger for its use case 

---

### 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-02-07 10:54:48 +00:00
Aleksandr Bezobchuk
1344ff137d
fix: exclude mem store from commit info (#14931) 2023-02-06 23:09:21 -05:00
Julien Robert
6978710699
refactor: migrate store and api to CometBFT (#14899) 2023-02-04 14:53:15 +01:00
yihuang
b266522c88
feat: add config iavl-lazy-loading to enable lazy loading of iavl store (#14189)
Co-authored-by: Marko <marbar3778@yahoo.com>
2023-01-31 21:52:32 +00:00
khanh-notional
40ca1550da
chore: Add check for uneven stores' height (#14410) 2023-01-31 01:54:29 +00:00
Likhita Polavarapu
7559d9ecd3
refactor: create go.mod for store (#14746)
Co-authored-by: Marko <marbar3778@yahoo.com>
2023-01-25 13:31:56 +00:00
Marko
f3dd51029a
refactor: remove global metrics in store (#14439) 2022-12-30 14:46:29 +01:00
Jacob Gadikian
1bb0629846
chore: iavl-v0.20-alpha1 and cosmos-db (#14411)
Co-authored-by: marbar3778 <marbar3778@yahoo.com>
2022-12-28 21:42:00 +01:00
khanh-notional
829c487de8
chore: Enforce order of store commits in root store (#14385)
Co-authored-by: Marko <marbar3778@yahoo.com>
2022-12-28 15:52:34 +00:00
Jacob Gadikian
be8c5a09c2
chore: lint tests (#14268) 2022-12-18 23:48:31 +00:00
Marko
f08ba9eafa
refactor: don't rely on sdk/codec in streaming (#14155) 2022-12-09 16:35:13 +00:00
Marko
390262f56b
refactor: remove reliance on sdk/types/errors from store (#14090)
* Move snapshotstore under store

* add changelog entry

* errors store

* remove dep on sdk/types/errors

* clean up

* fix var

* undo some changes, clean up fmt.Errorf usage

* remove pkg/errors
2022-12-03 13:11:33 +00:00
yihuang
1f91ee2ee9
fix: state listener observe writes at wrong time (#13516)
* fix: state listener observe writes at wrong time

Closes: #13457

Currently state listener is notified when the cache store write, which happens in commit event only, which breaks the current design.
The solution (as discussed in the issue) is to listen state writes on rootmulti store only.

It also changes the file streamer to output single data file for the writes in the whole block, since we can't distinguish writes from different stage of abci events.

It adds new config items for file streamer:
- streamers.file.output-metadata
- streamers.file.stop-node-on-error
- streamers.file.fsync

* synchronous abci call, and format doc

* fix comment

* update file streamer readme and fix typos

* typo

* fix: state listener observe writes at wrong time

Closes: #13457

Currently state listener is notified when the cache store write, which happens in commit event only, which breaks the current design.
The solution (as discussed in the issue) is to listen state writes on rootmulti store only.

It also changes the file streamer to output single data file for the writes in the whole block, since we can't distinguish writes from different stage of abci events.

It adds new config items for file streamer:
- streamers.file.output-metadata
- streamers.file.stop-node-on-error
- streamers.file.fsync

synchronous abci call, and format doc

fix comment

update file streamer readme and fix typos

typo

* improve UX of file streamer, make it immediately usable after enabled

- set default value to write_dir.
- make write_dir based on home directory by default.
- auto-create the directory if not exists.

* get homePage from opts

Co-authored-by: Marko <marbar3778@yahoo.com>
2022-12-02 15:43:21 +01:00
Marko
2e3d38f01c
refactor: move snapshotstore under store (#14048)
* Move snapshotstore under store

* add changelog entry

* fix build

* move snapshot proto package

* make proto-gen

* Update CHANGELOG.md

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

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
2022-11-29 23:40:14 +00:00