Skip to content

Stake operation limits #1766

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

Open
wants to merge 13 commits into
base: devnet-ready
Choose a base branch
from
Open

Conversation

shamil-gadelshin
Copy link
Collaborator

@shamil-gadelshin shamil-gadelshin commented Jun 17, 2025

This PR introduces staking operation rate limits. All operations that 'add stake' including moving stake operations set a "this block limit". It prevents any 'remove stake' operations including moving stake operations until the next block. The exception is transfer_stake that doesn't set the destination limit. All limits will be removed on each block. We're limiting the triplet (hot, cold, subnet).

Copy link
Contributor

@bdmason bdmason left a comment

Choose a reason for hiding this comment

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

Looks good, comments are about superficial things.

@shamil-gadelshin shamil-gadelshin added the skip-cargo-audit This PR fails cargo audit but needs to be merged anyway label Jun 18, 2025
@shamil-gadelshin shamil-gadelshin mentioned this pull request Jun 18, 2025
13 tasks
@shamil-gadelshin shamil-gadelshin changed the title Stake limits prototype Stake operation limits Jun 18, 2025
@shamil-gadelshin shamil-gadelshin marked this pull request as ready for review June 18, 2025 15:53
@shamil-gadelshin shamil-gadelshin added the breaking-change This PR introduces a noteworthy breaking change label Jun 18, 2025
Copy link

@opentensor/cerebrum / @opentensor/gyrus / @opentensor/cortex breaking change detected! Please prepare accordingly!

Copy link
Collaborator

@l0r1s l0r1s left a comment

Choose a reason for hiding this comment

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

small changes needed

@shamil-gadelshin shamil-gadelshin requested a review from l0r1s June 23, 2025 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change This PR introduces a noteworthy breaking change skip-cargo-audit This PR fails cargo audit but needs to be merged anyway
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants