feat: WASM-only architecture with sudo challenge management and P2P distribution#8
Open
feat: WASM-only architecture with sudo challenge management and P2P distribution#8
Conversation
…istribution Remove all legacy Docker/container code (challenge-orchestrator, secure-container-runtime) and clean up container references from wasm-runtime-interface, challenge-registry, and SDK. Add sudo actions for challenge management (AddChallenge, RemoveChallenge, EditChallenge, StopNetwork) with hotkey-based consensus verification. Store per-challenge emission weights in blockchain state with proper versioning (V7). Implement WASM module P2P distribution via DataRequest/DataResponse messages with SHA-256 peer verification. New validators automatically download missing modules on startup. Key changes: - Delete crates/challenge-orchestrator and crates/secure-container-runtime - Remove Docker-in-Docker from docker-compose.yml (privileged, docker.sock) - Add challenge weight system integrated into emission calculations - Add state mutation methods for sudo-initiated challenge operations - Add P2P message types for WASM module distribution - Increment state version to V7 with migration from V6 - Update documentation to reflect WASM-only architecture - Add comprehensive test suite for sudo actions
|
Important Review skippedToo many files! This PR contains 207 files, which is 57 over the limit of 150. You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Removes all legacy Docker/container orchestration code and establishes a pure WASM-based challenge execution architecture. Adds sudo-controlled challenge management with hotkey-based consensus verification and P2P distribution of WASM modules with SHA-256 integrity checks.
Changes
Docker/Container Removal
crates/challenge-orchestrator/(Docker-based challenge container orchestration)crates/secure-container-runtime/(Docker socket broker, container security)wasm-runtime-interface(container.rsgutted, container re-exports removed)docker_imageandendpointfields fromChallengeEntryin challenge-registryDockerRegistryvariant fromDiscoverySourceenumContainerRunRequest/ContainerRunResponsere-exports from challenge-sdk-wasmdocker-compose.yml(privileged: true, docker.sock mount, port 8090)tests/docker/directoryPLATFORM_TEST_DOCKER_MODEenv var from CICargo.tomlmembers and validator-node dependenciesSudo Challenge Management
SudoActionvariants:AddChallenge,RemoveChallenge,EditChallenge,StopNetworkadd_challenge_from_sudo,remove_challenge_from_sudo, etc.) to bothcore::ChainStateandp2p-consensus::ChainStateNetworkMessage::SudoActionin validator-node with hotkey verification (is_sudo)StopNetworkroutes all emissions to UID 0 (burn)Challenge Weight System
ChallengeWeightAllocation)process_wasm_evaluationsfor Bittensor weight submissionSetChallengeWeightsudo action updates weights with P2P propagationWASM Module P2P Distribution
WasmModuleRequest/WasmModuleResponseP2P message typesAddChallengeDataRequeston startupWasmModuleMetadata.code_hashwasm_module_dirfor executor loadingState Versioning
CURRENT_STATE_VERSIONto V7#[serde(default)]for backward compatibilityDocumentation & CI
Breaking Changes
ChallengeEntryno longer hasdocker_imageorendpointfieldsDiscoverySource::DockerRegistryvariant removedContainerHostFunctionsand related container types removed from wasm-runtime-interface