Skip to content

Very noticable slowdown on block import with --debug-store-bodies and --debug-store-receipts enabled #4274

@kdeme

Description

@kdeme

Default --debug-store-bodies and --debug-store-receipts are disabled.

If we want a node that can provide all bodies and receipts (without using era/era1/ere files) these flags need to be enabled so that they get stored on import.

When running this import on a node for testing export of ere files, I noticed a significant slow down.

This is most likely due to the fact that each transaction and receipt is stored individually (k:v) in the database. Plus transactionHashToBlockKey additional mapping to support retrieval by hash. This is practically re-encodes the receipts and transactions and does 3N writes per block (tx + receipt + mapping).

It might be worth testing to store the transactions and receipts in two blobs. But this would require some benchmarking / testing.

Of course such change would have a (slight?) impact on the reading side for individual tx/receipt (eth_getTransactionReceipt, eth_getTransactionByHash). Not sure if that would be practically noticable though.

I noticed that withdrawals already went through such change: 40233e5#diff-75f9cc6813e733de906d9a8209ac17d76094e226f1616108803dc9496ec7464e

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions