This repository was archived by the owner on Apr 11, 2021. It is now read-only.
StateDiff over Sqlite3#128
Merged
tynes merged 10 commits intofraudproof-apifrom Dec 3, 2020
Merged
Conversation
tynes
reviewed
Dec 1, 2020
tynes
reviewed
Dec 2, 2020
tynes
reviewed
Dec 2, 2020
tynes
approved these changes
Dec 3, 2020
Collaborator
tynes
left a comment
There was a problem hiding this comment.
Looks good to me, merging into fraudproof-api
gakonst
added a commit
that referenced
this pull request
Dec 10, 2020
* feat(diffdb): switch to sqlite3 * perf(diffdb): use db txs to write less often * test(ovm-state-manager): cleanup diff db each time * fix(core): intiialize diff db with 256 item cache * ci: fix import order * fix(blockchain): close the diff db handler * feat(cmd): add CLI params for db cache size * feat(backend): use chaindata dir * test(ovm-state-manager): remove globals * chore: use `defer` in tests for tmp files
gakonst
added a commit
that referenced
this pull request
Dec 10, 2020
* feat(diffdb): switch to sqlite3 * perf(diffdb): use db txs to write less often * test(ovm-state-manager): cleanup diff db each time * fix(core): intiialize diff db with 256 item cache * ci: fix import order * fix(blockchain): close the diff db handler * feat(cmd): add CLI params for db cache size * feat(backend): use chaindata dir * test(ovm-state-manager): remove globals * chore: use `defer` in tests for tmp files
gakonst
added a commit
that referenced
this pull request
Dec 10, 2020
* feat(diffdb): switch to sqlite3 * perf(diffdb): use db txs to write less often * test(ovm-state-manager): cleanup diff db each time * fix(core): intiialize diff db with 256 item cache * ci: fix import order * fix(blockchain): close the diff db handler * feat(cmd): add CLI params for db cache size * feat(backend): use chaindata dir * test(ovm-state-manager): remove globals * chore: use `defer` in tests for tmp files
gakonst
added a commit
that referenced
this pull request
Dec 11, 2020
* feat(diffdb): switch to sqlite3 * perf(diffdb): use db txs to write less often * test(ovm-state-manager): cleanup diff db each time * fix(core): intiialize diff db with 256 item cache * ci: fix import order * fix(blockchain): close the diff db handler * feat(cmd): add CLI params for db cache size * feat(backend): use chaindata dir * test(ovm-state-manager): remove globals * chore: use `defer` in tests for tmp files
tynes
pushed a commit
that referenced
this pull request
Dec 14, 2020
* fix: update gomod and gofmt * feat: initial scaffold for getting data * feat: hook state manager to diff db * feat: mvp diffdb with in-memory map * feat: hook diffdb on NewBlockchain * fix: use eth.diffdb in the API instead of re-instantiating it * test(ovm-state-manager): ensure that diffdb is called properly * test(ovm-state-manager): only update diffdb for non eth_call calls * fix: handle error if no state diff found * fix(blockchain): directly call diffdb.GetDiff * fix(ethapi): export StatediffProof json data * feat(diffdb): save if a key was mutated or not * feat(ovm-state-manager): save if a key was mutated * feat(ethapi): expose if a storage key was mutated or not in the diff * misc: fmt / lint / fix tests * fix(ovm-state-manager): use proper log.Error format * StateDiff over Sqlite3 (#128) * feat(diffdb): switch to sqlite3 * perf(diffdb): use db txs to write less often * test(ovm-state-manager): cleanup diff db each time * fix(core): intiialize diff db with 256 item cache * ci: fix import order * fix(blockchain): close the diff db handler * feat(cmd): add CLI params for db cache size * feat(backend): use chaindata dir * test(ovm-state-manager): remove globals * chore: use `defer` in tests for tmp files * fix(ovm): set diff keys on rest of state mutating calls * feat(diffdb): set account diffs at special key * test: sorted diff equality Co-authored-by: Karl Floersch <karl@karlfloersch.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces the in-memory map from #118 with Sqlite3. The db is stored under
chaindata/diffdb. It stored data in memory and writes to the db / flushes memory every N calls, set by a CLI param which defaults to 256.