-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
R4R: Store Refactor #2344
R4R: Store Refactor #2344
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #2344 +/- ##
===========================================
- Coverage 58.82% 58.51% -0.31%
===========================================
Files 152 144 -8
Lines 9425 8213 -1212
===========================================
- Hits 5544 4806 -738
+ Misses 3511 3091 -420
+ Partials 370 316 -54 |
a43b50f
to
80a4921
Compare
@mossid Do you want to rebase this? I still think the refactor is a great idea and would be happy to review (sorry it didn't happen sooner)! |
db4905a
to
ab13269
Compare
218f495
to
bc2b7f7
Compare
@mossid Thanks for rebasing. Let's pair review this in person, maybe early next week. |
483ecfa
to
e1bd6dd
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.
@mossid this PR is pretty hefty...I really don't know how to start as I'm sure I'll miss something. May I suggest perhaps breaking it up into sub PR (I, II, III, etc...) if possible?
Thoughts @ValarDragon?
@@ -115,7 +115,7 @@ func (app *BaseApp) Name() string { | |||
// SetCommitMultiStoreTracer sets the store tracer on the BaseApp's underlying | |||
// CommitMultiStore. | |||
func (app *BaseApp) SetCommitMultiStoreTracer(w io.Writer) { | |||
app.cms.WithTracer(w) | |||
app.cms.GetTracer().Writer = w |
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.
The initial API call was bad and that's my fault. Can we just do app.cms.SetTracer(w)
?
keyMain *sdk.KVStoreKey | ||
keyAccount *sdk.KVStoreKey | ||
keyStake *sdk.KVStoreKey | ||
keyMain *sdk.IAVLStoreKey |
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.
Mhmmm, why did we rename these? This assumes IAVL usage, although it probably won't change for Gaia.
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 don't want us to have this key... an IAVLStore is a KVStore... no need to create key types for specific types of KVStores. In the future we may have other store types like HeapStores.
lol this PR is gigantic |
@mossid way out of date - please update, we should get this in |
Closing in favor of #2986 |
Closes: #2309
Targeted PR against correct branch (see CONTRIBUTING.md)
Linked to github-issue with discussion and accepted design OR link to spec that describes this work.
Wrote tests
Updated relevant documentation (
docs/
)Added entries in
PENDING.md
with issue #rereviewed
Files changed
in the github PR explorergas.go
,store.go
, are moved tostore/
types/
importsstore/
now and reexports types/functionsStoreType
enum, insteadStoreKey
s are dependent on concrete store implementationerrors.go
to reduce dependencytraceWriter io.Writer
andtraceContext TraceContext
are merged intoTracer
meter GasMeter
andconfig GasConfig
are merged intoGasTank
For Admin Use: