Replies: 1 comment
-
i know you said no indexer, but this ts indexer is a good example of using grpc stream to get events in real time, and it's super simple https://github.com/0xaptosj/aptos-full-stack-template/tree/main/ts-indexer |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Discord user ID
No response
Describe your question in detail.
I'm building a blockchain scanner on Aptos and need to process blocks in real time. I'm using the /v1/blocks/by_height/{height}?with_transactions=true endpoint to fetch block data. However, a single request takes more than 500ms, while more than 8 blocks are produced per second.
To keep up, I tried making concurrent requests in multiple threads. Unfortunately, this causes the API to slow down even more, making it infeasible to keep up with the latest blocks.
I've observed this behavior both on my own full node and on the public testnet API.
Is there any way to speed this up or scan the chain more efficiently without relying on an indexer?
What error, if any, are you getting?
No specific error, just slow response times and increasing latency with concurrency. cant parse blockchain =(
What have you tried or looked at? Or how can we reproduce the error?
Sequential and parallel requests to /v1/blocks/by_height/...
Tested on local full node and testnet
Confirmed consistent latency per request (>500ms)
Not using an indexer — trying to avoid that
Which operating system are you using?
Linux (Ubuntu, Fedora, Windows WSL, etc.)
Which SDK or tool are you using? (if any)
REST API
Describe your environment or tooling in detail
No response
Beta Was this translation helpful? Give feedback.
All reactions