Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support deployment on Sepolia #150

Closed
68 of 99 tasks
michalinacienciala opened this issue Jul 26, 2023 · 2 comments
Closed
68 of 99 tasks

Support deployment on Sepolia #150

michalinacienciala opened this issue Jul 26, 2023 · 2 comments
Assignees

Comments

@michalinacienciala
Copy link
Contributor

michalinacienciala commented Jul 26, 2023

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:
image
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?

@michalinacienciala
Copy link
Contributor Author

michalinacienciala commented Sep 13, 2023

Documenting some decisions and steps of the process:

Deployer account
We decided to deploy the non-dapp-dev contracts on Sepolia using the 0x68ad60CC5e8f3B7cC53beaB321cf0e6036962dBc account. This is an account that was also used for Goerli deployment. We'll use it to deploy both Keep (v1, v2) and Threshold contracts.

Deploying legacy v1 Keep contracts
As some of the legacy projects are deprecated, we didn't commit the changes needed for Sepolia deployment to the repos. Only did this for keep-core project.
Here is the list of updates that was done in the deprecated projects to publish the NPM packages:

nvm use 16
npm ci
CHAIN_API_URL=... CONTRACT_OWNER_ACCOUNT_PRIVATE_KEY=... npx truffle migrate --reset --network sepolia
mkdir -p artifacts
cp -r build/contracts/* artifacts/

then updated the package version in the package.json to 1.8.1-sepolia.0 and then:

npm publish --access=public --dry-run --tag sepolia
npm publish --access=public --tag sepolia          # required running `npm addr` first
  • keep-ecdsa: updated truffle-related dependencies using Node.js v16, added sepolia config in solidity/truffle.js and then in the solidity folder:
nvm use 16
npm ci
npm install --save-exact @keep-network/keep-core@1.8.1-sepolia.0
CHAIN_API_URL=... CONTRACT_OWNER_ACCOUNT_PRIVATE_KEY=... npx truffle migrate --reset --network sepolia
mkdir -p artifacts
cp -r build/contracts/* artifacts/

then updated the package version in the package.json to 1.9.0-sepolia.0 and then:

npm publish --access=public --dry-run --tag sepolia
npm publish --access=public --tag sepolia
  • tbtc: updated truffle-related dependencies using Node.js v16, added sepolia config in solidity/truffle-config.js, modified 2_deploy_contracts.js to deploy TestnetRelay for Sepolia and then in the solidity folder:
nvm use 16
npm ci
npm install --save-exact @keep-network/keep-ecdsa@1.9.0-sepolia.0
npx truffle migrate --reset --network sepolia

then updated the package version in the package.json to 1.1.2-sepolia.0 and then:

npm publish --access=public --dry-run --tag sepolia
npm publish --access=public --tag sepolia

lukasz-zimnoch added a commit to keep-network/keep-core that referenced this issue Sep 13, 2023
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](https://github.com/eth-clients/holesky), however it's not yet
available - it's planned it will become widely accessible on Sep 15,
2023
([source](https://everstake.one/blog/new-ethereum-testnet-holesky-all-you-need-to-know-now)).
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.

As part of the process we need to deploy the legacy Keep contracts on
Sepolia. This PR contains changes needed for such deployment of the
`keep-core` contracts.
Package published using this code:
https://www.npmjs.com/package/@keep-network/keep-core/v/1.8.1-sepolia.0.

Refs: threshold-network/solidity-contracts#150
lukasz-zimnoch added a commit to keep-network/keep-core that referenced this issue Sep 25, 2023
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](https://github.com/eth-clients/holesky), however it's not yet
available - it's planned it will become widely accessible on Oct 1, 2023
([source](https://everstake.one/blog/new-ethereum-testnet-holesky-all-you-need-to-know-now)).
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.

Refs:
threshold-network/solidity-contracts#150
keep-network/ci#48
threshold-network/solidity-contracts#151
keep-network/tbtc-v2#691
threshold-network/token-dashboard#605

- [ ] Update `TESTNET_ETH_CONTRACT_OWNER_PRIVATE_KEY` so that it is
prefixed with `0x`
lukasz-zimnoch added a commit to keep-network/tbtc-v2 that referenced this issue Oct 24, 2023
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](https://github.com/eth-clients/holesky), however it's not yet
available - it's planned it will become widely accessible on Oct 1, 2023

([source](https://everstake.one/blog/new-ethereum-testnet-holesky-all-you-need-to-know-now)).
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.

Refs:
threshold-network/solidity-contracts#150
keep-network/ci#48
threshold-network/solidity-contracts#151
keep-network/keep-core#3706
threshold-network/token-dashboard#605
michalsmiarowski added a commit to keep-network/tbtc-v2 that referenced this issue Nov 14, 2023
Refs: threshold-network/solidity-contracts#150

We are slowly moving to our new Sepolia testnet. Contracts are already
deployed there. It is a good time to add Sepolia testnet support to the
SDK.

Artifacts were taken from the following npm packages:
- `@keep-network/tbtc-v2@sepolia`
- `@keep-network/ecdsa@sepolia`
michalinacienciala added a commit to keep-network/keep-core that referenced this issue Nov 21, 2023
Refs: threshold-network/solidity-contracts#150

Here we are making all adjustments required to switch `keep-test` to
Sepolia contracts
michalinacienciala added a commit to keep-network/tbtc-v2 that referenced this issue Nov 23, 2023
Refs: threshold-network/solidity-contracts#150

Here we adjust the tBTC v2 monitoring tool to the new Sepolia testnet.
michalinacienciala added a commit to threshold-network/merkle-distribution that referenced this issue Jan 10, 2024
Remove support for Goerli testnet

As the Goerli testnet will become deprecated with end of year 2023 and we've already migrated to Sepolia testnet, we'll no longer need the Goerli-related code past that date.

Ref: threshold-network/solidity-contracts#150
@michalinacienciala
Copy link
Contributor Author

As the main objective of this Issue was fulfilled (we moved the crucial components to Sepolia) and task was becoming hard to manage due to many subtasks, we decided to close this one and create a new one, just for the outstanding/blocked tasks: #163.

lukasz-zimnoch added a commit to keep-network/keep-core that referenced this issue Jan 29, 2024
As the Goerli testnet will become deprecated with end of year 2023 and
we've already migrated to Sepolia testnet, we'll no longer need the
Goerli-related code past that date.

Ref: threshold-network/solidity-contracts#150
lukasz-zimnoch added a commit to keep-network/tbtc-v2 that referenced this issue Jan 29, 2024
As the Goerli testnet will become deprecated with end of year 2023 and
we've already migrated to Sepolia testnet where we could, we'll no
longer need the Goerli-related code past that date.

[UPDATE post-2023]: As Wormhole does not support Sepolia-base L2 chains
yet, we decided to still use Goerli for the cross-chainp rojects (Goerli
it's still live, despite EOL planned for 2023 EOY). So we're not
removing Goerli config from the cross-chain projects - we will handle
that in a later date (once Wormhole supports Sepolia L2s or Goerli
becomes unusable).

Ref: threshold-network/solidity-contracts#150
lukasz-zimnoch added a commit to keep-network/tbtc-v2 that referenced this issue Feb 19, 2024
The Goerli testnet currently used by Threshold/Keep for development
purposes was planned to become deprecated with the end of year 2023.
Although it's already 2024, the testnet is still live, but it will loose
validators over the time and may become unusable at some point. The
testnet that was created to replace it is called
[Holešky](https://github.com/eth-clients/holesky), however it will take
some time until it gets integrated with by some of the projects we rely
on. 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.

The Goerli -> Sepolia migration means that also L2 testnet based on
Goerli (Optimism Goerli) needs to be migrated to Sepolia-based chain
(Optimism Sepolia). In this PR we're adjusting the config used to deploy
testnet contracts in the `@keep-network/tbtc-v2-arbitrum` project. After
the update, both deploy to `optimismGoerli` and `optimismSepolia`
networks will be supported (we may remove `optimismGoerli` support once
we're sure the `optimismSepolia` deployment works as expected).

TODO
- [x] Add `external/optimismSepolia/OptimismWormholeTBTC.json` - in
order to get the address we need to perform attestation of the Ethereum
Sepolia TBTC token on Optimism Sepolia (but atm Optimism Sepolia is not
available on the list of target networks on
https://wormhole-foundation.github.io/example-token-bridge-ui/#/register)

Ref: threshold-network/solidity-contracts#150
lukasz-zimnoch added a commit to keep-network/tbtc-v2 that referenced this issue Feb 19, 2024
The Goerli testnet currently used by Threshold/Keep for development
purposes was planned to become deprecated with the end of year 2023.
Although it's already 2024, the testnet is still live, but it will loose
validators over the time and may become unusable at some point. The
testnet that was created to replace it is called
[Holešky](https://github.com/eth-clients/holesky), however it will take
some time until it gets integrated with by some of the projects we rely
on. 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.

The Goerli -> Sepolia migration means that also L2 testnet based on
Goerli (Base Goerli) needs to be migrated to Sepolia-based chain (Base
Sepolia). In this PR we're adjusting the config used to deploy testnet
contracts in the `@keep-network/tbtc-v2-arbitrum` project. After the
update, both deploy to `baseGoerli` and `baseSepolia` networks will be
supported (we may remove `baseGoerli` support once we're sure the
`baseSepolia` deployment works as expected).

TODO
- [x] Add `external/baseSepolia/BaseWormholeTBTC.json` - in order to get
the address we need to perform attestation of the Ethereum Sepolia TBTC
token on Base Sepolia (but atm Base Sepolia is not available on the list
of target networks on
https://wormhole-foundation.github.io/example-token-bridge-ui/#/register)

Ref: threshold-network/solidity-contracts#150
lukasz-zimnoch added a commit to keep-network/tbtc-v2 that referenced this issue Feb 19, 2024
The Goerli testnet currently used by Threshold/Keep for development
purposes was planned to become deprecated with the end of year 2023.
Although it's already 2024, the testnet is still live, but it will loose
validators over the time and may become unusable at some point. The
testnet that was created to replace it is called
[Holešky](https://github.com/eth-clients/holesky), however it will take
some time until it gets integrated with by some of the projects we rely
on. 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.

The Goerli -> Sepolia migration means that also L2 testnet based on
Goerli (Arbitrum Goerli) needs to be migrated to Sepolia-based chain
(Arbitrum Sepolia). In this PR we're adjusting the config used to deploy
testnet contracts in the `@keep-network/tbtc-v2-arbitrum` project. After
the update, both deploy to `arbitrumGoerli` and `arbitrumSepolia`
networks will be supported (we may remove `arbitrumGoerli` support once
we're sure the `arbitrumSepolia` deployment works as expected).

TODO
- [x] Add `external/arbitrumSepolia/ArbitrumWormholeTBTC.json` - in
order to get the address we need to perform attestation of the Ethereum
Sepolia TBTC token on Arbitrum Sepolia (but atm Arbitrum Sepolia is not
available on the list of target networks on
https://wormhole-foundation.github.io/example-token-bridge-ui/#/register)

Ref: threshold-network/solidity-contracts#150
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant