Skip to content

Port more precompile tests to Rust#2616

Merged
ales-otf merged 7 commits intodevnet-readyfrom
feat/precompile-rust-tests
Apr 24, 2026
Merged

Port more precompile tests to Rust#2616
ales-otf merged 7 commits intodevnet-readyfrom
feat/precompile-rust-tests

Conversation

@ales-otf
Copy link
Copy Markdown
Contributor

Description

This PR continues the work of precompile tests porting. It contains sr25519 and staking precompile tests.

Related Issue(s)

  • Closes #[issue number]

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

If this PR introduces a breaking change, please provide a detailed description of the impact and the migration path for existing applications.

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)

Please include any relevant screenshots or GIFs that demonstrate the changes made.

Additional Notes

Please provide any additional information or context that may be helpful for reviewers.

@ales-otf ales-otf added the skip-cargo-audit This PR fails cargo audit but needs to be merged anyway label Apr 24, 2026
@ales-otf ales-otf marked this pull request as ready for review April 24, 2026 13:37
Copy link
Copy Markdown
Collaborator

@evgeny-s evgeny-s left a comment

Choose a reason for hiding this comment

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

LGTM

I would consider keeping those TS tests in the scope of the Moonwall setup, because Rust tests ignore rate limits, and in general, this is another angle that would be great to keep. WDYT?

Copy link
Copy Markdown
Contributor

@open-junius open-junius 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!

@ales-otf
Copy link
Copy Markdown
Contributor Author

LGTM

I would consider keeping those TS tests in the scope of the Moonwall setup, because Rust tests ignore rate limits, and in general, this is another angle that would be great to keep. WDYT?

Hey, thanks for reviewing! The goal is to port the contract logic tests to the rust. It doesn’t make sense to test the RPC boundary with this amount of tests. We can cover it with a few directed tests instead. For the rate limiting, it should work now, because currently our rate limiting implementation is hardcoded into the calls and spare across the codebase. But it could be the case when my PR with rate limiting was merged. But we could either setup the dispatch extension in the mock or move the test to the integration level. Additionally to the boundary thing, it’s much better to have the tests in rust instead of TS, because, well we are a team of Rust developers.

@ales-otf ales-otf merged commit 1c268be into devnet-ready Apr 24, 2026
208 of 219 checks passed
LandynDev added a commit to LandynDev/subtensor that referenced this pull request Apr 24, 2026
Resolves conflicts from upstream precompile test port (opentensor#2616),
remove_stake benchmark fix (opentensor#2602), TransactionFeePaidWithAlpha
netuid event, and spec_version bumps.

- pallets/proxy/src/weights.rs: accept upstream regenerated weights
- pallets/subtensor/src/weights.rs: accept upstream regenerated weights
- runtime/src/lib.rs: bump spec_version 401 -> 403 (was 402 upstream)
- pallets/subtensor/src/macros/dispatches.rs: auto-merged
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.

5 participants