Skip to content

Commit 677f9a9

Browse files
uri-99MauroToscano
andauthored
fix(contract): remove reinitializers from AlignedLayerServiceManager (#1770)
Co-authored-by: MauroFab <[email protected]>
1 parent e546a4f commit 677f9a9

File tree

6 files changed

+21
-330
lines changed

6 files changed

+21
-330
lines changed

contracts/script/upgrade/AlignedLayerPauserUpgrader.s.sol

Lines changed: 0 additions & 128 deletions
This file was deleted.

contracts/script/upgrade/AlignedLayerUpgradeAddAggregator.s.sol

Lines changed: 0 additions & 114 deletions
This file was deleted.

contracts/scripts/anvil/state/alignedlayer-deployed-anvil-state.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

contracts/scripts/upgrade_add_aggregator_to_service_manager.sh

Lines changed: 0 additions & 38 deletions
This file was deleted.

contracts/scripts/upgrade_add_pausable_to_service_manager.sh

Lines changed: 0 additions & 32 deletions
This file was deleted.

contracts/src/core/AlignedLayerServiceManager.sol

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -84,23 +84,26 @@ contract AlignedLayerServiceManager is
8484
_initializePauser(_pauserRegistry, _initialPausedStatus);
8585
}
8686

87-
// This function is to be run only on upgrade
88-
// If a new contract is deployed, this function should be removed
89-
// Because this new value is also added in the initializer
90-
function initializeAggregator(
91-
address _alignedAggregator
92-
) public reinitializer(2) {
93-
setAggregator(_alignedAggregator);
94-
}
95-
96-
// Just to be used to upgrade contracts without the pausable functionality
97-
// Once the contract is pausable this method is not needed anymore
98-
function initializePauser(
99-
IPauserRegistry _pauserRegistry,
100-
uint256 _initialPausedStatus
101-
) public reinitializer(3) {
102-
_initializePauser(_pauserRegistry, _initialPausedStatus);
103-
}
87+
// Reinitializers:
88+
// Notice Testnet had more upgrades than Mainnet.
89+
// In Testnet, we executed the reinitializer(2) and reinitializer(3)
90+
91+
// These are not needed in Mainnet.
92+
// In the future, in case of needing to add a reinitializer,
93+
// either add it as reinitializer(4) or redeploy Testnet from scratch
94+
95+
// function initializeAggregator( // applied on Testnet
96+
// address _alignedAggregator
97+
// ) public reinitializer(2) {
98+
// setAggregator(_alignedAggregator);
99+
// }
100+
101+
// function initializePauser( // applied on Testnet
102+
// IPauserRegistry _pauserRegistry,
103+
// uint256 _initialPausedStatus
104+
// ) public reinitializer(3) {
105+
// _initializePauser(_pauserRegistry, _initialPausedStatus);
106+
// }
104107

105108
function createNewTask(
106109
bytes32 batchMerkleRoot,

0 commit comments

Comments
 (0)