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

Tests for StackerSetUpdater #45

Open
zone117x opened this issue Nov 8, 2024 · 0 comments
Open

Tests for StackerSetUpdater #45

zone117x opened this issue Nov 8, 2024 · 0 comments

Comments

@zone117x
Copy link
Member

zone117x commented Nov 8, 2024

The StackerSet fetcher background service needs tests.

It's responsible for populating the db reward_set_signers table. There's some indication that it might get stuck after running for a while.

Here's how it works (which is also an outline of how to implement tests):

  1. Listen to the missingStackerSet for cycle N events from the db.
  2. Queue a job in memory (using p-queue).
  3. During the job execution it fetch the set for cycle N (via stacks-core RPC) and then store it in the db.
  4. If the RPC fetch or the db write fails, the job is re-queued to try again after a timeout.
@github-project-automation github-project-automation bot moved this to 🆕 New in API Board Nov 8, 2024
@zone117x zone117x moved this from 🆕 New to 📋 Backlog in API Board Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant