Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RPC eth_call not executing transaction in the block specified #3526

Closed
krlosMata opened this issue Apr 4, 2024 · 0 comments
Closed

RPC eth_call not executing transaction in the block specified #3526

krlosMata opened this issue Apr 4, 2024 · 0 comments
Assignees
Labels

Comments

@krlosMata
Copy link

System information

zkEVM Node version: v0.6.4
OS & Version: Linux
Network: Cardona

Expected behaviour

eth_call takes as a parameter the blockNumber as a parameter in order to execute the payload on a specific blockNumber.
Tx being executed in the blockNumber provided

Actual behaviour

Looks like this is not happening in the node since transaction is always being executed in the latest block number

Steps to reproduce the behaviour

SC deployed:

// SPDX-License-Identifier: MIT
pragma solidity 0.8.18;

contract GetBlockHash {
    function getBlockTimestamp() public view returns (uint) {
        return block.timestamp;
    }
}

eth_call using cast:

cast call --rpc-url https://rpc.cardona.zkevm-rpc.com 0xDE12c2E97562Bbbd13e168256E5905A8432d92C5 "getBlockTimestamp()" -b 1982744 | cast to-dec

The above command should return always the same timestmap, but instead it returns always the latest one

  • Same command on Sepolia:
cast call --rpc-url https://sepolia.infura.io/v3/d48935b5e5bc4820a1b766f572efb6c1 0x3dCD87395b19bc78e5e889dCEA1722dea82C4Ed5 "getBlockTimestamp()" -b 5627043 | cast to-dec

returns always the same timestamp, which is the timestamp of the specified blockNumber

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants