Skip to content
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

Closed
wants to merge 23 commits into from

Conversation

noel2004
Copy link
Member

@noel2004 noel2004 commented May 18, 2022

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

@noel2004
Copy link
Member Author

Move comment here

#100 (comment)

core/blockchain.go Outdated Show resolved Hide resolved
"difficulty": "0x1",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"coinbase": "0x0000000000000000000000000000000000000000",
"alloc": {
Copy link

@mask-pp mask-pp May 19, 2022

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.

core/types/l2trace.go Outdated Show resolved Hide resolved
for _, v := range db.rawDirties {
batch.Put(v.K, v.V)
}
for k := range db.rawDirties {
Copy link

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.

Copy link
Member Author

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
Copy link

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.

Copy link
Member Author

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

@lispc lispc changed the title Improvment for the first phase of zktrie deprecated. Improvment for the first phase of zktrie May 19, 2022
@lispc lispc changed the title deprecated. Improvment for the first phase of zktrie wip. Improvment for the first phase of zktrie May 23, 2022
@lispc lispc changed the title wip. Improvment for the first phase of zktrie wip. Improvment for the second phase of zktrie May 23, 2022
@lispc lispc changed the title wip. Improvment for the second phase of zktrie wip. zktrie part2: add zktrie; allow switch trie type by config; storage witness converter May 23, 2022
@lispc lispc changed the title wip. zktrie part2: add zktrie; allow switch trie type by config; storage witness converter wip. zktrie part2: add zktrie; allow switch trie type by config; storage witness generator May 23, 2022
@lispc lispc closed this Jun 28, 2022
@noel2004
Copy link
Member Author

All works have been finished in #102, #113 and #123

@Thegaram Thegaram deleted the zkrollup-zktrie-ref branch March 21, 2023 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants