question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Prevent /v2 from being queried too often on accounts page

See original GitHub issue

Is your feature request related to a problem? Please describe. On the explorer’s address page (example), the v2 endpoint https://stacks-node-api.stacks.co/v2/accounts/XXXXXXXXX?proof=0&unanchored=true is fetched roughly every 10 seconds. With so many people using the explorer, this could create RPC congestion for stacks-nodes.

Describe the solution you’d like I’m not sure what data is being used from https://stacks-node-api.stacks.co/v2/accounts/XXXXXXXXX?proof=0&unanchored=true every 10 seconds, but can it be obtained from a v1 endpoint instead? v1 is much more performant, and will help stacks-nodes propagate transactions faster with less RPC congestion.

Additionally, I feel a 10 second refresh might be too frequent. If this refresh interval could be changed via environment variable, it would allow those hosting it to configure a refresh interval that balances speed and traffic.

Side question - Looks like a few other v1 endpoints are being called at regular intervals in the explorer as well. Can the explorer start leveraging websockets? The API now supports websockets, which would be more performant than standard HTTP requests, and data would be transmitted as soon as it’s received.

cc @zone117x @rafaelcr

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:3
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
CharlieC3commented, Nov 19, 2021

@markmhx I think a manual refresh button would end up helping quite a bit for the interim, as most don’t need to refresh every so often.

It may detract a tiny bit from the user experience though. So in the long run if it can be swapped out for a v1 call or websockets, it would be nice to have auto-refresh re-implemented with that optimization, along with the adjustable env var mentioned in the description.

0reactions
blockstack-devopscommented, Jul 25, 2022

🎉 This issue has been resolved in version 1.28.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Read more comments on GitHub >

github_iconTop Results From Across the Web

Resolve blocking problem caused by lock escalation - SQL ...
This article describes how to determine whether lock escalation is causing blocking and how to resolve the problem.
Read more >
Rate limits | Docs | Twitter Developer Platform
Keep reading to learn more about these details and tips on how to avoid being rate ... The following table lists the rate...
Read more >
Admin settings - Queries | Looker - Google Cloud
The Queries page in the Database section of the Admin menu lists information about the last 50 queries that Looker submitted to your...
Read more >
Performance tuning in Athena - AWS Documentation
Avoid large query outputs – A large amount of output data can slow performance. To work around this, try using CTAS to create...
Read more >
What is SQL Injection (SQLi) and How to Prevent Attacks
A web page or web application that has an SQL Injection vulnerability uses such user input directly in an SQL query. The attacker...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found