From 3ad72cef9ce80b16429a22b60dd030b75dfdbd86 Mon Sep 17 00:00:00 2001 From: dylan Date: Sat, 5 Sep 2026 17:12:39 +0000 Subject: [PATCH 1/2] fix: skip unregistered escrow UIDs when setting weights Unregistered escrow hotkeys resolve to None, and numpy treats arr[None] = x as a broadcast that zeros the entire weight vector, so set_weights fell back to all-ones. Co-authored-by: Cursor --- neurons/validator/validator.py | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/neurons/validator/validator.py b/neurons/validator/validator.py index cad27b86..87ec747e 100644 --- a/neurons/validator/validator.py +++ b/neurons/validator/validator.py @@ -222,7 +222,13 @@ async def set_weights(self, block): netuid=self.config.netuid, ) - special_uids = {burn_uid, image_escrow_uid, video_escrow_uid, audio_escrow_uid} + # Escrow hotkeys can be unregistered (uid=None). Do not index + # numpy with None — that broadcasts and zeros the whole vector. + special_uids = { + uid + for uid in (burn_uid, image_escrow_uid, video_escrow_uid, audio_escrow_uid) + if uid is not None + } # Compute norm excluding specials norm = np.ones_like(self.scores) @@ -243,10 +249,13 @@ async def set_weights(self, block): active_mask = np.array([uid in active_uids_set for uid in range(len(normed_weights))]) normed_weights[active_mask] *= generator_pct - normed_weights[burn_uid] = burn_pct - normed_weights[video_escrow_uid] = video_pct - normed_weights[image_escrow_uid] = image_pct - normed_weights[audio_escrow_uid] = audio_pct + normed_weights[burn_uid] = burn_pct + if video_escrow_uid is not None: + normed_weights[video_escrow_uid] = video_pct + if image_escrow_uid is not None: + normed_weights[image_escrow_uid] = image_pct + if audio_escrow_uid is not None: + normed_weights[audio_escrow_uid] = audio_pct # Verify allocations total_weight = np.sum(normed_weights) From dde5693f8f24b03e2479d67e6d02ff924d984eb8 Mon Sep 17 00:00:00 2001 From: dylan Date: Sat, 5 Sep 2026 17:25:32 +0000 Subject: [PATCH 2/2] bump version to 4.9.11 Co-authored-by: Cursor --- VERSION | 2 +- gas/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index ef248f02..43110fd2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.9.10 +4.9.11 diff --git a/gas/__init__.py b/gas/__init__.py index be5618c3..f3d88ce6 100644 --- a/gas/__init__.py +++ b/gas/__init__.py @@ -1,4 +1,4 @@ -__version__ = "4.9.10" +__version__ = "4.9.11" version_split = __version__.split(".") __spec_version__ = (