-
Notifications
You must be signed in to change notification settings - Fork 279
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
zktrie part2: add zktrie; allow switch trie type by config; #113
Conversation
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.
Just one minor comment. otherwise LGTM
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.
Overall LGTM, just a nitpick
It's necessary to update readme so we can use it easily. |
"period": 15, | ||
"epoch": 30000 | ||
}, | ||
"zktrie": true |
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.
Is it possible to use the same genesis.json file, and choose zktrie module by cmd params i.g: 'geth --zktrie' ?
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.
Cmd params may be not feasible because the data being persisted in db is complete different for zktrie. Run geth with zktrie on data saved without this flag just ruin the whole db and vice visa. It has to be a flag in chain's config.
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.g: ./build/bin/geth init --zktrie
,init
is subcmd and can add the flag at here.
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 think it is ok only being applied in init sub command. But the genesis object in init is mandatory, as the result it may be a confliction if we have specified zktrie flag both in genesis object and cmd flag and we need a rule for respecting which one.
I found the original geth cmd do not handle such an issue by put all possible flags only avaliable in the genesis object. So should we really need such a flag for cmd (even for the possible risk of causing some confusion)?
This PR re-organize the original #101 :
Induce zktrie implement on top of part1 (zktrie part1: change storage proof from per step to per block #102, which has been merged)
Significant refactoring: