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

getrawtransaction JSON RPC API is very slow #4475

Closed
sammisetty opened this issue Apr 27, 2020 · 3 comments · Fixed by #4574
Closed

getrawtransaction JSON RPC API is very slow #4475

sammisetty opened this issue Apr 27, 2020 · 3 comments · Fixed by #4574
Labels
C-bug Category: This is a bug

Comments

@sammisetty
Copy link

sammisetty commented Apr 27, 2020

getrawtransaction JSON RPC API is very slow

Describe the issue

I was trying to extract the transactions of a block using getrawtransaction api and observe that it is really slow unlike BTC/BCH/LTC

Can you reliably reproduce the issue?

If so, please list the steps to reproduce below:

  1. Call getrawtransaction api for every transaction in a block
  2. in turn call getrawtransaction api for every input (VIN) of a transaction
  3. The calls work but they are really slow
  4. BTC/BCH/LTC has similiar issue but they tackle with extra blockhash parameter to the API. However, we see that it's missing for ZCash or we are missing something here. Is it not an option in ZCash?
  5. For a block of 50 transactions it takes 15 mins to retrieve all queries
  6. The API breaks when sending more requests

Expected behaviour

The API should be fast

Actual behaviour + errors

The API is very slow and tough to depend on for transactions extraction and building explorers

The version of Zcash you were using:

2.1.2

Machine specs:

  • OS name + version: Ubuntu 18
  • CPU: 16 Cores
  • RAM: 112G
  • Disk size: 500G Premium SDD
  • Disk Type (HD/SDD): SDD
  • Linux kernel version (uname -a): Linux ***** 5.0.0-1036-azure Check licensing for the codebase; add appropriate license. #38-Ubuntu SMP Sun Mar 22 21:27:21 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
  • Compiler version (gcc --version):
  • Linker version (ld -v): GNU ld (GNU Binutils for Ubuntu) 2.30
  • Assembler version (as --version): GNU assembler (GNU Binutils for Debian) 2.28
    Copyright (C) 2017 Free Software Foundation, Inc.
    This program is free software; you may redistribute it under the terms of
    the GNU General Public License version 3 or later.
    This program has absolutely no warranty.
    This assembler was configured for a target of `x86_64-linux-gnu'
@sammisetty sammisetty added the C-bug Category: This is a bug label Apr 27, 2020
@oxarbitrage
Copy link
Contributor

Do you know in what pull request this was introduced into Bitcoin ?

@sammisetty
Copy link
Author

not really @oxarbitrage probably after the fork I guess. I will try looking up.

@sammisetty
Copy link
Author

Do we know how all the ZEC explorer out in public extract transactions from a block? Are they not dependent on getrawtransaction either directly or indirectly? API being very slow, I wonder how others do it now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants