-
Notifications
You must be signed in to change notification settings - Fork 21.6k
Open
Labels
Description
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.