Skip to content

Commit 4d6973a

Browse files
authored
Merge pull request #56 from coinmetrics/staging
2 parents d8429ee + c446fb2 commit 4d6973a

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

docs/Release Notes.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
Release Notes
22
=============
3+
1.0.2
4+
-----
5+
Released on January 16th 2025
6+
- Ensure metagraph is properly synced when new miners join the network
37

48
1.0.1
59
-----

precog/validators/weight_setter.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,14 +104,17 @@ async def resync_metagraph(self):
104104
bt.logging.debug(f"Before sync - MinerHistory keys: {old_history}")
105105

106106
# Update available UIDs
107-
self.available_uids = asyncio.run(self.get_available_uids())
107+
self.available_uids = await self.get_available_uids()
108108
new_uids = set(self.available_uids)
109109

110+
# Update hotkeys dictionary
111+
self.hotkeys = {uid: value for uid, value in enumerate(self.metagraph.hotkeys)}
112+
110113
# Process hotkey changes
111114
for uid, hotkey in enumerate(self.metagraph.hotkeys):
112115
new_miner = uid in new_uids and uid not in old_uids
113116
if not new_miner:
114-
replaced_miner = self.hotkeys[uid] != hotkey
117+
replaced_miner = self.hotkeys.get(uid, "") != hotkey
115118
else:
116119
replaced_miner = False
117120

@@ -121,9 +124,6 @@ async def resync_metagraph(self):
121124
if uid in new_uids: # Only create history for available UIDs
122125
self.MinerHistory[uid] = MinerHistory(uid, timezone=self.timezone)
123126

124-
# Update hotkeys dictionary
125-
self.hotkeys = {uid: value for uid, value in enumerate(self.metagraph.hotkeys)}
126-
127127
# Ensure all available UIDs have MinerHistory entries
128128
for uid in self.available_uids:
129129
if uid not in self.MinerHistory:

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "precog"
3-
version = "1.0.1"
3+
version = "1.0.2"
44
description = "Bitcoin Price Prediction Subnet"
55
authors = ["Coin Metrics", "Yuma Group"]
66
readme = "README.md"

tests/test_package.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ def setUp(self):
1616
def test_package_version(self):
1717
# Check that version is as expected
1818
# Must update to increment package version successfully
19-
self.assertEqual(__version__, "1.0.1")
19+
self.assertEqual(__version__, "1.0.2")

0 commit comments

Comments
 (0)