-
Notifications
You must be signed in to change notification settings - Fork 278
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
wip. zktrie part2: add zktrie; allow switch trie type by config; storage witness generator #101
Conversation
* make emptyRoot applicable on both tries * make smt trace output just work Co-authored-by: Ho Vei <noelwei@gmail.com>
Move comment here |
"difficulty": "0x1", | ||
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
"coinbase": "0x0000000000000000000000000000000000000000", | ||
"alloc": { |
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.
It might be better to use existing account, or we need to provide private key files for those additional accounts.
for _, v := range db.rawDirties { | ||
batch.Put(v.K, v.V) | ||
} | ||
for k := range db.rawDirties { |
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.
Use make(KvMap)
be more simplely.
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.
not completely clear where should we use make(KvMap)
here. Do you mean the db.rawDirties
?
@@ -70,6 +70,10 @@ var ( | |||
type Database struct { | |||
diskdb ethdb.KeyValueStore // Persistent storage for matured trie nodes | |||
|
|||
// zktrie related stuff | |||
Zktrie bool |
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.
config.Zktrie
is not be used.
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.
It is used in stateDb for detouring some action when chain config has enabled zktrie
updated 2022.05.19(zzhang): I prefer split the zktrie and new storage proof mechanism. So there will be three PR finally
(1) change storage proof from step-wise to block-wise #102
(2) zktrie
(3) zktrie proof (the last 600 lines)
========= OLD CONTENTS =====
This work has finished the first part of a better PR for zktrie: inducing zktrie as an alternative storage layer and providing a more effective, unitify logging scheme for the L2 trace.
There is some breaking change for the trace output comparing to current zktrie work branch:
All the "proof" parts are purged from "extraData" field
The tracing for "after" status of SSTORE opcode is removed, and so "CaptureStateAfter" is of no use now
I think these changes has no affection on the trace handling of roller because no module would refer the proof part except for the mpt-circuit