Skip to content
New issue

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

⚡[FEAT] Detect stale data #154

Open
whoabuddy opened this issue Jun 29, 2022 · 0 comments
Open

⚡[FEAT] Detect stale data #154

whoabuddy opened this issue Jun 29, 2022 · 0 comments
Labels
Enhancement New feature or request Good first issue Good for newcomers

Comments

@whoabuddy
Copy link

*Is your feature request related to a problem? Please describe.

Given the API pulls data from a pool of available nodes, and assuming multiple APIs could be used in the future, there is a small chance stale data can appear if a node is out of sync.

unknown

Describe the solution you'd like

Use a simple KV entry that tracks the current block on each query.

If the next query matches the block height, do nothing.

If the next query is a higher block height, update KV.

If the next query is a lower block height, display a modal/warning for potentially stale data.

Describe alternatives you've considered

Displaying a warning feels better then blocking or re-fetching the data automatically, so loading times stay consistent.

It's also an edge case, but gets more interesting if people are able to change which API they use.

Additional context

None.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request Good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant