privacy-scaling-explorations / zkevm-circuits

https://privacy-scaling-explorations.github.io/zkevm-circuits/
Other
815 stars 854 forks source link

Deduplication of gen_blockchain_data.rs #1556

Open ChihChengLiang opened 1 year ago

ChihChengLiang commented 1 year ago

The gen_blockchain_data deploys many contracts. It now has many duplication of deploy, get_block_number, blocks.insert, deployments.insert.

It would be great to extract functions to prevent code duplication.

https://github.com/privacy-scaling-explorations/zkevm-circuits/blob/999722fe638d14adc15fbc291c44792dd6ba07c3/integration-tests/src/bin/gen_blockchain_data.rs#L225-L244

Originally pointed out by @leolara in https://github.com/privacy-scaling-explorations/zkevm-circuits/pull/1550#discussion_r1284234211_

protocolwhisper commented 1 year ago

Hello, @ChihChengLiang this is for the specific branch 999722f?

ChihChengLiang commented 1 year ago

Hi @protocolwhisper, the issue remains in the current main branch. The commit hash 999722f is only used as a permalink to show the code block.

leolara commented 1 year ago

this is not urgent I think that is why I assigned it to me, but if someone else wants to do it, reassign and go for it

ChihChengLiang commented 1 year ago

@protocolwhisper, let us know if you would like to take this task.

protocolwhisper commented 1 year ago

Sure :)

ChihChengLiang commented 1 year ago

Hi @leolara, I reassigned to @protocolwhisper as this is a good first issue.

protocolwhisper commented 1 year ago

Hey 👋🏽, @ChihChengLiang.Can I get your comments on the PR?

ChihChengLiang commented 1 year ago

Hi @protocolwhisper, Yes, I've left some feedback on the PR.