zkevm-circuits icon indicating copy to clipboard operation
zkevm-circuits copied to clipboard

Required opcodes for advanced l2 bridge contracts

Open pinkiebell opened this issue 3 years ago • 6 comments

Further opcodes for more advanced l2 contracts (compatibility layers, erc-20 factories etc):
  • [x] EXTCODEHASH https://github.com/appliedzkp/zkevm-circuits/pull/353
  • [ ] EXTCODESIZE
  • [ ] CREATE2
  • [x] CODECOPY
  • [x] SELFBALANCE https://github.com/appliedzkp/zkevm-circuits/pull/328
  • [x] CHAINID https://github.com/appliedzkp/zkevm-specs/pull/168
  • [x] SLOAD https://github.com/appliedzkp/zkevm-circuits/pull/353 + https://github.com/appliedzkp/zkevm-circuits/pull/334
  • [x] SSTORE
  • [x] DELEGATECALL #847
  • [x] STATICCALL #801

#277

pinkiebell avatar Mar 04 '22 12:03 pinkiebell

SELFBALANCE is done: https://github.com/appliedzkp/zkevm-circuits/blob/main/zkevm-circuits/src/evm_circuit/execution/selfbalance.rs

z2trillion avatar Mar 07 '22 06:03 z2trillion

I'm going to take CHAINID :)

CPerezz avatar Apr 04 '22 09:04 CPerezz

@pinkiebell, I wanna make sure did the create2 haven done.

ps: I've seen impl<const IS_CREATE2: bool> Opcode for DummyCreate<IS_CREATE2> in the create opcode in bus-mapping.

SuccinctPaul avatar Dec 03 '22 09:12 SuccinctPaul

@ChengYueJia There seems to be a bus-mapping implementation but it's still named dummy. cc/ @z2trillion @lispc regarding status on this one. 1

On the other hand these opcodes are not handled in the evm circuit yet 2 - only dummy gadgets. As far as I know they are up for grabs :)

pinkiebell avatar Dec 03 '22 09:12 pinkiebell

Looks like EXTCODESIZE has a wrong reference 😅

pinkiebell avatar Dec 03 '22 09:12 pinkiebell

Looks like EXTCODESIZE has a wrong reference 😅

Just started to work on this opcode by this spec issue 🙏 https://github.com/privacy-scaling-explorations/zkevm-specs/issues/327

silathdiir avatar Dec 03 '22 09:12 silathdiir

The remaining CREATE opcode is tracked in #1130 Meta issue can be closed for just 1 item left.

ChihChengLiang avatar May 19 '23 08:05 ChihChengLiang