Skip to content

[⚙️] Challenge SDK is a trustless, confidential computing framework for Platform Network (Bittensor Subnet 100). Built with Intel TDX, it enables transparent and verifiable execution of agent evaluation jobs in secure enclaves.

Notifications You must be signed in to change notification settings

PlatformNetwork/challenge

Repository files navigation

█▀▀ █░█ ▄▀█ █░░ █░░ █▀▀ █▄░█ █▀▀ █▀▀   █▀ █▀▄ █▄▀
█▄▄ █▀█ █▀█ █▄▄ █▄▄ ██▄ █░▀█ █▄█ ██▄   ▄█ █▄▀ █░█

A modern, secure, and developer-friendly Python SDK for building verifiable challenges
on Platform Network using confidential computing with end-to-end security,
using the technology from Dstack-TEE.

Python version License PEP 621

↗️ The official Challenge SDK documentation ↗️

Getting Started · Architecture · Usage · Security · API Reference

Caution

Challenge SDK is currently in early development. Some features may be incomplete, APIs may change, and potential security vulnerabilities may exist. The team is actively testing to ensure everything is properly implemented and stable. Not ready for production use.

Features

  • End-to-End Security: Encrypted WebSocket communication with TDX attestation (X25519/ChaCha20-Poly1305), Ed25519 signed requests, and encrypted credential management.

  • Lifecycle Management: Decorator-based handlers for startup, ready, job evaluation, and cleanup.

  • Database Migrations: Automatic versioned migrations with sealed credential decryption.

  • Custom Weights: Flexible weights calculation for mining allocation.

  • Public APIs: Built-in support for custom public endpoints.

  • Monitoring: Health checks and comprehensive logging.

Quick Start

Note

Challenge SDK requires Python 3.10 or higher.

Install the Challenge SDK:

pip install platform-challenge-sdk

Or install from source:

git clone https://github.com/PlatformNetwork/challenge.git
cd challenge
pip install -e .

Create a new challenge file my_challenge.py:

from platform_challenge_sdk import challenge, run, Context

@challenge.on_startup()
async def on_startup():
    print("Challenge initializing...")

@challenge.on_ready()
async def on_ready():
    print("Challenge ready to accept jobs!")

@challenge.on_job()
def evaluate(ctx: Context, payload: dict) -> dict:
    return {
        "score": 0.95,
        "metrics": {"accuracy": 0.95},
        "job_type": "inference",
    }

if __name__ == "__main__":
    run()

See Getting Started for detailed installation and usage instructions.

Documentation

For complete documentation, see:

  • Getting Started - Installation, prerequisites, and quick start guide
  • Architecture - System architecture, components, and Platform API/Validator roles
  • Usage - Challenge lifecycle, job evaluation, weights, and public endpoints
  • Security - Security architecture, TDX attestation, and encryption details
  • API Reference - Complete API documentation (decorators, context, endpoints)
  • Database Migrations - Migration guide and examples
  • Development - Development setup, project structure, and tools
  • Troubleshooting - Common errors and solutions

License

Copyright 2025 Cortex Foundation

Licensed under the MIT License.

See LICENSE file for details.

Back to top

Made with love by the Cortex Foundation

About

[⚙️] Challenge SDK is a trustless, confidential computing framework for Platform Network (Bittensor Subnet 100). Built with Intel TDX, it enables transparent and verifiable execution of agent evaluation jobs in secure enclaves.

Resources

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published