Skip to content

Stake operation limits#1766

Merged
sam0x17 merged 15 commits intodevnet-readyfrom
feat/staking-ops-rates
Jun 30, 2025
Merged

Stake operation limits#1766
sam0x17 merged 15 commits intodevnet-readyfrom
feat/staking-ops-rates

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
@github-actions
Copy link
Contributor

@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
l0r1s
l0r1s previously approved these changes Jun 23, 2025
@sam0x17 sam0x17 merged commit 404a62e into devnet-ready Jun 30, 2025
24 of 26 checks passed
@sam0x17 sam0x17 mentioned this pull request Jul 1, 2025
@sirouk
Copy link

sirouk commented Jul 23, 2025

I think this same-block limitation is also applying to stake that is moved under the same triplet from the origin of spearate hotkeys and towards a validator hotkey for the purposes of staking.

I will test with transfer_stake

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.

6 participants