From 4cd3baba64927340077d021f3eea463811eb55ae Mon Sep 17 00:00:00 2001 From: thedevbirb Date: Tue, 17 Sep 2024 10:38:38 +0200 Subject: [PATCH 1/7] docs(contracts): added EigenLayer integration in README --- bolt-contracts/README.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/bolt-contracts/README.md b/bolt-contracts/README.md index 4b607a96c..63b3448ba 100644 --- a/bolt-contracts/README.md +++ b/bolt-contracts/README.md @@ -48,11 +48,10 @@ coordination of validators, operators, and vaults within the Bolt network. Key features include: -1. Registration of Symbiotic Operators and Vaults +1. Registration of Symbiotic Operators and Vaults / EigenLayer Operators and Strategies 2. Whitelisting of collateral assets used to back commitments 3. Retrieval of operator stake and proposer status from their pubkey -4. Integration with Symbiotic -5. (WIP) Integration with Eigenlayer +4. Integration with Symbiotic/EigenLayer ### Symbiotic Integration guide for Staking Pools @@ -85,7 +84,13 @@ The opt-in process requires the following steps: ### Eigenlayer Integration guides -WIP +As an operator/validator in the EigenLayer ecosystem you need to participate into the Bolt AVS following +the usual procedure. After that, some additional steps are required: + +1. The validator that has delegated to you the stake needs to register into the `BoltValidators` contract + by calling the `BoltValidators.registerValidator` function. +2. The operator needs to register into the `BoltManager` contract by calling the `BoltManager.registerEigenLayerOperator` function. +3. Lastly, any entity needs to registrer the EigenLayer strategy used for restaking. ## Fault Proof Challenge and Slashing: `BoltChallenger` From f2b3a1f305d09fd29fe9f5c256704bd395d0c671 Mon Sep 17 00:00:00 2001 From: thedevbirb Date: Tue, 17 Sep 2024 10:49:08 +0200 Subject: [PATCH 2/7] docs(contracts): better EL explanation --- bolt-contracts/README.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/bolt-contracts/README.md b/bolt-contracts/README.md index 63b3448ba..0fd7abe6b 100644 --- a/bolt-contracts/README.md +++ b/bolt-contracts/README.md @@ -61,7 +61,7 @@ on how to spin up a Vault and start receiving stake from your node operators. Opting into Bolt works as any other Symbiotic middleware integration. Here are the steps: -1. Make sure your vault collateral is whitelisted in `BoltManager` by calling `isCollateralWhitelisted`. +1. Make sure your vault collateral is whitelisted in `BoltManager` by calling `isSymbioticCollateralWhitelisted`. 2. Register as a vault in `BoltManager` by calling `registerSymbioticVault`. 3. Verify that your vault is active in `BoltManager` by calling `isSymbioticVaultEnabled`. 4. Set the network limit for your vault in Symbiotic with `Vault.delegator().setNetworkLimit()`. @@ -82,15 +82,16 @@ The opt-in process requires the following steps: 5. get approved by the vault. 6. start providing commitments with the stake provided by the vault. -### Eigenlayer Integration guides +### Eigenlayer Integration guides for Validators/Operators As an operator/validator in the EigenLayer ecosystem you need to participate into the Bolt AVS following -the usual procedure. After that, some additional steps are required: +the procedure described in the [EigenLayer docs](https://docs.eigenlayer.xyz/). After that, some additional steps are required: -1. The validator that has delegated to you the stake needs to register into the `BoltValidators` contract +1. Make sure your Strategy underlying collateral is whitelisted in `BoltManager` by calling `isEigenLayerCollateralWhitelisted`. +2. The validator that has delegated stake to an operator needs to register into the `BoltValidators` contract by calling the `BoltValidators.registerValidator` function. -2. The operator needs to register into the `BoltManager` contract by calling the `BoltManager.registerEigenLayerOperator` function. -3. Lastly, any entity needs to registrer the EigenLayer strategy used for restaking. +3. The operator needs to register into the `BoltManager` contract by calling the `BoltManager.registerEigenLayerOperator` function. +4. Lastly, any entity needs to registrer the EigenLayer strategy used for restaking. ## Fault Proof Challenge and Slashing: `BoltChallenger` From e786c0ed51b7dc4b401661d084422539c2f871b4 Mon Sep 17 00:00:00 2001 From: thedevbirb Date: Thu, 19 Sep 2024 18:14:29 +0200 Subject: [PATCH 3/7] docs(contracts): better readme for el --- bolt-contracts/README.md | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/bolt-contracts/README.md b/bolt-contracts/README.md index 0fd7abe6b..5a74bb2ae 100644 --- a/bolt-contracts/README.md +++ b/bolt-contracts/README.md @@ -84,14 +84,19 @@ The opt-in process requires the following steps: ### Eigenlayer Integration guides for Validators/Operators -As an operator/validator in the EigenLayer ecosystem you need to participate into the Bolt AVS following -the procedure described in the [EigenLayer docs](https://docs.eigenlayer.xyz/). After that, some additional steps are required: - -1. Make sure your Strategy underlying collateral is whitelisted in `BoltManager` by calling `isEigenLayerCollateralWhitelisted`. -2. The validator that has delegated stake to an operator needs to register into the `BoltValidators` contract - by calling the `BoltValidators.registerValidator` function. -3. The operator needs to register into the `BoltManager` contract by calling the `BoltManager.registerEigenLayerOperator` function. -4. Lastly, any entity needs to registrer the EigenLayer strategy used for restaking. +In the Bolt ecosystem, we assume that the staker and operator are controlled by the same entity: the proposer. +This assumption comes from the fact that preconfirmation fees are paid directly to it using priority fees. + +To participate in the Bolt Actively Validated Service (AVS) via EigenLayer, follow the standard procedures outlined in the [EigenLayer documentation](https://docs.eigenlayer.xyz/). However, Bolt’s integration introduces some additional steps that differ from the classic AVS onboarding process: + +1. **Ensure Collateral is Whitelisted**: Verify that your underlying collateral strategy is whitelisted in the `BoltManager` + contract by calling the `isEigenLayerCollateralWhitelisted` function. Bolt requires specific collateral types to maintain compatibility and security within its system. +2. **Register as a Validator**: Since you act as both validator and operator in Bolt, you need to register your validator in the `BoltValidators` + contract by invoking the `BoltValidators.registerValidator function`. This step is crucial for your validator to be recognized and to participate in Bolt’s protocol. +3. **Register as an Operator**: Register yourself as an operator in the `BoltManager` contract by calling the + `BoltManager.registerEigenLayerOperator` function. This formalizes your role within the Bolt network and allows you to manage operations effectively. +4. **Register the EigenLayer Strategy**: Finally, register the EigenLayer strategy you are using for restaking if it has not been done by someones else. + This ensures that your restaked assets are correctly integrated with Bolt’s system. ## Fault Proof Challenge and Slashing: `BoltChallenger` From 1bf5389af2680ca4a752939933ada99bc1e249e5 Mon Sep 17 00:00:00 2001 From: thedevbirb Date: Fri, 20 Sep 2024 12:03:20 +0200 Subject: [PATCH 4/7] test --- bolt-contracts/README.md | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/bolt-contracts/README.md b/bolt-contracts/README.md index 5a74bb2ae..8a77a67c0 100644 --- a/bolt-contracts/README.md +++ b/bolt-contracts/README.md @@ -82,22 +82,33 @@ The opt-in process requires the following steps: 5. get approved by the vault. 6. start providing commitments with the stake provided by the vault. -### Eigenlayer Integration guides for Validators/Operators +### EigenLayer Integration Guide for Bolt Validators and Operators -In the Bolt ecosystem, we assume that the staker and operator are controlled by the same entity: the proposer. -This assumption comes from the fact that preconfirmation fees are paid directly to it using priority fees. +In the Bolt ecosystem, the integration process slightly varies depending on whether you are part of a **staking pool** or you are a **solo staker**. +Below, we outline the steps for both scenarios and highlight the differences. -To participate in the Bolt Actively Validated Service (AVS) via EigenLayer, follow the standard procedures outlined in the [EigenLayer documentation](https://docs.eigenlayer.xyz/). However, Bolt’s integration introduces some additional steps that differ from the classic AVS onboarding process: +**For Staking Pools** + +To participate in the Bolt Actively Validated Service (AVS) via EigenLayer as part of a staking pool, +follow the standard procedures outlined in the [EigenLayer documentation](https://docs.eigenlayer.xyz/). +In particular, the validators will need to point to a common Node Operator. +However, Bolt’s integration introduces some additional steps that differ from the classic AVS onboarding process: 1. **Ensure Collateral is Whitelisted**: Verify that your underlying collateral strategy is whitelisted in the `BoltManager` contract by calling the `isEigenLayerCollateralWhitelisted` function. Bolt requires specific collateral types to maintain compatibility and security within its system. -2. **Register as a Validator**: Since you act as both validator and operator in Bolt, you need to register your validator in the `BoltValidators` +2. **Register the Validators**: in Bolt, you need to register your validator in the `BoltValidators` contract by invoking the `BoltValidators.registerValidator function`. This step is crucial for your validator to be recognized and to participate in Bolt’s protocol. 3. **Register as an Operator**: Register yourself as an operator in the `BoltManager` contract by calling the `BoltManager.registerEigenLayerOperator` function. This formalizes your role within the Bolt network and allows you to manage operations effectively. 4. **Register the EigenLayer Strategy**: Finally, register the EigenLayer strategy you are using for restaking if it has not been done by someones else. This ensures that your restaked assets are correctly integrated with Bolt’s system. +**For Solo Stakers** + +In the case of solo stakers, **the staker and operator are controlled by the same entity**, known as the proposer. +This assumption is made because preconfirmation fees are paid directly to the proposer using priority fees. +Having both roles unified simplifies fee distribution and aligns incentives. + ## Fault Proof Challenge and Slashing: `BoltChallenger` WIP From e14caf01db64f78e348f889c6f26143077bfe81c Mon Sep 17 00:00:00 2001 From: thedevbirb Date: Fri, 20 Sep 2024 18:46:18 +0200 Subject: [PATCH 5/7] docs(contracts): el integration once again --- bolt-contracts/README.md | 73 +++++++++++++++++++++++++++++----------- 1 file changed, 53 insertions(+), 20 deletions(-) diff --git a/bolt-contracts/README.md b/bolt-contracts/README.md index 8a77a67c0..9cf87e48c 100644 --- a/bolt-contracts/README.md +++ b/bolt-contracts/README.md @@ -82,32 +82,65 @@ The opt-in process requires the following steps: 5. get approved by the vault. 6. start providing commitments with the stake provided by the vault. -### EigenLayer Integration Guide for Bolt Validators and Operators +### EigenLayer Integration Guide for Node Operators and Solo Stakers -In the Bolt ecosystem, the integration process slightly varies depending on whether you are part of a **staking pool** or you are a **solo staker**. -Below, we outline the steps for both scenarios and highlight the differences. +To participate in the Bolt Actively Validated Service (AVS) via EigenLayer you +need to be either a Node Operator (NO) in a staking pool or a solo staker. +This is because preconfirmations fees are paid directly to Ethereum block +proposers by using the priority fees of the transactions. -**For Staking Pools** +Following EigenLayer's terminology, in the context of the Bolt AVS the "Operator" is an +Ethereum address owned by an Ethereum block proposer. -To participate in the Bolt Actively Validated Service (AVS) via EigenLayer as part of a staking pool, -follow the standard procedures outlined in the [EigenLayer documentation](https://docs.eigenlayer.xyz/). -In particular, the validators will need to point to a common Node Operator. -However, Bolt’s integration introduces some additional steps that differ from the classic AVS onboarding process: +Next, you need to follow the standard procedure outlined in the +[EigenLayer documentation](https://docs.eigenlayer.xyz/) to opt into EigenLayer. Let's go through the steps: -1. **Ensure Collateral is Whitelisted**: Verify that your underlying collateral strategy is whitelisted in the `BoltManager` - contract by calling the `isEigenLayerCollateralWhitelisted` function. Bolt requires specific collateral types to maintain compatibility and security within its system. -2. **Register the Validators**: in Bolt, you need to register your validator in the `BoltValidators` - contract by invoking the `BoltValidators.registerValidator function`. This step is crucial for your validator to be recognized and to participate in Bolt’s protocol. -3. **Register as an Operator**: Register yourself as an operator in the `BoltManager` contract by calling the - `BoltManager.registerEigenLayerOperator` function. This formalizes your role within the Bolt network and allows you to manage operations effectively. -4. **Register the EigenLayer Strategy**: Finally, register the EigenLayer strategy you are using for restaking if it has not been done by someones else. - This ensures that your restaked assets are correctly integrated with Bolt’s system. +1. As an Operator, you register into EigenLayer using [`DelegationManager.registerAsOperator`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/mainnet/src/contracts/core/DelegationManager.sol#L107-L119). + +2. As an Ethereum block proposer offering precofirmations you need some collateral in + order to be economically credible. In order to do that, some entities known as a "stakers" + need to deposit some Liquid Staking Tokens (LSTs) into an appropriate "Strategy" + associated to the LST via the [`StrategyManager.depositIntoStrategy`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/mainnet/src/contracts/core/StrategyManager.sol#L105-L110). + Such entities can be any party that is affiliated with you + and wants to delegate its funds, aware that you're the entity receiving rewards. + Note that only whitelist collaterals exposed by the `BoltManager` contract can be actually used. + +3. After the stakers have deposited their collateral into a strategy they need + to choose you as their operator. To do that, they need to call the function + [`DelegationManager.delegateTo`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/mainnet/src/contracts/core/DelegationManager.sol#L154-L163). + +4. As an Operator you finally opt into the Bolt AVS by interacting with the `BoltEigenLayerMiddleware`. + This consists in calling the function `BoltEigenLayerMiddleware.registerOperatorToAVS`. + The payload is a signature whose digest consists of: + + 1. your operator address + 2. the `BoltEigenLayerMiddleware` contract address + 3. a salt + 4. an expiry 2. -**For Solo Stakers** + The contract will then forward the call to the [`AVSDirectory.registerOperatorToAVS`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/mainnet/src/contracts/core/AVSDirectory.sol#L64-L108) + with the `msg.sender` set to the Bolt AVS contract. Upon successful verification of the signature, + the operator is considered `REGISTERED` in a mapping `avsOperatorStatus[msg.sender][operator]`. -In the case of solo stakers, **the staker and operator are controlled by the same entity**, known as the proposer. -This assumption is made because preconfirmation fees are paid directly to the proposer using priority fees. -Having both roles unified simplifies fee distribution and aligns incentives. +Lastly, you need to interact with both the `BoltValidators` and `BoltEigenLayerMiddleware` +contract. This is needed for internal functioning of the AVS and to make RPCs aware that you are a +registered operator and so that they can forward you preconfirmation requests. + +The steps required are the following: + +1. Register all the validator public keys you want to use with Bolt via the `BoltValidators.registerValidator`. + If you for example a Node Operator and you own more than one validator public key, + you can use the more gas-efficient `BoltValidators.batchRegisterValidators` function. + The `authorizedOperator` argument must be the same Ethereum address used for + opting into EigenLayer as an Operator. + +2. Register the same Operator address in the `BoltManager` contract by calling + the `BoltManager.registerEigenLayerOperator` function. This formalizes your role within the Bolt network + and allows you to manage operations effectively, such as pausing or resuming + your service. + +3. Register the EigenLayer strategy you are using for restaking _if it has not been done by someone else already_. + This ensures that your restaked assets are correctly integrated with Bolt’s system. ## Fault Proof Challenge and Slashing: `BoltChallenger` From 11fd74001a0628a467a623bd3ca5533b6df4dfa5 Mon Sep 17 00:00:00 2001 From: thedevbirb Date: Mon, 23 Sep 2024 10:42:16 +0200 Subject: [PATCH 6/7] docs(contracts): feedback --- bolt-contracts/README.md | 39 +++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/bolt-contracts/README.md b/bolt-contracts/README.md index 9cf87e48c..8019e05ce 100644 --- a/bolt-contracts/README.md +++ b/bolt-contracts/README.md @@ -84,26 +84,33 @@ The opt-in process requires the following steps: ### EigenLayer Integration Guide for Node Operators and Solo Stakers -To participate in the Bolt Actively Validated Service (AVS) via EigenLayer you -need to be either a Node Operator (NO) in a staking pool or a solo staker. -This is because preconfirmations fees are paid directly to Ethereum block -proposers by using the priority fees of the transactions. +Participants in the Bolt Actively Validated Service (AVS) via EigenLayer can be +be either a Node Operator (NO) in a staking pool or a solo staker. +This is because preconfirmations fees are paid directly to +Ethereum validators by using the priority fees of the transactions. +Without loss of generality, we will assume the reader of this guide is a Node Operator, +since the same steps apply to solo stakers. -Following EigenLayer's terminology, in the context of the Bolt AVS the "Operator" is an -Ethereum address owned by an Ethereum block proposer. +> [!NOTE] +> Following EigenLayer's terminology, in the context of the Bolt AVS the "Operator" is an +> Ethereum address owned by an Ethereum validator. Next, you need to follow the standard procedure outlined in the [EigenLayer documentation](https://docs.eigenlayer.xyz/) to opt into EigenLayer. Let's go through the steps: 1. As an Operator, you register into EigenLayer using [`DelegationManager.registerAsOperator`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/mainnet/src/contracts/core/DelegationManager.sol#L107-L119). -2. As an Ethereum block proposer offering precofirmations you need some collateral in +2. As an Ethereum validator offering precofirmations a NO needs some collateral in order to be economically credible. In order to do that, some entities known as a "stakers" - need to deposit some Liquid Staking Tokens (LSTs) into an appropriate "Strategy" - associated to the LST via the [`StrategyManager.depositIntoStrategy`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/mainnet/src/contracts/core/StrategyManager.sol#L105-L110). - Such entities can be any party that is affiliated with you - and wants to delegate its funds, aware that you're the entity receiving rewards. - Note that only whitelist collaterals exposed by the `BoltManager` contract can be actually used. + need to deposit whitelisted Liquid Staking Tokens (LSTs) + into an appropriate "Strategy" associated to the LST via the + [`StrategyManager.depositIntoStrategy`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/mainnet/src/contracts/core/StrategyManager.sol#L105-L110), + so that the Operator has a `min_amount` (TBD) of collateral associated to it. + Whitelisted LSTs are exposed by the `BoltEigenLayerMiddleware` contract + in the `getWhitelistedCollaterals` function. + Note that NOs and stakers can be two different entities + _but there is fully trusted relationship as stakers will be slashed if a NO misbehaves_. + As such, it is expected this will lead only NOs themselves to be the sole stakers. 3. After the stakers have deposited their collateral into a strategy they need to choose you as their operator. To do that, they need to call the function @@ -122,20 +129,20 @@ Next, you need to follow the standard procedure outlined in the with the `msg.sender` set to the Bolt AVS contract. Upon successful verification of the signature, the operator is considered `REGISTERED` in a mapping `avsOperatorStatus[msg.sender][operator]`. -Lastly, you need to interact with both the `BoltValidators` and `BoltEigenLayerMiddleware` +Lastly, a NO needs to interact with both the `BoltValidators` and `BoltEigenLayerMiddleware` contract. This is needed for internal functioning of the AVS and to make RPCs aware that you are a registered operator and so that they can forward you preconfirmation requests. The steps required are the following: 1. Register all the validator public keys you want to use with Bolt via the `BoltValidators.registerValidator`. - If you for example a Node Operator and you own more than one validator public key, + If you own more than one validator public key, you can use the more gas-efficient `BoltValidators.batchRegisterValidators` function. The `authorizedOperator` argument must be the same Ethereum address used for opting into EigenLayer as an Operator. -2. Register the same Operator address in the `BoltManager` contract by calling - the `BoltManager.registerEigenLayerOperator` function. This formalizes your role within the Bolt network +2. Register the same Operator address in the `BoltEigenLayerMiddleware` contract by calling + the `BoltEigenLayerMiddleware.registerOperator` function. This formalizes your role within the Bolt network and allows you to manage operations effectively, such as pausing or resuming your service. From defd20777ab4bdabfd986bf9d15143015e1c6bd0 Mon Sep 17 00:00:00 2001 From: thedevbirb Date: Tue, 24 Sep 2024 17:35:37 +0200 Subject: [PATCH 7/7] docs(contracts): readme EL again --- bolt-contracts/README.md | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/bolt-contracts/README.md b/bolt-contracts/README.md index 8019e05ce..d6a6a7977 100644 --- a/bolt-contracts/README.md +++ b/bolt-contracts/README.md @@ -84,18 +84,17 @@ The opt-in process requires the following steps: ### EigenLayer Integration Guide for Node Operators and Solo Stakers -Participants in the Bolt Actively Validated Service (AVS) via EigenLayer can be -be either a Node Operator (NO) in a staking pool or a solo staker. -This is because preconfirmations fees are paid directly to -Ethereum validators by using the priority fees of the transactions. -Without loss of generality, we will assume the reader of this guide is a Node Operator, -since the same steps apply to solo stakers. - > [!NOTE] -> Following EigenLayer's terminology, in the context of the Bolt AVS the "Operator" is an -> Ethereum address owned by an Ethereum validator. +> Without loss of generality, we will assume the reader of this guide is a Node +> Operator (NO), since the same steps apply to solo stakers. + +As a Node Operator you will be an ["Operator"](https://docs.eigenlayer.xyz/eigenlayer/overview/key-terms) +in the Bolt AVS built on top of EigenLayer. This requires +running an Ethereum validator and the Bolt sidecar in order issue +preconfirmations. -Next, you need to follow the standard procedure outlined in the +The Operator will be represented by an Ethereum address that needs +to follow the standard procedure outlined in the [EigenLayer documentation](https://docs.eigenlayer.xyz/) to opt into EigenLayer. Let's go through the steps: 1. As an Operator, you register into EigenLayer using [`DelegationManager.registerAsOperator`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/mainnet/src/contracts/core/DelegationManager.sol#L107-L119). @@ -110,7 +109,6 @@ Next, you need to follow the standard procedure outlined in the in the `getWhitelistedCollaterals` function. Note that NOs and stakers can be two different entities _but there is fully trusted relationship as stakers will be slashed if a NO misbehaves_. - As such, it is expected this will lead only NOs themselves to be the sole stakers. 3. After the stakers have deposited their collateral into a strategy they need to choose you as their operator. To do that, they need to call the function