Running more than 20 production blockchains, SKALED is Ethereum-compatible, high performance C++ Proof-of-Stake client, tools and libraries. Uses SKALE consensus as a blockchain consensus core. Includes dynamic Oracle. Implements file storage and retrieval as an EVM extension.
When attempting to estimate gas for GnosisSafe calls on the SKALE Network, specifically for the simulateAndRevert function, the node does not return the expected revert bytes containing gas usage information. This behavior differs from other EVM-compatible networks, such as Ethereum mainnet, where the revert bytes are correctly returned and can be decoded to extract the gas used.
Steps to Reproduce
Prepare an eth_call request to a GnosisSafe contract's simulateAndRevert function on the SKALE Network.
Execute the request using the SKALE Network RPC endpoint.
Observe the response, which should contain revert bytes with gas usage information.
Expected Behavior
The eth_call should return revert bytes that can be decoded to extract the gas used, similar to the behavior observed on Ethereum mainnet.
Actual Behavior
The SKALE node returns an EVM revert instruction without a description message or revert bytes containing gas usage information.
The issue specifically affects the GnosisSafe(safeAddress).simulateAndRevert(address targetContract, calldataPayload) call.
The targetContract in this case is the SimulateTxAccessor contract(a contract deployed as part of a standard GnosisSafe deployment).
The calldataPayload is the encoded data for the SimulateTxAccessor.simulate(...) function.
The above examples are for simulating a function setTwapPeriod(uint32) call, this can be verified by recursively decoding the calldata using a tool such as https://tools.deth.net/calldata-decoder
Impact
This issue prevents accurate gas estimation for GnosisSafe transactions on the SKALE Network, which can lead to transaction failures or inefficient gas usage. It also creates inconsistencies for applications that rely on this gas estimation method when integrating with multiple EVM-compatible networks.
Possible Solution
Investigate the implementation of the eth_call method on the SKALE Network, particularly for cases involving REVERT opcodes. Ensure that the node correctly captures and returns the revert data, including gas usage information, in a manner consistent with other EVM-compatible networks.
This behavior was compared against Ethereum mainnet, where the same type of call correctly returns the revert bytes containing gas usage information. Addressing this issue will improve compatibility and consistency for applications using GnosisSafe on the SKALE Network.
Description
When attempting to estimate gas for GnosisSafe calls on the SKALE Network, specifically for the
simulateAndRevert
function, the node does not return the expected revert bytes containing gas usage information. This behavior differs from other EVM-compatible networks, such as Ethereum mainnet, where the revert bytes are correctly returned and can be decoded to extract the gas used.Steps to Reproduce
eth_call
request to a GnosisSafe contract'ssimulateAndRevert
function on the SKALE Network.Expected Behavior
The
eth_call
should return revert bytes that can be decoded to extract the gas used, similar to the behavior observed on Ethereum mainnet.Actual Behavior
The SKALE node returns an EVM revert instruction without a description message or revert bytes containing gas usage information.
Example
SKALE Network Request
SKALE Network Response
Ethereum Mainnet Request (for comparison)
Ethereum Mainnet Response (for comparison)
Additional Context
GnosisSafe(safeAddress).simulateAndRevert(address targetContract, calldataPayload)
call.targetContract
in this case is theSimulateTxAccessor
contract(a contract deployed as part of a standard GnosisSafe deployment).calldataPayload
is the encoded data for theSimulateTxAccessor.simulate(...)
function.function setTwapPeriod(uint32)
call, this can be verified by recursively decoding the calldata using a tool such as https://tools.deth.net/calldata-decoderImpact
This issue prevents accurate gas estimation for GnosisSafe transactions on the SKALE Network, which can lead to transaction failures or inefficient gas usage. It also creates inconsistencies for applications that rely on this gas estimation method when integrating with multiple EVM-compatible networks.
Possible Solution
Investigate the implementation of the
eth_call
method on the SKALE Network, particularly for cases involvingREVERT
opcodes. Ensure that the node correctly captures and returns the revert data, including gas usage information, in a manner consistent with other EVM-compatible networks.Environment
https://mainnet.skalenodes.com/v1/elated-tan-skat
simulateAndRevert
Additional Notes
This behavior was compared against Ethereum mainnet, where the same type of call correctly returns the revert bytes containing gas usage information. Addressing this issue will improve compatibility and consistency for applications using GnosisSafe on the SKALE Network.