Skip to content

Conversation

@Q-YZX0
Copy link

@Q-YZX0 Q-YZX0 commented Dec 27, 2025

Description

Fixed the registration difficulty adjustment logic in block_step.rs to correctly handle cases where registrations are below target. Previously, the logic for Case C (POW > Burn) and Case D (Burn > POW) was swapped, causing difficulty to decrease when it should have increased (or vice versa), leading to a latching behavior.

Related Issue(s)

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Other (please describe):

Breaking Change

N/A

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 ./scripts/fix_rust.sh to 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

Screenshots (if applicable)

N/A

Additional Notes

Verified logic against the intended difficulty adjustment specifications.

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.

Subnet registration block 7105263 - registration price decreased instead of expected increase

1 participant