We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
While subscribing to blocks the delay between blocks received increases as the program runs. How could I keep real-time sync with blocks?
Delays: 1122 1896 1570 2362 2147 2840 3500 3065 3912 3615 4262 3948 4929 4688 5342 5995 5340
const Yellowstone = require('@triton-one/yellowstone-grpc').default ;(async () => { const client = new Yellowstone( '', '', { 'grpc.max_receive_message_length': 64 * 1024 * 1024 }) const stream = await client.subscribe() stream.on('data', (data) => { if(data && data.block) { //How far behind are we? console.log(Date.now() - data.block.blockTime.timestamp*1000) } }) stream.on('error', console.log) const request ={ slots: { }, transactions: { }, commitment: 'finalized', accounts: { }, transactionsStatus: { }, entry: { }, blocks: { client: { accountInclude: [], includeTransactions: true, includeAccounts: false, includeEntries: false } }, blocksMeta: { }, accountsDataSlice: [] } stream.write(request, (err) => { if(err) console.log(err) }) })()
The text was updated successfully, but these errors were encountered:
it looks like you can't ingest fast enough due to network latency or cpu intensive code
Sorry, something went wrong.
No branches or pull requests
While subscribing to blocks the delay between blocks received increases as the program runs. How could I keep real-time sync with blocks?
Delays:
1122
1896
1570
2362
2147
2840
3500
3065
3912
3615
4262
3948
4929
4688
5342
5995
5340
The text was updated successfully, but these errors were encountered: