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

Feat: enable use keccak for codehash #3

Merged
merged 4 commits into from
Dec 7, 2022

Conversation

chokobole
Copy link
Collaborator

This PR consists of 2 parts of commits.

This PR is needed because it is used to launch not only L2 chain but also L1 chain on voost side!

Wonyong Kim(Ryan Kim) added 3 commits December 7, 2022 18:42
6cda8c9 made changes to hexutil but the unit tests didn't reflect
the change.
Not only this, it fixes Database to return IsZktrie based on
ChainConfig.
This doesn't mean all the codes creating StateDB need to load with
Zktrie, such as test codes. This commit makes changes to only production
code.
@chokobole chokobole requested review from Pangssu and jyc228 December 7, 2022 09:45
@chokobole chokobole changed the base branch from optimism to dev December 7, 2022 09:46
This code is used to launch L1 devnet as well. So forcing to use
poseidon as code hash makes it incompatible.
@chokobole chokobole force-pushed the feat/enable-use-keccak-for-codehash branch from 53bbca3 to e45f327 Compare December 7, 2022 10:13
Copy link
Collaborator

@Pangssu Pangssu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@chokobole chokobole merged commit 0272c26 into dev Dec 7, 2022
@chokobole chokobole deleted the feat/enable-use-keccak-for-codehash branch December 7, 2022 11:44
chokobole pushed a commit that referenced this pull request Mar 8, 2023
This commit squashes the kanvas-geth fork history into a more maintainable
diff for rebasing upon upstream geth.

See https://github.com/wemixkanvas/go-ethereum/commits/op-geth-base
for more details about how op-geth changes geth code.

kanvas-geth changes:

- Merge pull request #17 from light-scale/fix/change-contract-address
- fix: change predeployed contract address
- Merge pull request #15 from light-scale/ci/lint
- Merge pull request #16 from light-scale/ci/pipeline
- ci: add ci pipeline and test pipeline
- ci: add worklows to run lint on push
- ci: change the style of the code so that linting succeeds
- Merge pull request #14 from light-scale/ci/test-disable
- disable unittest temporarily for CI introduction
- Merge pull request #13 from light-scale/feat/enable-tx-pool-sync-by-force
- feat: enable tx pool sync by force
- Merge pull request #11 from light-scale/feat/remove-daisy-chain
- feat: remove daisy chain
- Merge pull request #10 from light-scale/feat/set-pending-block-gas-limit
- Merge pull request #12 from light-scale/zktrie
- chore: upgrade zktrie library
- feat: enable setting pending block gas limit
- chore: rename optimism to kanvas
- ci: remove circle ci config
- Merge pull request #8 from light-scale/feat/add-fee-recipients-to-proof
- feat(core, eth): add Optimism{Base,L1}FeeRecipient to block trace
- feat: add Mint to TransactionTrace
- Merge pull request #5 from light-scale/feat/add-L1CostFunc-to-EVM-BlockContext
- fix(cmd): list ipcAPIs on alphabetical order
- fix(eth): add L1CostFunc to evm's block context
- refac(light): remove unneeded member variable
- perf(trie): disable preimage by default
- chore: rename voost to kanvas
- Merge pull request #3 from light-scale/feat/enable-use-keccak-for-codehash
- feat: use poseidon as code hash only with zktrie
- fix(cmd, core): load database with Zktrie when possible
- fix: fix segfault when referencing to Database
- fix(common, signer): make unit test passed

We wrapped code with comments like below to separate code change for
scroll-geth from op-geth.

```go
// [Scroll: START]
// changes for scroll-geth
// [Scroll: END]
```

scroll-geth changes:

- Merge pull request #1 from light-scale/feat/add-scroll-patches
- chore: add run_geth.sh
- feat: add GetBlockResultByNumberOrHash rpc
- feat: add CacheConfig to Backend interface
- feat(core): add some methods to StateDB interface
- feat: add MPTWitness to CacheConfig
- feat: use zktrie for state trie
- feat: apply poseidon to codehash
- feat(core): add ReturnValue to Receipt
- feat: add detailed contents to traces for zkevm
- feat(core/vm, eth/tracers): add CaptureStateAfter hook
- feat(core/vm): disable SelfDestruct opcode
- test(cmd, internal): add custom genesis test
chokobole pushed a commit that referenced this pull request Mar 8, 2023
This commit squashes the kanvas-geth fork history into a more maintainable
diff for rebasing upon upstream geth.

See https://github.com/wemixkanvas/go-ethereum/commits/op-geth-base
for more details about how op-geth changes geth code.

kanvas-geth changes:

- Merge pull request #17 from light-scale/fix/change-contract-address
- fix: change predeployed contract address
- Merge pull request #15 from light-scale/ci/lint
- Merge pull request #16 from light-scale/ci/pipeline
- ci: add ci pipeline and test pipeline
- ci: add worklows to run lint on push
- ci: change the style of the code so that linting succeeds
- Merge pull request #14 from light-scale/ci/test-disable
- disable unittest temporarily for CI introduction
- Merge pull request #13 from light-scale/feat/enable-tx-pool-sync-by-force
- feat: enable tx pool sync by force
- Merge pull request #11 from light-scale/feat/remove-daisy-chain
- feat: remove daisy chain
- Merge pull request #10 from light-scale/feat/set-pending-block-gas-limit
- Merge pull request #12 from light-scale/zktrie
- chore: upgrade zktrie library
- feat: enable setting pending block gas limit
- chore: rename optimism to kanvas
- ci: remove circle ci config
- Merge pull request #8 from light-scale/feat/add-fee-recipients-to-proof
- feat(core, eth): add Optimism{Base,L1}FeeRecipient to block trace
- feat: add Mint to TransactionTrace
- Merge pull request #5 from light-scale/feat/add-L1CostFunc-to-EVM-BlockContext
- fix(cmd): list ipcAPIs on alphabetical order
- fix(eth): add L1CostFunc to evm's block context
- refac(light): remove unneeded member variable
- perf(trie): disable preimage by default
- chore: rename voost to kanvas
- Merge pull request #3 from light-scale/feat/enable-use-keccak-for-codehash
- feat: use poseidon as code hash only with zktrie
- fix(cmd, core): load database with Zktrie when possible
- fix: fix segfault when referencing to Database
- fix(common, signer): make unit test passed

We wrapped code with comments like below to separate code change for
scroll-geth from op-geth.

```go
// [Scroll: START]
// changes for scroll-geth
// [Scroll: END]
```

scroll-geth changes:

- Merge pull request #1 from light-scale/feat/add-scroll-patches
- chore: add run_geth.sh
- feat: add GetBlockResultByNumberOrHash rpc
- feat: add CacheConfig to Backend interface
- feat(core): add some methods to StateDB interface
- feat: add MPTWitness to CacheConfig
- feat: use zktrie for state trie
- feat: apply poseidon to codehash
- feat(core): add ReturnValue to Receipt
- feat: add detailed contents to traces for zkevm
- feat(core/vm, eth/tracers): add CaptureStateAfter hook
- feat(core/vm): disable SelfDestruct opcode
- test(cmd, internal): add custom genesis test
chokobole pushed a commit that referenced this pull request Mar 8, 2023
This commit squashes the kanvas-geth fork history into a more maintainable
diff for rebasing upon upstream geth.

See https://github.com/wemixkanvas/go-ethereum/commits/op-geth-base
for more details about how op-geth changes geth code.

kanvas-geth changes:

- Merge pull request #17 from light-scale/fix/change-contract-address
- fix: change predeployed contract address
- Merge pull request #15 from light-scale/ci/lint
- Merge pull request #16 from light-scale/ci/pipeline
- ci: add ci pipeline and test pipeline
- ci: add worklows to run lint on push
- ci: change the style of the code so that linting succeeds
- Merge pull request #14 from light-scale/ci/test-disable
- disable unittest temporarily for CI introduction
- Merge pull request #13 from light-scale/feat/enable-tx-pool-sync-by-force
- feat: enable tx pool sync by force
- Merge pull request #11 from light-scale/feat/remove-daisy-chain
- feat: remove daisy chain
- Merge pull request #10 from light-scale/feat/set-pending-block-gas-limit
- Merge pull request #12 from light-scale/zktrie
- chore: upgrade zktrie library
- feat: enable setting pending block gas limit
- chore: rename optimism to kanvas
- ci: remove circle ci config
- Merge pull request #8 from light-scale/feat/add-fee-recipients-to-proof
- feat(core, eth): add Optimism{Base,L1}FeeRecipient to block trace
- feat: add Mint to TransactionTrace
- Merge pull request #5 from light-scale/feat/add-L1CostFunc-to-EVM-BlockContext
- fix(cmd): list ipcAPIs on alphabetical order
- fix(eth): add L1CostFunc to evm's block context
- refac(light): remove unneeded member variable
- perf(trie): disable preimage by default
- chore: rename voost to kanvas
- Merge pull request #3 from light-scale/feat/enable-use-keccak-for-codehash
- feat: use poseidon as code hash only with zktrie
- fix(cmd, core): load database with Zktrie when possible
- fix: fix segfault when referencing to Database
- fix(common, signer): make unit test passed

We wrapped code with comments like below to separate code change for
scroll-geth from op-geth.

```go
// [Scroll: START]
// changes for scroll-geth
// [Scroll: END]
```

scroll-geth changes:

- Merge pull request #1 from light-scale/feat/add-scroll-patches
- chore: add run_geth.sh
- feat: add GetBlockResultByNumberOrHash rpc
- feat: add CacheConfig to Backend interface
- feat(core): add some methods to StateDB interface
- feat: add MPTWitness to CacheConfig
- feat: use zktrie for state trie
- feat: apply poseidon to codehash
- feat(core): add ReturnValue to Receipt
- feat: add detailed contents to traces for zkevm
- feat(core/vm, eth/tracers): add CaptureStateAfter hook
- feat(core/vm): disable SelfDestruct opcode
- test(cmd, internal): add custom genesis test
chokobole pushed a commit that referenced this pull request Mar 9, 2023
This commit squashes the kanvas-geth fork history into a more maintainable
diff for rebasing upon upstream geth.

See https://github.com/wemixkanvas/go-ethereum/commits/op-geth-base
for more details about how op-geth changes geth code.

kanvas-geth changes:

- Merge pull request #17 from light-scale/fix/change-contract-address
- fix: change predeployed contract address
- Merge pull request #15 from light-scale/ci/lint
- Merge pull request #16 from light-scale/ci/pipeline
- ci: add ci pipeline and test pipeline
- ci: add worklows to run lint on push
- ci: change the style of the code so that linting succeeds
- Merge pull request #14 from light-scale/ci/test-disable
- disable unittest temporarily for CI introduction
- Merge pull request #13 from light-scale/feat/enable-tx-pool-sync-by-force
- feat: enable tx pool sync by force
- Merge pull request #11 from light-scale/feat/remove-daisy-chain
- feat: remove daisy chain
- Merge pull request #10 from light-scale/feat/set-pending-block-gas-limit
- Merge pull request #12 from light-scale/zktrie
- chore: upgrade zktrie library
- feat: enable setting pending block gas limit
- chore: rename optimism to kanvas
- ci: remove circle ci config
- Merge pull request #8 from light-scale/feat/add-fee-recipients-to-proof
- feat(core, eth): add Optimism{Base,L1}FeeRecipient to block trace
- feat: add Mint to TransactionTrace
- Merge pull request #5 from light-scale/feat/add-L1CostFunc-to-EVM-BlockContext
- fix(cmd): list ipcAPIs on alphabetical order
- fix(eth): add L1CostFunc to evm's block context
- refac(light): remove unneeded member variable
- perf(trie): disable preimage by default
- chore: rename voost to kanvas
- Merge pull request #3 from light-scale/feat/enable-use-keccak-for-codehash
- feat: use poseidon as code hash only with zktrie
- fix(cmd, core): load database with Zktrie when possible
- fix: fix segfault when referencing to Database
- fix(common, signer): make unit test passed

We wrapped code with comments like below to separate code change for
scroll-geth from op-geth.

```go
// [Scroll: START]
// changes for scroll-geth
// [Scroll: END]
```

scroll-geth changes:

- Merge pull request #1 from light-scale/feat/add-scroll-patches
- chore: add run_geth.sh
- feat: add GetBlockResultByNumberOrHash rpc
- feat: add CacheConfig to Backend interface
- feat(core): add some methods to StateDB interface
- feat: add MPTWitness to CacheConfig
- feat: use zktrie for state trie
- feat: apply poseidon to codehash
- feat(core): add ReturnValue to Receipt
- feat: add detailed contents to traces for zkevm
- feat(core/vm, eth/tracers): add CaptureStateAfter hook
- feat(core/vm): disable SelfDestruct opcode
- test(cmd, internal): add custom genesis test
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.

2 participants