Skip to content

Commit dc57650

Browse files
authored
chore: redeploy Tempo with fresh Sp1Helios contract (#1324)
* chore: redeploy Tempo with fresh Sp1Helios contract Signed-off-by: bennett <bennett@umaproject.org> * commetns Signed-off-by: bennett <bennett@umaproject.org> * prompt sp1 deployment Signed-off-by: bennett <bennett@umaproject.org> --------- Signed-off-by: bennett <bennett@umaproject.org>
1 parent fe8a738 commit dc57650

File tree

9 files changed

+99
-210
lines changed

9 files changed

+99
-210
lines changed

broadcast/DeploySP1Helios.s.sol/4217/run-latest.json

Lines changed: 36 additions & 37 deletions
Large diffs are not rendered by default.

broadcast/DeployUniversalSpokePool.s.sol/4217/run-latest.json

Lines changed: 26 additions & 155 deletions
Large diffs are not rendered by default.

broadcast/deployed-addresses.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -598,9 +598,8 @@
598598
"chain_name": "Tempo",
599599
"contracts": {
600600
"SpokePool": {
601-
"address": "0x2d4710f04da90184255782d3715224a6c776955d",
602-
"block_number": 4341825,
603-
"transaction_hash": "0x2042b4ae549cd4b3047c56ef4dea4a5b7f34f256e5c2d18925948a961362ad21"
601+
"address": "0x2d4710F04Da90184255782d3715224A6C776955D",
602+
"block_number": 4341825
604603
},
605604
"MulticallHandler": {
606605
"address": "0x7d6adcbb51ea70c134d7b0b96aa9af50fe504d90",
@@ -611,9 +610,9 @@
611610
"block_number": 4035644
612611
},
613612
"SP1Helios": {
614-
"address": "0x3ca11702f7c0f28e0b4e03c31f7492969862c569",
615-
"block_number": 4340584,
616-
"transaction_hash": "0x0f377cf3b6f210a1bdd2bae9cca87946f66fedf13af196dd33719a1786ae6568"
613+
"address": "0x2bc84a3777469f67e040dab9d00512a5d5258f39",
614+
"block_number": 5673252,
615+
"transaction_hash": "0xb499f362e8b95a9ea011aa984a94e46394bf9c23e51643198e9b3c280b805f81"
617616
}
618617
}
619618
},

broadcast/deployed-addresses.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -192,13 +192,12 @@ This file contains the latest deployed smart contract addresses from the broadca
192192

193193
## Tempo (4217)
194194

195-
| Contract Name | Address |
196-
| ------------------ | ---------------------------------------------------------------------------------------------------------------------------------- |
197-
| MulticallHandler | [0x7D6ADCbB51Ea70C134d7B0B96aA9AF50FE504D90](https://explore.mainnet.tempo.xyz/address/0x7D6ADCbB51Ea70C134d7B0B96aA9AF50FE504D90) |
198-
| SP1Helios | [0x3CA11702f7c0F28e0b4e03C31F7492969862C569](https://explore.mainnet.tempo.xyz/address/0x3CA11702f7c0F28e0b4e03C31F7492969862C569) |
199-
| SpokePool | [0x2d4710F04Da90184255782d3715224A6C776955D](https://explore.mainnet.tempo.xyz/address/0x2d4710F04Da90184255782d3715224A6C776955D) |
200-
| SpokePool | [0x2d4710F04Da90184255782d3715224A6C776955D](https://explore.mainnet.tempo.xyz/address/0x2d4710F04Da90184255782d3715224A6C776955D) |
201-
| SpokePoolPeriphery | [0x1cFC76f039e01970355Cf73a37B785A81847796C](https://explore.mainnet.tempo.xyz/address/0x1cFC76f039e01970355Cf73a37B785A81847796C) |
195+
| Contract Name | Address |
196+
| ------------------ | ------------------------------------------ |
197+
| MulticallHandler | 0x7D6ADCbB51Ea70C134d7B0B96aA9AF50FE504D90 |
198+
| SP1Helios | 0x2BC84A3777469f67e040DAb9d00512a5D5258f39 |
199+
| SpokePool | 0x2d4710F04Da90184255782d3715224A6C776955D |
200+
| SpokePoolPeriphery | 0x1cFC76f039e01970355Cf73a37B785A81847796C |
202201

203202
## MegaETH (4326)
204203

deploy/consts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ export const L2_ADDRESS_MAP: { [key: number]: { [contractName: string]: string }
321321
},
322322
[CHAIN_IDs.TEMPO]: {
323323
permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
324-
helios: "0x3CA11702f7c0F28e0b4e03C31F7492969862C569",
324+
helios: "0x2BC84A3777469f67e040DAb9d00512a5D5258f39",
325325
},
326326
[CHAIN_IDs.LISK]: {
327327
permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",

generated/constants.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,8 @@
204204
"name": "Tempo",
205205
"family": "NONE",
206206
"nativeToken": "pathUSD",
207-
"publicRPC": "https://rpc.tempo.xyz",
208-
"blockExplorer": "https://explore.mainnet.tempo.xyz",
207+
"publicRPC": "",
208+
"blockExplorer": "",
209209
"cctpDomain": -1,
210210
"oftEid": 30410,
211211
"hypDomainId": -1
@@ -678,7 +678,7 @@
678678
},
679679
"4217": {
680680
"permit2": "0x000000000022D473030F116dDEE9F6B43aC78BA3",
681-
"helios": "0x3CA11702f7c0F28e0b4e03C31F7492969862C569"
681+
"helios": "0x2BC84A3777469f67e040DAb9d00512a5D5258f39"
682682
},
683683
"4326": {
684684
"cctpV2TokenMessenger": "0x0000000000000000000000000000000000000000",
@@ -946,7 +946,6 @@
946946
"324": "0x3355df6D4c9C3035724Fd0e3914dE96A5a83aaf4",
947947
"1135": "0xF242275d3a6527d877f2c927a82D9b057609cc71",
948948
"1868": "0xbA9986D2381edf1DA03B0B9c1f8b00dc4AacC369",
949-
"4217": "0x20c000000000000000000000b9537d11c60e8b50",
950949
"34443": "0xd988097fb8612cc24eeC14542bC03424c656005f",
951950
"41455": "0x18d25B4e18165c97e1285212e5d1f80eDD6d3Aa7",
952951
"42161": "0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8",

script/universal/DeploySP1Helios.s.sol

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ import { SP1MockVerifier } from "@sp1-contracts/src/SP1MockVerifier.sol";
1010
/// @notice Deploy script for the SP1Helios contract.
1111
/// @dev This script downloads the genesis binary from the SP1Helios GitHub releases,
1212
/// runs it to generate the genesis.json, then deploys the SP1Helios contract.
13+
/// @dev Be familiar with the README in this directory before deploying, as there are time
14+
/// considerations and follow-up transactions to execute after deployments.
1315
///
1416
/// How to run:
1517
/// 1. Set environment variables in .env:
@@ -61,6 +63,14 @@ contract DeploySP1Helios is Script {
6163
console.log("SP1MockVerifier deployed to:", params.verifier);
6264
}
6365

66+
string memory confirmation = vm.prompt(
67+
"Once Sp1Helios is deployed, you will have 7 days to deploy the UniversalSpokePool and activate it in-protocol. If 7 days passes with no update on this deployment, it will be impossible to make any updates to this contract. Press y/Y to confirm."
68+
);
69+
if (!strEq(confirmation, "y") && !strEq(confirmation, "Y")) {
70+
console.log("Prompt not confirmed. Aborting deployment.");
71+
return address(0);
72+
}
73+
6474
// Deploy the SP1 Helios contract
6575
console.log("Deploying SP1Helios...");
6676
SP1Helios helios = new SP1Helios(params);
@@ -261,4 +271,8 @@ contract DeploySP1Helios is Script {
261271

262272
console.log("Checksum verified successfully");
263273
}
274+
275+
function strEq(string memory a, string memory b) private pure returns (bool) {
276+
return keccak256(bytes(a)) == keccak256(bytes(b));
277+
}
264278
}

script/universal/DeployUniversalSpokePool.s.sol

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ import { ITokenMessenger } from "../../contracts/external/interfaces/CCTPInterfa
1111
/// @title DeployUniversalSpokePool
1212
/// @notice Deploy script for the Universal_SpokePool contract.
1313
/// @dev See script/universal/README.md for detailed usage instructions.
14+
/// @dev Be familiar with the README in this directory before deploying, as there are time
15+
/// considerations and follow-up transactions to execute after deployments.
1416
///
1517
/// Example:
1618
/// forge script script/universal/DeployUniversalSpokePool.s.sol:DeployUniversalSpokePool \
@@ -36,6 +38,7 @@ contract DeployUniversalSpokePool is Script, Test, DeploymentUtils {
3638

3739
uint256 heliosAdminBufferUpdateSeconds = 1 days;
3840
address helios = getDeployedAddress("SP1Helios", info.spokeChainId, true);
41+
3942
address l1HubPoolStore = getL1Addresses(info.hubChainId).hubPoolStore;
4043

4144
bool hasCctpDomain = hasCctpDomain(info.spokeChainId);

script/universal/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ This guide covers deploying the **Universal SpokePool** infrastructure to a new
1010
- A funded deployer wallet (via mnemonic)
1111
- `generated/constants.json` with chain configuration (run `yarn generate-constants` if missing)
1212

13+
## A Note to Deployers
14+
15+
When you deploy a new Universal Spoke pool to be used by Across, there is a time limit you must follow from Sp1Helios deployment to config store activation.
16+
The SP1Helios contract has a constant `MAX_SLOT_AGE = 7 days`, which is the upper-bound on how long updates may be spaced apart from each other. If the `stateUpdater` is not actively updating helios within seven days of deployment, the Sp1Helios contract will revert to a state where no further updates can be made, and by extension the Universal spoke will become inert and must be upgraded by the `owner` (where the upgrade implementation candidate has a fresh Sp1Helios contract set in its constructor).
17+
1318
## Environment Variables
1419

1520
Create a `.env` file with the following variables:

0 commit comments

Comments
 (0)