Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf(rpc): eth_getTransactionByBlock* should not fetch the whole block #11100

Open
joshieDo opened this issue Sep 21, 2024 · 1 comment
Open
Assignees
Labels
A-rpc Related to the RPC implementation C-perf A change motivated by improving speed, memory usage or disk footprint D-good-first-issue Nice and easy! A great choice to get started

Comments

@joshieDo
Copy link
Collaborator

joshieDo commented Sep 21, 2024

Describe the feature

RPC calls such aseth_getTransactionByBlockHashAndIndex & eth_getTransactionByBlockNumberAndIndex should not need to fetch the whole block (with all transactions), just to get the one.

fn transaction_by_block_and_tx_index(
&self,
block_id: BlockId,
index: usize,
) -> impl Future<Output = Result<Option<RpcTransaction<Self::NetworkTypes>>, Self::Error>> + Send
where
Self: LoadBlock,
{
async move {
if let Some(block) = self.block_with_senders(block_id).await? {

Additional context

No response

@joshieDo joshieDo added D-good-first-issue Nice and easy! A great choice to get started C-perf A change motivated by improving speed, memory usage or disk footprint A-rpc Related to the RPC implementation labels Sep 21, 2024
@KoxyG
Copy link

KoxyG commented Sep 21, 2024

Hi @joshieDo i am very interested in working on this issue. Can you pls assign me to this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rpc Related to the RPC implementation C-perf A change motivated by improving speed, memory usage or disk footprint D-good-first-issue Nice and easy! A great choice to get started
Projects
Status: Todo
Development

No branches or pull requests

2 participants