diff --git a/main/opcodes.zkasm b/main/opcodes.zkasm index 95f757e8..cfc860ae 100644 --- a/main/opcodes.zkasm +++ b/main/opcodes.zkasm @@ -373,8 +373,6 @@ opSARNeg: A :MSTORE(SP++) GAS-3 => GAS :JMP(readCode) -;opKECCAK256: -; GAS - 30 - 6*data_size_words - mem_expansion_cost opADDRESS: $ => A :MLOAD(txIsCreateContract) diff --git a/main/process_tx.zkasm b/main/process_tx.zkasm index 72adbdac..e7ae7ff1 100644 --- a/main/process_tx.zkasm +++ b/main/process_tx.zkasm @@ -235,7 +235,9 @@ endloopCreate2: create2end: HASHPOS :HASHKLEN(E) - $ => A :HASHKDIGEST(E) + $ => C :HASHKDIGEST(E) + ; A new hash with position 0 is started + 0 => HASHPOS $ => E :MLOAD(lastHashIdUsed) E+1 => E :MSTORE(lastHashIdUsed) ;keccak256( 0xff ++ address ++ salt ++ keccak256(init_code))[12:]