Conversation
- Subtensor handles CRv4/commit-reveal automatically based on chain config - Fetch weights from platform-server each epoch - Submit burn weights (UID 0) if no challenges available - Reveal pending commits in RevealWindowOpen (for non-CRv4) - Clean centralized architecture (no P2P)
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughThe validator-node crate undergoes dependency cleanup and major control-flow refactoring. Cargo.toml removes unused platform and utility crates while standardizing workspace dependencies. Main.rs integrates Subtensor persistence with CRv4-aware submission, updates CLI arguments, and modifies handle_block_event to wire in new signer and Subtensor parameters throughout the event loop. Changes
Sequence DiagramsequenceDiagram
participant EvtLoop as Event Loop
participant Handler as handle_block_event
participant PSClient as PlatformServerClient
participant Subtensor
participant Signer as BittensorSigner
EvtLoop->>Handler: block_event + platform_client + subtensor + signer + netuid + version_key
rect rgb(230, 245, 240)
Note over Handler: COMMIT WINDOW
Handler->>PSClient: fetch platform weights
PSClient-->>Handler: weights
Handler->>Handler: translate to mechanism weights
Handler->>Signer: create signature
Signer-->>Handler: signature
Handler->>Subtensor: submit weights via ExtrinsicWait
Subtensor-->>Handler: submission confirmed
end
rect rgb(245, 240, 230)
Note over Handler: REVEAL WINDOW
Handler->>Subtensor: trigger automatic reveal (CRv4)
Subtensor-->>Handler: reveal complete
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~40 minutes Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
Comment |
* fix(p2p-consensus): improve PBFT consensus security and reliability - Add double-vote prevention in handle_prepare and handle_commit - Validate ViewChange messages match NewView's view number - Fix race conditions in consensus round handling - Replace unwrap with proper error handling in finalize_evaluation - Improve merkle proof generation with is_multiple_of check * fix(storage): add size limits to bincode deserialization for security - Add MAX_ENTRY_SIZE limits to prevent memory exhaustion attacks - Use bincode::options().with_limit() for safe deserialization - Ensure bincode compatibility with serialize defaults - Fix ConflictResolution to use derive(Default) - Apply clippy suggestions for improved code quality * fix(secure-container-runtime): add container security hardening - Add enhanced path traversal protection in policy validation - Improve WebSocket transport security with better authentication - Update container broker with improved error handling - Add additional integration tests for security features * fix(platform-server): secure API endpoints with signature verification - Add signature verification to submit_evaluation endpoint - Add signature verification to all validator API endpoints - Secure CORS configuration and HTTP client error handling - Fix broadcast authentication bypass vulnerability - Add historical_weights pruning and JWT secret warning - Implement Display trait instead of ToString for SubmissionStatus * fix(validator): require authentication and improve security - Require authentication for validator node operations - Update container tests for security compliance - Fix clippy warnings for iterator patterns * chore: fix clippy warnings and apply code formatting - Add allow attributes for await_holding_lock in p2p_client - Apply cargo fmt formatting to all files - Fix CORS configuration formatting in platform server
…llenge storage validation (#4) * feat(storage): add blockchain storage module for validator consensus - Add BlockHeader struct with state roots, challenge roots, and signatures - Add ValidatorSignature struct for attestations - Add Block struct with transitions and computed hash - Add StateTransition enum for state changes - Add BlockchainStorage with full CRUD operations - Support for historical state queries - Implement 2f+1 signature verification - Add comprehensive unit tests (23 tests) * feat: add state root consensus protocol with fraud proofs * feat(storage): add unified metadata registry module Implements MetadataRegistry for centralized challenge storage validation: - ChallengeMetadata: tracks schema version, merkle root, and config per challenge - GlobalMetadata: tracks all challenges and combined state root - Registry methods: register/unregister challenges, update state roots, validate - Comprehensive unit tests (28 tests) * feat(storage): add network-aware migration coordination - Add NetworkMigrationStatus for tracking network-wide schema versions - Add NetworkMigrationCoordinator for coordinating migrations across validators - Add ChallengeMigration and ChallengeMigrationStatus for per-challenge migrations - Add compute_migration_state_hash for migration verification - Add ChallengeMigrationHandler trait for challenge-specific migrations - Add comprehensive unit tests for all new functionality * style: apply cargo fmt formatting
Summary by CodeRabbit
Release Notes
New Features
Updates
✏️ Tip: You can customize this high-level summary in your review settings.