Skip to content

Girazoki chopsticks to subtensor#2728

Open
girazoki wants to merge 2 commits into
opentensor:devnet-readyfrom
girazoki:girazoki-chopsticks-to-subtensor
Open

Girazoki chopsticks to subtensor#2728
girazoki wants to merge 2 commits into
opentensor:devnet-readyfrom
girazoki:girazoki-chopsticks-to-subtensor

Conversation

@girazoki
Copy link
Copy Markdown
Contributor

@girazoki girazoki commented Jun 8, 2026

Description

Adds chopsticks utilization for mainnet fork tests against one single subnet. It prefetches the data from mainnet for one single subnet and spawns a mainnet clone with data only for that subnet. the test runs under a minute in contrast to recent fetch-all approaches taking 15 minutes to warm up.

Motivation:

  • testing: testing migrations and certain features that will be added against real-world-data.
  • randomized-testing: by randomizing the subnet against which we perform the test we can also guarantee that changes won't break. Maybe an idea could be to add chopsticks to the CI running every, e.g., 2 hours.

Usage:

  • pnpm moonwall test chopsticks_fork: tests against a mainnet fork with only subnet 1's data.
  • FORK_NETUID=43 pnpm moonwall test chopsticks_fork: tests against a mainnet fork with only subnet 43's data.
  • FORK_RANDOM_SUBNET=1 pnpm moonwall test chopsticks_fork: tests against a random subnet from mainnet.

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

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

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.

1 participant