Skip to content

Instantly share code, notes, and snippets.

@cordt-sei
Last active October 18, 2024 02:48
Show Gist options
  • Save cordt-sei/92e1435af65bad15eca67b716ef82a8d to your computer and use it in GitHub Desktop.
Save cordt-sei/92e1435af65bad15eca67b716ef82a8d to your computer and use it in GitHub Desktop.

Important Update to RPC Data and Endpoints

We believe providing both a unified, simplified solution alongside the original untouched data streams is the most sensible path forward for the majority of developers. In an effort to avoid introducing further frustration and integration issues while solving any existing problems, we are reverting the EVM RPC to its original specification and introducing several new custom API methods that will continue serving synthetic events.

We apologize for any inconvenience and additional work this has caused. These changes have been made with long-term stability in mind and should fully resolve the current situation. Please review carefully to ensure your applications continue functioning as expected and your data remains accurate.

What’s Changing:

  • Reversion of the EVM RPC:

    • The modified EVM RPC will be reverted to 100% conform to the EVM standard. This means that eth_getLogs, eth_getBlock, and eth_getBlockByNumber will no longer include any Tendermint or synthetic data.
  • Introduction of a Third Custom RPC (Combined Data):

    • A third "combined" custom RPC will serve both EVM and synthetic Tendermint data, as in v5.8.0. This custom RPC (sei_getLogs, sei_getBlock, sei_getBlockByNumber) will allow users who require a unified view of both data streams to continue using a single RPC endpoint without breaking existing applications that rely on unmodified EVM responses.

Specific API Changes:

  • EVM RPC Changes:

    • eth_getLogs, eth_getBlock, and eth_getBlockByNumber will return only EVM data, with no synthetic or echoed events.
  • New Sei-Specific RPC:

    • sei_getLogs, sei_getBlock, and sei_getBlockByNumber will return both EVM and synthetic Tendermint events in a single query, designed for teams needing complete data from both sources.

Actions Required:

  • If you rely on synthetic events in eth_getLogs, eth_getBlockByNumber, or eth_getBlock:

    • Switch to the new methods (sei_getLogs, sei_getBlock, sei_getBlockByNumber) to continue receiving combined EVM and Tendermint data.
    • The eth_* methods will no longer provide complete data. You must either use the new sei_* methods or combine data from both the EVM and Tendermint RPCs to maintain accurate, up-to-date information.
  • If you have created your own workaround to combine EVM and Tendermint data:

    • You can continue manually combining data from both RPCs, or (optionally) switch to the new sei_* methods if it better suits your needs.
  • If your application has been using only the EVM endpoints/methods:

    • Your data will be incomplete going forward. To maintain accuracy, you should either:
      • Combine data from both EVM and Tendermint RPCs, or
      • Switch to the new sei_* methods to receive the combined data.

Reasoning:

At the request of many builders, v5.7.5 introduced 'synthetic' events to several RPC responses (eth_getLogs, eth_getBlockByNumber). While this worked for some, others requested these events be included in eth_getBlock, implemented in v5.8.0. This unfortunately introduced a different set of issues.

Important Notes:

  • For transactions using wasmExecute, the transaction hash will only work in sei_getReceipt. If there is no associated transaction hash, it is advised not to query debug_trace.

TL;DR:
If you do not either:

  1. Ingest / manually combine data from both EVM and Tendermint endpoints, or
  2. Fetch data from the new custom methods,

you will not have an accurate or complete view of the blockchain data at any given time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment