datahaven/contracts/config/example.jsonc

123 lines
8.1 KiB
Text
Raw Permalink Normal View History

//! REMOVE ALL COMMENTS AND CHANGE EXTENSION TO `.json` BEFORE USING
//! Parsing JSONC is not supported by the Solidity JSON parser, so we need to remove the comments before using the config
{
"eigenLayer": {
"pausers": [
"0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
"0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
],
"unpauser": "0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC",
/// Account authorised to update pending rewards merkle root in the RewardsCoordinator contract.
/// In practice, this is the account used by the off-chain rewards updater service.
/// See https://github.com/Layr-Labs/eigenlayer-contracts/tree/dev/docs#rewardscoordinator
"rewardsUpdater": "0x90F79bf6EB2c4f870365E785982E1f101E93b906",
/// The interval at which the new rewards merkle root is calculated.
/// See testnet deployment: https://hoodi.etherscan.io/address/0x29e8572678e0c272350aa0b4B8f304E47EBcd5e7#readProxyContract#F1
"calculationIntervalSeconds": 86400,
/// The maximum duration of rewards that can be retroactively applied.
/// See testnet deployment: https://hoodi.etherscan.io/address/0xAcc1fb458a1317E886dB376Fc8141540537E68fE#readProxyContract#F5
"maxRewardsDuration": 6048000,
/// The maximum retroactive length of rewards that can be applied.
/// See testnet deployment: https://hoodi.etherscan.io/address/0xAcc1fb458a1317E886dB376Fc8141540537E68fE#readProxyContract#F4
"maxRetroactiveLength": 7776000,
/// The maximum duration of rewards that can be applied in the future.
/// See testnet deployment: https://hoodi.etherscan.io/address/0xAcc1fb458a1317E886dB376Fc8141540537E68fE#readProxyContract#F3
"maxFutureLength": 2592000,
/// The timestamp at which rewards are first calculated.
/// See testnet deployment: https://hoodi.etherscan.io/address/0xAcc1fb458a1317E886dB376Fc8141540537E68fE#readProxyContract#F2
"genesisRewardsTimestamp": 1710979200,
/// Delay in timestamp (seconds) before a posted root can be claimed against
/// See testnet deployment: https://hoodi.etherscan.io/address/0xAcc1fb458a1317E886dB376Fc8141540537E68fE#readProxyContract#F6
"activationDelay": 7200,
/// Also called "defaultOperatorSplitBips"
/// Used off-chain by the rewards updater to calculate an Operator's split for a specific reward.
/// See testnet deployment: https://hoodi.etherscan.io/address/0xAcc1fb458a1317E886dB376Fc8141540537E68fE#readProxyContract#F7
"globalCommissionBips": 1000,
/// Multisig address for controlling operations (we don't care as much about this).
"executorMultisig": "0x15d34AAf54267DB7D7c367839AAf71A00a2C6A65",
/// Multisig address for executing operations (we don't care as much about this).
"operationsMultisig": "0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc",
/// The delay in blocks before withdrawals can be completed.
/// See testnet deployment: https://hoodi.etherscan.io/address/0x867837a9722C512e0862d8c2E15b8bE220E8b87d#readProxyContract#F24
"minWithdrawalDelayBlocks": 50,
/// The initial paused status of the DelegationManager
/// See here for more details: https://github.com/Layr-Labs/eigenlayer-contracts/blob/db0f582ba9b4df861b72269267d4980d7f3f7490/src/contracts/permissions/Pausable.sol#L12
"delegationInitPausedStatus": 0,
/// The initial paused status of the EigenPodManager
/// See here for more details: https://github.com/Layr-Labs/eigenlayer-contracts/blob/db0f582ba9b4df861b72269267d4980d7f3f7490/src/contracts/permissions/Pausable.sol#L12
"eigenPodManagerInitPausedStatus": 0,
/// The initial paused status of the RewardsCoordinator
/// See here for more details: https://github.com/Layr-Labs/eigenlayer-contracts/blob/db0f582ba9b4df861b72269267d4980d7f3f7490/src/contracts/permissions/Pausable.sol#L12
"rewardsCoordinatorInitPausedStatus": 0,
/// The initial paused status of the AllocationManager
/// See here for more details: https://github.com/Layr-Labs/eigenlayer-contracts/blob/db0f582ba9b4df861b72269267d4980d7f3f7490/src/contracts/permissions/Pausable.sol#L12
"allocationManagerInitPausedStatus": 0,
/// The delay in blocks before deallocations can be completed.
/// See testnet deployment: https://hoodi.etherscan.io/address/0x95a7431400F362F3647a69535C5666cA0133CAA0#readProxyContract#F2
"deallocationDelay": 50,
/// The delay in blocks before allocation configuration can be completed.
/// See testnet deployment: https://hoodi.etherscan.io/address/0x95a7431400F362F3647a69535C5666cA0133CAA0#readProxyContract#F1
"allocationConfigurationDelay": 75,
/// The genesis time of the beacon state, to help EL calculate conversions between slot and timestamp
/// See EigenPodManager: https://hoodi.etherscan.io/address/0xcd1442415Fc5C29Aa848A49d2e232720BE07976c
"beaconChainGenesisTimestamp": 1695902400
},
"avs": {
/// The owner of the DataHaven Service Manager contract.
"avsOwner": "0x976EA74026E726554dB657fA54763abd0C3a0aa9",
/// The address of the account that initiates the rewards calculation.
/// This is for the EigenLayer rewards distribution way, using the RewardsCoordinator.
/// But for now, we're not using it, and instead sending the rewards directly.
"rewardsInitiator": "0x14dC79964da2C08b23698B3D3cc7Ca32193d9955",
/// The EigenLayer strategy addresses for the Validators to stake into.
feat: Add DH-AVS stagenet/testnet Hoodi deployment support (#422) ## Summary - Add multi-environment deployment support (stagenet, testnet, mainnet) to CLI and contracts - Configure stagenet and testnet runtimes with correct genesis hashes and Snowbridge Agent IDs - Add CLI commands for BEEFY checkpoint updates and rewards origin computation - Add ETH validator strategies (native beacon chain ETH + LSTs) to all config files ## Changes ### Runtime Configuration **Stagenet Runtime:** - Set `StagenetGenesisHash` to DataHaven stagenet genesis hash - Configure `RewardsAgentOrigin` with computed Snowbridge Agent ID - Add tests verifying rewards account derivation and agent ID computation **Testnet Runtime:** - Set `TestnetGenesisHash` to DataHaven testnet genesis hash - Configure `RewardsAgentOrigin` with computed Snowbridge Agent ID - Add tests verifying rewards account derivation and agent ID computation The Rewards Agent ID is computed following Snowbridge's location description pattern: ``` blake2_256(SCALE_ENCODE("GlobalConsensus", ByGenesis(genesis), "AccountKey20", rewards_account)) ``` ### CLI Enhancements - All contracts subcommands (`status`, `deploy`, `verify`, `update-metadata`) now accept `--environment` option - Config and deployment files use environment-prefixed naming (e.g., `stagenet-hoodi.json`, `testnet-hoodi.json`) - New `update-beefy-checkpoint` command that: - Connects to a live DataHaven chain via WebSocket RPC - Fetches all BEEFY data at the same finalized block for consistency - Uses parallel queries with `Promise.all` for better performance - Computes authority hashes (keccak256 of Ethereum addresses derived from BEEFY public keys) - Uses Snowbridge's quorum formula `n - floor((n-1)/3)` for strictly > 2/3 majority - New `update-rewards-origin` command that computes the Snowbridge Agent ID for the rewards pallet - Centralized validation via `contractsPreActionHook` for all contract commands - Environment validation against allowlist (`stagenet`, `testnet`, `mainnet`) ### Contract Changes - Network validation uses explicit allowlist instead of suffix matching - Added `initialValidatorSetId` and `nextValidatorSetId` fields to `SnowbridgeConfig` struct - `DeployBase.s.sol` now uses config values for validator set IDs instead of hardcoded 0/1 - `DeployParams.s.sol` loads validator set IDs from config with backwards compatibility ### Validator Strategies Added ETH-equivalent strategies to allow validators to stake using native ETH or LSTs: **All Networks:** - `0xbeaC0eeEeeeeEEeEeEEEEeeEEeEeeeEeeEEBEaC0` - Native beacon chain ETH (virtual strategy) **Hoodi Testnet:** - `0xf8a1a66130d614c7360e868576d5e59203475fe0` - stETH - `0x24579aD4fe83aC53546E5c2D3dF5F85D6383420d` - WETH **Ethereum Mainnet:** - `0x93c4b944D05dfe6df7645A86cd2206016c51564D` - stETH - `0x1BeE69b7dFFfA4E2d53C2a2Df135C388AD25dCD2` - rETH - `0x54945180dB7943c0ed0FEE7EdaB2Bd24620256bc` - cbETH ### Config Files - `stagenet-hoodi.json` - Hoodi testnet with stagenet EigenLayer addresses - `testnet-hoodi.json` - Hoodi testnet with testnet EigenLayer addresses - `mainnet-ethereum.json` - Ethereum mainnet with mainnet EigenLayer addresses - Removed `hoodi.json` (replaced by environment-prefixed files) ## Usage ```bash # Deploy to stagenet on Hoodi bun cli contracts deploy --chain hoodi --environment stagenet # Update BEEFY checkpoint from live chain bun cli contracts update-beefy-checkpoint \ --chain hoodi \ --environment stagenet \ --rpc-url wss://services.datahaven-dev.network/stagenet # Compute rewards origin for a chain bun cli contracts update-rewards-origin \ --chain hoodi \ --environment stagenet \ --rpc-url wss://services.datahaven-dev.network/stagenet # Check deployment status bun cli contracts status --chain hoodi --environment stagenet ``` --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 15:41:15 +00:00
/// The beaconChainETHStrategy is a virtual address representing native beacon chain ETH.
/// All networks:
/// - beaconChainETH: 0xbeaC0eeEeeeeEEeEeEEEEeeEEeEeeeEeeEEBEaC0 (virtual, same on all networks)
/// Hoodi testnet strategies:
/// - stETH: 0xf8a1a66130d614c7360e868576d5e59203475fe0
/// - WETH: 0x24579aD4fe83aC53546E5c2D3dF5F85D6383420d
/// Mainnet strategies:
/// - stETH: 0x93c4b944D05dfe6df7645A86cd2206016c51564D
/// - rETH: 0x1BeE69b7dFFfA4E2d53C2a2Df135C388AD25dCD2
/// - cbETH: 0x54945180dB7943c0ed0FEE7EdaB2Bd24620256bc
"validatorsStrategies": [
"0xbeaC0eeEeeeeEEeEeEEEEeeEEeEeeeEeeEEBEaC0"
]
},
"snowbridge": {
/// Minimum delay in number of blocks that a relayer must wait between calling
/// submitInitial and commitPrevRandao. In production this should be set to MAX_SEED_LOOKAHEAD:
/// https://eth2book.info/altair/part3/config/preset#max_seed_lookahead
"randaoCommitDelay": 4,
/// after randaoCommitDelay is reached, relayer must call commitPrevRandao within this number of blocks.
/// Without this expiration, relayers can roll the dice infinitely to get the subsampling
/// they desire.
"randaoCommitExpiration": 24,
/// The minimum number of required signatures for a Randao commit to be valid.
feat: Add DH-AVS stagenet/testnet Hoodi deployment support (#422) ## Summary - Add multi-environment deployment support (stagenet, testnet, mainnet) to CLI and contracts - Configure stagenet and testnet runtimes with correct genesis hashes and Snowbridge Agent IDs - Add CLI commands for BEEFY checkpoint updates and rewards origin computation - Add ETH validator strategies (native beacon chain ETH + LSTs) to all config files ## Changes ### Runtime Configuration **Stagenet Runtime:** - Set `StagenetGenesisHash` to DataHaven stagenet genesis hash - Configure `RewardsAgentOrigin` with computed Snowbridge Agent ID - Add tests verifying rewards account derivation and agent ID computation **Testnet Runtime:** - Set `TestnetGenesisHash` to DataHaven testnet genesis hash - Configure `RewardsAgentOrigin` with computed Snowbridge Agent ID - Add tests verifying rewards account derivation and agent ID computation The Rewards Agent ID is computed following Snowbridge's location description pattern: ``` blake2_256(SCALE_ENCODE("GlobalConsensus", ByGenesis(genesis), "AccountKey20", rewards_account)) ``` ### CLI Enhancements - All contracts subcommands (`status`, `deploy`, `verify`, `update-metadata`) now accept `--environment` option - Config and deployment files use environment-prefixed naming (e.g., `stagenet-hoodi.json`, `testnet-hoodi.json`) - New `update-beefy-checkpoint` command that: - Connects to a live DataHaven chain via WebSocket RPC - Fetches all BEEFY data at the same finalized block for consistency - Uses parallel queries with `Promise.all` for better performance - Computes authority hashes (keccak256 of Ethereum addresses derived from BEEFY public keys) - Uses Snowbridge's quorum formula `n - floor((n-1)/3)` for strictly > 2/3 majority - New `update-rewards-origin` command that computes the Snowbridge Agent ID for the rewards pallet - Centralized validation via `contractsPreActionHook` for all contract commands - Environment validation against allowlist (`stagenet`, `testnet`, `mainnet`) ### Contract Changes - Network validation uses explicit allowlist instead of suffix matching - Added `initialValidatorSetId` and `nextValidatorSetId` fields to `SnowbridgeConfig` struct - `DeployBase.s.sol` now uses config values for validator set IDs instead of hardcoded 0/1 - `DeployParams.s.sol` loads validator set IDs from config with backwards compatibility ### Validator Strategies Added ETH-equivalent strategies to allow validators to stake using native ETH or LSTs: **All Networks:** - `0xbeaC0eeEeeeeEEeEeEEEEeeEEeEeeeEeeEEBEaC0` - Native beacon chain ETH (virtual strategy) **Hoodi Testnet:** - `0xf8a1a66130d614c7360e868576d5e59203475fe0` - stETH - `0x24579aD4fe83aC53546E5c2D3dF5F85D6383420d` - WETH **Ethereum Mainnet:** - `0x93c4b944D05dfe6df7645A86cd2206016c51564D` - stETH - `0x1BeE69b7dFFfA4E2d53C2a2Df135C388AD25dCD2` - rETH - `0x54945180dB7943c0ed0FEE7EdaB2Bd24620256bc` - cbETH ### Config Files - `stagenet-hoodi.json` - Hoodi testnet with stagenet EigenLayer addresses - `testnet-hoodi.json` - Hoodi testnet with testnet EigenLayer addresses - `mainnet-ethereum.json` - Ethereum mainnet with mainnet EigenLayer addresses - Removed `hoodi.json` (replaced by environment-prefixed files) ## Usage ```bash # Deploy to stagenet on Hoodi bun cli contracts deploy --chain hoodi --environment stagenet # Update BEEFY checkpoint from live chain bun cli contracts update-beefy-checkpoint \ --chain hoodi \ --environment stagenet \ --rpc-url wss://services.datahaven-dev.network/stagenet # Compute rewards origin for a chain bun cli contracts update-rewards-origin \ --chain hoodi \ --environment stagenet \ --rpc-url wss://services.datahaven-dev.network/stagenet # Check deployment status bun cli contracts status --chain hoodi --environment stagenet ``` --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 15:41:15 +00:00
/// Auto-calculated by update-beefy-checkpoint as ceil(validators * 2/3) for BFT security.
"minNumRequiredSignatures": 2,
feat: Add DH-AVS stagenet/testnet Hoodi deployment support (#422) ## Summary - Add multi-environment deployment support (stagenet, testnet, mainnet) to CLI and contracts - Configure stagenet and testnet runtimes with correct genesis hashes and Snowbridge Agent IDs - Add CLI commands for BEEFY checkpoint updates and rewards origin computation - Add ETH validator strategies (native beacon chain ETH + LSTs) to all config files ## Changes ### Runtime Configuration **Stagenet Runtime:** - Set `StagenetGenesisHash` to DataHaven stagenet genesis hash - Configure `RewardsAgentOrigin` with computed Snowbridge Agent ID - Add tests verifying rewards account derivation and agent ID computation **Testnet Runtime:** - Set `TestnetGenesisHash` to DataHaven testnet genesis hash - Configure `RewardsAgentOrigin` with computed Snowbridge Agent ID - Add tests verifying rewards account derivation and agent ID computation The Rewards Agent ID is computed following Snowbridge's location description pattern: ``` blake2_256(SCALE_ENCODE("GlobalConsensus", ByGenesis(genesis), "AccountKey20", rewards_account)) ``` ### CLI Enhancements - All contracts subcommands (`status`, `deploy`, `verify`, `update-metadata`) now accept `--environment` option - Config and deployment files use environment-prefixed naming (e.g., `stagenet-hoodi.json`, `testnet-hoodi.json`) - New `update-beefy-checkpoint` command that: - Connects to a live DataHaven chain via WebSocket RPC - Fetches all BEEFY data at the same finalized block for consistency - Uses parallel queries with `Promise.all` for better performance - Computes authority hashes (keccak256 of Ethereum addresses derived from BEEFY public keys) - Uses Snowbridge's quorum formula `n - floor((n-1)/3)` for strictly > 2/3 majority - New `update-rewards-origin` command that computes the Snowbridge Agent ID for the rewards pallet - Centralized validation via `contractsPreActionHook` for all contract commands - Environment validation against allowlist (`stagenet`, `testnet`, `mainnet`) ### Contract Changes - Network validation uses explicit allowlist instead of suffix matching - Added `initialValidatorSetId` and `nextValidatorSetId` fields to `SnowbridgeConfig` struct - `DeployBase.s.sol` now uses config values for validator set IDs instead of hardcoded 0/1 - `DeployParams.s.sol` loads validator set IDs from config with backwards compatibility ### Validator Strategies Added ETH-equivalent strategies to allow validators to stake using native ETH or LSTs: **All Networks:** - `0xbeaC0eeEeeeeEEeEeEEEEeeEEeEeeeEeeEEBEaC0` - Native beacon chain ETH (virtual strategy) **Hoodi Testnet:** - `0xf8a1a66130d614c7360e868576d5e59203475fe0` - stETH - `0x24579aD4fe83aC53546E5c2D3dF5F85D6383420d` - WETH **Ethereum Mainnet:** - `0x93c4b944D05dfe6df7645A86cd2206016c51564D` - stETH - `0x1BeE69b7dFFfA4E2d53C2a2Df135C388AD25dCD2` - rETH - `0x54945180dB7943c0ed0FEE7EdaB2Bd24620256bc` - cbETH ### Config Files - `stagenet-hoodi.json` - Hoodi testnet with stagenet EigenLayer addresses - `testnet-hoodi.json` - Hoodi testnet with testnet EigenLayer addresses - `mainnet-ethereum.json` - Ethereum mainnet with mainnet EigenLayer addresses - Removed `hoodi.json` (replaced by environment-prefixed files) ## Usage ```bash # Deploy to stagenet on Hoodi bun cli contracts deploy --chain hoodi --environment stagenet # Update BEEFY checkpoint from live chain bun cli contracts update-beefy-checkpoint \ --chain hoodi \ --environment stagenet \ --rpc-url wss://services.datahaven-dev.network/stagenet # Compute rewards origin for a chain bun cli contracts update-rewards-origin \ --chain hoodi \ --environment stagenet \ --rpc-url wss://services.datahaven-dev.network/stagenet # Check deployment status bun cli contracts status --chain hoodi --environment stagenet ``` --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 15:41:15 +00:00
/// Initial BEEFY block number. Set to latest finalized block by update-beefy-checkpoint.
/// The BeefyClient will only accept BEEFY commitments with block numbers > startBlock.
"startBlock": 1,
/// The origin linked to the Rewards Agent, the Agent contract who's allowed to submit
/// new reward merkle roots to the RewardsRegistry contract.
"rewardsMessageOrigin": "0x0000000000000000000000000000000000000000000000000000000000000000",
feat: Add DH-AVS stagenet/testnet Hoodi deployment support (#422) ## Summary - Add multi-environment deployment support (stagenet, testnet, mainnet) to CLI and contracts - Configure stagenet and testnet runtimes with correct genesis hashes and Snowbridge Agent IDs - Add CLI commands for BEEFY checkpoint updates and rewards origin computation - Add ETH validator strategies (native beacon chain ETH + LSTs) to all config files ## Changes ### Runtime Configuration **Stagenet Runtime:** - Set `StagenetGenesisHash` to DataHaven stagenet genesis hash - Configure `RewardsAgentOrigin` with computed Snowbridge Agent ID - Add tests verifying rewards account derivation and agent ID computation **Testnet Runtime:** - Set `TestnetGenesisHash` to DataHaven testnet genesis hash - Configure `RewardsAgentOrigin` with computed Snowbridge Agent ID - Add tests verifying rewards account derivation and agent ID computation The Rewards Agent ID is computed following Snowbridge's location description pattern: ``` blake2_256(SCALE_ENCODE("GlobalConsensus", ByGenesis(genesis), "AccountKey20", rewards_account)) ``` ### CLI Enhancements - All contracts subcommands (`status`, `deploy`, `verify`, `update-metadata`) now accept `--environment` option - Config and deployment files use environment-prefixed naming (e.g., `stagenet-hoodi.json`, `testnet-hoodi.json`) - New `update-beefy-checkpoint` command that: - Connects to a live DataHaven chain via WebSocket RPC - Fetches all BEEFY data at the same finalized block for consistency - Uses parallel queries with `Promise.all` for better performance - Computes authority hashes (keccak256 of Ethereum addresses derived from BEEFY public keys) - Uses Snowbridge's quorum formula `n - floor((n-1)/3)` for strictly > 2/3 majority - New `update-rewards-origin` command that computes the Snowbridge Agent ID for the rewards pallet - Centralized validation via `contractsPreActionHook` for all contract commands - Environment validation against allowlist (`stagenet`, `testnet`, `mainnet`) ### Contract Changes - Network validation uses explicit allowlist instead of suffix matching - Added `initialValidatorSetId` and `nextValidatorSetId` fields to `SnowbridgeConfig` struct - `DeployBase.s.sol` now uses config values for validator set IDs instead of hardcoded 0/1 - `DeployParams.s.sol` loads validator set IDs from config with backwards compatibility ### Validator Strategies Added ETH-equivalent strategies to allow validators to stake using native ETH or LSTs: **All Networks:** - `0xbeaC0eeEeeeeEEeEeEEEEeeEEeEeeeEeeEEBEaC0` - Native beacon chain ETH (virtual strategy) **Hoodi Testnet:** - `0xf8a1a66130d614c7360e868576d5e59203475fe0` - stETH - `0x24579aD4fe83aC53546E5c2D3dF5F85D6383420d` - WETH **Ethereum Mainnet:** - `0x93c4b944D05dfe6df7645A86cd2206016c51564D` - stETH - `0x1BeE69b7dFFfA4E2d53C2a2Df135C388AD25dCD2` - rETH - `0x54945180dB7943c0ed0FEE7EdaB2Bd24620256bc` - cbETH ### Config Files - `stagenet-hoodi.json` - Hoodi testnet with stagenet EigenLayer addresses - `testnet-hoodi.json` - Hoodi testnet with testnet EigenLayer addresses - `mainnet-ethereum.json` - Ethereum mainnet with mainnet EigenLayer addresses - Removed `hoodi.json` (replaced by environment-prefixed files) ## Usage ```bash # Deploy to stagenet on Hoodi bun cli contracts deploy --chain hoodi --environment stagenet # Update BEEFY checkpoint from live chain bun cli contracts update-beefy-checkpoint \ --chain hoodi \ --environment stagenet \ --rpc-url wss://services.datahaven-dev.network/stagenet # Compute rewards origin for a chain bun cli contracts update-rewards-origin \ --chain hoodi \ --environment stagenet \ --rpc-url wss://services.datahaven-dev.network/stagenet # Check deployment status bun cli contracts status --chain hoodi --environment stagenet ``` --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 15:41:15 +00:00
/// The BEEFY validator set ID for the initial validators.
/// This is fetched from Beefy.ValidatorSetId on the DataHaven chain.
"initialValidatorSetId": 0,
Fix: 🏗️ Message encoding / decoding (#113) ## Summary of changes - We decided to remove the topics and nonce from the massage encoding since we don't use them (original commit: https://github.com/Moonsong-Labs/datahaven/commit/ee2a3f2fd432e0f8623a9798730ce697bfc52d34). - Besides, we already have a nonce at the Snowbridge message level https://github.com/Moonsong-Labs/datahaven/blob/f4ab5c2b2e93c775555ab4b8d0b2babaf5bc15b7/operator/primitives/snowbridge/inbound-queue/src/v2/message.rs#L105 - I had to recreate the static test for _encoding_ (happens in [DataHavenSnowbridgeMessages.sol](https://github.com/Moonsong-Labs/datahaven/blob/d12d40634f16eb9642b5b94cbc364b6679339393/contracts/src/libraries/DataHavenSnowbridgeMessages.sol) ) / _decoding_ (happens in [operator/primitives/bridge/src/lib.rs)](https://github.com/Moonsong-Labs/datahaven/blob/f9f9cc65fe33c86ac91f2097adbcb945b1746277/operator/primitives/bridge/src/lib.rs). Now it matches the current structure. The idea is that now we can test that we don't break the decoding in followup refactoring. - Fixes a problem with EigenLayer validator addresses. In all our contracts we were using `bytes32` to refer to a Solochain validator address. But on our Substrate change we actually expect AccountId20, so only 20 bytes. This was causing the decoding to fail. - I opted for the minimal change that would be to take the right-most 20 bytes to send that to our chain. But we might want aswell to limit our EigenLayer contracts to be only 20 bytes long. @ahmadkaouk showcase this [here](https://github.com/Moonsong-Labs/datahaven/commit/92a34c273ca439341bd8b61ff3592cef45ba4727) - Adds a bash script to run the static test. The test will compile the contracts, run the encoding test, compile the operator, and run the decoding test. This saves a huge amount of time since we don't need to run the full e2e setup. The way of running it is the following: ```bash cd operator/test/scripts ./test_message_encoding.sh ``` - As a consequence of this PR, the execution relayer now works properly. EDIT: > [!IMPORTANT] **We decided to use 20-byte addresses in our contracts**. So what is stated above is not valid anymore. The change implies that the mapping from Ethereum addresses to bytes32 addresses now it's a mapping as follows: https://github.com/Moonsong-Labs/datahaven/blob/dd3ba99ac0553a33448dc77efbbea08cacd278e6/contracts/src/DataHavenServiceManager.sol#L51-L52 I've updated helper functions, tests, etc to be compliant with this change. The execution relayer and beefy relayer look stable now. --------- Co-authored-by: Ahmad Kaouk <ahmadkaouk.93@gmail.com> Co-authored-by: Ahmad Kaouk <56095276+ahmadkaouk@users.noreply.github.com>
2025-07-16 07:38:58 +00:00
/// The initial validator hashes for the BEEFY light client.
feat: Add DH-AVS stagenet/testnet Hoodi deployment support (#422) ## Summary - Add multi-environment deployment support (stagenet, testnet, mainnet) to CLI and contracts - Configure stagenet and testnet runtimes with correct genesis hashes and Snowbridge Agent IDs - Add CLI commands for BEEFY checkpoint updates and rewards origin computation - Add ETH validator strategies (native beacon chain ETH + LSTs) to all config files ## Changes ### Runtime Configuration **Stagenet Runtime:** - Set `StagenetGenesisHash` to DataHaven stagenet genesis hash - Configure `RewardsAgentOrigin` with computed Snowbridge Agent ID - Add tests verifying rewards account derivation and agent ID computation **Testnet Runtime:** - Set `TestnetGenesisHash` to DataHaven testnet genesis hash - Configure `RewardsAgentOrigin` with computed Snowbridge Agent ID - Add tests verifying rewards account derivation and agent ID computation The Rewards Agent ID is computed following Snowbridge's location description pattern: ``` blake2_256(SCALE_ENCODE("GlobalConsensus", ByGenesis(genesis), "AccountKey20", rewards_account)) ``` ### CLI Enhancements - All contracts subcommands (`status`, `deploy`, `verify`, `update-metadata`) now accept `--environment` option - Config and deployment files use environment-prefixed naming (e.g., `stagenet-hoodi.json`, `testnet-hoodi.json`) - New `update-beefy-checkpoint` command that: - Connects to a live DataHaven chain via WebSocket RPC - Fetches all BEEFY data at the same finalized block for consistency - Uses parallel queries with `Promise.all` for better performance - Computes authority hashes (keccak256 of Ethereum addresses derived from BEEFY public keys) - Uses Snowbridge's quorum formula `n - floor((n-1)/3)` for strictly > 2/3 majority - New `update-rewards-origin` command that computes the Snowbridge Agent ID for the rewards pallet - Centralized validation via `contractsPreActionHook` for all contract commands - Environment validation against allowlist (`stagenet`, `testnet`, `mainnet`) ### Contract Changes - Network validation uses explicit allowlist instead of suffix matching - Added `initialValidatorSetId` and `nextValidatorSetId` fields to `SnowbridgeConfig` struct - `DeployBase.s.sol` now uses config values for validator set IDs instead of hardcoded 0/1 - `DeployParams.s.sol` loads validator set IDs from config with backwards compatibility ### Validator Strategies Added ETH-equivalent strategies to allow validators to stake using native ETH or LSTs: **All Networks:** - `0xbeaC0eeEeeeeEEeEeEEEEeeEEeEeeeEeeEEBEaC0` - Native beacon chain ETH (virtual strategy) **Hoodi Testnet:** - `0xf8a1a66130d614c7360e868576d5e59203475fe0` - stETH - `0x24579aD4fe83aC53546E5c2D3dF5F85D6383420d` - WETH **Ethereum Mainnet:** - `0x93c4b944D05dfe6df7645A86cd2206016c51564D` - stETH - `0x1BeE69b7dFFfA4E2d53C2a2Df135C388AD25dCD2` - rETH - `0x54945180dB7943c0ed0FEE7EdaB2Bd24620256bc` - cbETH ### Config Files - `stagenet-hoodi.json` - Hoodi testnet with stagenet EigenLayer addresses - `testnet-hoodi.json` - Hoodi testnet with testnet EigenLayer addresses - `mainnet-ethereum.json` - Ethereum mainnet with mainnet EigenLayer addresses - Removed `hoodi.json` (replaced by environment-prefixed files) ## Usage ```bash # Deploy to stagenet on Hoodi bun cli contracts deploy --chain hoodi --environment stagenet # Update BEEFY checkpoint from live chain bun cli contracts update-beefy-checkpoint \ --chain hoodi \ --environment stagenet \ --rpc-url wss://services.datahaven-dev.network/stagenet # Compute rewards origin for a chain bun cli contracts update-rewards-origin \ --chain hoodi \ --environment stagenet \ --rpc-url wss://services.datahaven-dev.network/stagenet # Check deployment status bun cli contracts status --chain hoodi --environment stagenet ``` --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 15:41:15 +00:00
/// Each hash is keccak256(ethereum_address) derived from the BEEFY authority public keys.
Fix: 🏗️ Message encoding / decoding (#113) ## Summary of changes - We decided to remove the topics and nonce from the massage encoding since we don't use them (original commit: https://github.com/Moonsong-Labs/datahaven/commit/ee2a3f2fd432e0f8623a9798730ce697bfc52d34). - Besides, we already have a nonce at the Snowbridge message level https://github.com/Moonsong-Labs/datahaven/blob/f4ab5c2b2e93c775555ab4b8d0b2babaf5bc15b7/operator/primitives/snowbridge/inbound-queue/src/v2/message.rs#L105 - I had to recreate the static test for _encoding_ (happens in [DataHavenSnowbridgeMessages.sol](https://github.com/Moonsong-Labs/datahaven/blob/d12d40634f16eb9642b5b94cbc364b6679339393/contracts/src/libraries/DataHavenSnowbridgeMessages.sol) ) / _decoding_ (happens in [operator/primitives/bridge/src/lib.rs)](https://github.com/Moonsong-Labs/datahaven/blob/f9f9cc65fe33c86ac91f2097adbcb945b1746277/operator/primitives/bridge/src/lib.rs). Now it matches the current structure. The idea is that now we can test that we don't break the decoding in followup refactoring. - Fixes a problem with EigenLayer validator addresses. In all our contracts we were using `bytes32` to refer to a Solochain validator address. But on our Substrate change we actually expect AccountId20, so only 20 bytes. This was causing the decoding to fail. - I opted for the minimal change that would be to take the right-most 20 bytes to send that to our chain. But we might want aswell to limit our EigenLayer contracts to be only 20 bytes long. @ahmadkaouk showcase this [here](https://github.com/Moonsong-Labs/datahaven/commit/92a34c273ca439341bd8b61ff3592cef45ba4727) - Adds a bash script to run the static test. The test will compile the contracts, run the encoding test, compile the operator, and run the decoding test. This saves a huge amount of time since we don't need to run the full e2e setup. The way of running it is the following: ```bash cd operator/test/scripts ./test_message_encoding.sh ``` - As a consequence of this PR, the execution relayer now works properly. EDIT: > [!IMPORTANT] **We decided to use 20-byte addresses in our contracts**. So what is stated above is not valid anymore. The change implies that the mapping from Ethereum addresses to bytes32 addresses now it's a mapping as follows: https://github.com/Moonsong-Labs/datahaven/blob/dd3ba99ac0553a33448dc77efbbea08cacd278e6/contracts/src/DataHavenServiceManager.sol#L51-L52 I've updated helper functions, tests, etc to be compliant with this change. The execution relayer and beefy relayer look stable now. --------- Co-authored-by: Ahmad Kaouk <ahmadkaouk.93@gmail.com> Co-authored-by: Ahmad Kaouk <56095276+ahmadkaouk@users.noreply.github.com>
2025-07-16 07:38:58 +00:00
"initialValidatorHashes": [
"0x8626f6940e2eb28930efb4cef49b2d1f2c9c1199914b9e5506744e80bd0fd33d",
"0xdf57089febbacf7ba0bc227dafbffa9fc08a93fdc68e1e42411a14efcf23656e"
],
feat: Add DH-AVS stagenet/testnet Hoodi deployment support (#422) ## Summary - Add multi-environment deployment support (stagenet, testnet, mainnet) to CLI and contracts - Configure stagenet and testnet runtimes with correct genesis hashes and Snowbridge Agent IDs - Add CLI commands for BEEFY checkpoint updates and rewards origin computation - Add ETH validator strategies (native beacon chain ETH + LSTs) to all config files ## Changes ### Runtime Configuration **Stagenet Runtime:** - Set `StagenetGenesisHash` to DataHaven stagenet genesis hash - Configure `RewardsAgentOrigin` with computed Snowbridge Agent ID - Add tests verifying rewards account derivation and agent ID computation **Testnet Runtime:** - Set `TestnetGenesisHash` to DataHaven testnet genesis hash - Configure `RewardsAgentOrigin` with computed Snowbridge Agent ID - Add tests verifying rewards account derivation and agent ID computation The Rewards Agent ID is computed following Snowbridge's location description pattern: ``` blake2_256(SCALE_ENCODE("GlobalConsensus", ByGenesis(genesis), "AccountKey20", rewards_account)) ``` ### CLI Enhancements - All contracts subcommands (`status`, `deploy`, `verify`, `update-metadata`) now accept `--environment` option - Config and deployment files use environment-prefixed naming (e.g., `stagenet-hoodi.json`, `testnet-hoodi.json`) - New `update-beefy-checkpoint` command that: - Connects to a live DataHaven chain via WebSocket RPC - Fetches all BEEFY data at the same finalized block for consistency - Uses parallel queries with `Promise.all` for better performance - Computes authority hashes (keccak256 of Ethereum addresses derived from BEEFY public keys) - Uses Snowbridge's quorum formula `n - floor((n-1)/3)` for strictly > 2/3 majority - New `update-rewards-origin` command that computes the Snowbridge Agent ID for the rewards pallet - Centralized validation via `contractsPreActionHook` for all contract commands - Environment validation against allowlist (`stagenet`, `testnet`, `mainnet`) ### Contract Changes - Network validation uses explicit allowlist instead of suffix matching - Added `initialValidatorSetId` and `nextValidatorSetId` fields to `SnowbridgeConfig` struct - `DeployBase.s.sol` now uses config values for validator set IDs instead of hardcoded 0/1 - `DeployParams.s.sol` loads validator set IDs from config with backwards compatibility ### Validator Strategies Added ETH-equivalent strategies to allow validators to stake using native ETH or LSTs: **All Networks:** - `0xbeaC0eeEeeeeEEeEeEEEEeeEEeEeeeEeeEEBEaC0` - Native beacon chain ETH (virtual strategy) **Hoodi Testnet:** - `0xf8a1a66130d614c7360e868576d5e59203475fe0` - stETH - `0x24579aD4fe83aC53546E5c2D3dF5F85D6383420d` - WETH **Ethereum Mainnet:** - `0x93c4b944D05dfe6df7645A86cd2206016c51564D` - stETH - `0x1BeE69b7dFFfA4E2d53C2a2Df135C388AD25dCD2` - rETH - `0x54945180dB7943c0ed0FEE7EdaB2Bd24620256bc` - cbETH ### Config Files - `stagenet-hoodi.json` - Hoodi testnet with stagenet EigenLayer addresses - `testnet-hoodi.json` - Hoodi testnet with testnet EigenLayer addresses - `mainnet-ethereum.json` - Ethereum mainnet with mainnet EigenLayer addresses - Removed `hoodi.json` (replaced by environment-prefixed files) ## Usage ```bash # Deploy to stagenet on Hoodi bun cli contracts deploy --chain hoodi --environment stagenet # Update BEEFY checkpoint from live chain bun cli contracts update-beefy-checkpoint \ --chain hoodi \ --environment stagenet \ --rpc-url wss://services.datahaven-dev.network/stagenet # Compute rewards origin for a chain bun cli contracts update-rewards-origin \ --chain hoodi \ --environment stagenet \ --rpc-url wss://services.datahaven-dev.network/stagenet # Check deployment status bun cli contracts status --chain hoodi --environment stagenet ``` --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 15:41:15 +00:00
/// The BEEFY validator set ID for the next validators (initialValidatorSetId + 1).
"nextValidatorSetId": 1,
Fix: 🏗️ Message encoding / decoding (#113) ## Summary of changes - We decided to remove the topics and nonce from the massage encoding since we don't use them (original commit: https://github.com/Moonsong-Labs/datahaven/commit/ee2a3f2fd432e0f8623a9798730ce697bfc52d34). - Besides, we already have a nonce at the Snowbridge message level https://github.com/Moonsong-Labs/datahaven/blob/f4ab5c2b2e93c775555ab4b8d0b2babaf5bc15b7/operator/primitives/snowbridge/inbound-queue/src/v2/message.rs#L105 - I had to recreate the static test for _encoding_ (happens in [DataHavenSnowbridgeMessages.sol](https://github.com/Moonsong-Labs/datahaven/blob/d12d40634f16eb9642b5b94cbc364b6679339393/contracts/src/libraries/DataHavenSnowbridgeMessages.sol) ) / _decoding_ (happens in [operator/primitives/bridge/src/lib.rs)](https://github.com/Moonsong-Labs/datahaven/blob/f9f9cc65fe33c86ac91f2097adbcb945b1746277/operator/primitives/bridge/src/lib.rs). Now it matches the current structure. The idea is that now we can test that we don't break the decoding in followup refactoring. - Fixes a problem with EigenLayer validator addresses. In all our contracts we were using `bytes32` to refer to a Solochain validator address. But on our Substrate change we actually expect AccountId20, so only 20 bytes. This was causing the decoding to fail. - I opted for the minimal change that would be to take the right-most 20 bytes to send that to our chain. But we might want aswell to limit our EigenLayer contracts to be only 20 bytes long. @ahmadkaouk showcase this [here](https://github.com/Moonsong-Labs/datahaven/commit/92a34c273ca439341bd8b61ff3592cef45ba4727) - Adds a bash script to run the static test. The test will compile the contracts, run the encoding test, compile the operator, and run the decoding test. This saves a huge amount of time since we don't need to run the full e2e setup. The way of running it is the following: ```bash cd operator/test/scripts ./test_message_encoding.sh ``` - As a consequence of this PR, the execution relayer now works properly. EDIT: > [!IMPORTANT] **We decided to use 20-byte addresses in our contracts**. So what is stated above is not valid anymore. The change implies that the mapping from Ethereum addresses to bytes32 addresses now it's a mapping as follows: https://github.com/Moonsong-Labs/datahaven/blob/dd3ba99ac0553a33448dc77efbbea08cacd278e6/contracts/src/DataHavenServiceManager.sol#L51-L52 I've updated helper functions, tests, etc to be compliant with this change. The execution relayer and beefy relayer look stable now. --------- Co-authored-by: Ahmad Kaouk <ahmadkaouk.93@gmail.com> Co-authored-by: Ahmad Kaouk <56095276+ahmadkaouk@users.noreply.github.com>
2025-07-16 07:38:58 +00:00
/// The next validator hashes for the BEEFY light client.
feat: Add DH-AVS stagenet/testnet Hoodi deployment support (#422) ## Summary - Add multi-environment deployment support (stagenet, testnet, mainnet) to CLI and contracts - Configure stagenet and testnet runtimes with correct genesis hashes and Snowbridge Agent IDs - Add CLI commands for BEEFY checkpoint updates and rewards origin computation - Add ETH validator strategies (native beacon chain ETH + LSTs) to all config files ## Changes ### Runtime Configuration **Stagenet Runtime:** - Set `StagenetGenesisHash` to DataHaven stagenet genesis hash - Configure `RewardsAgentOrigin` with computed Snowbridge Agent ID - Add tests verifying rewards account derivation and agent ID computation **Testnet Runtime:** - Set `TestnetGenesisHash` to DataHaven testnet genesis hash - Configure `RewardsAgentOrigin` with computed Snowbridge Agent ID - Add tests verifying rewards account derivation and agent ID computation The Rewards Agent ID is computed following Snowbridge's location description pattern: ``` blake2_256(SCALE_ENCODE("GlobalConsensus", ByGenesis(genesis), "AccountKey20", rewards_account)) ``` ### CLI Enhancements - All contracts subcommands (`status`, `deploy`, `verify`, `update-metadata`) now accept `--environment` option - Config and deployment files use environment-prefixed naming (e.g., `stagenet-hoodi.json`, `testnet-hoodi.json`) - New `update-beefy-checkpoint` command that: - Connects to a live DataHaven chain via WebSocket RPC - Fetches all BEEFY data at the same finalized block for consistency - Uses parallel queries with `Promise.all` for better performance - Computes authority hashes (keccak256 of Ethereum addresses derived from BEEFY public keys) - Uses Snowbridge's quorum formula `n - floor((n-1)/3)` for strictly > 2/3 majority - New `update-rewards-origin` command that computes the Snowbridge Agent ID for the rewards pallet - Centralized validation via `contractsPreActionHook` for all contract commands - Environment validation against allowlist (`stagenet`, `testnet`, `mainnet`) ### Contract Changes - Network validation uses explicit allowlist instead of suffix matching - Added `initialValidatorSetId` and `nextValidatorSetId` fields to `SnowbridgeConfig` struct - `DeployBase.s.sol` now uses config values for validator set IDs instead of hardcoded 0/1 - `DeployParams.s.sol` loads validator set IDs from config with backwards compatibility ### Validator Strategies Added ETH-equivalent strategies to allow validators to stake using native ETH or LSTs: **All Networks:** - `0xbeaC0eeEeeeeEEeEeEEEEeeEEeEeeeEeeEEBEaC0` - Native beacon chain ETH (virtual strategy) **Hoodi Testnet:** - `0xf8a1a66130d614c7360e868576d5e59203475fe0` - stETH - `0x24579aD4fe83aC53546E5c2D3dF5F85D6383420d` - WETH **Ethereum Mainnet:** - `0x93c4b944D05dfe6df7645A86cd2206016c51564D` - stETH - `0x1BeE69b7dFFfA4E2d53C2a2Df135C388AD25dCD2` - rETH - `0x54945180dB7943c0ed0FEE7EdaB2Bd24620256bc` - cbETH ### Config Files - `stagenet-hoodi.json` - Hoodi testnet with stagenet EigenLayer addresses - `testnet-hoodi.json` - Hoodi testnet with testnet EigenLayer addresses - `mainnet-ethereum.json` - Ethereum mainnet with mainnet EigenLayer addresses - Removed `hoodi.json` (replaced by environment-prefixed files) ## Usage ```bash # Deploy to stagenet on Hoodi bun cli contracts deploy --chain hoodi --environment stagenet # Update BEEFY checkpoint from live chain bun cli contracts update-beefy-checkpoint \ --chain hoodi \ --environment stagenet \ --rpc-url wss://services.datahaven-dev.network/stagenet # Compute rewards origin for a chain bun cli contracts update-rewards-origin \ --chain hoodi \ --environment stagenet \ --rpc-url wss://services.datahaven-dev.network/stagenet # Check deployment status bun cli contracts status --chain hoodi --environment stagenet ``` --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 15:41:15 +00:00
/// Each hash is keccak256(ethereum_address) derived from the BEEFY authority public keys.
Fix: 🏗️ Message encoding / decoding (#113) ## Summary of changes - We decided to remove the topics and nonce from the massage encoding since we don't use them (original commit: https://github.com/Moonsong-Labs/datahaven/commit/ee2a3f2fd432e0f8623a9798730ce697bfc52d34). - Besides, we already have a nonce at the Snowbridge message level https://github.com/Moonsong-Labs/datahaven/blob/f4ab5c2b2e93c775555ab4b8d0b2babaf5bc15b7/operator/primitives/snowbridge/inbound-queue/src/v2/message.rs#L105 - I had to recreate the static test for _encoding_ (happens in [DataHavenSnowbridgeMessages.sol](https://github.com/Moonsong-Labs/datahaven/blob/d12d40634f16eb9642b5b94cbc364b6679339393/contracts/src/libraries/DataHavenSnowbridgeMessages.sol) ) / _decoding_ (happens in [operator/primitives/bridge/src/lib.rs)](https://github.com/Moonsong-Labs/datahaven/blob/f9f9cc65fe33c86ac91f2097adbcb945b1746277/operator/primitives/bridge/src/lib.rs). Now it matches the current structure. The idea is that now we can test that we don't break the decoding in followup refactoring. - Fixes a problem with EigenLayer validator addresses. In all our contracts we were using `bytes32` to refer to a Solochain validator address. But on our Substrate change we actually expect AccountId20, so only 20 bytes. This was causing the decoding to fail. - I opted for the minimal change that would be to take the right-most 20 bytes to send that to our chain. But we might want aswell to limit our EigenLayer contracts to be only 20 bytes long. @ahmadkaouk showcase this [here](https://github.com/Moonsong-Labs/datahaven/commit/92a34c273ca439341bd8b61ff3592cef45ba4727) - Adds a bash script to run the static test. The test will compile the contracts, run the encoding test, compile the operator, and run the decoding test. This saves a huge amount of time since we don't need to run the full e2e setup. The way of running it is the following: ```bash cd operator/test/scripts ./test_message_encoding.sh ``` - As a consequence of this PR, the execution relayer now works properly. EDIT: > [!IMPORTANT] **We decided to use 20-byte addresses in our contracts**. So what is stated above is not valid anymore. The change implies that the mapping from Ethereum addresses to bytes32 addresses now it's a mapping as follows: https://github.com/Moonsong-Labs/datahaven/blob/dd3ba99ac0553a33448dc77efbbea08cacd278e6/contracts/src/DataHavenServiceManager.sol#L51-L52 I've updated helper functions, tests, etc to be compliant with this change. The execution relayer and beefy relayer look stable now. --------- Co-authored-by: Ahmad Kaouk <ahmadkaouk.93@gmail.com> Co-authored-by: Ahmad Kaouk <56095276+ahmadkaouk@users.noreply.github.com>
2025-07-16 07:38:58 +00:00
"nextValidatorHashes": [
"0x8626f6940e2eb28930efb4cef49b2d1f2c9c1199914b9e5506744e80bd0fd33d",
"0xdf57089febbacf7ba0bc227dafbffa9fc08a93fdc68e1e42411a14efcf23656e"
]
}
}