subtensor
subtensor copied to clipboard
Reimplement StakeDelta
Description
This PR reimplements "stake delta" feature that was removed previously. It saves stake movement into the separate storage by hotkey, coldkey, and netuid. During the epoch() function execution stake delta is used as a "damper" to counter large stake movement effects on the epoch.
Related Issue(s)
- Closes https://github.com/opentensor/subtensor/issues/1558
Type of Change
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [x] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation update
- [ ] Other (please describe):
Breaking Change
The PR changes the epoch calculations.
Checklist
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have run
cargo fmtandcargo clippyto ensure my code is formatted and linted correctly - [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream modules
Additional Notes
The original PR comes as a draft to gather feedback.