diff --git a/src/zkevm_specs/evm/instruction.py b/src/zkevm_specs/evm/instruction.py index 75b62d839..67b86d5ec 100644 --- a/src/zkevm_specs/evm/instruction.py +++ b/src/zkevm_specs/evm/instruction.py @@ -500,9 +500,9 @@ def tx_log_lookup( RW.Write, RWTableTag.TxLog, key1=tx_id, - key2=log_id, + key2=FQ(index + int(field_tag) << 32 + log_id.expr().n << 48), key3=FQ(field_tag), - key4=FQ(index), + key4=FQ(0), ).value return value diff --git a/src/zkevm_specs/evm/typing.py b/src/zkevm_specs/evm/typing.py index 9e0615e4f..56bfa7dbd 100644 --- a/src/zkevm_specs/evm/typing.py +++ b/src/zkevm_specs/evm/typing.py @@ -374,9 +374,9 @@ def call_context_write( def tx_log_write( self, tx_id: IntOrFQ, - log_id: IntOrFQ, + log_id: int, field_tag: TxLogFieldTag, - index: IntOrFQ, + index: int, value: Union[int, FQ, RLC], ) -> RWDictionary: if isinstance(value, int): @@ -385,9 +385,9 @@ def tx_log_write( RW.Write, RWTableTag.TxLog, key1=FQ(tx_id), - key2=FQ(log_id), + key2=FQ(index + int(field_tag) << 32 + log_id << 48), key3=FQ(field_tag), - key4=FQ(index), + key4=FQ(0), value=value, )