Skip to content

Speeding up eth_getTransactionByHash #33317

@fjl

Description

@fjl

When we access a single transaction by its hash, we perform a lot of disk reads. This is because the transaction index only stores the block number where the transaction was included and nothing more.

While resolving the transaction, we have to load the full block body, and then hash every transaction to match it with the requested one. If we had the tx index available in the index entry, we could avoid this hashing. Alternatively, if the index stored the bytes offset of the transaction directly, we could just return the transaction without any further parsing. It's something worth looking into.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions