System Components and Interactions
Help build the future of decentralized storage! The DIG Network is an open-source project that needs community support to continue development.
π Support the Project β - Donate crypto, buy NFTs, or sponsor development
This section details the technical interactions between DIG Network components, providing implementation-level understanding of how data flows through the system.
Component Interaction Flowsβ
Content Creation and Publishingβ
The publishing flow transforms raw content into cryptographically-secured, network-distributed data:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Content Creation and Publishing β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β 1. DATASTORE CREATION β
β βββββββββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ β
β β Raw Content β Capsule Fragmentation β Merkle Tree Generation β NFT Minting β β
β β β’ Fragment into ~16MB capsules β’ Generate content hash β β
β β β’ Build Merkle tree structure β’ Create DataStore NFT β β
β β β’ Embed metadata and proofs β’ Publish to Chia blockchain β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β β
β βΌ β
β 2. ECONOMIC COMMITMENTS (Required for Network Propagation) β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β
β β A. HANDLE REGISTRATION β Value Signaling β β
β β β’ Choose Handle β Calculate Cost β Pay DIG Tokens β Register On-Chain β β
β β β’ 3-char: 5000 DIG β’ 4-char: 1000 DIG β’ 5-char: 200 DIG β β
β β β’ 6-char: 40 DIG β’ 7-char: 8 DIG β’ 8+char: 1 DIG β β
β β β β
β β B. CAPSULESTAKECOIN CREATION β Per-Capsule Collateral β β
β β β’ Lock DIG tokens proportional to capsule size β β
β β β’ 256KB: 64 DIG β’ 1MB: 256 DIG β’ 10MB: 1024 DIG β β
β β β’ 100MB: 4096 DIG β’ 1000MB: 16384 DIG β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β β
β βΌ β
β 3. NETWORK DISCOVERY AND PROPAGATION β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Push to DIG Node β Plot Generation β PlotCoin Creation β P2P Broadcast β β
β β β’ HTTP push to initial node β’ Node generates plot file β β
β β β’ Create cryptographic proofs β’ Register PlotCoin on-chain β β
β β β’ Announce via P2P protocol β’ Economic incentives drive spread β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββ ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Technical Detailsβ
Capsule Fragmentation Algorithm:
- Content split into ~16MB chunks for optimal network distribution
- Each capsule receives unique identifier from content hash
- Merkle tree enables efficient integrity verification
- Capsule boundaries align with content structure when possible
Handle Registration Mechanics:
- Handle cost creates tiered reward system
- Registration transaction includes DataStore reference
- On-chain registry prevents duplicate handles
- Cost determines epoch reward multiplier
Storage Provider Operationsβ
Storage providers execute a complex optimization loop to maximize rewards:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Storage Provider Operations β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β 1. CONTENT DISCOVERY LOOP β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Monitor Sources β Calculate Profitability β Select Content β Store β β
β β β β
β β Sources: Profitability Factors: β β
β β β’ Handle registrations β’ Handle tier (3-char = 5x rewards) β β
β β β’ CapsuleStakeCoin publicationsβ’ Capsule size (1000MB = 3x rewards) β β
β β β’ P2P announcements β’ CapsuleStakeCoin collateral amount β β
β β β’ Direct content pushes β’ Current provider count β β
β β β’ Storage cost vs reward β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β β
β βΌ β
β 2. PLOT GENERATION PROCESS β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Capsule Collection β Plot Creation β Proof Generation β PlotCoin Mintingβ β
β β β β
β β Plot Creation: Proof Generation: β β
β β β’ 7-table format structure β’ Plot ownership proof β β
β β β’ Embed proof-of-work β’ Data inclusion proof β β
β β β’ Optimize for read speed β’ Computational work proof β β
β β β’ Physical access proof β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ βββββββ β
β β β
β βΌ β
β 3. ECONOMIC PARTICIPATION β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Stake DIG Tokens β Register PlotCoin β Serve Content β Claim Rewards β β
β β β β
β β Staking Requirements: Reward Distribution: β β
β β β’ Minimum stake per plot β’ Random capsule selection β β
β β β’ Locked during participation β’ Proof verification β β
β β β’ Slashable for misbehavior β’ Proportional to tier β β
β β β’ Withdrawal cooldown period β’ Performance multipliers β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Optimization Strategiesβ
Portfolio Management:
- Continuous profitability analysis
- Dynamic content rotation based on rewards
- Geographic distribution for performance
- Risk diversification across content tiers
Technical Optimizations:
- Parallel plot generation pipelines
- Efficient proof caching mechanisms
- P2P connection pooling
- Bandwidth allocation algorithms
Validation and Reward Flowβ
The validation process ensures network integrity while distributing rewards fairly:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Validation and Reward Distribution β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β 1. DETERMINISTIC SELECTION β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Block Hash β VRF β Capsule Selection β Provider Identification β β
β β β β
β β Selection Algorithm: Provider Discovery: β β
β β β’ Latest Chia block hash β’ Query PlotCoin registry β β
β β β’ Verifiable random function β’ Filter active providers β β
β β β’ Deterministic capsule ID β’ Check stake status β β
β β β’ Unpredictable selection β’ Verify network presence β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β β
β βΌ β
β 2. CRYPTOGRAPHIC VERIFICATION β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Request Proofs β Verify Each Type β Test Liveness β Record Results β β
β β β β
β β Verification Steps: Liveness Testing: β β
β β β’ Validate digital signatures β’ Request specific capsule β β
β β β’ Check Merkle paths β’ Verify response time β β
β β β’ Verify PoW binding β’ Check data integrity β β
β β β’ Confirm data possession β’ Test bandwidth capacity β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β β
β βΌ β
β 3. REWARD CALCULATION β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Determine Tier β Count Providers β Calculate Share β Distribute Tokens β β
β β β β
β β Reward Formula: Distribution: β β
β β β’ Base = tier_multiplier β’ Escrow release β β
β β β’ Share = base / provider_count β’ Performance bonus β β
β β β’ Bonus = uptime * speed β’ Automatic claiming β β
β β β’ Total = share + bonus β’ Compound staking option β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Validation Parametersβ
Selection Frequency:
- Validators perform selections every N blocks
- Frequency tunable based on network load
- Higher-tier content validated more frequently
- Random timing prevents gaming
Verification Thresholds:
- Proof verification must complete within timeout
- Liveness test requires sub-second response
- Failed verifications trigger re-selection
- Persistent failures result in penalties
P2P Protocolβ
Capsule Announcement Message:
{
"type": "CAPSULE_ANNOUNCE",
"capsule_id": "0x...",
"datastore_id": "0x...",
"handle_tier": 3,
"timestamp": 1234567890,
"provider_count": 5
}
Content Request Protocol:
{
"type": "CONTENT_REQUEST",
"capsule_ids": ["0x...", "0x..."],
"max_providers": 10,
"geo_preference": "US-WEST"
}
Blockchain Interfacesβ
PlotCoin Structure:
{
"plot_id": "0x...",
"provider_address": "xch1...",
"stake_amount": 1000,
"capsule_filter": "0x...",
"proof_package": "0x...",
"timestamp": 1234567890
}
Handle Registration:
{
"handle": "myproject",
"datastore_id": "0x...",
"tier": 3,
"payment": 5000,
"owner": "xch1..."
}
Performance Considerationsβ
Optimization Techniquesβ
Caching Strategies:
- Proof caching reduces computation overhead
- Capsule index caching accelerates lookups
- P2P peer caching improves discovery
- Handle registry caching minimizes queries
Parallel Processing:
- Concurrent plot generation pipelines
- Parallel proof verification
- Asynchronous P2P operations
- Batch blockchain transactions
Scalability Measuresβ
Horizontal Scaling:
- Multiple DIG Nodes per operator
- Geographic distribution of nodes
- Load balancing across providers
- Redundant validation infrastructure
Efficiency Improvements:
- Bloom filters for capsule discovery
- Compressed proof formats
- Delta synchronization protocols
- Optimized network routing
Component Dependenciesβ
External Dependenciesβ
- Chia Blockchain: Transaction processing and consensus
- IPFS (optional): Alternative capsule storage backend
- PostgreSQL: Local indexing and caching
- Redis: High-performance caching layer
Internal Dependenciesβ
- Plot Generator: Creates cryptographic storage proofs
- Proof Verifier: Validates storage commitments
- P2P Network Stack: Enables peer communication
- Economic Calculator: Determines reward distributions
Related Documentationβ
- Network Participants - Detailed roles and responsibilities
- Content Propagation - Distribution mechanisms
- Technical Specifications - Low-level implementation details
- DIG Node API - Complete API documentation