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

eth_getTransactionReceipt on v3.0.0-alpha5 20X+ slower than Geth or Erigon 2.0 ? #12892

Closed
journeytosilius opened this issue Nov 27, 2024 · 4 comments · Fixed by #12424
Closed
Assignees
Labels
imp1 High importance performance
Milestone

Comments

@journeytosilius
Copy link

journeytosilius commented Nov 27, 2024

System information

  • (HEAD detached at v3.0.0-alpha5)
    main

Ubuntu server 24

#####################

Just ran my backend with v3.0.0-alpha5 and eth_getTransactionReceipt is 20X slower or more. Before it takes about 1-3 seconds to parse 60 blocks and now it takes 1 minute. I believe also slower than Erigon 2.0 ?

I read here there is a similar problem : #11090

How can I fix this or tune it ?

@journeytosilius journeytosilius changed the title eth_getTransactionReceipt on v3.0.0-alpha5 10X slower than Geth or Erigon 2.0 ? eth_getTransactionReceipt on v3.0.0-alpha5 10X+ slower than Geth or Erigon 2.0 ? Nov 27, 2024
@journeytosilius journeytosilius changed the title eth_getTransactionReceipt on v3.0.0-alpha5 10X+ slower than Geth or Erigon 2.0 ? eth_getTransactionReceipt on v3.0.0-alpha5 20X+ slower than Geth or Erigon 2.0 ? Nov 27, 2024
@awskii
Copy link
Member

awskii commented Nov 27, 2024

Can you please provide query you running for us to assess?

@journeytosilius
Copy link
Author

journeytosilius commented Nov 27, 2024

for _, tx := range block.Transactions() {
	wg.Add(1)
	go func(tx *types.Transaction) {
		defer wg.Done()

		receipt, err := node.Client().Instance().TransactionReceipt(ctx, tx.Hash())
		if err != nil {
			fmt.Println("Error getting transaction receipt:", err)
			return
		}

	}(tx)
}

wg.Wait()

Just calling concurrently, for 60 blocks takes 1+ minute, before it took 1-3 seconds. So just iterating over a range of blocks ( 60 ),get the blocks, then parsing the Tx receipts like this for each block.

@yperbasis yperbasis added the imp1 High importance label Nov 29, 2024
@yperbasis yperbasis added this to the 3.0.0-beta1 milestone Nov 29, 2024
@AskAlexSharov
Copy link
Collaborator

@awskii i think @JkLondon working on it

@JkLondon
Copy link
Member

yep, exactly working on it in #12424

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
imp1 High importance performance
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants