RPC `eth_call` not executing transaction in the block specified
krlosMata opened this issue · comments
Carlos Matallana commented
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