(Notice!) Upcoming Ethereum API changes

[UPDATE: November 12, 2020] As part of our response to a service interruption that we experienced on 11/11/2020, we have updated our client backend infrastructure on short notice, and these changes we had previously postponed are now live.

[UPDATE: November 2, 2020] In order to provide a more stable upgrade path for our infrastructure we have decided to postpone this maintenance and will send out another announcement when a new date is set. Users do not have to take any action for the time being.

Upcoming Ethereum API changes

Infura will be upgrading portions of its core infrastructure to ensure its public Ethereum API remains compatible with the API spec as implemented by common Ethereum clients such as Geth. The upgrade will bring about some changes that users will need to be aware of; however, we estimate that the number of users impacted by these changes will be small.

Timeline

The infrastructure upgrade changes will take place on November 3, 2020 and will affect the following Ethereum RPCs:

  • eth_call
  • eth_estimateGas
  • eth_sendRawTransaction

Updates and reminders will be provided on this site, as well as the Infura status page, as the target date gets closer.

What is changing

The upgrade will operate the following changes on the affected RPC functionality:

Request argument changes in eth_call

The from field, that specifies the address the call is coming from, will be required and no longer optional.

Response changes in eth_call, eth_estimateGas, eth_sendRawTransaction

On Mainnet, Rinkeby, Ropsten and Görli, if these RPCs cause the EVM to execute a REVERT operation, the RPC response will now be an error that includes a message field as a string in addition to the raw data in the data field, to maintain compatibility with current versions of Geth. For example:

{
   "jsonrpc": "2.0",
   "id": 1,
   "error": {
       "code": 3,
       "message": "execution reverted: Dai/insufficient-balance",
       "data":"0x08c379a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000184461692f696e73756666696369656e742d62616c616e63650000000000000000"
   }
}

On Kovan, the revert reason will only be returned for eth_call RPCs, and in the same situation it won’t be pre-decoded in the response, but will still be available as part of the encoded data field, to maintain compatibility with current versions of OpenEthereum. For example:

{
  "jsonrpc": "2.0",
  "id": 1,
  "error": {
    "code": -32015,
    "data": "Reverted 0x08c379a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000204f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572",
    "message": "VM execution error."
  }
}

The data string in the example above would decode to the actual revert reason string “Ownable: caller is not the owner” as would be returned by the client.

Conclusion

We’re confident that this will help maintain compatibility with our users’ applications while keeping our offering up to date with improvements in Ethereum JSON-RPC spec implementations. Please check this site or the Infura status page for updates, and for any further questions drop us a message here.