Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADR-040 Implementation: Hook state store and SMT into the SDK #10117

Closed
2 of 7 tasks
i-norden opened this issue Sep 11, 2021 · 0 comments · Fixed by #9892
Closed
2 of 7 tasks

ADR-040 Implementation: Hook state store and SMT into the SDK #10117

i-norden opened this issue Sep 11, 2021 · 0 comments · Fixed by #9892
Assignees

Comments

@i-norden
Copy link
Contributor

i-norden commented Sep 11, 2021

Child of #9816

At this stage we introduce a KVStore into the SDK that has decoupled state commitment (using SMT) and state storage. This will exist alongside the IAVL KVStore for the time being. In addition to this, included in this task are the updates to the SMT required to support automatic pruning of orphans and ics23 proofs.

For the SS we add two additional KV buckets:

  1. B1: key → value: the principal object storage, used by a state machine, behind the SDK KVStore interface: provides direct access by key and allows prefix iteration (KV DB backend must support it).
  2. B2: hash(key) → key: an index needed to extract a value (through: B2 -> B1) having an only a Merkle Path (hash(key)).

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@i-norden i-norden mentioned this issue Sep 20, 2021
38 tasks
@mergify mergify bot closed this as completed in #9892 Oct 19, 2021
mergify bot pushed a commit that referenced this issue Oct 19, 2021
## Description

Resolves: #10117

Implements a `CommitKVStore` which separates the concerns of state storage and state commitment according to [ADR-040](https://github.com/cosmos/cosmos-sdk/blob/eb7d939f86c6cd7b4218492364cdda3f649f06b5/docs/architecture/adr-040-storage-and-smt-state-commitments.md).

---

### 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
- [ ] 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))
- [x] provided a link to the relevant issue or specification
- [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules) - n/a
- [x] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing)
- [x] added a changelog entry to `CHANGELOG.md`
- [x] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [x] updated the relevant documentation 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 `!` 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants