Port more precompile tests to Rust#2616
Conversation
evgeny-s
left a comment
There was a problem hiding this comment.
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. |
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
Description
This PR continues the work of precompile tests porting. It contains sr25519 and staking precompile tests.
Related Issue(s)
Type of Change
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
./scripts/fix_rust.shto ensure my code is formatted and linted correctlyScreenshots (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.