-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Fetching transaction receipt performance #9430
Comments
For the sake of precision, can you confirm the version of Parity Ethereum, the way you're querying the receipts (web3?), what RPC you use and give as many info about your setup as possible. |
Ethereum main net, latest parity version, web3 ("web3": "^1.0.0-beta.33"), ipc provider, nodejs. |
I wrote a simpler version so you can see the code, same results as the app version. Here are the results: |
Hi @adyshimony, There are two ways I see to solve this:
Personally I'm more in favour of the second option since it's simpler to implement, doesn't require db migration nor increases db size and simplifies required RPC queries on your side as well. |
Hi @tomusdrw Yes, I like the second option too, exactly what I need. Do you think it can be done in the near future? its taking weeks to index ethereum logs with the current get receipt performance. |
Looking forward to the |
Ok, checked it with geth. Here are the restults: Parity: Geth: I am switching to geth until partiy will provide getBlockReceipts api. |
Hi,
100 blocks txs receipts - total of 15324 - takes 102 seconds.
I am with latest Parity, on ubuntu, this is a constant issue.
I am indexing all transaction, and getting very slow performance when fetching transaction receipt.
For example:
blocks 4832000 - 4832099
To get the 100 blocks, the duration in sec:, 8.921 (block include transactions body)
// now get the receipts for each transaction per block (I am waiting for all txs per block. waiting for all txs for all blocks didn't improve performance)
getTransactionsFromBlockAsync for block: 4832000, txs: 252, duration in sec:, 1.929
getTransactionsFromBlockAsync for block: 4832001, txs: 103, duration in sec:, 0.190
getTransactionsFromBlockAsync for block: 4832002, txs: 79, duration in sec:, 0.134
getTransactionsFromBlockAsync for block: 4832003, txs: 64, duration in sec:, 0.064
getTransactionsFromBlockAsync for block: 4832004, txs: 251, duration in sec:, 2.090
getTransactionsFromBlockAsync for block: 4832005, txs: 258, duration in sec:, 2.317
getTransactionsFromBlockAsync for block: 4832006, txs: 302, duration in sec:, 3.510
getTransactionsFromBlockAsync for block: 4832007, txs: 87, duration in sec:, 0.162
getTransactionsFromBlockAsync for block: 4832008, txs: 192, duration in sec:, 1.355
getTransactionsFromBlockAsync for block: 4832009, txs: 323, duration in sec:, 4.140
getTransactionsFromBlockAsync for block: 4832010, txs: 162, duration in sec:, 0.754
getTransactionsFromBlockAsync for block: 4832011, txs: 54, duration in sec:, 0.047
getTransactionsFromBlockAsync for block: 4832012, txs: 43, duration in sec:, 0.032
getTransactionsFromBlockAsync for block: 4832013, txs: 24, duration in sec:, 0.014
getTransactionsFromBlockAsync for block: 4832014, txs: 68, duration in sec:, 0.084
getTransactionsFromBlockAsync for block: 4832015, txs: 121, duration in sec:, 0.376
getTransactionsFromBlockAsync for block: 4832016, txs: 15, duration in sec:, 0.011
getTransactionsFromBlockAsync for block: 4832017, txs: 247, duration in sec:, 2.373
getTransactionsFromBlockAsync for block: 4832018, txs: 109, duration in sec:, 0.288
getTransactionsFromBlockAsync for block: 4832019, txs: 73, duration in sec:, 0.096
getTransactionsFromBlockAsync for block: 4832020, txs: 45, duration in sec:, 0.036
getTransactionsFromBlockAsync for block: 4832021, txs: 271, duration in sec:, 2.648
getTransactionsFromBlockAsync for block: 4832022, txs: 270, duration in sec:, 2.719
getTransactionsFromBlockAsync for block: 4832023, txs: 6, duration in sec:, 0.004
getTransactionsFromBlockAsync for block: 4832024, txs: 241, duration in sec:, 1.988
getTransactionsFromBlockAsync for block: 4832025, txs: 276, duration in sec:, 2.150
getTransactionsFromBlockAsync for block: 4832026, txs: 230, duration in sec:, 1.597
getTransactionsFromBlockAsync for block: 4832027, txs: 267, duration in sec:, 2.671
getTransactionsFromBlockAsync for block: 4832028, txs: 179, duration in sec:, 1.248
getTransactionsFromBlockAsync for block: 4832029, txs: 125, duration in sec:, 0.421
getTransactionsFromBlockAsync for block: 4832030, txs: 8, duration in sec:, 0.006
getTransactionsFromBlockAsync for block: 4832031, txs: 85, duration in sec:, 0.142
getTransactionsFromBlockAsync for block: 4832032, txs: 278, duration in sec:, 2.998
getTransactionsFromBlockAsync for block: 4832033, txs: 162, duration in sec:, 0.812
getTransactionsFromBlockAsync for block: 4832034, txs: 167, duration in sec:, 0.930
getTransactionsFromBlockAsync for block: 4832035, txs: 91, duration in sec:, 0.148
getTransactionsFromBlockAsync for block: 4832036, txs: 237, duration in sec:, 2.112
getTransactionsFromBlockAsync for block: 4832037, txs: 138, duration in sec:, 0.512
getTransactionsFromBlockAsync for block: 4832038, txs: 271, duration in sec:, 2.873
getTransactionsFromBlockAsync for block: 4832039, txs: 287, duration in sec:, 3.034
getTransactionsFromBlockAsync for block: 4832040, txs: 276, duration in sec:, 2.624
getTransactionsFromBlockAsync for block: 4832041, txs: 216, duration in sec:, 1.572
getTransactionsFromBlockAsync for block: 4832042, txs: 14, duration in sec:, 0.010
getTransactionsFromBlockAsync for block: 4832043, txs: 49, duration in sec:, 0.038
getTransactionsFromBlockAsync for block: 4832044, txs: 211, duration in sec:, 1.392
getTransactionsFromBlockAsync for block: 4832045, txs: 232, duration in sec:, 1.703
getTransactionsFromBlockAsync for block: 4832046, txs: 266, duration in sec:, 1.941
getTransactionsFromBlockAsync for block: 4832047, txs: 208, duration in sec:, 1.238
getTransactionsFromBlockAsync for block: 4832048, txs: 145, duration in sec:, 0.593
getTransactionsFromBlockAsync for block: 4832049, txs: 122, duration in sec:, 0.298
getTransactionsFromBlockAsync for block: 4832050, txs: 182, duration in sec:, 1.150
getTransactionsFromBlockAsync for block: 4832051, txs: 114, duration in sec:, 0.256
getTransactionsFromBlockAsync for block: 4832052, txs: 165, duration in sec:, 0.902
getTransactionsFromBlockAsync for block: 4832053, txs: 25, duration in sec:, 0.019
getTransactionsFromBlockAsync for block: 4832054, txs: 148, duration in sec:, 0.576
getTransactionsFromBlockAsync for block: 4832055, txs: 219, duration in sec:, 1.371
getTransactionsFromBlockAsync for block: 4832056, txs: 81, duration in sec:, 0.153
getTransactionsFromBlockAsync for block: 4832057, txs: 185, duration in sec:, 0.891
getTransactionsFromBlockAsync for block: 4832058, txs: 281, duration in sec:, 3.002
getTransactionsFromBlockAsync for block: 4832059, txs: 283, duration in sec:, 2.852
getTransactionsFromBlockAsync for block: 4832060, txs: 42, duration in sec:, 0.034
getTransactionsFromBlockAsync for block: 4832061, txs: 83, duration in sec:, 0.109
getTransactionsFromBlockAsync for block: 4832062, txs: 153, duration in sec:, 0.543
getTransactionsFromBlockAsync for block: 4832063, txs: 43, duration in sec:, 0.029
getTransactionsFromBlockAsync for block: 4832064, txs: 251, duration in sec:, 2.527
getTransactionsFromBlockAsync for block: 4832065, txs: 156, duration in sec:, 0.789
getTransactionsFromBlockAsync for block: 4832066, txs: 178, duration in sec:, 0.895
getTransactionsFromBlockAsync for block: 4832067, txs: 203, duration in sec:, 1.319
getTransactionsFromBlockAsync for block: 4832068, txs: 113, duration in sec:, 0.303
getTransactionsFromBlockAsync for block: 4832069, txs: 222, duration in sec:, 1.545
getTransactionsFromBlockAsync for block: 4832070, txs: 106, duration in sec:, 0.240
getTransactionsFromBlockAsync for block: 4832071, txs: 83, duration in sec:, 0.126
getTransactionsFromBlockAsync for block: 4832072, txs: 77, duration in sec:, 0.104
getTransactionsFromBlockAsync for block: 4832073, txs: 65, duration in sec:, 0.077
getTransactionsFromBlockAsync for block: 4832074, txs: 145, duration in sec:, 0.546
getTransactionsFromBlockAsync for block: 4832075, txs: 61, duration in sec:, 0.067
getTransactionsFromBlockAsync for block: 4832076, txs: 57, duration in sec:, 0.060
getTransactionsFromBlockAsync for block: 4832077, txs: 205, duration in sec:, 1.150
getTransactionsFromBlockAsync for block: 4832078, txs: 121, duration in sec:, 0.265
getTransactionsFromBlockAsync for block: 4832079, txs: 52, duration in sec:, 0.038
getTransactionsFromBlockAsync for block: 4832080, txs: 115, duration in sec:, 0.236
getTransactionsFromBlockAsync for block: 4832081, txs: 147, duration in sec:, 0.413
getTransactionsFromBlockAsync for block: 4832082, txs: 278, duration in sec:, 2.294
getTransactionsFromBlockAsync for block: 4832083, txs: 262, duration in sec:, 2.163
getTransactionsFromBlockAsync for block: 4832084, txs: 186, duration in sec:, 0.987
getTransactionsFromBlockAsync for block: 4832085, txs: 249, duration in sec:, 1.837
getTransactionsFromBlockAsync for block: 4832086, txs: 57, duration in sec:, 0.066
getTransactionsFromBlockAsync for block: 4832087, txs: 38, duration in sec:, 0.029
getTransactionsFromBlockAsync for block: 4832088, txs: 24, duration in sec:, 0.014
getTransactionsFromBlockAsync for block: 4832089, txs: 162, duration in sec:, 0.641
getTransactionsFromBlockAsync for block: 4832090, txs: 345, duration in sec:, 4.140
getTransactionsFromBlockAsync for block: 4832091, txs: 89, duration in sec:, 0.135
getTransactionsFromBlockAsync for block: 4832092, txs: 41, duration in sec:, 0.031
getTransactionsFromBlockAsync for block: 4832093, txs: 82, duration in sec:, 0.119
getTransactionsFromBlockAsync for block: 4832094, txs: 121, duration in sec:, 0.356
getTransactionsFromBlockAsync for block: 4832095, txs: 156, duration in sec:, 0.743
getTransactionsFromBlockAsync for block: 4832096, txs: 122, duration in sec:, 0.394
getTransactionsFromBlockAsync for block: 4832097, txs: 37, duration in sec:, 0.026
getTransactionsFromBlockAsync for block: 4832098, txs: 221, duration in sec:, 1.721
getTransactionsFromBlockAsync for block: 4832099, txs: 293, duration in sec:, 3.366
getBlockTransactionsAsync tx for blocks #4832000 - #4832099 : 15324, duration in sec:, 102.119!!!
100 blocks txs receipts - total of 15324 - 102 seconds.
Any way to improve that?
Thanks,
Ady.
The text was updated successfully, but these errors were encountered: