Description
Why?
The Görli testnet currently used by Threshold/Keep for development purposes is planned to become deprecated with the end of year 2023. The testnet that is planned to replace it is called Holešky, however it's not yet available - it's planned it will become widely accessible on Oct 1, 2023 (source).
Switching our infrastructure to support new testnet is quite time consuming, so moving directly from Görli to Holešky may be quite risky, especially if there would be some delays in the date of Holešky genesis (not meeting the planned timelines is not a rare occurrence in the Ethereum space). As a solution, we decided to switch first to another testnet that is currently live - Sepolia. This testnet's EOL is planned for 2026, which gives us plenty of time to move to Holešky before Sepolia gets deprecated.
Testnets Lifecycle:
Read more in Predictable Ethereum Testnet Lifecycle Proposal.
How?
Deploying contracts to a new testnet and adjusting CI accordingly is a work consisting of many tasks and requiring coordination of several team members. We shouldn't get rid of Görli support until we're sure that everything works on Sepolia smoothly (maybe even until Görli gets deprecated). We may consider adding Holešky support together with Sepolia in some places, for the future use (for example in Hardhat config).
What & who?
- Update list of supported networks in
keep-common
(Add Sepolia to the list of supported networks keep-network/keep-common#118) - Adjust our Hardhat/Truffle configuration to support Sepolia (without removing configuration for Görli yet):
-
@keep-network/keep-core
- Support deployment of v1 contracts on Sepolia keep-core#3712 -
@keep-network/keep-ecdsa
- modified locally (repository deprecated) -
@keep-network/tbtc
- modified locally (repository deprecated) -
@threshold-network/solidity-contracts
- Support deployment on Sepolia #151, Add missing${{ }}
markers in thecontracts.yml
#152, Upgradehardhat-deploy
plugin to0.1.37
version #154 -
@keep-network/coverage-pools
- Support deployment on Sepolia keep-network/coverage-pools#235 -
@keep-network/random-beacon
- Support deployment on Sepolia keep-core#3706 -
@keep-network/ecdsa
- Support deployment on Sepolia keep-core#3706 -
@keep-network/tbtc-v2
- Support deployment on Sepolia tbtc-v2#691 -
@keep-network/tbtc-v2.ts
- Support deployment on Sepolia tbtc-v2#691 -
@keep-network/tbtc-v2-arbitrum
(nice to have) - Add Sepolia / Arbitrum Sepolia support for Arbitrum cross-chain tbtc-v2#753 -
@keep-network/tbtc-v2-optimism
(nice to have) - Add Sepolia / Optimism Sepolia support for Optimism cross-chain tbtc-v2#752 -
@keep-network/tbtc-v2-polygon
(nice to have) - Add Sepolia support for Polygon cross-chain tbtc-v2#751 -
@keep-network/tbtc-v2-solana
? (once Solana support lands onmain
) (nice to have) -
@keep-network/tbtc-v2-base
- Add Sepolia / Base Sepolia support for Base cross-chain tbtc-v2#742
-
- Create
SepoliaLightRelay.sol
- Support deployment on Sepolia tbtc-v2#691 - Adjust deployments scripts, where needed.
- Send SepoliaETH to the account that will be used as a deployer (
0x68ad60CC5e8f3B7cC53beaB321cf0e6036962dBc
) - Deploy contracts on Sepolia and publish packages with them to the NPM registry (in specific order, taking under consideration dependencies between the projects):
-
@keep-network/[email protected]
-
@keep-network/[email protected]
-
@keep-network/[email protected]
-
@threshold-network/[email protected]
-
@keep-network/[email protected]
-
@keep-network/coverage-pools@1...
(There were problems with publishing package for v1, we will skip it's deployment and manage without it, at least for now) -
@keep-network/[email protected]
-
@keep-network/[email protected]
-
@keep-network/[email protected]
-
keep-network/[email protected]
(published based on code from19e2dfff
commit, package marked as deprecated) -
@keep-network/tbtc-v2-arbitrum
(also update.gitignore
andpackage.json
) (nice to have) -
@keep-network/tbtc-v2-optimism
(also update.gitignore
andpackage.json
) (nice to have) -
@keep-network/tbtc-v2-polygon
(also update.gitignore
andpackage.json
) (nice to have) -
@keep-network/tbtc-v2-solana
? (also update.gitignore
andpackage.json
) (once Solana support lands onmain
) (nice to have) -
@keep-network/tbtc-v2-base
-
- Verify contracts on Etherscan
- Update
merkle-drop
config - Support Sepolia merkle-distribution#93 - Deploy merkle drop and stub(?)
SimplePreApplication
on Sepolia - Update CI config file (
keep-network/ci/config/env/sepolia.env
) - Support deployment on Sepolia keep-network/ci#48 - Setup environment variables on organization level (in
keep-network
andthreshold-network
):-
SEPOLIA_ETH_HOSTNAME_HTTP
-
SEPOLIA_ETH_HOSTNAME_WS
-
TESTNET_ETH_CONTRACT_OWNER_PRIVATE_KEY
-
DAPP_DEV_TESTNET_ETH_CONTRACT_OWNER_PRIVATE_KEY
-
- Modify CI
.yml
files in following projects to use above secrets when deploying on Sepolia:-
threshold-network/solidity-contracts
-
keep-network/coverage-pools
(?) -
keep-network/random-beacon
-
keep-network/ecdsa
-
keep-network/tbtc-v2
-
keep-network/tbtc-v2/monitoring
- Add support for Sepolia testnet in monitoring tbtc-v2#754 -
threshold-network/token-dashboard
- Support deployment on Sepolia token-dashboard#605
-
- (Nice to have) Include publishing of following packages in CI flow:
-
keep-network/tbtc-v2-arbitrum
(also update.gitignore
andpackage.json
) -
keep-network/tbtc-v2-optimism
(also update.gitignore
andpackage.json
) -
keep-network/tbtc-v2-polygon
(also update.gitignore
andpackage.json
) -
keep-network/tbtc-v2-solana
? (also update.gitignore
andpackage.json
) (once Solana support lands onmain
) -
keep-network/tbtc-v2-base
(also update.gitignore
andpackage.json
)
-
- Modify
dapp-development
branch in following projects to support Sepolia:-
threshold-network/solidity-contracts
- [Do not merge] dApp-friendly contract deployment #118 -
keep-network/keep-core
- [Do not merge] dApp-friendly contract deployment keep-core#3118 -
keep-network/tbtc-v2
- [Do not merge] dApp-friendly contract deployment tbtc-v2#403
-
- Create
dapp-development-sepolia
-tagged packages for:-
@threshold-network/[email protected]
-
@keep-network/[email protected]
-
@keep-network/[email protected]
-
@keep-network/[email protected]
-
- Document the published contracts in the Threshold docs and update READMEs and other documentation referencing
goerli
- https://app.gitbook.com/o/R2meumXNNad4y1B10iL7/s/WosjlL4zUGUMlcMfuSAp/~/changes/268/resources/contract-addresses/sepolia-testnet, https://app.gitbook.com/o/R2meumXNNad4y1B10iL7/s/WosjlL4zUGUMlcMfuSAp/~/changes/326/app-development/tbtc-v2/tbtc-sdk/guides/initialize-sdk - Update subgraphs and TBTC testnet scan website (https://testnet.tbtcscan.com/) to point to Sepolia (or allow to switch between Görli and Sepolia) - (repo link)
- Adjust governable parameters in contracts to make testing easier:
- Update wallet creation parameters to allow creating wallets one after another without delay
- Updatee DKG parameters to reduce approval time from 48 hours to 10 minutes and reduce the timeout to quickly terminate DKGs in case of failures
- Reduce optimistic minting delay to 1 hour (needs to be finalized)
- Authorize our minter and guardian
- Configure SepoliaLightRelay to accept testnet SPV proofs
- Fund the reimbursement pool with 5 ETH
- Fund maintainer account with 1 ETH
- Fund minter and guardian with 1 ETH
- Deploy goerli-based dApp under a separate domain, e.g. dashboard-goerli.test.threshold.network
- Update mentions of
GoerliLightRelay
inkeep-core
to mention also SepoliaLightRelay - Replace mentions ofGoerliLghtRelay
withSepoliaLightRelay
keep-core#3730 - Update client config, apply - Adjust deployments to Sepolia testnet keep-core#3741
- Update maintainer config, apply (SPV maintainer compatible with Bitcoin testnet and
SepoliaLightRelay
contract keep-core#3742) - Update
optimistic-minting
configuration (https://github.com/keep-network/optimistic-minting/pull/101) - Update monitoring (Add support for Sepolia testnet in monitoring tbtc-v2#754)
- Adjust dApp to use Sepolia-based contracts (similarly to Add support for deployment on Goerli testnet token-dashboard#138) - Support deployment on Sepolia token-dashboard#605
- Distribute SepoliaETH (or inform about the faucet) to devs that need it
- Perform cleanup once we confirm everything works smoothly and Görli gets deprecated:
- remove the Hardhat, CI configuration relating to Görli testnet:
- Remove support for Goerli testnet keep-core#3746
- Remove support for Goerli testnet #160
- Remove support for Goerli testnet keep-network/keep-common#119
- Remove support for Goerli testnet tbtc-v2#755
- Remove support for Goerli testnet token-dashboard#670
- Remove support for Goerli testnet merkle-distribution#102
- remove the Görli-related GH secrets
- remove mentions of Görli in documentation
- deprecate
goerli
-related NPM packages (we can also do a cleanup of other obsolete packages) - get rid of the goerli-based testnet dApp and domain
- remove the Hardhat, CI configuration relating to Görli testnet:
- Adjust
optimistic-minting
's integration tests for Sepolia contracts