Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions subnet/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
RELIABILLITY_FAILURE_REWARD = 0.0

# Score weights
AVAILABILITY_WEIGHT = 3.0
LATENCY_WEIGHT = 1.0
RELIABILLITY_WEIGHT = 1.0
DISTRIBUTION_WEIGHT = 1.0
AVAILABILITY_WEIGHT = 8
LATENCY_WEIGHT = 8
RELIABILLITY_WEIGHT = 3
DISTRIBUTION_WEIGHT = 1

# Reset config
RELIABILLITY_RESET = 1080 # Reset challenge statistics every 3 epochs
Expand Down
2 changes: 1 addition & 1 deletion subnet/validator/score.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ def compute_final_score(miner: Miner):
"""
# Use a smaller weight if the subtensor is available but desync (miner block < validator block - 1)
availability_weight = (
1 if miner.verified and not miner.sync else AVAILABILITY_WEIGHT
3 if miner.verified and not miner.sync else AVAILABILITY_WEIGHT
)

numerator = (
Expand Down
6 changes: 3 additions & 3 deletions tests/unit_tests/subnet/validator/test_final_score.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def test_a_not_sync_miner_should_return_a_score_different_of_zero():
miner.reliability_score = 0.30
miner.distribution_score = 0.40

expected_score = (0.10 + 0.20 + 0.30 + 0.40) / 4
expected_score = (0.10 * 3 + 0.20 * 8 + 0.30 * 3 + 0.40) / 15

# Act
result = compute_final_score(miner)
Expand Down Expand Up @@ -67,7 +67,7 @@ def test_a_suspicious_miner_with_penalty_factor_should_return_a_score_different_
miner.distribution_score = 0.40
miner.penalty_factor = 0.4

expected_score = ((0.10 + 0.20 + 0.30 + 0.40) / 4) * 0.4
expected_score = ((0.10 * 3 + 0.20 * 8 + 0.30 * 3 + 0.40) / 15) * 0.4

# Act
result = compute_final_score(miner)
Expand All @@ -86,7 +86,7 @@ def test_a_verified_and_sync_miner_should_return_a_score_different_of_zero():
miner.reliability_score = 0.30
miner.distribution_score = 0.40

expected_score = (3 * 0.10 + 0.20 + 0.30 + 0.40) / 6
expected_score = (0.10 * 8 + 0.20 * 8 + 0.30 * 3 + 0.40) / 20

# Act
result = compute_final_score(miner)
Expand Down