How to Migrate from Ropsten to Goerli
With the recent deprecation of the Ropsten test network, and the upcoming deprecation of the Rinkeby testnet, developers should be prepared to migrate dApps off of testnets that will not be supported after the Ethereum merge. Before Ethereum's existing Proof-of-Work blockchain merges with the new Proof-of-Stake Beacon Chain, dApps should deploy their smart contracts on the Goerli testnet which will be maintained after The Merge is complete.
Testnets are important web3 developer tools for testing the smart contracts used in decentralized applications and the configurations of nodes running various types of client software. With the Ethereum Merge timeline underway, the recommended testnets that engineers should use are changing.
What testnets are being deprecated?
To date, the primary testnets that have been deprecated include Kovan, Ropsten, and Kintsugi. Rinkeby will be deprecated later this year, and the Prater testnet will be merged with Goerli. The Sepolia testnet will continue to be maintained after the merge so client developers can continue to test their nodes.
Alchemy will support the Ropsten and Kovan testnets until July 1st, 2022. Both of these testnets have already been deprecated by the Ethereum Foundation and the larger Ethereum community. Kovan has been deprecated for the last year, whereas the Ropsten testnet recently completed its merge on June 8th as a planning exercise ahead of the mainnet merge, which is expected to happen later this year.
What happens after a testnet is deprecated?
After a testnet is deprecated, no additional client updates will be provided by the community, and the software used to run testnet nodes will not actively be maintained. This means these networks will no longer serve as a safe or accurate environment for testing applications.
Once a testnet is on the deprecation path, while some node infrastructure providers might continue running nodes, they will eventually lose parity with the Ethereum Virtual Machine (EVM). In other words, the EVM execution will drift apart from the production EVM execution environment on mainnet.
Because Ropsten and Kovan are no longer actively maintained, they are no longer good places to test smart contracts.
What is the difference between deprecated and sunset?
Deprecation means a testnet will no longer be supported by the community, whereas sunset means the testnet no longer exists (i.e. there are no longer nodes running the network). Ropsten and Kovan are not sunset yet, but they are deprecated, which means no more upgrades or bug fixes will be deployed to maintain the node client software.
What testnets should I use instead of Ropsten?
The two testnets that Alchemy and the Ethereum Foundation recommend using are Goerli and Sepolia. These two testnets will be maintained after The Merge, and it is where dApp and client developers should migrate to from Ropsten, Kovan, and Rinkeby.
For Ethereum application developers building dApps like DeFi protocols, NFT marketplaces, and web3 projects, Goerli is the recommended testnet. This will be the majority of builders in the web3 space.
For engineers building, maintaining, and testing node client software, Sepolia is the recommended testnet to use during and after the merge because it is a Proof-of-Work (PoW) testnet that most similarly reflects the current state of the Ethereum mainnet.
Although the Rinkeby testnet won't be deprecated until later in 2022, it is recommended that web3 development teams using Rinkeby start planning, testing, and re-deploying their contracts to the Goerli testnet as well.
How to Migrate from Ropsten to Goerli
To migrate from Ropsten to the Goerli testnet create a new app in the Alchemy dashboard for the Ethereum blockchain and the Goerli test network.
Then, copy the Goerli RPC URL for your app. This is what the new Goerli RPC URL will look like: https://eth-goerli.alchemyapi.io/v2/<your api key>
Once you've created a new Goerli RPC URL, get goETH from a Goerli faucet. This fake ETH will be used to pay for transaction on the Goerli testnet.
Now that you have goETH, deploy your smart contract in your new Goerli app with Alchemy the same way you deployed your Ropsten app.
Once your app is deployed on Goerli, you can run tests, fine-tune code, and iterate on your product the same way you did when testing dApps on other testnets.
Things to Consider Before Migrating from Ropsten to Goerli
Before migrating smart contracts from Ropsten to Goerli, dApp developers should consider their:
1. Product roadmap
2. Upcoming deadlines
3. Testing and verification needs
4. Smart contract dependencies
By considering these four areas, engineers can ensure their dApps work as they are expected to work on Goerli, and complete the migration from Ropsten before the deprecated testnet begins to lose parity with Ethereum.