Skip to content

Conversation

@0xrajath
Copy link
Collaborator

@0xrajath 0xrajath commented Nov 21, 2025

Motivation:

Rewards v2.2 upgrade scripts (v1.10.0)

Modifications:

  • v1.10.0-rewards-v2.2 release script that includes 3 steps (Collectively it upgrades the RewardsCoordinator to include Rewards v2.2 functionality and also updates MAX_REWARDS_DURATION from 70 days to 2 years):
  1. 1-deployRewardsCoordinatorImpl.s.sol
  2. 2-queueRewardsCoordinatorUpgrade.s.sol
  3. 3-executeRewardsCoordinatorUpgrade.s.sol
  • Updated v1.9.0-slashing-ux and v1.9.0-slashing-ux-destination release scripts to have a version check for v1.8.1.

Result:

Rewards v2.2 upgrade.

@0xrajath 0xrajath self-assigned this Nov 21, 2025
@0xrajath 0xrajath force-pushed the release-dev/rewards-v2.2 branch from 9b2b470 to 1103809 Compare November 21, 2025 22:00
@0xrajath 0xrajath force-pushed the rajath/rewards-v2.2-upgrade-script branch from 2b46d2a to dcd304d Compare November 21, 2025 22:31
Copy link
Collaborator

@ypatil12 ypatil12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might also need to add KeyRegistrar in this upgrade

zUpdateUint32("REWARDS_COORDINATOR_MAX_REWARDS_DURATION", 63072000);

// Deploy RewardsCoordinator implementation with the updated MAX_REWARDS_DURATION
deployImpl({
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can use the CoreContractsDeployer lib: deployRewardsCoordinator

// Deploy the new RewardsCoordinator implementation
runAsEOA();

_validateNewImplAddress();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can use the implementation validations in TestUtils.sol. Specifically:

        // Run tests
        TestUtils.validateProxyAdmins();
        TestUtils.validateImplConstructors();
        TestUtils.validateImplsNotInitializable();

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should keep upgrade specific assertions: _validateZeusEnvUpdated, _validateNewFunctionality, and _validateStorageLayout

/// @dev Get the calldata to be sent from the timelock to the executor
function _getCalldataToExecutor() internal returns (bytes memory) {
/// forgefmt: disable-next-item
MultisigCall[] storage executorCalls = Encode.newMultisigCalls().append({
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can use QueueUpgradeHelper. Example:

        MultisigCall[] storage executorCalls = Encode.newMultisigCalls();

        /// permissions
        executorCalls.upgradeRewardsCoordinator();

execute();
assertTrue(timelock.isOperationDone(txHash), "v1.10.0 RewardsCoordinator upgrade should be complete");

// 5 - Validate the upgrade was successful
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can use TestUtils:

        TestUtils.validateProxyAdmins();
        TestUtils.validateProxyConstructors();
        TestUtils.validateProxiesAlreadyInitialized();
        TestUtils.validateProxyStorage();
        TestUtils.validateImplAddressesMatchProxy();
        TestUtils.validateProtocolRegistry();

Good to keep the first and last ones though since they are upgrade-specific

proxy: address(Env.proxy.rewardsCoordinator()),
impl: address(Env.impl.rewardsCoordinator())
})
});
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also need a queue an update to the ProtocolRegistry via ship. Since the names and addresses and config are the same, fine to just set a semver and leave the first 3 params empty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants