README.md
AI-First Decentralized Storage secured by EigenLayer ā a verifiable storage network for AI training data, machine learning models, and Web3 applications.
DataHaven is a decentralized storage and retrieval network designed for applications that need verifiable, production-scale data storage. Built on StorageHub 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.
Core Capabilities:
DataHaven combines EigenLayer's shared security with StorageHub's decentralized storage infrastructure:
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā Ethereum (L1) ā
ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā
ā ā EigenLayer AVS Contracts ā ā
ā ā ⢠DataHavenServiceManager (validator lifecycle & slashing) ā ā
ā ā ⢠RewardsRegistry (validator performance & rewards) ā ā
ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā
ā ā ā
ā Snowbridge Protocol ā
ā (trustless cross-chain messaging) ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā DataHaven (Substrate) ā
ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā
ā ā StorageHub Pallets DataHaven Pallets ā ā
ā ā ⢠file-system (file operations) ⢠External Validators ā ā
ā ā ⢠providers (MSP/BSP registry) ⢠Native Transfer ā ā
ā ā ⢠proofs-dealer (challenge/verify) ⢠Rewards ā ā
ā ā ⢠payment-streams (storage payments) ⢠Frontier (EVM) ā ā
ā ā ⢠bucket-nfts (bucket ownership) ā ā
ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā Storage Provider Network ā
ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā
ā ā Main Storage Providers ā ā Backup Storage Providers ā ā
ā ā (MSP) ā ā (BSP) ā ā
ā ā ⢠User-selected ā ā ⢠Network-assigned ā ā
ā ā ⢠Serve read requests ā ā ⢠Replicate data ā ā
ā ā ⢠Anchor bucket roots ā ā ⢠Proof challenges ā ā
ā ā ⢠MSP Backend service ā ā ⢠On-chain slashing ā ā
ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā
ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā
ā ā Indexer ā ā Fisherman ā ā
ā ā ⢠Index on-chain events ā ā ⢠Audit storage proofs ā ā
ā ā ⢠Query storage metadata ā ā ⢠Trigger challenges ā ā
ā ā ⢠PostgreSQL backend ā ā ⢠Detect misbehavior ā ā
ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
datahaven/
āāā contracts/ # EigenLayer AVS smart contracts
ā āāā src/ # Service Manager, Rewards Registry, Slasher
ā āāā script/ # Deployment scripts
ā āāā test/ # Foundry test suites
āāā operator/ # Substrate-based DataHaven node
ā āāā node/ # Node implementation & chain spec
ā āāā pallets/ # Custom pallets (validators, rewards, transfers)
ā āāā runtime/ # Runtime configurations (mainnet/stagenet/testnet)
āāā test/ # E2E testing framework
ā āāā suites/ # Integration test scenarios
ā āāā framework/ # Test utilities and helpers
ā āāā launcher/ # Network deployment automation
āāā deploy/ # Kubernetes deployment charts
ā āāā charts/ # Helm charts for nodes and relayers
ā āāā environments/ # Environment-specific configurations
āāā tools/ # GitHub automation and release scripts
āāā .github/ # CI/CD workflows
Each directory contains its own README with detailed information. See:
The fastest way to get started is with the interactive CLI:
cd test
bun i # Install dependencies
bun cli launch # Interactive launcher with prompts
This deploys a complete environment including:
For more options and detailed instructions, see the test README.
cd test
bun test:e2e # Run all integration tests
bun test:e2e:parallel # Run with limited concurrency
NOTES: Adding the environment variable INJECT_CONTRACTS=true will inject the contracts when starting the tests to speed up setup.
Smart Contract Development:
cd contracts
forge build # Compile contracts
forge test # Run contract tests
Node Development:
cd operator
cargo build --release --features fast-runtime
cargo test
./scripts/run-benchmarks.sh
After Making Changes:
cd test
bun generate:wagmi # Regenerate contract bindings
bun generate:types # Regenerate runtime types
Production-scale storage with cryptographic guarantees:
Two-tier provider model balancing performance and reliability:
DataHaven validators secured through Ethereum restaking:
DataHavenServiceManager contractRewardsRegistryFull Ethereum Virtual Machine support via Frontier pallets:
Trustless bridging via Snowbridge:
DataHaven is designed for applications requiring verifiable, tamper-proof data storage:
Production images published to DockerHub.
Build optimizations:
Build locally:
cd test
bun build:docker:operator # Creates datahavenxyz/datahaven:local
IDE configurations are excluded from version control for personalization, but these settings are recommended for optimal developer experience. Add to your .vscode/settings.json:
Rust Analyzer:
{
"rust-analyzer.linkedProjects": ["./operator/Cargo.toml"],
"rust-analyzer.cargo.allTargets": true,
"rust-analyzer.procMacro.enable": false,
"rust-analyzer.server.extraEnv": {
"CARGO_TARGET_DIR": "target/.rust-analyzer",
"SKIP_WASM_BUILD": 1
},
"rust-analyzer.diagnostics.disabled": ["unresolved-macro-call"],
"rust-analyzer.cargo.buildScripts.enable": false
}
Optimizations:
operator/ directory as the primary Rust projectSolidity (Juan Blanco's extension):
{
"solidity.formatter": "forge",
"solidity.compileUsingRemoteVersion": "v0.8.28+commit.7893614a",
"[solidity]": {
"editor.defaultFormatter": "JuanBlanco.solidity"
}
}
Note: Solidity version must match foundry.toml
TypeScript (Biome):
{
"biome.lsp.bin": "test/node_modules/.bin/biome",
"[typescript]": {
"editor.defaultFormatter": "biomejs.biome",
"editor.codeActionsOnSave": {
"source.organizeImports.biome": "always"
}
}
}
Run GitHub Actions workflows locally using act:
# Run E2E workflow
act -W .github/workflows/e2e.yml -s GITHUB_TOKEN="$(gh auth token)"
# Run specific job
act -W .github/workflows/e2e.yml -j test-job-name
The repository includes GitHub Actions for:
See .github/workflows/ for workflow definitions.
forge test, cargo test)cargo fmt, forge fmt, bun fmt:fix)bun generate:types after runtime changesbun generate:wagmi after modifications--features fast-runtime for shorter epochs/eras (block time stays 6s)See CLAUDE.md for detailed development guidance.
GPL-3.0 - See LICENSE file for details