{"id":35572882,"url":"https://github.com/datahaven-xyz/datahaven","last_synced_at":"2026-02-02T14:13:23.813Z","repository":{"id":325056817,"uuid":"943950290","full_name":"datahaven-xyz/datahaven","owner":"datahaven-xyz","description":"An EVM compatible Substrate chain, powered by StorageHub and secured by EigenLayer","archived":false,"fork":false,"pushed_at":"2026-01-27T10:12:19.000Z","size":14142,"stargazers_count":5491,"open_issues_count":10,"forks_count":91,"subscribers_count":25,"default_branch":"main","last_synced_at":"2026-01-27T10:32:32.469Z","etag":null,"topics":["ai-agents","blockchain","decentralized","eigenlayer","eigenlayer-avs","ethereum","privacy","storage"],"latest_commit_sha":null,"homepage":"https://datahaven.xyz/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/datahaven-xyz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-03-06T14:35:59.000Z","updated_at":"2026-01-27T10:11:24.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/datahaven-xyz/datahaven","commit_stats":null,"previous_names":["datahaven-xyz/datahaven"],"tags_count":43,"template":false,"template_full_name":null,"purl":"pkg:github/datahaven-xyz/datahaven","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datahaven-xyz%2Fdatahaven","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datahaven-xyz%2Fdatahaven/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datahaven-xyz%2Fdatahaven/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datahaven-xyz%2Fdatahaven/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/datahaven-xyz","download_url":"https://codeload.github.com/datahaven-xyz/datahaven/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datahaven-xyz%2Fdatahaven/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29012721,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-02T12:48:30.580Z","status":"ssl_error","status_checked_at":"2026-02-02T12:46:38.384Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-agents","blockchain","decentralized","eigenlayer","eigenlayer-avs","ethereum","privacy","storage"],"created_at":"2026-01-04T18:17:02.352Z","updated_at":"2026-02-02T14:13:23.807Z","avatar_url":"https://github.com/datahaven-xyz.png","language":"Rust","funding_links":[],"categories":["Applications","AI Agent Frameworks \u0026 SDKs"],"sub_categories":["Blockchain","Multi-Agent Collaboration Systems"],"readme":"# DataHaven 🫎\n\nAI-First Decentralized Storage secured by EigenLayer — a verifiable storage network for AI training data, machine learning models, and Web3 applications.\n\n## Overview\n\nDataHaven is a decentralized storage and retrieval network designed for applications that need verifiable, production-scale data storage. Built on [StorageHub](https://github.com/Moonsong-Labs/storage-hub) and secured by EigenLayer's restaking protocol, DataHaven separates storage from verification: providers store data off-chain while cryptographic commitments are anchored on-chain for tamper-evident verification.\n\n**Core Capabilities:**\n\n- **Verifiable Storage**: Files are chunked, hashed into Merkle trees, and committed on-chain — enabling cryptographic proof that data hasn't been tampered with\n- **Provider Network**: Main Storage Providers (MSPs) serve data with competitive offerings, while Backup Storage Providers (BSPs) ensure redundancy through decentralized replication with on-chain slashing for failed proof challenges\n- **EigenLayer Security**: Validator set secured by Ethereum restaking — DataHaven validators register as EigenLayer operators with slashing for misbehavior\n- **EVM Compatibility**: Full Ethereum support via Frontier pallets for smart contracts and familiar Web3 tooling\n- **Cross-chain Bridge**: Native, trustless bridging with Ethereum via Snowbridge for tokens and messages\n\n## Architecture\n\nDataHaven combines EigenLayer's shared security with StorageHub's decentralized storage infrastructure:\n\n```\n┌─────────────────────────────────────────────────────────────────────────────┐\n│                              Ethereum (L1)                                  │\n│  ┌───────────────────────────────────────────────────────────────────────┐  │\n│  │  EigenLayer AVS Contracts                                             │  │\n│  │  • DataHavenServiceManager (validator lifecycle \u0026 slashing)           │  │\n│  │  • RewardsRegistry (validator performance \u0026 rewards)                  │  │\n│  └───────────────────────────────────────────────────────────────────────┘  │\n│                                    ↕                                        │\n│                          Snowbridge Protocol                                │\n│                    (trustless cross-chain messaging)                        │\n└─────────────────────────────────────────────────────────────────────────────┘\n                                     ↕\n┌─────────────────────────────────────────────────────────────────────────────┐\n│                          DataHaven (Substrate)                              │\n│  ┌───────────────────────────────────────────────────────────────────────┐  │\n│  │  StorageHub Pallets                     DataHaven Pallets             │  │\n│  │  • file-system (file operations)        • External Validators         │  │\n│  │  • providers (MSP/BSP registry)         • Native Transfer             │  │\n│  │  • proofs-dealer (challenge/verify)     • Rewards                     │  │\n│  │  • payment-streams (storage payments)   • Frontier (EVM)              │  │\n│  │  • bucket-nfts (bucket ownership)                                     │  │\n│  └───────────────────────────────────────────────────────────────────────┘  │\n└─────────────────────────────────────────────────────────────────────────────┘\n                                     ↕\n┌─────────────────────────────────────────────────────────────────────────────┐\n│                        Storage Provider Network                             │\n│  ┌─────────────────────────────┐    ┌─────────────────────────────┐        │\n│  │  Main Storage Providers     │    │  Backup Storage Providers   │        │\n│  │  (MSP)                      │    │  (BSP)                      │        │\n│  │  • User-selected            │    │  • Network-assigned         │        │\n│  │  • Serve read requests      │    │  • Replicate data           │        │\n│  │  • Anchor bucket roots      │    │  • Proof challenges         │        │\n│  │  • MSP Backend service      │    │  • On-chain slashing        │        │\n│  └─────────────────────────────┘    └─────────────────────────────┘        │\n│  ┌─────────────────────────────┐    ┌─────────────────────────────┐        │\n│  │  Indexer                    │    │  Fisherman                  │        │\n│  │  • Index on-chain events    │    │  • Audit storage proofs     │        │\n│  │  • Query storage metadata   │    │  • Trigger challenges       │        │\n│  │  • PostgreSQL backend       │    │  • Detect misbehavior       │        │\n│  └─────────────────────────────┘    └─────────────────────────────┘        │\n└─────────────────────────────────────────────────────────────────────────────┘\n```\n\n### How Storage Works\n\n1. **Upload**: User selects an MSP, creates a bucket, and uploads files. Files are chunked (8KB default), hashed into Merkle trees, and the root is anchored on-chain.\n2. **Replication**: The MSP coordinates with BSPs to replicate data across the network based on the bucket's replication policy.\n3. **Retrieval**: MSP returns files with Merkle proofs that users verify against on-chain commitments.\n4. **Verification**: BSPs face periodic proof challenges — failure to prove data custody results in on-chain slashing via StorageHub pallets.\n\n## Repository Structure\n\n```\ndatahaven/\n├── contracts/      # EigenLayer AVS smart contracts\n│   ├── src/       # Service Manager, Rewards Registry, Slasher\n│   ├── script/    # Deployment scripts\n│   └── test/      # Foundry test suites\n├── operator/       # Substrate-based DataHaven node\n│   ├── node/      # Node implementation \u0026 chain spec\n│   ├── pallets/   # Custom pallets (validators, rewards, transfers)\n│   └── runtime/   # Runtime configurations (mainnet/stagenet/testnet)\n├── test/           # E2E testing framework\n│   ├── suites/    # Integration test scenarios\n│   ├── framework/ # Test utilities and helpers\n│   └── launcher/  # Network deployment automation\n├── deploy/         # Kubernetes deployment charts\n│   ├── charts/    # Helm charts for nodes and relayers\n│   └── environments/ # Environment-specific configurations\n├── tools/          # GitHub automation and release scripts\n└── .github/        # CI/CD workflows\n```\n\nEach directory contains its own README with detailed information. See:\n- [contracts/README.md](contracts/README.md) - Smart contract development\n- [operator/README.md](operator/README.md) - Node building and runtime development\n- [test/README.md](test/README.md) - E2E testing and network deployment\n- [deploy/README.md](deploy/README.md) - Kubernetes deployment\n- [tools/README.md](tools/README.md) - Development tools\n\n## Quick Start\n\n### Prerequisites\n\n- [Kurtosis](https://docs.kurtosis.com/install) - Network orchestration\n- [Bun](https://bun.sh/) v1.3.2+ - TypeScript runtime\n- [Docker](https://www.docker.com/) - Container management\n- [Foundry](https://getfoundry.sh/) - Solidity toolkit\n- [Rust](https://www.rust-lang.org/tools/install) - For building the operator\n- [Helm](https://helm.sh/) - Kubernetes deployments (optional)\n- [Zig](https://ziglang.org/) - For macOS cross-compilation (macOS only)\n\n### Launch Local Network\n\nThe fastest way to get started is with the interactive CLI:\n\n```bash\ncd test\nbun i                    # Install dependencies\nbun cli launch           # Interactive launcher with prompts\n```\n\nThis deploys a complete environment including:\n- **Ethereum network**: 2x EL clients (reth), 2x CL clients (lodestar)\n- **Block explorers**: Blockscout (optional), Dora consensus explorer\n- **DataHaven node**: Single validator with fast block times\n- **Storage providers**: MSP and BSP nodes for decentralized storage\n- **AVS contracts**: Deployed and configured on Ethereum\n- **Snowbridge relayers**: Bidirectional message passing\n\nFor more options and detailed instructions, see the [test README](./test/README.md).\n\n### Run Tests\n\n```bash\ncd test\nbun test:e2e              # Run all integration tests\nbun test:e2e:parallel     # Run with limited concurrency\n```\n\nNOTES: Adding the environment variable `INJECT_CONTRACTS=true` will inject the contracts when starting the tests to speed up setup.\n\n### Development Workflows\n\n**Smart Contract Development**:\n```bash\ncd contracts\nforge build               # Compile contracts\nforge test                # Run contract tests\n```\n\n**Node Development**:\n```bash\ncd operator\ncargo build --release --features fast-runtime\ncargo test\n./scripts/run-benchmarks.sh\n```\n\n**After Making Changes**:\n```bash\ncd test\nbun generate:wagmi        # Regenerate contract bindings\nbun generate:types        # Regenerate runtime types\n```\n\n## Key Features\n\n### Verifiable Decentralized Storage\nProduction-scale storage with cryptographic guarantees:\n- **Buckets**: User-created containers managed by an MSP, summarized by a Merkle-Patricia trie root on-chain\n- **Files**: Deterministically chunked, hashed into Merkle trees, with roots serving as immutable fingerprints\n- **Proofs**: Merkle proofs enable verification of data integrity without trusting intermediaries\n- **Audits**: BSPs prove ongoing data custody via randomized proof challenges\n\n### Storage Provider Network\nTwo-tier provider model balancing performance and reliability:\n- **MSPs**: User-selected providers offering data retrieval with competitive service offerings\n- **BSPs**: Network-assigned backup providers ensuring data redundancy and availability, with on-chain slashing for failed proof challenges\n- **Fisherman**: Auditing service that monitors proofs and triggers challenges for misbehavior\n- **Indexer**: Indexes on-chain storage events for efficient querying\n\n### EigenLayer Security\nDataHaven validators secured through Ethereum restaking:\n- Validators register as operators via `DataHavenServiceManager` contract\n- Economic security through ETH restaking\n- Slashing for validator misbehavior (separate from BSP slashing which is on-chain)\n- Performance-based validator rewards through `RewardsRegistry`\n\n### EVM Compatibility\nFull Ethereum Virtual Machine support via Frontier pallets:\n- Deploy Solidity smart contracts\n- Use existing Ethereum tooling (MetaMask, Hardhat, etc.)\n- Compatible with ERC-20, ERC-721, and other standards\n\n### Cross-chain Communication\nTrustless bridging via Snowbridge:\n- Native token transfers between Ethereum ↔ DataHaven\n- Cross-chain message passing\n- Finality proofs via BEEFY consensus\n- Three specialized relayers (beacon, BEEFY, execution)\n\n## Use Cases\n\nDataHaven is designed for applications requiring verifiable, tamper-proof data storage:\n\n- **AI \u0026 Machine Learning**: Store training datasets, model weights, and agent configurations with cryptographic proofs of integrity — enabling federated learning and verifiable AI pipelines\n- **DePIN (Decentralized Physical Infrastructure)**: Persistent storage for IoT sensor data, device configurations, and operational logs with provable data lineage\n- **Real World Assets (RWAs)**: Immutable storage for asset documentation, ownership records, and compliance data with on-chain verification\n\n## Docker Images\n\nProduction images published to [DockerHub](https://hub.docker.com/r/datahavenxyz/datahaven).\n\n**Build optimizations**:\n- [sccache](https://github.com/mozilla/sccache) - Rust compilation caching\n- [cargo-chef](https://lpalmieri.com/posts/fast-rust-docker-builds/) - Dependency layer caching\n- [BuildKit cache mounts](https://docs.docker.com/build/cache/optimize/#use-cache-mounts) - External cache restoration\n\n**Build locally**:\n```bash\ncd test\nbun build:docker:operator    # Creates datahavenxyz/datahaven:local\n```\n\n## Development Environment\n\n### VS Code Configuration\n\nIDE configurations are excluded from version control for personalization, but these settings are recommended for optimal developer experience. Add to your `.vscode/settings.json`:\n\n**Rust Analyzer**:\n```json\n{\n  \"rust-analyzer.linkedProjects\": [\"./operator/Cargo.toml\"],\n  \"rust-analyzer.cargo.allTargets\": true,\n  \"rust-analyzer.procMacro.enable\": false,\n  \"rust-analyzer.server.extraEnv\": {\n    \"CARGO_TARGET_DIR\": \"target/.rust-analyzer\",\n    \"SKIP_WASM_BUILD\": 1\n  },\n  \"rust-analyzer.diagnostics.disabled\": [\"unresolved-macro-call\"],\n  \"rust-analyzer.cargo.buildScripts.enable\": false\n}\n```\n\nOptimizations:\n- Links `operator/` directory as the primary Rust project\n- Disables proc macros and build scripts for faster analysis (Substrate macros are slow)\n- Uses dedicated target directory to avoid conflicts\n- Skips WASM builds during development\n\n**Solidity** ([Juan Blanco's extension](https://marketplace.visualstudio.com/items?itemName=JuanBlanco.solidity)):\n```json\n{\n  \"solidity.formatter\": \"forge\",\n  \"solidity.compileUsingRemoteVersion\": \"v0.8.28+commit.7893614a\",\n  \"[solidity]\": {\n    \"editor.defaultFormatter\": \"JuanBlanco.solidity\"\n  }\n}\n```\n\nNote: Solidity version must match [foundry.toml](./contracts/foundry.toml)\n\n**TypeScript** ([Biome](https://github.com/biomejs/biome)):\n```json\n{\n  \"biome.lsp.bin\": \"test/node_modules/.bin/biome\",\n  \"[typescript]\": {\n    \"editor.defaultFormatter\": \"biomejs.biome\",\n    \"editor.codeActionsOnSave\": {\n      \"source.organizeImports.biome\": \"always\"\n    }\n  }\n}\n```\n\n## CI/CD\n\n### Local CI Testing\n\nRun GitHub Actions workflows locally using [act](https://github.com/nektos/act):\n\n```bash\n# Run E2E workflow\nact -W .github/workflows/e2e.yml -s GITHUB_TOKEN=\"$(gh auth token)\"\n\n# Run specific job\nact -W .github/workflows/e2e.yml -j test-job-name\n```\n\n### Automated Workflows\n\nThe repository includes GitHub Actions for:\n- **E2E Testing**: Full integration tests on PR and main branch\n- **Contract Testing**: Foundry test suites for smart contracts\n- **Rust Testing**: Unit and integration tests for operator\n- **Docker Builds**: Multi-platform image builds with caching\n- **Release Automation**: Version tagging and changelog generation\n\nSee `.github/workflows/` for workflow definitions.\n\n## Contributing\n\n### Development Cycle\n\n1. **Make Changes**: Edit contracts, runtime, or tests\n2. **Run Tests**: Component-specific tests (`forge test`, `cargo test`)\n3. **Regenerate Types**: Update bindings if contracts/runtime changed\n4. **Integration Test**: Run E2E tests to verify cross-component behavior\n5. **Code Quality**: Format and lint (`cargo fmt`, `forge fmt`, `bun fmt:fix`)\n\n### Common Pitfalls\n\n- **Type mismatches**: Regenerate with `bun generate:types` after runtime changes\n- **Contract changes not reflected**: Run `bun generate:wagmi` after modifications\n- **Kurtosis issues**: Ensure Docker is running and Kurtosis engine is started\n- **Slow development**: Use `--features fast-runtime` for shorter epochs/eras (block time stays 6s)\n- **Network launch hangs**: Check Blockscout - forge output can appear frozen\n\nSee [CLAUDE.md](./CLAUDE.md) for detailed development guidance.\n\n## License\n\nGPL-3.0 - See LICENSE file for details\n\n## Links\n\n- [DataHaven Website](https://datahaven.xyz/)\n- [DataHaven Documentation](https://docs.datahaven.xyz/)\n- [StorageHub Repository](https://github.com/Moonsong-Labs/storage-hub)\n- [EigenLayer Documentation](https://docs.eigenlayer.xyz/)\n- [Substrate Documentation](https://docs.substrate.io/)\n- [Snowbridge Documentation](https://docs.snowbridge.network/)\n- [Foundry Book](https://book.getfoundry.sh/)\n- [Polkadot-API Documentation](https://papi.how/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatahaven-xyz%2Fdatahaven","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatahaven-xyz%2Fdatahaven","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatahaven-xyz%2Fdatahaven/lists"}