-
Notifications
You must be signed in to change notification settings - Fork 3
Successful dry run, but execution fails #114
Copy link
Copy link
Closed
Labels
PVMProblem occurs at the execution stage for PVMProblem occurs at the execution stage for PVMReleaseerror: gasgas mapping issuegas mapping issue
Description
Given the following contract:
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
contract Test {
function test(uint256 len) external returns (uint16) {
assembly {
mstore(0, 0xc9b9b445) // with_value selector
mstore(32, len)
let success := call(gas(), address(), 0, 28, 36, 32, len)
for { let i := 0 } lt(i, len) { i := add(i, 1) }
{
if eq(mload(add(i, 32)), 1) {
return(0, 32)
}
}
}
return 0x123;
}
function with_value(uint256 len) external view returns (bytes memory) {
return new bytes(len);
}
}
When calling the function test with input value 0xfa00 on the revive dev node (crate revive-dev-node), then
- gas estimation (via
eth_estimateGas) is successful and returns{ jsonrpc: '2.0', id: 1, result: '0x5633d1' } - dry running (via
eth_call) is successful and returns{ jsonrpc: '2.0', id: 1, result: '0x5a631e7e05938' } - executing the transaction (via
eth_sendRawTransaction) fails with{ jsonrpc: '2.0', id: 1, error: { code: 1010, message: 'Invalid Transaction' }}
Note: this works correctly on the kitchensink node and the call has the expected behavior.
Expected Behavior
In case the transaction fails due to some specific configuration parameter in the revive dev node (e.g., some memory limit that is less restricted on kitchensink), then I would expect the gas estimation and dry run to fail as well.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
PVMProblem occurs at the execution stage for PVMProblem occurs at the execution stage for PVMReleaseerror: gasgas mapping issuegas mapping issue