-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Open
Copy link
Labels
bug 🪲Something isn't workingSomething isn't working
Description
Summary
The blueprint deploy eigenlayer flow currently interrupts the expected contract deployment process by prompting for the TaskManager.initialize call too early, before the ServiceManager contract is deployed. This prevents a complete initialization and deployment sequence.
Expected Behavior
Deployment should follow this order:
- Deploy
TaskManager(independent). - Deploy
ServiceManager(requiresTaskManageraddress). - Execute
TaskManager.initializeafter both are deployed, using theServiceManageraddress.
Current Behavior
- After deploying
TaskManager, the CLI immediately prompts for initialization. - If skipped, the user cannot rerun initialization later through the CLI.
- The CLI then deploys
ServiceManagerand exits without letting the user perform the requiredinitializestep. - This causes the deployment to halt before AVS setup and operator registration.
Example Log
$ cargo tangle blueprint deploy eigenlayer --devnet --ordered-deployment
...
SKIP CALL THE `initialize`
...
$ cargo tangle blueprint deploy eigenlayer --devnet --ordered-deployment
...
Contract Deployed Successfully
./contracts/src/TangleTaskManager.sol:TangleTaskManager: 0xc0f115a19107322cfbf1cdbc7ea011c19ebdb4f8
━━━ Initialize ./contracts/src/TangleTaskManager.sol:TangleTaskManager ━━━
Do you want to initialize? no
ℹ Skipping initialization of ./contracts/src/TangleTaskManager.sol:TangleTaskManager
SKIP CALL THE `initialize`
Contract Deployed Successfully
./contracts/src/TangleServiceManager.sol:TangleServiceManager: 0xc96304e3c037f81da488ed9dea1d8f2a48278a75
Deployment Summary:
./contracts/src/TangleTaskManager.sol:TangleTaskManager: 0xc0f1...
./contracts/src/TangleServiceManager.sol:TangleServiceManager: 0xc9630...
...
... By the end, cannot back to initialize step! Impact
- EigenLayer pipeline deployment cannot complete automatically.
- Developers are forced to manually initialize the task manager using
castor a custom script. - Blocks AVS registration, operator configuration, and subsequent integration steps.
Reproduction Steps
- Run:
cargo tangle blueprint deploy eigenlayer --devnet --ordered-deployment
- Choose No when prompted to initialize
TaskManager. - Observe that there is no later step to run
initializeafterServiceManagerdeployment.
Proposed Fixes
Approach 1: Allow Deferred Initialization
- Modify deploy pipeline in deploy_eigenlayer.rs
- Add a new
--deferred-initflag or ablueprint initializesubcommand
Example:cargo tangle blueprint initialize eigenlayer TaskManager --service 0xc9630...a75
- Implementation: enable late binding logic or store constructor outputs in memory/state for later initialization.
Approach 2: Support Solidity Script Deployments
- Create deployment solidity script i.e
// scripts/DeployAvs.s.sol
contract DeployMyServiceManager is Script {
function run() public {
// Deploy
vm.startBroadcast(deployer);
serviceManager = new ServiceManager(...);
taskManager = new TaskManager(...);
vm.stopBroadcast();
// Register operator
vm.startBroadcast(operator);
delegationManager.registerAsOperator(...);
vm.stopBroadcast();
// Link and complete AVS registration
vm.startBroadcast(operator);
serviceManager.registerOperatorToAVS(operator, operatorSignature);
vm.stopBroadcast();
}
}- Introduce
--scriptflag to execute Foundry deployment scripts:cargo tangle blueprint deploy eigenlayer --devnet --script scripts/DeployAvs.s.sol
- Developers manage deployment and initialization manually inside Solidity, while CLI focuses purely on orchestration and logging.
Benefits:
- Maintains single responsibility for the CLI.
- Allows reuse of developer’s existing Foundry deployment scripts.
- Simplifies debugging and iteration.
Acceptance Criteria
- CLI must allow skipping immediate initialization and completing it later.
- Deployment summary should include a clear next-step message, e.g.:
Next: finalize initialization for TaskManager using: cargo tangle blueprint initialize eigenlayer --contract TaskManager - Optionally support a
--scriptflow for fully scripted deployments.
References
Metadata
Metadata
Assignees
Labels
bug 🪲Something isn't workingSomething isn't working
Type
Projects
Status
Not Started 🕧