Today, we are excited to announce that our Ethereum gateways now support the Görli and Sepolia test networks (testnets), and are fully prepared for the Ethereum Merge. These testnets allow developers to test and build decentralized applications (dapps) or trial upgrades before deploying them on the Ethereum mainnet. Like the mainnet, these testnets use the Ethereum protocol, but the Ether used on them has no real-world value.
The Ethereum Merge represents a major upgrade to the Ethereum network, transitioning its consensus mechanism from Proof of Work to Proof of Stake. This shift significantly reduces energy consumption and enhances network efficiency.
Understanding Consensus Mechanisms
Proof of Work
Proof of Work (PoW) is the original consensus algorithm used by Ethereum and popularized by Bitcoin. In this system, miners compete to solve complex mathematical puzzles. The first to solve the puzzle gets to add a new block to the blockchain and receives a reward.
While initially seen as a way to promote decentralization, PoW has led to the rise of specialized, energy-intensive hardware. The security of PoW comes at a high environmental cost—the Ethereum network under PoW consumed more energy annually than some entire countries.
Proof of Stake
Proof of Stake (PoS) is a more sustainable consensus mechanism. Instead of miners, validators are chosen to propose and validate new blocks based on the amount of cryptocurrency they have "staked" as collateral.
Validators are incentivized to act honestly. If they behave maliciously or go offline, a portion of their stake can be "slashed." The Ethereum Foundation estimates that PoS will use 99.95% less energy than PoW, making it far more environmentally friendly.
Proof of Authority
Proof of Authority (PoA) is similar to PoS but uses a permissioned validator model. Validators are approved by a central authority rather than staking cryptocurrency. This model is less common for public blockchains but is often used in private, trusted environments like corporate or government networks.
Cloudflare previously operated an authority node for the Rinkeby testnet, which is now deprecated.
The Ethereum Merge Explained
The Ethereum Merge combines the existing Ethereum blockchain (the execution layer) with the Beacon Chain (the consensus layer). This integration shifts the entire network from PoW to PoS.
The merge occurs when the network reaches a specific Total Terminal Difficulty (TTD). After this point, validators on the Beacon Chain take over block production and validation.
Node operators must prepare for the merge by running both an execution client (like Geth) and a consensus client (such as Prysm or Lighthouse). Failure to do so will result in their nodes falling out of sync once the merge is complete.
This upgrade also paves the way for future improvements, such as sharding, which aims to increase transaction throughput and reduce fees.
Using Cloudflare’s Ethereum Gateway
Cloudflare’s Ethereum Gateway allows developers to interact with the Ethereum network without managing their own nodes. The gateway is built using Cloudflare’s own technologies, including Workers and Load Balancers, ensuring low latency and high reliability.
When a JSON-RPC request is made, it is first processed by a Worker, which normalizes the query. The request is then forwarded via a Load Balancer to a cluster of Ethereum node proxies. These proxies distribute requests to synced nodes, each consisting of both an execution client and a consensus client.
This architecture ensures high availability, speed, and geographic distribution for all requests.
Accessing Görli and Sepolia Testnets
Cloudflare has integrated support for the Görli and Sepolia testnets into its Ethereum Gateway. To use these testnets, simply replace mainnet in your gateway URL with sepolia or goerli.
For example, to check the network version of the Sepolia testnet:
curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc": "2.0", "method": "net_version", "params": [], "id": 35}' https://your-gateway-url/v1/sepoliaThis will return a response indicating the network ID for Sepolia.
Using these testnets allows you to safely test smart contracts and dapps without risking real assets or affecting the mainnet.
Deprecation of Rinkeby Testnet
Following the Ethereum Foundation’s decision, Cloudflare will deprecate support for the Rinkeby testnet. The Rinkeby signer (public address: 0xf10326c1c6884b094e03d616cc8c7b920e3f73e0) will be discontinued, and support will end on January 15, 2023. Developers are encouraged to migrate to Görli or Sepolia.
Benefits of Using Testnets
Testnets provide a risk-free environment for development and testing. They allow you to:
- Debug smart contracts without spending real Ether.
- Simulate mainnet conditions and upgrades.
- Ensure compatibility and functionality before deployment.
By leveraging Cloudflare’s gateways, you can access these testnets easily without managing your own infrastructure.
👉 Explore testnet integration tools
Frequently Asked Questions
What is the difference between Görli and Sepolia testnets?
Both are Ethereum testnets used for testing dapps and contracts. The key difference lies in their consensus mechanisms and validator sets. Sepolia uses a permissioned validator model, while Görli is open to more participants.
How does the Ethereum Merge affect developers?
The Merge changes the consensus mechanism but does not break existing smart contracts or dapps. Developers should test their applications on testnets to ensure compatibility with the new PoS model.
Why is Proof of Stake more efficient than Proof of Work?
Proof of Stake eliminates the need for energy-intensive mining. Validators are chosen based on their staked Ether, reducing energy consumption by over 99%.
Can I still use the Rinkeby testnet?
Rinkeby is deprecated and will not be supported after January 2023. Migrate to Görli or Sepolia for continued testing.
How do I switch to a testnet using Cloudflare’s gateway?
Replace mainnet in your endpoint URL with goerli or sepolia. The API methods remain the same.
Is there a cost to using Cloudflare’s Ethereum Gateway?
Cloudflare offers access to both mainnet and testnets through its gateway. Check the official documentation for details on pricing and limits.
Conclusion
The addition of Görli and Sepolia testnet support to Cloudflare’s Ethereum Gateway provides developers with robust tools for testing and development. The upcoming Ethereum Merge marks a significant step toward a more scalable and sustainable blockchain.
By using these testnets, you can ensure that your dapps are secure, efficient, and ready for the future of Ethereum.