Skip to content

Conversation

gztensor
Copy link
Contributor

@gztensor gztensor commented Sep 18, 2025

Description

  • Remove recursion, indexing, assertions, and zipping.
  • Remove math.rs functions and corresponding tests that are not used
  • Add a test for mismatching LastUpdate and Weights => Crashed TestNet recently
  • Fix TestNet crash root cause:
    • Fix get_last_update (will always return proper length vector)
    • Fix LastUpdate vector update in add_neuron

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):

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 fmt and cargo clippy 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

@gztensor gztensor added the skip-cargo-audit This PR fails cargo audit but needs to be merged anyway label Sep 18, 2025
@gztensor gztensor changed the title Cleanup math Cleanup math and LastUpdate fix Sep 18, 2025
sam0x17
sam0x17 previously approved these changes Sep 19, 2025
Copy link
Collaborator

@shamil-gadelshin shamil-gadelshin left a comment

Choose a reason for hiding this comment

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

I noticed that you have two policies for replacing assert_eq!(len1, len2) - safe implementation and skipping. Is it intentional?

Another question - do we have all this math covered by tests?

@shamil-gadelshin shamil-gadelshin self-requested a review September 19, 2025 12:41
l0r1s
l0r1s previously approved these changes Sep 19, 2025
@sam0x17 sam0x17 merged commit f17472f into devnet-ready Sep 19, 2025
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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