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 #151

Merged
merged 7 commits into from
Sep 19, 2023
Merged

Support deployment on Sepolia #151

merged 7 commits into from
Sep 19, 2023

Conversation

michalinacienciala
Copy link
Contributor

@michalinacienciala michalinacienciala commented Sep 5, 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, 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.

Refs:
#150
keep-network/ci#48
keep-network/keep-core#3706
keep-network/tbtc-v2#691
threshold-network/token-dashboard#605

TODO:

  • Configure secrets:
TESTNET_ETH_CONTRACT_OWNER_PRIVATE_KEY
DAPP_DEV_TESTNET_ETH_CONTRACT_OWNER_PRIVATE_KEY
SEPOLIA_ETH_HOSTNAME_HTTP

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.
There is no scenario were we wouldn't need to provide an `environment` when
manually triggering the workflow run.
We don't need to differenciate between Sepolia and Goerli secrets storing
private keys of the deployers - in both cases we're using the same deployer
address.
We're using the same address to deploy Keep and Threshold contracts on Sepolia
as on Goerli.
The Ropsten testnet is depracated.
We've been using the same account to deploy Keep and Threshold contracts
(both on Goerli and Sepolia).
@michalinacienciala
Copy link
Contributor Author

@lukasz-zimnoch, I've realized I was missing some changes in order to make a successful deployment and added a couple of commits (and verified locally that contracts now deploy on Sepolia). I wasn't 100% sure if the files in .external/sepolia can be just copied from the keep-core deployment or should I do any changes to them (e.g. remove address or networks) - I did no changes and the deployment worked - but if there's some reason I should remove some data, please let me know.
Also, if you have the right privileges (I still am missing them), could you set the environment variables listed in the TODO section of the PR summary?

@michalinacienciala michalinacienciala marked this pull request as ready for review September 13, 2023 22:16
@lukasz-zimnoch
Copy link
Member

lukasz-zimnoch commented Sep 19, 2023

@lukasz-zimnoch, I've realized I was missing some changes in order to make a successful deployment and added a couple of commits (and verified locally that contracts now deploy on Sepolia). I wasn't 100% sure if the files in .external/sepolia can be just copied from the keep-core deployment or should I do any changes to them (e.g. remove address or networks) - I did no changes and the deployment worked - but if there's some reason I should remove some data, please let me know. Also, if you have the right privileges (I still am missing them), could you set the environment variables listed in the TODO section of the PR summary?

Normally, those files should be copied from the keep-core Sepolia deployment info. This project uses them as a reference to the legacy Keep contracts. If they are copied from https://www.npmjs.com/package/@keep-network/keep-core/v/1.8.1-sepolia.0 I think we are good. Just make sure they have the address field. I see that is the case for Goerli artifacts and those for Sepolia have networks.11155111.address which is a bit different. But if that works then 🤷 - maybe some changes in our Hardhat configs were done in the meantime.

EDIT: You can make sure the external contract addresses are resolved properly by console logging KeepTokenStaking.address in the deploy/07_deploy_token_staking.ts file during deployment

@michalinacienciala
Copy link
Contributor Author

If they are copied from https://www.npmjs.com/package/@keep-network/keep-core/v/1.8.1-sepolia.0 I think we are good.

Yes, the are.

I see that is the case for Goerli artifacts and those for Sepolia have networks.11155111.address which is a bit different. But if that works then 🤷 - maybe some changes in our Hardhat configs were done in the meantime.
EDIT: You can make sure the external contract addresses are resolved properly by console logging KeepTokenStaking.address in the deploy/07_deploy_token_staking.ts file during deployment

Confirmed, the right TokenStaking address was used (0x91Fe7128f74dBd4F031ea3D90FC5Ea4DCfD81818).

Package deployed and published successfully: https://www.npmjs.com/package/@threshold-network/solidity-contracts/v/1.3.0-sepolia.0.
I think we can merge once we have the secrets set up.

@lukasz-zimnoch lukasz-zimnoch merged commit faf4a93 into main Sep 19, 2023
12 checks passed
@lukasz-zimnoch lukasz-zimnoch deleted the support-sepolia branch September 19, 2023 13:59
lukasz-zimnoch added a commit to keep-network/keep-core that referenced this pull request 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 pull request 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants