Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Architecture

Overview of the system architecture

overview of each layer and its role

  • Application client Layer

    • Accepts user requests and displays finalized outputs (Web UI, CLI, REST bridge).

    • Provides inspection/visualization and basic controls.

  • Consensus Layer

    • Runs the Miner and Validators, plus the Coordinator.

    • Executes AI tasks, triggers quality voting, aggregates votes, and produces events.

  • Causal Consistency Layer (VLC)

    • Maintains vector logical clocks to enforce causal ordering.

    • Provides increment/validate/merge operations to prevent ordering violations.

  • Economic reward Layer (Smart Contracts)

    • Subnet registration/authorization, staking (HETU), and reward minting (KEY).

    • Receives epoch submissions (batched VLC/event summaries) and distributes incentives.

    • Tracks miner statistics and reputation signals.

  • Blockchain Base Layer

    • Provides secure execution, data availability, and immutable settlement.

    • Anchors summaries of off-chain work and enforces reward logic.

PoCW Architecture

High-Level Deployment

Intelligence KEY Mining is a distributed AI consensus system that combines off-chain quality validation with on-chain economic settlement. The system processes user requests through AI agents, validates outputs via Byzantine Fault Tolerant consensus, and anchors verified work on the blockchain for cryptocurrency rewards.

System Layers (Internal Subnet Architecture)

Core Components

1. CoreMiner (AI Worker)

Purpose: Executes AI tasks and maintains VLC consistency

Core Responsibilities:

  • Process user-submitted tasks using pluggable AI models

  • Generate solutions or request additional information when context is insufficient

  • Maintain causal ordering through Vector Logical Clock (VLC) increments

  • Track history of all processed inputs for audit purposes

  • Support multiple interaction patterns (direct answers, clarification requests, iterative refinement)

VLC Behavior:

  • Participant ID: 1 (fixed identifier in the VLC system)

  • Increments VLC: Every time it processes user input or additional information

  • VLC Format: Tracks its operation count as {1: counter} where counter increases with each operation

Key Operations:

  1. ProcessInput() - Handle initial user requests

    • Receives user's task or question

    • Evaluates if sufficient information is available

    • Either generates complete solution OR requests additional details

    • Increments VLC to timestamp this operation

    • Returns output type (ready/need-info), response, and updated VLC state

  2. ProcessAdditionalInfo() - Refine with user clarifications

    • Receives original request plus new context from user

    • Combines information to generate comprehensive solution

    • Increments VLC to timestamp this enhanced processing

    • Returns final solution with updated VLC state

Plugin Architecture: The miner uses a pluggable TaskProcessor interface that allows different AI implementations:

  • Demo Mode: Simple pattern-matching responses for testing

  • Production Ready: Integration with OpenAI, Anthropic Claude, or other LLMs

  • Custom Models: Domain-specific AI models for specialized tasks

This design separates the consensus logic from the actual AI implementation, making it easy to swap AI providers or upgrade models without changing the core protocol.

2. CoreValidator (Quality Control)

Purpose: Validate miner outputs through consensus voting

Core Responsibilities:

  • Independently assess quality of miner-generated outputs

  • Vote to accept or reject outputs based on quality thresholds

  • Coordinate user interactions (UI Validator only)

  • Validate VLC sequence correctness to prevent causality violations

  • Participate in Byzantine Fault Tolerant consensus

Two Validator Roles:

A. UI Validator (The Coordinator)

  • Role Type: UserInterfaceValidator

  • Count: Exactly 1 per subnet

  • VLC Participant ID: 2 (fixed identifier)

  • VLC Behavior: Increments on every user interaction

Unique Responsibilities:

  1. Receive all user inputs and increment VLC to timestamp receipt

  2. Coordinate information request flows between users and miners

  3. Handle user feedback on delivered results

  4. Aggregate votes from all 4 validators to determine consensus

  5. Deliver final approved results back to users

  6. Participate in VLC causal chain as active timestamper

The UI Validator is special because it bridges the external world (users) with the internal subnet, and therefore must participate in the VLC causality tracking.

B. Consensus Validators (The Quality Jury)

  • Role Type: ConsensusValidator

  • Count: 3 per subnet

  • VLC Behavior: Do NOT increment VLC (passive observers)

  • Voting Weight: 0.25 (25%) each

Focused Responsibilities:

  1. Receive miner output for independent assessment

  2. Apply quality scoring algorithms (pluggable)

  3. Vote Accept/Reject based on quality threshold

  4. Contribute voting weight to consensus calculation

  5. Do NOT participate in VLC (only judge quality, don't coordinate)

The separation between UI and Consensus validators allows for:

  • Simpler VLC: Only 2 active participants instead of 5

  • Clearer roles: Coordination vs judgment

  • Parallel voting: Consensus validators can assess simultaneously

  • Security: UI Validator can't manipulate votes (need 3/4 consensus)

Consensus Mechanism:

  • 4 validators total, each with 0.25 weight (25%)

  • Need >50% acceptance votes to approve output

  • Byzantine Fault Tolerant: Can handle 1 malicious validator

  • Quality assessment is pluggable (different criteria for different domains)

Plugin Architecture: Two pluggable interfaces allow customization:

  • QualityAssessor: Defines how to score miner outputs (domain-specific metrics)

  • UserInteractionHandler: Simulates or handles real user feedback

This modular design enables the same validator code to work with different quality standards (technical accuracy, creativity, safety, etc.) and different user interaction models (automated testing vs real users).

Workflow Management:

The coordinator orchestrates a complete request flow:

  1. User Input Reception: Receives task from UI Validator (VLC incremented)

  2. Clock Synchronization: Ensures miner has latest VLC state

  3. Task Delegation: Routes request to miner for processing

  4. VLC Validation: Verifies miner's VLC state is causally correct

  5. Parallel Voting: Triggers all 4 validators to assess quality simultaneously

  6. Consensus Calculation: Aggregates votes to determine acceptance (>50% threshold)

  7. Result Delivery: Sends approved output back to user via UI Validator

  8. Event Tracking: Records complete causal chain in graph database

Last updated