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

Algo to give k ranked miners for store #45

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

Conversation

rishiad
Copy link
Contributor

@rishiad rishiad commented Jan 23, 2025

Given that erasure coding provides us with a guarantee that we can recover the file even after a 30% loss of the data pieces. We can use this assign 70% of the pieces (mix of data and parity pieces) to higher ranking miners and 30% of the pieces (only data pieces) to lower ranking miners to allow them to build trust and rank in the network.

Introduces top_miner_ratio setting

Closes #3

Copy link
Contributor

@Shr1ftyy Shr1ftyy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work. I think there's just some smol changes that need to be made.

# Calculate number of top, low, and random miners
num_top = int(k * top_fraction)
num_low = int(k * low_fraction)
logger.debug(f"Top: {num_top}, Low: {num_low}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This log should make it obvious that we're selecting miners.

self: Neuron,
k: int,
exclude: list[int] = None,
rank_by: str = "total_successes",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update:
I think ranking based off of total_successes we should determine the ranks of the miners by their moving average scores (which is self.scores in the Validator's class).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Miner Candidate Selection Algorithm
2 participants