Skip to content

Commit

Permalink
feat(nns): Adjust batch limit for moving neurons to stable memory (#2778
Browse files Browse the repository at this point in the history
)

Given the recent finalization rate drop while the NNS subnet had a
sustained 2B instructions per round, and the migration can run every 5
seconds, we should lower the max instructions consumed by the task, just
to be safe.
  • Loading branch information
jasonz-dfinity authored Nov 22, 2024
1 parent 1232c0e commit 7e25f22
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rs/nns/governance/src/neuron_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -582,10 +582,10 @@ impl NeuronStore {
/// Adjusts the storage location of neurons, since active neurons might become inactive due to
/// passage of time.
pub fn batch_adjust_neurons_storage(&mut self, start_neuron_id: NeuronId) -> Option<NeuronId> {
static BATCH_SIZE_FOR_MOVING_NEURONS: usize = 1000;
static BATCH_SIZE_FOR_MOVING_NEURONS: usize = 200;

#[cfg(target_arch = "wasm32")]
static MAX_NUM_INSTRUCTIONS_PER_BATCH: u64 = 5_000_000_000;
static MAX_NUM_INSTRUCTIONS_PER_BATCH: u64 = 1_000_000_000;

#[cfg(target_arch = "wasm32")]
let max_instructions_reached =
Expand Down

0 comments on commit 7e25f22

Please sign in to comment.