Skip to content

Promote testnet to main for 14.8.3 release#496

Closed
HudsonGraeme wants to merge 2 commits into
mainfrom
testnet
Closed

Promote testnet to main for 14.8.3 release#496
HudsonGraeme wants to merge 2 commits into
mainfrom
testnet

Conversation

@HudsonGraeme
Copy link
Copy Markdown
Member

@HudsonGraeme HudsonGraeme commented May 13, 2026

Brings two testnet-merged PRs into main as the next mainnet release candidate:

Testnet verification

Deployed testnet-0291f33c to sn2-testnet-1 (validator + miner) and sn2-testnet-2 (validator). After resolving an unrelated miner hotkey-mismatch on testnet-1 (axon was advertising the testnet/miner hotkey but pm2 had it running with --wallet-hotkey validator), sn2-testnet-1 sustains ~89 proofs/sec against a single local miner (uid 69). Mainnet pre-PR was ~17 proofs/sec spread across 240+ miners, so end-to-end speedup is bounded by whichever downstream constraint (network fanout, miner proving rate, etc.) the validator now exposes.

Release plan

After merge, tag 14.8.3 to trigger the mainnet release workflow.

Summary by CodeRabbit

  • New Features

    • Added MessagePack format support for circuit input validation, enabling efficient binary data handling
    • Enhanced input schema validation with descriptive error messages for MessagePack-encoded inputs
  • Chores

    • Updated security scanning and dependency management tools
    • Refreshed container runtime base image for latest system patches

Review Change Stack

@github-advanced-security
Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 13, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 2cf4868a-a7b2-46b7-bfcc-08294b037e40

📥 Commits

Reviewing files that changed from the base of the PR and between cb5fc16 and 0291f33.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (13)
  • .github/workflows/security.yml
  • Cargo.toml
  • Dockerfile
  • crates/sn2-types/Cargo.toml
  • crates/sn2-types/src/circuit.rs
  • crates/sn2-types/src/lib.rs
  • crates/sn2-types/src/miner_response.rs
  • crates/sn2-types/src/request.rs
  • crates/sn2-types/src/tensor_codec.rs
  • crates/sn2-validator/Cargo.toml
  • crates/sn2-validator/src/validator_loop/dispatch.rs
  • crates/sn2-validator/src/validator_loop/dslice.rs
  • crates/sn2-validator/src/validator_loop/mod.rs

Walkthrough

This PR introduces MessagePack-based binary request payloads and shared Arc-based circuit references across the type system and validator pipelines. Workspace dependencies are updated to add msgpack and bytes support; types move from JSON serialization to binary encodings; the dispatch loop gains a caching layer for budget management; and dslice staging pipelines are refactored to thread Arc-wrapped circuits and encode inputs as msgpack bytes.

Changes

MessagePack Input Handling and Arc Circuit Sharing

Layer / File(s) Summary
Workspace Setup and MessagePack Codec Foundation
Cargo.toml, crates/sn2-types/Cargo.toml, crates/sn2-validator/Cargo.toml, crates/sn2-types/src/tensor_codec.rs, crates/sn2-types/src/lib.rs
Workspace dependencies add rmpv, bytes, and enable serde rc feature; tensor_codec module adds arrayd_to_msgpack_value, encode_msgpack_value, input_data_payload, decode_msgpack_value, and decode_msgpack_to_json functions to convert between ndarray tensors and msgpack bytes; lib.rs re-exports codec functions for public use.
Type Contract Updates: Arc and Bytes
crates/sn2-types/src/miner_response.rs, crates/sn2-types/src/request.rs, crates/sn2-validator/src/validator_loop/mod.rs
DSliceRequest replaces circuit, inputs, and outputs fields with Arc<Circuit>, Bytes, and Option<Bytes> respectively, removing Serialize/Deserialize derives; MinerResponse.circuit becomes Option<Arc<Circuit>>; DispatchedRequest.task_circuit becomes Option<Arc<Circuit>>; ValidatorLoop gains dispatch_cache field.
Circuit MessagePack Validation
crates/sn2-types/src/circuit.rs
New Circuit::validate_inputs_msgpack method decodes msgpack bytes as a map and validates presence of all schema-defined keys with contextual error messages.
Dispatch Cache and Eligibility Refactor
crates/sn2-validator/src/validator_loop/dispatch.rs
DispatchCache struct holds cached capacities, adaptive_timeout, api_eligible set, and refreshed_at timestamp; refresh_dispatch_cache_if_stale recomputes cache based on queryable UIDs; compute_api_eligible_from_uids replaces neuron-based eligibility computation; spawn_miner_task signature changes to accept explicit ip, port, and hotkey parameters instead of deriving from neuron.
DSlice Pipeline Enqueue and Staging Updates
crates/sn2-validator/src/validator_loop/dslice.rs
enqueue_all_dslices parameter changes to accept &Arc<Circuit>; non-tiled input staging switches from JSON to msgpack input_data_payload bytes; tiled work preparation builds (tile_idx, Bytes) tuples instead of JSON values; build_tile_request accepts tile_bytes: Bytes directly and wraps circuit via Arc::clone; benchmark path wraps circuit in Arc before enqueueing.

Infrastructure Version Updates

Layer / File(s) Summary
Version Updates
.github/workflows/security.yml, Dockerfile
GitHub Actions cargo-deny-action updated from v2.0.17 to v2.0.18; Dockerfile Debian Bookworm slim base image updated from 20260421 to 20260505 build.

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly Related PRs

  • inference-labs-inc/subnet-2#494: Core changes to Arc-based circuit sharing, msgpack payloads, and validator dispatch refactor overlap directly with the same files and functions.
  • inference-labs-inc/subnet-2#430: Modifies crates/sn2-validator/src/validator_loop/dslice.rs tiled staging pipeline, overlapping with msgpack byte payload handling in the same function.
  • inference-labs-inc/subnet-2#303: Modifies DSliceRequest struct definition in crates/sn2-types/src/request.rs, overlapping with field type changes for circuit and inputs.

Poem

🐰 In bytes we trust, no JSON to rust,
Arc-wrapped circuits share the load with us,
DSlice staged swift in msgpack delight,
Dispatch cache shines, timeout metrics bright!

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch testnet

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@HudsonGraeme
Copy link
Copy Markdown
Member Author

switching to direct merge

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.

2 participants