Closed teslashibe closed 2 weeks ago
Ask in Discord
Tracking conversation here
Based on the conversation in Discord, the Testnet may be configured in such a way that there is no minimum TAO required to acquire a vpermit. Creating a fresh miner now on devent to see the vpermit
behavior...
As seen above, there is no vpermit
on a freshly-registered miner on devnet. Will do some miner work and see when a vpermit is acquired (likely above a certain TAO staked threshold)
After doing some work with miner-2, we see that it now has a vpermit
! I have replicated this behavior on testnet
as well. Pivoting to more holistic research on the topic after playing around locally.
Adding a stake check on the synapse
can look like the following in miner/forward.py
:
# Get the current stakes from the metagraph
current_stakes = self.metagraph.S
# Define the minimum stake required
min_stake = 1000 # Adjust this value as needed
# Check if the calling neuron meets the minimum stake requirement
caller_uid = self.metagraph.hotkeys.index(synapse.dendrite.hotkey)
if current_stakes[caller_uid] < min_stake:
bt.logging.warning(f"Rejecting synapse from neuron with insufficient stake: {current_stakes[caller_uid]}")
return synapse # You might want to modify the response to indicate rejection
It looks like applying that min_stake may be the way to go, have you done any research about what kind of minimums are other subnets using?
Based on that we should be able to create a task for implementation
Really great work here @grantdfoster - lets do an implementation ticket and move this forward.
I am adding min_stake
to our production release checklist here: https://github.com/orgs/masa-finance/projects/12/views/1?pane=issue&itemId=66418693
Please link this spike
in the implementation ticket
cc @Luka-Loncar
We currently see that miners on our network get vtrust which implicitly makes them validators.
Research how vtrust gets set for both a validator and miner, an miner should not get vtrust otherwise it is a validator or miner/validator