Integration of the Ethereum Remote Procedure Call (RPC)
RPC Integration Process
The integration of the Ethereum Remote Procedure Call (RPC) system involves a two-step process, detailed in the following subsections.
1. Node enhancements
The signature verification logic has been enhanced to support Ethereum's curve, secp256k1. This improvement was effectively incorporated using existing abstractions and interfaces.
To accommodate Ethereum's standard, transactions now include additional information, seamlessly reaching the node. After initial processing, these transactions are converted to conform to the default MultiversX format, ensuring smooth progression through the next processing stages.
2. RPC endpoints integration into MultiversX's Proxy
OneFinity's RPC integration leverages Go Ethereum. Key points:
Endpoints are responsible for translating between Ethereum and MultiversX formats.
The translation includes the conversion between Ethereum based addresses and MultiversX based addresses
Certain endpoints, such as
eth_call
, automatically prefill data to ensure requests are accurately mapped to the MultiversX API.Websockets are not supported at the moment
3. Available OneFinity's RPC Endpoints and key differences
eth_chainId - fully supported
eth_gasPrice - fully supported
eth_getBalance - fully supported
eth_blockNumber - returns the latest finalised block number
eth_getBlockByNumber
Ethereum's special filters are mapped to the following MultiversX equivalent
PendingBlockNumber
,LatestBlockNumber
-> latest block numberFinalizedBlockNumber
,SafeBlockNumber
-> latest finalised block number
fullTx is supported
certain Ethereum-specific fields that lack equivalents on MultiversX will not be included in the response.
eth_getBlockByHash
similar to
eth_getBlockByNumber
, Ethereum-specific fields are omitted in the response.
eth_getCode - fully supported
eth_getStorageAt - it is supported; however, the output may vary since it retrieves data from MultiversX-based storage.
eth_getBlockReceipts
simillarly to eth_getBlockBy endpoints, the filters are supported
certain Ethereum-specific fields that lack equivalents on MultiversX will not be included in the response (eg. transactionIndex, cumulativeGasUsed)
eth_call
while MultiversX doesn't have an exact equivalent for this method, its implementation aims to fully support it to the best possible extent. When invoking
eth_call
on Ethereum, many request parameters can be omitted. To ensure compatibility, we prefill any information that would be mandatory in order to make the API requests on MultiversXthe implementation switches between calling the MultiversX's simulate transaction and sc query based on the parameters sent on the request
state and block overrides are not currently supported
eth_estimateGas
the request will be prefilled with any additional data in order to ensure compatibility
state overrides are not currently supported
eth_getBlockTransactionCountByNumber - fully supported
eth_getBlockTransactionCountByHash - fully supported
eth_getTransactionCount - fully supported
eth_getTransactionByHash
certain Ethereum-specific fields that lack equivalents on MultiversX will not be included in the response (eg. TransactionIndex, GasFeeCap)
eth_getTransactionReceipt
similar to
eth_getTransactionByHash
, Ethereum-specific fields are omitted in the response.
eth_sendRawTransaction - fully supported
will take care of the mapping between the Ethereum transaction format and the MultiversX transaction format
Environment-specific RPC configurations
Please see the relevant section here.
Last updated