-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
feat: ADR-040: Implement KV Store with decoupled storage and SMT #9892
Conversation
14daa15
to
2c6c90d
Compare
00bc622
to
7ed1be9
Compare
I'm not sure what to make of all these build failures - CI wants to update go.mod. Could it be related to the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we perhaps review this PR together in a call?
return "StoreTypeSMT" | ||
|
||
case StoreTypeDecoupled: | ||
return "StoreTypeDecoupled" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is this type?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This represents the new decoupled.Store
type
b0acc1c
to
207363c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this change @roysc! I've added some comments from the first pass, please take a look.
c733df3
to
514c119
Compare
store/v2/decoupled/store.go
Outdated
@@ -0,0 +1,493 @@ | |||
package decoupled |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO - rename this package/store ("decoupled" being somewhat a misnomer)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've been drawing a blank on a good alternative name. Perhaps "flat" store, to reflect that reads don't need a tree traversal? Open to suggestions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
flat def sounds good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
left some comments.
I've expanded the test coverage for the |
@odeke-em I've addressed the changes from your review - if you can approve, this is ready to merge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @roysc for this work! LGTM but with some suggestions, please take a look, and congrats! I have some future changes I'll send to further increase performance but I won't distract this critical change from landing for now :-) I shall also then be able to send benchmarks after this lands.
@roysc could you update the branch to master, the bot will take care of the merge |
@roysc some of this code doesn't compile and failed per https://dashboard.github.orijtech.com/benchmark/c29ef717d40744458619a51d565e7471 |
Oh, that's bad. I'll make a patch right now. I forgot the nested module's tests are not included in CI. |
Thanks for the prompt fix, looks good now https://dashboard.github.orijtech.com/benchmark/6d259263f5784f348c9b5153eb553e1f. No, you don't need an issue for it. |
@@ -128,3 +131,5 @@ replace google.golang.org/grpc => google.golang.org/grpc v1.33.2 | |||
replace github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 | |||
|
|||
replace github.com/99designs/keyring => github.com/cosmos/keyring v1.1.7-0.20210622111912-ef00f8ac3d76 | |||
|
|||
replace github.com/cosmos/cosmos-sdk/db => ./db |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe a dumb question: What is the purpose of this line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh nvm, it's because db is its own module.
Description
Resolves: #10117
Implements a
CommitKVStore
which separates the concerns of state storage and state commitment according to ADR-040.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...
!
to the type prefix if API or client breaking changeCHANGELOG.md
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...
!
in the type prefix if API or client breaking change