Skip to content
This repository has been archived by the owner on Apr 21, 2020. It is now read-only.

How much time it will take to scan all transactions? #347

Closed
kelvinkuo opened this issue Aug 8, 2018 · 11 comments
Closed

How much time it will take to scan all transactions? #347

kelvinkuo opened this issue Aug 8, 2018 · 11 comments

Comments

@kelvinkuo
Copy link

I wrote scan program. it took too much time to scan whole blockchain. Main problem is geth can't response quickly. Parallel workers will cause "Error: Invalid JSON RPC response: """. I slow down the request.

So I want know how much time will trust-ray take to scan all transactions by now about 6111079 blocks

@kolya182
Copy link
Contributor

kolya182 commented Aug 8, 2018

Are using local RPC server ?. I believe to sync a whole blockchain utilizing let say Infura RPC it may take up to 5-8 days. If you run Ray and RPC on the same machine (keep in mind you will need a lot of RAM and SSD disk for Geth to show some good performance).
A few potential improvements we should

  • Use WebSockets, not sure what the latest status on it from Infura
  • Batching getting blocks transactions

@kelvinkuo
Copy link
Author

yes. Scan program and a geth full node are in the same server. I will have a try. Thanks for your suggestion.

@kolya182
Copy link
Contributor

kolya182 commented Aug 9, 2018

let me know the results

@kelvinkuo
Copy link
Author

I have a server with SSD disk and 8core CPU 16G RAM. I think its ok.
I will try websocket and batch request.

no problem, I will post the results.

@Boyjons74
Copy link

Super coin wallet!👍👍👍

@kelvinkuo
Copy link
Author

@kolya182 batch request is the right way. I batch all getTransaction and getReceipt of one block. Speed goes up. about 4days, scanned all blocks.
Thanks

@kolya182
Copy link
Contributor

How about RAM consumption ?.

@kelvinkuo
Copy link
Author

For my program, memory is around 200MB. The bottleneck is geth. CPU usage goes high.
I need a schedule manager to get down RPC QPS.

@kelvinkuo
Copy link
Author

I saw trust-ray uses abi-decoder, I encounter some transactions, It will raise exception when decoding the event logs. Like tx: 0x7834632fb74e671317e87551c5969dcf117efaf00c1f16c4e5d66419715e3b37.

I have reported the issue. But they haven't reply.

@kolya182
Copy link
Contributor

I see your problem Consensys/abi-decoder#27, i made PR long time ago Consensys/abi-decoder#11 fixing it.
That why we do this https://github.com/TrustWallet/trust-ray/blob/703192ca21666c7fa7fa9e5615b25db3c2c88460/package.json#L24

@kelvinkuo
Copy link
Author

Thanks. abi-decoder long time no new commits.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants