Network Update

JSON-RPC API changes

4min

Overview

There are some important API changes arising as a result of changing the node software from Hyperledger Besu to Polygon Edge. The majority of API calls are unchanged and should return the same results, however it's recommended that testing is carried out on your application to ensure that there are no unexpected issues arising from the switch to the Edge client.

API methods

The table below lists the API methods available with Polygon Edge.

Method

Comment

DEBUG methods:

  • debug_traceBlock
  • debug_traceBlockByHash
  • debug_traceBlockByNumber
  • debug_traceCall
  • debug_traceTransaction

These should be used in place of any existing usage of TRACE methods

ETH methods:

  • eth_blockNumber
  • eth_call
  • eth_chainId
  • eth_estimateGas
  • eth_feeHistory
  • eth_gasPrice
  • eth_getBalance
  • eth_getBlockByHash
  • eth_getBlockByNumber
  • eth_getBlockTransactionCountByNumber
  • eth_getCode
  • eth_getFilterChanges
  • eth_getFilterLogs
  • eth_getLogs
  • eth_getStorageAt
  • eth_getTransactionByHash
  • eth_getTransactionCount
  • eth_getTransactionReceipt
  • eth_maxPriorityFeePerGas
  • eth_newBlockFilter
  • eth_newFilter
  • eth_sendRawTransaction
  • eth_subscribe
  • eth_syncing
  • eth_uninstallFilter
  • eth_unsubscribe



NET methods:

  • net_listening
  • net_peerCount
  • net_version



TXPOOL methods:

  • txpool_content
  • txpool_inspect
  • txpool_status



WEB3 methods:

  • web3_clientVersion
  • web3_sha3





API methods no longer available

The table below lists methods that are not available in Polygon Edge. Some have never been applicable to Palm network (such as Proof of Work methods), so are unlikely to be an issue.

Alternatives for the most commonly-used methods such as the TRACE are outlined below where applicable.

If there are any missing RPC methods that are essential for your application to be retained or replaced, please get in touch.

Method

Comment / Alternative

ADMIN methods:

  • admin_addPeer
  • admin_changeLogLevel
  • admin_generateLogBloomCache
  • admin_logsRemoveCache
  • admin_logsRepairCache
  • admin_nodeInfo
  • admin_peers
  • admin_removePeer

This info can be obtained direct from the polygon-edge client

Subset of DEBUG methods:

  • debug_accountAt
  • debug_accountRange
  • debug_batchSendRawTransaction
  • debug_getBadBlocks
  • debug_getRawBlock
  • debug_getRawHeader
  • debug_metrics
  • debug_replayBlock
  • debug_resyncWorldstate
  • debug_setHead
  • debug_standardTraceBadBlockToFile
  • debug_standardTraceBlockToFile
  • debug_storageRangeAt

No alternatives.

Subset of ETH methods:

  • eth_accounts
  • eth_coinbase
  • eth_createAccessList
  • eth_getBlockTransactionCountByHash
  • eth_getMinerDataByBlockHash
  • eth_getMinerDataByBlockNumber
  • eth_getProof
  • eth_getTransactionByBlockHashAndIndex
  • eth_getTransactionByBlockNumberAndIndex
  • eth_getUncleByBlockHashAndIndex
  • eth_getUncleByBlockNumberAndIndex
  • eth_getUncleCountByBlockHash
  • eth_getUncleCountByBlockNumber
  • eth_getWork
  • 
  • eth_hashrate
  • eth_mining
  • eth_newPendingTransactionFilter
  • eth_protocolVersion
  • eth_submitHashrate
  • eth_submitWork

Majority are not applicable to Palm network (e.g. proof-of-work methods)

IBFT methods

  • ibft_discardValidatorVote
  • ibft_getPendingVotes
  • ibft_getSignerMetrics
  • ibft_getValidatorsByBlockHash
  • ibft_getValidatorsByBlockNumber
  • ibft_proposeValidatorVote

Primarily used for managing validators on Palm network, these are replaced by new contract-based methods for managing validators

MINER methods

  • miner_changeTargetGasLimit
  • miner_setCoinbase
  • miner_start
  • miner_stop

Not applicable to Palm network

NET methods

  • net_enode
  • net_services

No alternatives.

PLUGINS methods

  • plugins_reloadPluginConfig

Applicable to besu software only

TRACE methods

  • trace_block
  • trace_call
  • trace_callMany
  • trace_filter
  • trace_get
  • trace_rawTransaction
  • trace_replayBlockTransactions
  • trace_transaction

DEBUG methods should be used as alternatives:

  • debug_traceBlock
  • debug_traceBlockByHash
  • debug_traceBlockByNumber
  • debug_traceTransaction

TXPOOL methods

  • txpool_besuPendingTransactions
  • txpool_besuStatistics
  • txpool_besuTransactions

Applicable to besu software only



API differences

The following methods are available in Edge, but may have different interpretations/calculations of data or have additional parameters

Method

Difference

eth_gasPrice

  • Besu: calculcated based on median gas price of transactions in 100 most recent blocks
  • Edge: moving average (mean) calculation of gas price based on sample of transactions in past 20 blocks

This may give rise to slightly different results at particular blocks however overall, the data is fairly consistent.



Updated 25 Mar 2024
Doc contributor
Doc contributor
Did this page help you?