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(nns): Move spawn_neurons to a one-minute timer #2934

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jasonz-dfinity
Copy link
Contributor

Why

As we plan to move neurons to stable storage, the cost for scanning neurons to spawn will increase (80x). Therefore, to keep the average instruction count similar, we reduce its frequency (twice per second -> once every minute)

What

  • Schedule a timer to run maybe_spawn_neurons() every minute
  • Remove spawn_neurons from heartbeat

Tests

Verified that bazel test //rs/nns/integration_tests:integration_tests_test_src/governance_neurons --test_filter=test_spawn_neuron fails if the spawn_neurons is removed from heartbeat but not added to timer

@jasonz-dfinity jasonz-dfinity requested review from a team as code owners December 3, 2024 00:28
@github-actions github-actions bot added the feat label Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants