optimise GetTransactionByHash and GetRawTransactionByHash #11347
Closed
Description
opened on Jul 26, 2024
Sudeep:
question about the RPC endpoints: GetTransactionByHash and GetRawTransactionByHash (in eth_txs.go)
both use BlockReader#TxnLookup which basically goes through different segments/indexes and return txnRlp and block number.
then txnRlp is ignored and block number is sent to eth_txs.go (where GetTx and GetRawTx is implemented). Then it fetches block and iterates through the tx and returns that tx.wouldn't it be better just to use the txnRlp, rather than ignoring it? We can also ignore figuring out block number for this query. Is there a problem with removing the 2nd step above?
Alex Sharov GMT+7:
Probably you right.
Activity