Skip to content

Conversation

@iuwqyir
Copy link
Contributor

@iuwqyir iuwqyir commented Oct 15, 2024

TL;DR

Added support for using eth_getBlockReceipts instead of eth_getLogs and enhanced transaction data storage.

What changed?

  • Introduced eth_getBlockReceipts RPC method support
  • Added new configuration options for block receipts
  • Enhanced transaction structure with additional fields from receipts
  • Updated ClickHouse schema to accommodate new transaction fields
  • Improved serialization logic to handle block receipts data

How to test?

  1. Update the configuration file to enable block receipts:
    rpc:
      blockReceipts:
        enabled: true
        blocksPerRequest: 500
        batchDelay: 100
  2. Run the indexer with the updated configuration
  3. Verify that transactions in the ClickHouse database contain the new fields (e.g., contract_address, gas_used, status)
  4. Check the logs to ensure that eth_getBlockReceipts method is being used when enabled

Why make this change?

This change improves the efficiency and completeness of data collection:

  1. Using eth_getBlockReceipts can be more efficient than fetching logs and receipts separately
  2. Additional transaction data from receipts provides more comprehensive information for analysis and querying
  3. The enhanced schema allows for more detailed transaction insights without the need for additional RPC calls

Copy link
Contributor Author

iuwqyir commented Oct 15, 2024

@iuwqyir iuwqyir changed the title utilize eth_getBlockReceipts if possible Add support for eth_getBlockReceipts RPC method Oct 15, 2024
@iuwqyir iuwqyir marked this pull request as ready for review October 15, 2024 10:56
@iuwqyir iuwqyir force-pushed the 10-15-utilize_eth_getblockreceipts_if_possible branch 2 times, most recently from adf485e to 2959ea3 Compare October 15, 2024 13:02
@iuwqyir iuwqyir force-pushed the 10-15-utilize_eth_getblockreceipts_if_possible branch from 2959ea3 to b0d6088 Compare October 15, 2024 13:53
Copy link
Contributor Author

iuwqyir commented Oct 15, 2024

Merge activity

  • Oct 15, 1:50 PM EDT: A user started a stack merge that includes this pull request via Graphite.
  • Oct 15, 1:51 PM EDT: Graphite rebased this pull request as part of a merge.
  • Oct 15, 1:52 PM EDT: A user merged this pull request with Graphite.

Base automatically changed from 10-11-schema_changes to main October 15, 2024 17:50
@iuwqyir iuwqyir force-pushed the 10-15-utilize_eth_getblockreceipts_if_possible branch from b0d6088 to e3c8949 Compare October 15, 2024 17:50
@iuwqyir iuwqyir merged commit 241a8a7 into main Oct 15, 2024
5 checks passed
@iuwqyir iuwqyir deleted the 10-15-utilize_eth_getblockreceipts_if_possible branch October 15, 2024 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants