feat(lib): add validator-side library crate with SDK type imports#18
feat(lib): add validator-side library crate with SDK type imports#18
Conversation
Add new term-challenge-lib crate (lib/) to the workspace providing validator-side challenge logic using platform-v2 SDK types. New modules created: - dataset: DatasetEntry type using ChallengeId, re-exported from lib root - synthetic: SyntheticTask type using ChallengeId and Hotkey - validation: ValidationResult type using ChallengeId and Hotkey - admin: AdminAction type using ChallengeId and Hotkey - util/hotkey: parse_hotkey helper wrapping platform_core::Hotkey - cache: ScoreCache keyed by (ChallengeId, Hotkey) - chain: ChainSubmission type using ChallengeId and Hotkey - worker: WorkerJob and WorkerJobStatus using ChallengeId and Hotkey - bin/term-sudo: Admin CLI binary consuming ChallengeId and Hotkey lib.rs declares all modules, glob re-exports dataset::*, and re-exports ChallengeId from platform_challenge_sdk and Hotkey from platform_core. Workspace Cargo.toml updated to include lib/ as a member and adds the w3f-bls patch required by platform-core transitive deps. AGENTS.md updated with lib crate architecture documentation.
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ✨ 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 |
…k-types # Conflicts: # AGENTS.md # Cargo.lock # Cargo.toml
…t with explicit import
…k-types # Conflicts: # AGENTS.md
…b/storage - Change workspace deps from platform.git to platform-v2.git which exports ChallengeContext, routes(), and handle_route() on the ServerChallenge trait - Switch server/Cargo.toml from local path dep to workspace = true - Switch lib/Cargo.toml and storage/Cargo.toml to workspace = true - Regenerate Cargo.lock
- Add 'core' and 'lib' to workspace members - Use platform-v2 branch=main for workspace SDK deps - Switch server/Cargo.toml to workspace = true - Regenerate Cargo.lock
Summary
Add a new native library crate
lib/(term-challenge-lib) to the workspace, providing validator-side challenge logic that imports SDK types fromplatform-v2.Changes
lib/Cargo.toml: New crate with dependencies onplatform-core(forHotkey) andplatform-challenge-sdk(forChallengeId)lib/src/lib.rs: Module declarations fordataset,synthetic,validation,admin,util,cache,chain,worker; glob re-exportsdataset::*; re-exportsChallengeIdandHotkeylib/src/dataset.rs:DatasetEntrytype usingChallengeIdlib/src/synthetic/mod.rs:SyntheticTasktype usingChallengeIdandHotkeylib/src/validation/mod.rs:ValidationResulttype usingChallengeIdandHotkeylib/src/admin/mod.rs:AdminActiontype usingChallengeIdandHotkeylib/src/util/hotkey.rs:parse_hotkeyhelper wrappingplatform_core::Hotkey::from_ss58lib/src/cache/mod.rs:ScoreCachekeyed by(ChallengeId, Hotkey)lib/src/chain/mod.rs:ChainSubmissiontype usingChallengeIdandHotkeylib/src/worker/mod.rs:WorkerJobandWorkerJobStatustypes usingChallengeIdandHotkeylib/src/bin/term-sudo.rs: Admin CLI binary consumingChallengeIdandHotkeyCargo.toml: Addedlibto workspace members, addedw3f-blspatchAGENTS.md: Updated architecture docs with lib crate structure