forked from ethereum/go-ethereum
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: State Diff data for fraud proofs (ethereum#118)
* 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 (ethereum#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>
- Loading branch information
1 parent
f1fdce0
commit 6a04e39
Showing
23 changed files
with
786 additions
and
31 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
contracts/canonicaltransactionchain/OVM_CanonicalTransactionChain.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.