Conversation
… pattern - Add IPFSManager class with Kubo HTTP API client - Add Docker Compose configuration for Kubo v0.26.0 - Integrate IPFS auto-start/stop in ./run script - Port assignment: IPFS API = NODE_PORT + 1000 - Add helper scripts for manual development usage - Add comprehensive README documentation Phase 1 of IPFS integration (node-2pd) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
IPFSManager methods: - add(): Add content to IPFS, returns CID - get(): Retrieve content by CID - pin()/unpin(): Manage pinning status - listPins(): List all pinned CIDs - isPinned(): Check if content is pinned - getSize(): Get content size without download - validateCid(): Private CID validation RPC endpoints (NodeCall handlers): - ipfsStatus: Health and node info - ipfsAdd: Add content with base64 support - ipfsGet: Retrieve content by CID - ipfsPin: Pin content to local node - ipfsUnpin: Unpin content from local node - ipfsListPins: List all pinned CIDs Features: - Singleton IPFS manager with lazy initialization - CID validation for CIDv0 (Qm...) and CIDv1 (bafy/bafk...) - Proper error handling with typed errors - Base64 encoding for binary-safe RPC transfer 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add IPFSTypes.ts with PinnedContent and AccountIPFSState interfaces - Add ipfs JSONB field to GCR_Main entity for account IPFS state - Create GCRIPFSRoutines with helper methods: - getIPFSState, addPin, removePin, getPins, isPinned - updateRewards, updateCosts, getStats, cleanupExpiredPins - Export GCRIPFSRoutines from gcr_routines index Part of IPFS integration epic (node-qz1) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add ipfsPins nodecall handler that queries account IPFS state using GCRIPFSRoutines from Phase 3. This is different from ipfsListPins which lists all pins on the IPFS node itself. The ipfsPins handler: - Takes an account address parameter - Returns pins array, count, totalPinnedBytes, rewards/costs - Uses gcrRoutines.ipfs.getIPFSState() from Phase 3 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add ipfsOperations.ts with handlers for ipfs_add, ipfs_pin, ipfs_unpin - Integrate IPFS operations into executeOperations.ts switch dispatch - Uses SDK types from @kynesyslabs/demosdk v2.6.0 - Handlers integrate with GCRIPFSRoutines for account state management 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add ipfsTokenomics.ts with pricing calculations: - Regular accounts: 1 DEM per 100MB (min 1 DEM) - Genesis accounts: 1GB free, then 1 DEM per GB - Fee distribution: 100% to hosting RPC (MVP) - Integrate tokenomics into ipfsOperations.ts: - Pre-operation balance validation - Fee deduction from sender - RPC credit for hosting - Free tier tracking for genesis accounts - Extend IPFSTypes.ts with tokenomics fields: - freeAllocationBytes and usedFreeBytes - wasFree and freeBytes per pin - costPaid tracking - Update GCRIPFSRoutines.ts: - Support for new IPFS state fields 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Wrap contentBuffer in Uint8Array for proper BlobPart compatibility. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implements Phase 8 - IPFS Streaming for large files: - Add addStream() method for chunked uploads with progress callbacks - Add getStream() method for streaming downloads with progress tracking - Add streaming types (StreamProgressCallback, AddStreamOptions, GetStreamOptions) - Add STREAM_CHUNK_SIZE constant (256KB) - Create ipfsAddStream RPC endpoint with session-based chunk management - Create ipfsGetStream RPC endpoint with chunked download support - Update manageNodeCall to route streaming requests Features: - Memory-efficient handling of 1GB+ files - Progress callbacks during transfer - Session timeout cleanup for incomplete uploads - Multipart streaming for Kubo HTTP API 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implements private IPFS network support and cluster operations for Demos Network: **Swarm Key Management (swarmKey.ts)**: - Generate/parse/validate 32-byte swarm keys for private networks - Environment variable integration (DEMOS_IPFS_SWARM_KEY) - go-ipfs/kubo compatible swarm.key file format **Swarm Types (types.ts)**: - SwarmConfig for private network configuration - SwarmPeerInfo for connected peer details - ClusterPinOptions/ClusterPinResult for distributed pinning - BootstrapNode for network bootstrap configuration - getSwarmConfigFromEnv() and SWARM_DEFAULTS **IPFSManager Extensions**: - getSwarmPeers(): List connected peers with direction/latency - connectPeer()/disconnectPeer(): Manage peer connections - Bootstrap node management (add/remove/list/clear) - configureBootstrapNodes(): Replace public with Demos bootstraps - registerDemosPeer()/getDemosPeers(): Track Demos network nodes - clusterPin(): Replicate content across Demos network - isPrivateNetwork()/getSwarmConfig(): Configuration queries **RPC Endpoints**: - ipfsSwarmPeers: Get connected peer list - ipfsSwarmConnect/ipfsSwarmDisconnect: Peer management - ipfsBootstrapList: View bootstrap configuration - ipfsClusterPin: Distributed pinning across nodes - ipfsDemosPeers: List known Demos network peers Environment variables: - DEMOS_IPFS_SWARM_KEY: 64-hex swarm key for isolation - DEMOS_IPFS_BOOTSTRAP_NODES: Comma-separated multiaddrs - LIBP2P_FORCE_PNET: Force private network mode 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implements optional bridge to public IPFS network for content retrieval and publishing, with rate limiting for controlled access. New features: - fetchFromPublic(): Fetch content from public gateways with fallbacks (ipfs.io, dweb.link, cloudflare-ipfs.com, gateway.pinata.cloud) - publishToPublic(): Announce content to public DHT via dht/provide - isPubliclyAvailable(): HEAD request check for content availability - Rate limiting: requests/minute and bytes/minute tracking New RPC endpoints: - ipfsPublicFetch: Fetch from public gateways - ipfsPublicPublish: Publish to public network - ipfsPublicCheck: Check public availability - ipfsRateLimitStatus: Rate limit monitoring Configuration via environment variables: - DEMOS_IPFS_PUBLIC_BRIDGE_ENABLED (default: false) - DEMOS_IPFS_PUBLIC_GATEWAY (default: https://ipfs.io) - DEMOS_IPFS_ALLOW_PUBLIC_PUBLISH (default: false) - DEMOS_IPFS_PUBLIC_TIMEOUT (default: 30000ms) - DEMOS_IPFS_PUBLIC_MAX_REQUESTS (default: 30/min) - DEMOS_IPFS_PUBLIC_MAX_BYTES (default: 100MB/min) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Merged .gitignore: includes both docs and devnet runtime entries - Merged run script: IPFS + PostgreSQL shutdown wrapped in external-db check - Includes devnet Docker Compose setup (4-node local development network) - Added Serena memory documenting devnet architecture 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add 4 IPFS Kubo containers (ipfs-1 through ipfs-4) - Each Demos node depends on and connects to its IPFS container - IPFS API internal only (http://ipfs-N:5001) - not exposed to host - Persistent volumes: ipfs-1-data through ipfs-4-data - Memory limits: 1G per IPFS container (256M reserved) - Health checks ensure nodes wait for IPFS before starting - Update README with IPFS architecture and troubleshooting - Update Serena memory with IPFS integration details 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add IPFS to LogCategory type and ALL_CATEGORIES array - Add IPFS tab to TUI (key: -, shifted DAHR to =, CMD to \) - Add IPFS tag mappings: IPFS, IPFS MANAGER, IPFS UPLOAD, etc. - Update keyboard handler for new tab indices 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add IPFS private swarm key to all docker-compose nodes - Add PeerCapabilities interface for extensible feature advertising - Add IpfsCapabilities for IPFS peer info exchange (peerId, addresses) - Update HelloPeerRequest with optional capabilities field (backward compatible) - Implement handleIpfsCapabilities() for async IPFS peer connection - Add PeerManager.getOurCapabilities() to advertise IPFS info - Resolve merge conflicts: keep both IPFS and TLSNotary operations - Fix TUI conflicts: add IPFS, DAHR, TLSN tabs with proper keybindings IPFS peers now dynamically discover each other through Demos peer network instead of static bootstrap configuration. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add IPFS status column to TUI header (active/error/off, peer ID, swarm count) - Add ipfsStatus property to SharedState for TUI display - Update IPFSManager to populate ipfsStatus on init/healthCheck - Clean up verbose [DEBUG HELLO PEER] logs to concise [IPFS] category - Add self-connection skip (IPFS/libp2p rejects self-dial by design) - Remove DEBUG tab from TUI TABS, add dedicated IPFS tab - Make IPFS capability errors non-fatal (graceful degradation) - Configure host networking and LAN address announcement - Add address filtering for hello_peer capabilities exchange 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implements Phase 9 cost estimation endpoint: - Add ipfsQuote.ts handler with IpfsQuoteRequest/IpfsQuoteResponse types - Register in manageNodeCall.ts switch case - Export from ipfs/index.ts The endpoint calculates cost using existing ipfsTokenomics module and returns detailed breakdown including genesis account detection. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…tion - Pass custom_charges from transaction to operation params in createOperation - Update ipfsAdd/ipfsPin to check custom_charges.ipfs.max_cost_dem - Fair pricing: charge actual cost (≤ signed maximum) - Maintains backward compatibility with legacy transactionAmount validation Part of IPFS Cost Estimation epic (node-zbp) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add custom_charges.ipfs validation in handleValidateTransaction - Calculate actual cost using ipfsTokenomics.calculatePinCost() - Validate actual cost <= signed max_cost_dem (fair pricing) - Attach actual cost breakdown to validityData for client review - Update SDK to v2.8.2 with custom_charges support 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…h IPFS capabilities Merged features from both branches: - IPFS: capabilities exchange, tokenomics, peer discovery, quote validation - custom_protocol: DTR manager, peerlist exchange in hello_peer, Waiter integration - Updated SDK to 2.8.3 - Added sender parameter to manageNodeCall for IPFS quote validation Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix ValidityDataCustomCharges structure to match SDK type (flat structure with type field) - Add missing await on helloPeerCallback async call Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Use base_cost, size_cost fields instead of custom fields - Move IPFS-specific info to additional_costs Record Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add IPFS_GATEWAY_PORT env variable (default 58080) - Configure Gateway in init-ipfs.sh to use alternate port - Port 8080 often conflicts with other services (cli-proxy-api, etc.) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The IPFS container was crashing when started through ./run because IPFS_GATEWAY_PORT was not being passed to the docker compose command. While the variable was exported, the inline environment assignments (PORT=X IPFS_API_PORT=X) created a new environment context. - Added IPFS_GATEWAY_PORT to docker compose up command - Updated log_verbose message to include the gateway port Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When the base ipfs/ folder has newer init-ipfs.sh or docker-compose.yml,
automatically copy them to ipfs_${PORT} instance folders. This ensures
configuration updates (like the Gateway port fix) are propagated to
existing instance folders without requiring manual intervention.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The TUI was becoming unresponsive after 20-30 seconds because: 1. Every log entry triggered updateFilteredLogs() synchronously 2. getAllEntries() iterated all category buffers and sorted on every call 3. Rapid log entries saturated the event loop, blocking keyboard input Fixes: - Debounce handleLogEntry using setImmediate to batch rapid updates - Cache getAllEntries() result, only rebuild when new entries added - Invalidate cache on log() and clearBuffer() Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When running as anchor node, the startup code would set up stdin handlers for the "press Enter to skip" functionality during hello_peer wait. After the wait completed or timed out, it called process.stdin.pause() which broke terminal-kit's keyboard input handling. Now skips stdin manipulation entirely when TUI is enabled, since terminal-kit manages stdin independently via grabInput(). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Write Demos swarm key to /data/ipfs/swarm.key in init-ipfs.sh - Add LIBP2P_FORCE_PNET=1 to enforce private network mode - Update docker-compose files for both template and instance - All Demos IPFS nodes now form isolated swarm automatically Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add SIGTERM signal handling alongside SIGINT for graceful shutdown - Add DATABASE_URL validation when --external-db flag is used - Add orphan Docker container cleanup on startup (postgres_, ipfs_) - Add IPFS swarm port 4001 conflict detection - Add IPFS swarm.key verification for private network (Phase 10) - Fix IPFS stop logic - now runs regardless of EXTERNAL_DB mode - Improve ctrl_c() to stop IPFS, PostgreSQL, and TLSNotary with status Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
CRITICAL fixes: - node-0uf: Replace process.exit(1) with log.error for non-fatal IPFS errors - node-t02: Make DEBUG_SKIP_SELF_CHECK environment-based - node-vcd: Resolve merge conflict markers in .gitignore - node-tkq: Check result.success in executeOperations to propagate failures - node-1ut: Clear initializationPromise on failure to allow retry - node-8n4: Add isTTY check before setRawMode to avoid Docker/CI crashes HIGH priority fixes (non-breaking): - H2: Add per-pubkey promise-based locking in addPin/removePin - H3: Add promise singleton pattern for genesis cache loading - H4: Give remainder to consensus in calculateFeeDistribution MEDIUM fixes: - M3: Add null safety with optional chaining in ipfsPins, PeerManager, TUIManager - M4: Add pending downloads map to prevent duplicate IPFS fetches - M5: Use sliding window timestamp for session cleanup Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- ipfsQuote: Add Number.isNaN() check since typeof NaN === "number" passes the existing validation (fixes node-yet / DEM-483) - ipfsAdd: Add MAX_CONTENT_SIZE (16MB) validation before buffer allocation to prevent memory exhaustion DoS attacks. Includes pre-decode size estimate and post-decode verification (fixes node-p2n / DEM-484) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add retry logic with exponential backoff to IPFSManager (5 attempts, 1s-30s delay) - Add connecting/retrying transient states to sharedState.ipfsStatus - Update TUI to show yellow for connecting/retrying vs red for permanent errors - Add IPFS_VERBOSE_LOGGING env var for debug output control - Refactor status updates to use shared helper method Fixes: node-jh4 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add duration options (week/month/quarter/year/permanent) with pricing multipliers - Add ipfsExtendPin transaction type for extending pin expiration - Create ExpirationWorker for background cleanup of expired pins - Update ipfsPins response with expiration summary (permanent/expiring/expired counts) - Add GCRIPFSRoutines.updatePin() for modifying pin properties - Add ipfsQuota endpoint for storage quota checking - Fix PointSystem.ts linkedNomisIdentities field REVIEW: DEM-481 - IPFS Pin Expiration System Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add comprehensive yellowpaper-style documentation for the IPFS integration covering all features implemented since testnet: - System architecture and component overview - Transaction operations (IPFS_ADD, IPFS_PIN, IPFS_UNPIN, IPFS_EXTEND_PIN) - Tokenomics model with genesis vs regular pricing - Duration-based pricing with multipliers - Storage quota system (DEM-480) - Pin expiration system (DEM-481) - Private swarm network with official Demos swarm key - Public bridge configuration - RPC endpoint reference (23 endpoints) - Error handling and validation - Security considerations - Configuration reference
|
Caution Review failedThe pull request is closed. WalkthroughThis PR implements comprehensive IPFS (InterPlanetary File System) integration for the Demos Network, including a decentralized storage system with cost accounting, pin expiration mechanisms, multi-phase infrastructure, Docker containerization, and extensive RPC endpoint support for storage operations. Changes
Sequence Diagram(s)sequenceDiagram
participant Client as Client/SDK
participant Node as Demos Node
participant IPFS as IPFS Manager
participant GCR as GCR State
participant IPFS_Net as IPFS Network
Note over Client,IPFS_Net: IPFS Add with Custom Charges (Two-Step)
Client->>Node: ipfsQuote(file_size, operation)
activate Node
Node->>Node: Determine genesis status
Node->>Node: Calculate cost via tokenomics
Node-->>Client: cost_dem, breakdown
deactivate Node
Client->>Client: Construct ipfs_add transaction<br/>with max_cost_dem in custom_charges
Client->>Client: Sign transaction
Client->>Node: submitTransaction(ipfs_add_tx)
activate Node
Node->>Node: Validate custom_charges.ipfs
Node->>Node: Calculate actual_cost_dem
Node->>Node: Compare actual vs max_cost_dem
alt actual_cost > max_cost_dem
Node-->>Client: Invalid (exceeded budget)
else Within budget
Node->>GCR: Deduct balance (processFeePayment)
Node->>IPFS: Add content
activate IPFS
IPFS->>IPFS_Net: Store & pin content
IPFS-->>Node: Return CID
deactivate IPFS
Node->>GCR: Update pins, costs, rewards
Node-->>Client: Success with CID
end
deactivate Node
sequenceDiagram
participant Host as Host A
participant Node as Demos Node
participant IPFS_Node as IPFS Node
participant Peer as Peer B (Host)
participant Peer_IPFS as Peer B IPFS
Note over Host,Peer_IPFS: IPFS Peer Discovery & Connection (Hello Peer Flow)
Node->>Peer: hello_peer request
activate Peer
Peer->>Peer_IPFS: Get node info (peerId, addresses)
Peer_IPFS-->>Peer: Return capabilities
Peer-->>Node: hello_peer response<br/>(with capabilities)
deactivate Peer
activate Node
Node->>Node: Parse IpfsCapabilities<br/>(peerId, addresses)
Node->>IPFS_Node: handleIpfsCapabilities
activate IPFS_Node
IPFS_Node->>IPFS_Node: Filter local vs remote addresses
IPFS_Node->>Peer_IPFS: connectPeer(multiaddr)
Peer_IPFS-->>IPFS_Node: Connected
IPFS_Node->>Node: Register Demos peer
deactivate IPFS_Node
Node-->>Node: Store peer capabilities
deactivate Node
sequenceDiagram
participant Worker as ExpirationWorker
participant DB as GCR Database
participant IPFS as IPFS Manager
participant GCRRoutines as GCRIPFSRoutines
Note over Worker,GCRRoutines: IPFS Pin Expiration Cycle
Worker->>Worker: runExpirationCheck (periodic)
Worker->>DB: Get all accounts with pins
activate DB
DB-->>Worker: Account list
deactivate DB
loop For each account
Worker->>GCRRoutines: getIPFSState(account)
activate GCRRoutines
GCRRoutines->>DB: Query account IPFS state
DB-->>GCRRoutines: pins array
GCRRoutines-->>Worker: AccountIPFSState
deactivate GCRRoutines
Worker->>Worker: Identify expired pins<br/>(current_time > expiresAt)
alt Pin within grace period
Worker->>Worker: Wait & log
else Pin past grace period
loop For each expired pin (batch)
Worker->>IPFS: unpin(cid)
IPFS-->>Worker: Unpinned
Worker->>GCRRoutines: removePin(account, cid)
GCRRoutines->>DB: Update IPFS state
DB-->>GCRRoutines: Updated
end
end
end
Worker->>Worker: Update stats & log
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120 minutes Reasoning: This PR introduces a massive IPFS subsystem with 1500+ new lines across 50+ files, spanning infrastructure (Docker, startup scripts), core manager/types, tokenomics/costing, 21 NodeCall handlers, transaction handlers, GCR integration, peer discovery enhancements, and UI updates. The changes exhibit high logic density (custom_charges validation, cost calculations, expiration logic, quota enforcement), multi-pattern implementation (handlers, state routines, operations), deep integration across consensus/network/storage layers, and multiple edge cases (grace periods, genesis accounts, streaming uploads, rate limiting). While many handlers follow similar patterns (reducing per-file effort), the cohesive complexity of the entire feature—including cross-module dependencies, race condition prevention (per-pubkey locking), and tokenomics correctness—demands comprehensive scrutiny of core logic, test coverage, and integration flow. Possibly related issues
Possibly related PRs
Suggested labels
Suggested reviewers
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (101)
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 |
|
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
|||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||||||||||||||||||||||||||||




PR Type
Enhancement, Documentation, Bug fix
Description
Complete IPFS integration with core
IPFSManagerclass providing content operations (add,get,pin,unpin), streaming support for large files, swarm management, and public bridge functionalityIPFS tokenomics system with tier-based pricing (regular: 1GB/1000 pins, genesis: 10GB/10000 pins), pin expiration with duration-based multipliers, and fair pricing via
custom_chargesAccount IPFS state management in GCR with concurrency control, quota enforcement, pin expiration cleanup, and comprehensive statistics tracking
Comprehensive RPC endpoints for IPFS operations: status, add/get/pin/unpin, streaming uploads/downloads, swarm management, public bridge access, cost estimation, and quota checking
Pin expiration system with background worker service for monitoring and cleanup, grace period enforcement, and batch processing
Private network support via swarm key utilities and peer discovery through
hello_peerprotocol with capability exchangePublic bridge implementation with rate limiting, gateway availability checks, and content publishing to public IPFS network
TUI enhancements for IPFS status display, peer capabilities visualization, and debounced log updates
IPFS yellowpaper specification documenting complete architecture, tokenomics, quotas, expiration, security, and all RPC endpoints
Docker orchestration for IPFS container lifecycle management with port configuration and swarm key setup
Bug fix: TTY safety checks in index.ts to prevent crashes in Docker/CI environments
Diagram Walkthrough
File Walkthrough
52 files
IPFSManager.ts
Core IPFS Manager with streaming and public bridge supportsrc/features/ipfs/IPFSManager.ts
IPFSManagerclass wrapping Kubo HTTP API for IPFSoperations with health checking and lifecycle management
add,get,pin,unpin,listPins,isPinned,getSize) with comprehensive error handlingaddStreamandgetStreammethods with progress callbacks
cluster pinning for distributed content replication
public IPFS network with rate limiting
and verbose logging for debugging
ipfsOperations.ts
IPFS transaction handlers with tokenomics integrationsrc/libs/blockchain/routines/ipfsOperations.ts
ipfs_add,ipfs_pin,ipfs_unpin,ipfs_extend_pin)size and genesis account detection
state with cost tracking
and extension functionality
custom_chargesfor cost control andbalance validation
GCRIPFSRoutines.ts
Account IPFS state management with concurrency controlsrc/libs/blockchain/gcr/gcr_routines/GCRIPFSRoutines.ts
(
addPin,removePin,updatePin)concurrent operations
state
IPFSTypes.ts
IPFS types with quotas and expiration systemsrc/model/entities/types/IPFSTypes.ts
PinnedContentandAccountIPFSStateinterfaces for IPFS data inaccount records
(regular: 1GB/1000 pins, genesis: 10GB/10000 pins)
support with pricing multipliers
checking
pin time remaining calculations
ipfsPublicFetch.ts
Public IPFS gateway fetch RPC endpointsrc/libs/network/routines/nodecalls/ipfs/ipfsPublicFetch.ts
(403 for disabled, 429 for rate limit)
time metadata
PointSystem.ts
Add Nomis reputation scoring integrationsrc/features/incentive/PointSystem.ts
linkedNomisIdentitiesfield to account points structure for Nomisreputation scoring integration
PeerManager.ts
Phase 9 - IPFS peer discovery via hello_peer protocolsrc/libs/peer/PeerManager.ts
alongside URLs
savePeerList()method to persist peer data with capabilities todisk
getOurCapabilities()to advertise node's IPFS capabilitiesto peers
isLocalNetwork()helper to determine if peer is on local networkfor address filtering
sayHelloToPeer()to include capabilities in hello_peerhandshake
helloPeerCallback()async and added capability extraction frompeer responses
types.ts
IPFS integration type definitions and configurationsrc/features/ipfs/types.ts
health status
callbacks
ipfsTokenomics.ts
IPFS tokenomics and pricing calculations modulesrc/libs/blockchain/routines/ipfsTokenomics.ts
rates
ExpirationWorker.ts
IPFS pin expiration background worker servicesrc/features/ipfs/ExpirationWorker.ts
pins
intervals
TUIManager.ts
TUI enhancements for IPFS status and peer capabilities displaysrc/utilities/tui/TUIManager.ts
ID, and swarm peers
-, DAHR on=, TLSN onbacktick
multiaddresses
from rapid logs
display
ipfsAddStream.ts
IPFS streaming add endpoint for large file uploadssrc/libs/network/routines/nodecalls/ipfs/ipfsAddStream.ts
management
swarmKey.ts
IPFS swarm key utilities for private network setupsrc/features/ipfs/swarmKey.ts
ipfsGetStream.ts
IPFS streaming get endpoint for large file downloadssrc/libs/network/routines/nodecalls/ipfs/ipfsGetStream.ts
caching
access)
manageHelloPeer.ts
Phase 9 - IPFS capabilities in hello_peer handshakesrc/libs/network/manageHelloPeer.ts
IpfsCapabilitiesandPeerCapabilitiesinterfaces for capabilityexchange
HelloPeerRequestto include optional capabilities fieldhandleIpfsCapabilities()to dynamically connect to peerIPFS nodes
DEBUG_SKIP_SELF_CHECKenvironmentvariable
updates
ipfsQuote.ts
IPFS cost quote endpoint for operation estimationsrc/libs/network/routines/nodecalls/ipfs/ipfsQuote.ts
transactions
input
manageNodeCall.ts
IPFS NodeCall handlers integration and routingsrc/libs/network/manageNodeCall.ts
bootstrap)
ipfsQuota)
manageNodeCall()signature to accept optionalsenderparameteripfsPins.ts
IPFS account pins query endpoint with expiration infosrc/libs/network/routines/nodecalls/ipfs/ipfsPins.ts
state
expired pins
ipfsQuota.ts
IPFS quota check endpoint for storage limitssrc/libs/network/routines/nodecalls/ipfs/ipfsQuota.ts
endpointHandlers.ts
IPFS custom_charges validation in transaction handlingsrc/libs/network/endpointHandlers.ts
ipfsManager.ts
IPFS manager singleton initialization and accesssrc/libs/network/routines/nodecalls/ipfs/ipfsManager.ts
index.ts
IPFS module main exports and factory functionssrc/features/ipfs/index.ts
documentation
IPFSManagerclass and factory functioncreateIpfsManagerstreaming
support
ExpirationWorkerfor managing pin expiration lifecycleipfsAdd.ts
IPFS add content NodeCall handler with DoS protectionsrc/libs/network/routines/nodecalls/ipfs/ipfsAdd.ts
validation
errors.ts
IPFS error classes and error code definitionssrc/features/ipfs/errors.ts
IPFSErrorclass
IPFSConnectionError,IPFSTimeoutError,IPFSNotFoundError,IPFSInvalidCIDError,IPFSAPIErrorIPFS_ERROR_CODESconstant for error code referenceipfsPublicPublish.ts
IPFS public network publish endpoint handlersrc/libs/network/routines/nodecalls/ipfs/ipfsPublicPublish.ts
status codes
ipfsGet.ts
IPFS content retrieval NodeCall handlersrc/libs/network/routines/nodecalls/ipfs/ipfsGet.ts
IPFSNotFoundErrorandIPFSInvalidCIDErrorwith appropriateHTTP status codes
ipfsClusterPin.ts
IPFS cluster-wide pinning endpoint handlersrc/libs/network/routines/nodecalls/ipfs/ipfsClusterPin.ts
nodes
CategorizedLogger.ts
Logger categories and getAllEntries caching optimizationsrc/utilities/tui/CategorizedLogger.ts
IPFSandDEBUGlog categories for better log organizationgetAllEntries()to prevent event loopsaturation
entries
ipfsPublicCheck.ts
IPFS public gateway availability check endpointsrc/libs/network/routines/nodecalls/ipfs/ipfsPublicCheck.ts
gateways
ipfsSwarmConnect.ts
IPFS swarm peer connection endpoint handlersrc/libs/network/routines/nodecalls/ipfs/ipfsSwarmConnect.ts
ipfsPin.ts
IPFS content pinning NodeCall handlersrc/libs/network/routines/nodecalls/ipfs/ipfsPin.ts
executeOperations.ts
IPFS transaction operation handlers integrationsrc/libs/blockchain/routines/executeOperations.ts
ipfs_add,ipfs_pin,ipfs_unpin,ipfs_extend_pinIPFSOperationsmodule for transaction processingoperations
ipfsSwarmDisconnect.ts
IPFS swarm peer disconnection endpoint handlersrc/libs/network/routines/nodecalls/ipfs/ipfsSwarmDisconnect.ts
disconnection
ipfsUnpin.ts
IPFS content unpinning NodeCall handlersrc/libs/network/routines/nodecalls/ipfs/ipfsUnpin.ts
index.ts
IPFS NodeCall handlers index and exportssrc/libs/network/routines/nodecalls/ipfs/index.ts
ipfsAdd,ipfsGet,ipfsPin,ipfsUnpin,ipfsListPinsipfsSwarmPeers,ipfsSwarmConnect,ipfsSwarmDisconnect,ipfsBootstrapListorganization
ipfsRateLimitStatus.ts
IPFS public bridge rate limit status endpointsrc/libs/network/routines/nodecalls/ipfs/ipfsRateLimitStatus.ts
per minute
ipfsDemosPeers.ts
IPFS Demos network peers discovery endpointsrc/libs/network/routines/nodecalls/ipfs/ipfsDemosPeers.ts
ipfsBootstrapList.ts
IPFS bootstrap nodes list endpoint handlersrc/libs/network/routines/nodecalls/ipfs/ipfsBootstrapList.ts
ipfsSwarmPeers.ts
IPFS connected swarm peers list endpointsrc/libs/network/routines/nodecalls/ipfs/ipfsSwarmPeers.ts
ipfsStatus.ts
IPFS node health status check endpointsrc/libs/network/routines/nodecalls/ipfs/ipfsStatus.ts
ipfsListPins.ts
IPFS list pinned content endpoint handlersrc/libs/network/routines/nodecalls/ipfs/ipfsListPins.ts
node
control.ts
Debug logging for hello_peer protocol handlersrc/libs/omniprotocol/protocol/handlers/control.ts
hello_peerNodeCall with peer identitytruncation
manageHelloPeerresponse extra field for debuggingtagCategories.ts
Log tag to category mappings for IPFS and DEBUGsrc/utilities/tui/tagCategories.ts
IPFS,IPFS MANAGER,IPFS UPLOAD,IPFSDOWNLOAD,IPFS PIN,IPFS UNPIN,IPFS ERRORDEBUG,DEBUG HELLO PEER,DEBUG CAPABILITIESPeer.ts
Peer capabilities field for Phase 9 implementationsrc/libs/peer/Peer.ts
capabilitiesfield to Peer class for Phase 9 peer capabilitiestracking
peerBootstrap.ts
Debug logging for peer bootstrap routinesrc/libs/peer/routines/peerBootstrap.ts
sayHelloToPeerfor debuggingsharedState.ts
IPFS status tracking in shared application statesrc/utilities/sharedState.ts
ipfsStatusfield to track IPFS node status with states: active,connecting, retrying, error, disabled
messages
GCR_Main.ts
IPFS state field in GCR account entitysrc/model/entities/GCRv2/GCR_Main.ts
ipfsfield to GCRMain entity for storing account IPFS stateaccount
deriveMempoolOperation.ts
Custom charges inclusion in operation parameterssrc/libs/utils/demostdlib/deriveMempoolOperation.ts
custom_chargesin operation params for Phase 9 IPFS costcontrol
index.ts
IPFS routines integration in GCR operationssrc/libs/blockchain/gcr/gcr_routines/index.ts
GCRIPFSRoutinesmodule for IPFS-related GCR operationsipfsproperty togcrRoutinesobjectserver_rpc.ts
Sender identity parameter for NodeCall handlerssrc/libs/network/server_rpc.ts
senderparameter tomanageNodeCallfunctioninit-ipfs.sh
IPFS daemon initialization script with swarm keyipfs_53550/init-ipfs.sh
configuration
variables
init-ipfs.sh
IPFS daemon initialization script with swarm keyipfs/init-ipfs.sh
configuration
variables
1 files
index.ts
Phase 9 - TTY safety and TUI stdin handler fixessrc/index.ts
setRawMode()to prevent crashes inDocker/CI
input)
1 files
IPFS_YELLOWPAPER.md
Complete IPFS integration yellowpaper specificationIPFS_YELLOWPAPER.md
network, and public bridge
and implementation phases
protocol specification
1 files
run
IPFS container orchestration and lifecycle managementrun
+ 1000)
containers
handling
45 files
Summary by CodeRabbit
New Features
Documentation
Infrastructure
✏️ Tip: You can customize this high-level summary in your review settings.