Weights update for release v0.8.0 (RT800). - [x] Stagenet - [x] Testnet - [x] Mainnet Showing some +10% changes: Network | Pallet | Call | Old weight | New weight | Change % -- | -- | -- | -- | -- | -- mainnet | frame_system | authorize_upgrade | 12496000 | 22629000 | 81.09% mainnet | frame_system | remark | 30798441 | 8695261 | -71.77% mainnet | pallet_conviction_voting | undelegate | 21395950 | 23795285 | 11.21% mainnet | pallet_external_validators | remove_whitelisted | 17773467 | 15404854 | -13.33% mainnet | pallet_multisig | as_multi_complete | 58059065 | 50189845 | -13.55% mainnet | pallet_preimage | request_no_deposit_preimage | 18808000 | 29216000 | 55.34% mainnet | pallet_preimage | request_preimage | 26608000 | 40720000 | 53.04% mainnet | pallet_preimage | request_requested_preimage | 13880000 | 16912000 | 21.84% mainnet | pallet_preimage | request_unnoted_preimage | 19245000 | 33023000 | 71.59% mainnet | pallet_preimage | unnote_no_deposit_preimage | 32229000 | 46218000 | 43.41% mainnet | pallet_preimage | unnote_preimage | 70700000 | 91185000 | 28.97% mainnet | pallet_preimage | unrequest_multi_referenced_preimage | 13961000 | 16754000 | 20.01% mainnet | pallet_preimage | unrequest_preimage | 27274000 | 42435000 | 55.59% mainnet | pallet_preimage | unrequest_unnoted_preimage | 13946000 | 16113000 | 15.54% mainnet | pallet_scheduler | service_task_fetched | 24397000 | 4128742 | -83.08% mainnet | pallet_sudo | check_only_sudo_account | 5248000 | 6034000 | 14.98% mainnet | pallet_utility | batch | 18376045 | 14956939 | -18.61% mainnet | pallet_utility | batch_all | 13623778 | 9310421 | -31.66% mainnet | pallet_utility | force_batch | 13126526 | 11589563 | -11.71% stagenet | frame_system | authorize_upgrade | 12866000 | 23295000 | 81.06% stagenet | frame_system | remark | 33694157 | 25734885 | -23.62% stagenet | pallet_external_validators_rewards | on_era_end | 1583951000 | 1749571000 | 10.46% stagenet | pallet_multisig | as_multi_complete | 57510735 | 51491532 | -10.47% stagenet | pallet_preimage | request_no_deposit_preimage | 18612000 | 30396000 | 63.31% stagenet | pallet_preimage | request_preimage | 26129000 | 37317000 | 42.82% stagenet | pallet_preimage | request_requested_preimage | 13912000 | 17268000 | 24.12% stagenet | pallet_preimage | request_unnoted_preimage | 19198000 | 35428000 | 84.54% stagenet | pallet_preimage | unnote_no_deposit_preimage | 31195000 | 45321000 | 45.28% stagenet | pallet_preimage | unnote_preimage | 70675000 | 89916000 | 27.22% stagenet | pallet_preimage | unrequest_multi_referenced_preimage | 13422000 | 16452000 | 22.57% stagenet | pallet_preimage | unrequest_preimage | 27349000 | 43421000 | 58.77% stagenet | pallet_preimage | unrequest_unnoted_preimage | 14104000 | 16640000 | 17.98% stagenet | pallet_sudo | check_only_sudo_account | 5247000 | 5923000 | 12.88% stagenet | pallet_utility | batch | 17077975 | 10949120 | -35.89% stagenet | pallet_utility | batch_all | 11105082 | 4628520 | -58.32% stagenet | pallet_utility | force_batch | 9291805 | 4409497 | -52.54% testnet | frame_system | authorize_upgrade | 12576000 | 24096000 | 91.60% testnet | frame_system | remark | 49594571 | 14515706 | -70.73% testnet | pallet_external_validators_rewards | on_era_end | 1547405000 | 1732185000 | 11.94% testnet | pallet_preimage | request_no_deposit_preimage | 17857000 | 30407000 | 70.28% testnet | pallet_preimage | request_preimage | 25375000 | 42504000 | 67.50% testnet | pallet_preimage | request_requested_preimage | 14069000 | 16591000 | 17.93% testnet | pallet_preimage | request_unnoted_preimage | 19174000 | 34375000 | 79.28% testnet | pallet_preimage | unnote_no_deposit_preimage | 29893000 | 46805000 | 56.58% testnet | pallet_preimage | unnote_preimage | 71971000 | 89858000 | 24.85% testnet | pallet_preimage | unrequest_multi_referenced_preimage | 13934000 | 16085000 | 15.44% testnet | pallet_preimage | unrequest_preimage | 28700000 | 43751000 | 52.44% testnet | pallet_preimage | unrequest_unnoted_preimage | 13989000 | 17138000 | 22.51% testnet | pallet_sudo | check_only_sudo_account | 5279000 | 5881000 | 11.40% testnet | pallet_utility | batch | 17940544 | 20806579 | 15.98% testnet | pallet_utility | batch_all | 20328522 | 18215679 | -10.39% testnet | pallet_utility | force_batch | 13240132 | 18456500 | 39.40% --------- Co-authored-by: Steve Degosserie <723552+stiiifff@users.noreply.github.com> |
||
|---|---|---|
| .github | ||
| contracts | ||
| deploy | ||
| docker | ||
| operator | ||
| resources | ||
| test | ||
| tools | ||
| .gitignore | ||
| .gitmodules | ||
| biome.json | ||
| CLAUDE.md | ||
| file_header.txt | ||
| LICENSE | ||
| README.md | ||
| taplo.toml | ||
DataHaven 🫎
An EVM-compatible Substrate blockchain secured by EigenLayer, bridging Ethereum and Substrate ecosystems through trustless cross-chain communication.
Overview
DataHaven is an EigenLayer Actively Validated Service (AVS) that combines:
- EVM Compatibility: Full Ethereum support via Frontier pallets for smart contracts and dApps
- EigenLayer Security: Validator set secured by Ethereum's economic security through restaking
- Cross-chain Bridge: Seamless asset and message transfers with Ethereum via Snowbridge
- Dynamic Validators: Operator registry managed on-chain through EigenLayer contracts
- Performance Rewards: Validator incentives distributed cross-chain from Ethereum
Architecture
DataHaven bridges two major blockchain ecosystems:
┌───────────────────────────────────────────────────────────────┐
│ Ethereum (L1) │
│ ┌────────────────────────────────────────────────────────┐ │
│ │ EigenLayer AVS Contracts │ │
│ │ • DataHavenServiceManager (operator lifecycle) │ │
│ │ • RewardsRegistry (performance tracking) │ │
│ │ • VetoableSlasher (misbehavior penalties) │ │
│ └────────────────────────────────────────────────────────┘ │
│ ↕ │
│ Snowbridge Protocol │
└───────────────────────────────────────────────────────────────┘
↕
┌───────────────────────────────────────────────────────────────┐
│ DataHaven (Substrate) │
│ ┌────────────────────────────────────────────────────────┐ │
│ │ Custom Pallets │ │
│ │ • External Validators (sync validator set) │ │
│ │ • Native Transfer (cross-chain tokens) │ │
│ │ • Rewards (distribute validator rewards) │ │
│ │ • Frontier (EVM compatibility) │ │
│ └────────────────────────────────────────────────────────┘ │
└───────────────────────────────────────────────────────────────┘
Repository Structure
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:
- contracts/README.md - Smart contract development
- operator/README.md - Node building and runtime development
- test/README.md - E2E testing and network deployment
- deploy/README.md - Kubernetes deployment
- tools/README.md - Development tools
Quick Start
Prerequisites
- Kurtosis - Network orchestration
- Bun v1.3.2+ - TypeScript runtime
- Docker - Container management
- Foundry - Solidity toolkit
- Rust - For building the operator
- Helm - Kubernetes deployments (optional)
- Zig - For macOS cross-compilation (macOS only)
Launch Local Network
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:
- Ethereum network: 2x EL clients (reth), 2x CL clients (lodestar)
- Block explorers: Blockscout (optional), Dora consensus explorer
- DataHaven node: Single validator with fast block times
- AVS contracts: Deployed and configured on Ethereum
- Snowbridge relayers: Bidirectional message passing
For more options and detailed instructions, see the test README.
Run Tests
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.
Development Workflows
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
Key Features
EVM Compatibility
Full Ethereum Virtual Machine support via Frontier pallets:
- Deploy Solidity smart contracts
- Use existing Ethereum tooling (MetaMask, Hardhat, etc.)
- Compatible with ERC-20, ERC-721, and other standards
EigenLayer Integration
Validator security anchored to Ethereum:
- Operators register via
DataHavenServiceManagercontract - Economic security through ETH restaking
- Slashing protection with veto period via
VetoableSlasher - Performance-based rewards through
RewardsRegistry
Cross-chain Communication
Trustless bridging via Snowbridge:
- Native token transfers between Ethereum ↔ DataHaven
- Cross-chain message passing
- Finality proofs via BEEFY consensus
- Three specialized relayers (beacon, BEEFY, execution)
Dynamic Validator Set
Validator management synchronized with Ethereum:
- EigenLayer operator registry as source of truth
- On-chain validator set updates via External Validators pallet
- Automatic consensus participation changes
- Cross-chain coordination for validator lifecycle
Docker Images
Production images published to DockerHub.
Build optimizations:
- sccache - Rust compilation caching
- cargo-chef - Dependency layer caching
- BuildKit cache mounts - External cache restoration
Build locally:
cd test
bun build:docker:operator # Creates datahavenxyz/datahaven:local
Development Environment
VS Code Configuration
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:
- Links
operator/directory as the primary Rust project - Disables proc macros and build scripts for faster analysis (Substrate macros are slow)
- Uses dedicated target directory to avoid conflicts
- Skips WASM builds during development
Solidity (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"
}
}
}
CI/CD
Local CI Testing
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
Automated Workflows
The repository includes GitHub Actions for:
- E2E Testing: Full integration tests on PR and main branch
- Contract Testing: Foundry test suites for smart contracts
- Rust Testing: Unit and integration tests for operator
- Docker Builds: Multi-platform image builds with caching
- Release Automation: Version tagging and changelog generation
See .github/workflows/ for workflow definitions.
Contributing
Development Cycle
- Make Changes: Edit contracts, runtime, or tests
- Run Tests: Component-specific tests (
forge test,cargo test) - Regenerate Types: Update bindings if contracts/runtime changed
- Integration Test: Run E2E tests to verify cross-component behavior
- Code Quality: Format and lint (
cargo fmt,forge fmt,bun fmt:fix)
Common Pitfalls
- Type mismatches: Regenerate with
bun generate:typesafter runtime changes - Contract changes not reflected: Run
bun generate:wagmiafter modifications - Kurtosis issues: Ensure Docker is running and Kurtosis engine is started
- Slow development: Use
--features fast-runtimefor shorter epochs/eras (block time stays 6s) - Network launch hangs: Check Blockscout - forge output can appear frozen
See CLAUDE.md for detailed development guidance.
License
GPL-3.0 - See LICENSE file for details