Skip to content

Conversation

@fusmanii
Copy link
Contributor

@fusmanii fusmanii commented Sep 2, 2025

We want to ensure that the new implementation is working as expected by toggling pauseDeposits function post upgrade

Signed-off-by: Faisal Usmani <faisal.of.usmani@gmail.com>
@fusmanii fusmanii force-pushed the faisal/try-upgradeTo branch from 462340a to 4b60fdd Compare September 2, 2025 17:45
@fusmanii fusmanii added the wip label Sep 2, 2025
Signed-off-by: Faisal Usmani <faisal.of.usmani@gmail.com>
Signed-off-by: Faisal Usmani <faisal.of.usmani@gmail.com>
@fusmanii fusmanii force-pushed the faisal/try-upgradeTo branch from 2e4e5ce to acb0084 Compare September 3, 2025 14:16
@fusmanii fusmanii changed the title WIP - feat: Try upgradeTo for testing WIP - feat: Added upgradeToAndCall to Spoke Pool Upgrade task Sep 3, 2025
Signed-off-by: Faisal Usmani <faisal.of.usmani@gmail.com>
@fusmanii fusmanii changed the title WIP - feat: Added upgradeToAndCall to Spoke Pool Upgrade task feat: Added upgradeToAndCall to Spoke Pool Upgrade task Sep 3, 2025
@fusmanii fusmanii marked this pull request as ready for review September 3, 2025 14:33
@fusmanii fusmanii removed the wip label Sep 3, 2025
nicholaspai
nicholaspai previously approved these changes Sep 3, 2025
Copy link
Member

@nicholaspai nicholaspai left a comment

Choose a reason for hiding this comment

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

+1

Co-authored-by: nicholaspai <9457025+nicholaspai@users.noreply.github.com>
Signed-off-by: Faisal Usmani <faisal.of.usmani@gmail.com>
@fusmanii fusmanii force-pushed the faisal/try-upgradeTo branch from 0d5917e to 3520c92 Compare September 3, 2025 14:38
@fusmanii fusmanii requested a review from nicholaspai September 3, 2025 14:39

// @dev Any spoke pool's interface can be used here since they all should have the same upgradeTo function signature.
const abi = ["function upgradeTo(address newImplementation) external"];
const abi = [
Copy link
Contributor

Choose a reason for hiding this comment

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

ooc, can we draw on the ABI via typechain?

I'm generally pretty wary of using typechain, but given that the ABI is local to this repo it feels like we should be able to source it from somewhere dynamically, rather than have to redefine it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@pxrl good point, I was able to get the abi directly from the artifact instead


task("upgrade-spokepool", "Generate calldata to upgrade a SpokePool deployment")
.addParam("implementation", "New SpokePool implementation address")
.addOptionalParam("upgradeOnly", "Upgrade only, do not pause/unpause deposits")
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you think there's a scenario where we wouldn't want the atomic pause/unpause?

Copy link
Member

Choose a reason for hiding this comment

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

On EVM chains we are absolutely sure there is no difference from the L1 EVM

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just kept it in case someone is looking for the old upgrade only behaviour. @pxrl do you think its better (and safer) to only have atomic pause/unpause option?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah; I feel like we should just keep the interface simple and omit this option, since we don't actually have any concrete scenarios where we'd want to skip it. That feels like it'd be an exceptional circumstance.

Copy link
Contributor

Choose a reason for hiding this comment

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

@fusmanii This is my only remaining comment btw - OK to drop the arg and then merge it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done 1c11d8b

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@pxrl dropped the param

Comment on lines 71 to 83
/**
* We perform this seemingly unnecessary pause/unpause sequence because we want to ensure that the
* upgrade is successful and the new implementation gets forwarded calls by the proxy contract as expected
*
* Since the upgrade and call happens atomically, the upgrade will revert if the new implementation
* is not functioning correctly.
*/
const data = spokePool.interface.encodeFunctionData("multicall", [
[
spokePool.interface.encodeFunctionData("pauseDeposits", [true]),
spokePool.interface.encodeFunctionData("pauseDeposits", [false]),
],
]);
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice; I like this!

Signed-off-by: Faisal Usmani <faisal.of.usmani@gmail.com>
@fusmanii fusmanii requested a review from pxrl September 8, 2025 12:58
@across-protocol across-protocol deleted a comment from linear bot Sep 10, 2025
Signed-off-by: Faisal Usmani <faisal.of.usmani@gmail.com>
@nicholaspai nicholaspai changed the base branch from master to cctp-v2-eveerywhere October 6, 2025 15:48
fusmanii and others added 5 commits October 6, 2025 11:49
Signed-off-by: Faisal Usmani <faisal.of.usmani@gmail.com>
Signed-off-by: Faisal Usmani <faisal.of.usmani@gmail.com>
Signed-off-by: Faisal Usmani <faisal.of.usmani@gmail.com>
nicholaspai
nicholaspai previously approved these changes Oct 6, 2025
Base automatically changed from cctp-v2-eveerywhere to master October 6, 2025 16:17
@nicholaspai nicholaspai dismissed their stale review October 6, 2025 16:17

The base branch was changed.

nicholaspai
nicholaspai previously approved these changes Oct 6, 2025
@nicholaspai nicholaspai merged commit be78de3 into master Oct 6, 2025
10 checks passed
@nicholaspai nicholaspai deleted the faisal/try-upgradeTo branch October 6, 2025 17:41
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.

4 participants