Ethereum Gateway expands to post-merge testnets

Cloudflare's Ethereum Gateway now supports the Görli and Sepolia testnets, along with the Ethereum Merge on the mainnet network. The testnets run the same Ethereum protocol as mainnet, but with Ether that carries no value. This lets developers exercise full decentralized applications or rehearse mainnet upgrades in a low-stakes environment before deployment.

Both testnets have already been through their own merge events. Görli successfully completed the Görli-Prater merge, converting to Proof of Stake, while Sepolia transitioned to Proof of Authority. Cloudflare's testnet gateway handled the Görli merge without incident.

Consensus mechanisms, compared

Proof of Work, Ethereum's original consensus mechanism, relies on miners racing to solve cryptographic puzzles in order to append blocks and collect rewards. The difficulty of the puzzles scales with total network processing power, which historically drove adoption of specialized hardware like ASICs and GPUs. Ethereum's mining network currently consumes more than 80 terawatt-hours per year — more than Chile. That energy profile is difficult to justify as cryptocurrency and web3 usage grows.

Proof of Stake replaces mining with staking. Validators lock up a specified amount of cryptocurrency to run nodes that propose and validate blocks. One validator is randomly selected as proposer for each slot, while a committee of validators checks the proposed block. Validators who act dishonestly or go offline get their stake slashed. The Ethereum Foundation estimates the post-merge network will consume 99.95% less electricity than Proof of Work, and validators also carry a financial incentive to keep the chain healthy.

Proof of Authority is similar to Proof of Stake in that validators propose and validate blocks, but becoming a validator requires approval from an authority node rather than staking funds. It is uncommon for public blockchains, though it is used in trusted settings such as corporate or government internal networks. Cloudflare currently operates one authority node for the deprecated Rinkeby testnet.

Inside the gateway

The Ethereum Gateway lets customers talk to the Ethereum network over JSON-RPC without running their own node. Requests first hit a Cloudflare Worker, which normalizes calls using the latest block number it knows. The Worker forwards the request to a Load Balancer matched to the requested network, and the Load Balancer sends it to Ethereum Node proxies running in Cloudflare's Kubernetes cluster. Those proxies queue and route calls to synced nodes holding the requested block.

Each Ethereum node now pairs an execution client with a consensus client. The consensus client was added ahead of the merge to handle Proof of Stake duties, and redundant proxy and node instances ensure speed and availability.

Preparing for the merge

The Ethereum Merge transitions consensus from Proof of Work to Proof of Stake by fusing the existing Ethereum blockchain with the Beaconchain, a Proof of Stake chain. The switch happens when the Terminal Total Difficulty (TTD) is reached. After the merge, every new block is linked to a Beaconchain slot, while the blockchain itself continues to process transactions and execute smart contracts. Later upgrades such as sharding are expected to build on the merged architecture.

Node operators needed to add a consensus client such as Prysm or Lighthouse alongside their execution client before the transition. Without one, a node's copy of the blockchain stops syncing and the execution client stalls on the final pre-merge block.

For customers, the change is transparent. The gateway documentation describes how to create an Ethereum gateway and point it at either sepolia or goerli by editing the network name in the URL. A testnet call such as eth_blockNumber works exactly as it would on mainnet, but minus the financial risk of a faulty deployment.

Rinkeby deprecation

Cloudflare is also deprecating its Rinkeby signer, a node with public address 0xf10326c1c6884b094e03d616cc8c7b920e3f73e0 operated in support of the Ethereum ecosystem. Rinkeby testnet support will end on January 15, 2023, matching the Ethereum Foundation's plan to sunset the network. Product documentation remains the reference for building on the web3 gateways.