0xPolygonHermez / zkevm-node

Go implementation of a node that operates the Polygon zkEVM Network
Other
507 stars 643 forks source link

Encountering mismatched log event data between zkEVM and Ethereum #3634

Open zjg555543 opened 1 month ago

zjg555543 commented 1 month ago

System information

Network: Testnet

Expected behaviour

The contract's log event data should be the same.

Actual behaviour

There's a mismatch in the logged event data.

Steps to reproduce the behaviour

zkevm: 102030 sepolia: 010203

Performing a transfer operation using the emitEvent function.

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

contract Padded {
    event Test0(bytes data);

    function emitEvent() public {
        bytes memory myData = hex"010203"; 
        bytes32 eventSignature = keccak256("Test0(bytes)"); 
        assembly {
            let dataPtr := add(myData, 32)
            let dataLength := mload(myData)
            log1(dataPtr, dataLength, eventSignature)
        }
    }
}
tclemos commented 1 month ago

We are investigating it. Thanks for sharing it.