Ethereum Bridge Builder Mikhail Kalinin on Designing The Merge Transition Mechanism and Almost Missing Out

Ethereum Bridge Builder Mikhail Kalinin on Designing The Merge Transition Mechanism and Almost Missing Out

An early idea was to shut Ethereum down for eight hours to switch it to proof of stake, but Mikhail Kalinin knew it could be done seamlessly

With help from Vitalik Buterin the devs and Kalinin decided to use a Terminal Total Difficulty value to cue the change to PoS

It’s not often that international immigration officials deliver in the nick of time, but the last-minute approval of a visa in 2019 to enter Canada from Russia turned out to have a profound effect on Mikhail Kalinin’s career as an Ethereum developer.

He’d come west from his home in Omsk, which is in Siberia, to Moscow, to apply for the visa so he could attend the all-hands-on-deck meeting in rural Ontario where the future of the most-used blockchain would be mapped out in person by more than 30 Ethereum developers.

“I received my visa one day before the flight and if I hadn’t gone to Canada, I likely wouldn’t have joined ConsenSys. And if that didn’t happen, I wouldn’t be working on the merge,” he said to me. 

The merge refers colloquially to the process of moving the Ethereum blockchain from a proof of work consensus system to one that uses proof of stake. It’s the most important – and complicated – upgrade to Ethereum since its origin in 2015, has been in the works for more than five years and is expected to happen in the next few months. The risk of failure or a glitch in the switch-over has only been heightened in recent weeks as a broad crash in crypto prices has left many in the community jittery and risk adverse. At least, for now.

Of all the developers working on the merge, however, Kalinin has a special place. He’s been instrumental in designing the actual mechanism that will switch – in real time – Ethereum’s $145 billion network from its current consensus system to an entirely new one. If he’s nervous about it, it didn’t show when I spoke to him from the Middle East in early June.

“I became a fan of Ethereum because it allows you to develop yourself, it allows you to do what you really like,” Kalinin said. What Kalinin has always liked is deep research. While a student at the Siberia Automobile and Highway Academy he was able to zero in on computer science ideas where he had some knowledge already but knew there was much more to understand. After graduating in 2009 he became a Java programmer who used UpWork to find jobs. 

Then in 2015 one of the more controversial and confounding characters in early crypto, Roman Mandeleil, found Kalinin on UpWork and hired him to write an Ethereum client in the Java programming language. Mandeleil founded the hackathon and education provider EtherCamp, which raised millions in a token sale in 2016.

“And then Roman disappeared,” Kalinin said. Undaunted, he reached out to Vitalik Buterin, the inventor of Ethereum, to see what he thought of the Java Ethereum client. Buterin like the client, called EthereumJ, and Kalinin went on to work on a part of early proof of stake research called Casper the Finality Gadget.

A Reddit thread from 2018

He met Danny Ryan around this time, who was working on the Ethereum client in the Python language. After a failed attempt to get the wider community on board with their Casper approach, the devs knew they needed a change in course.

“The decision was made to build a new chain, basically to create Ethereum 2.0,” Kalinin said. “It was the right way of doing it. We couldn’t do this on the [Ethereum Virtual Machine, the current Ethereum protocol]. What the EVM can provide was not enough to build on top of it.”

Out of that realization the Beacon Chain was born. It’s the link to the new proof of stake consensus system and went live in 2020. Validators on its network stake a certain amount of Ethereum to take part in securing and verifying the latest transactions, all in return for free Ether. As of mid-June, the Beacon Chain is holding about 12.8 million Ether, worth $14.1 billion.

Having built clients for both the Eth 1 and Eth 2, Kalinin knew he was in a good position to work on how to transition the protocol.

“Let’s have a bridge between Eth 1 and Eth 2,” he said. He worked with Buterin and Ryan and others at ConsenSys “so I was not working from scratch,” he said.

An early idea was to shut Eth 1 down for eight hours to make the switch to Eth 2 but Kalinin knew he could do better.

The Ethereum dev meeting north of Toronto in Sept. 2019 photo: Danny Ryan

“I was like, we should do this seamlessly, that was my impression,” Kalinin told me. He modified the Teku Ethereum client to work in this new manner and knew he was making progress. Then a proposal by Buterin to replace the sharding in Ethereum with roll-ups, which aggregate transactions off-chain, made the transition process from Eth 1 to Eth 2 much simpler, Kalinin said.

“I was like, ok, cool,” he said. “In terms of the merge, it simplified a lot.” The main testnet for Ethereum is called Ropsten, and it transitioned from Eth 1 to the Beacon chain earlier this month. It took 30 seconds to stop making the last proof-of-work block and make the first proof-of-stake block, Kalinin said.

If you’re still with me, the last part of the transition Kalinin helped devised gets a bit technical. The trigger to implement the merge is a blockchain function known as terminal total difficulty, or TTD. Here’s a good description of what will happen from The Rockaway Blockchain Fund: “Once a block with total difficulty larger than TTD is produced, it’s considered the final [proof of work] block. Subsequent blocks will be produced and attested to by the validators on the Beacon Chain and The Merge is finished.”

With help from Buterin, devising the merge transition left him with a sense of completion. “It felt like the last brick in the wall,” he said. Kalinin celebrated the Ropsten merge, which he said was “a huge milestone.”

Up next, the main-net Ethereum merge transition. If the Ropsten merge continues to work well, as it has so far at least, Kalinin will want to push for the Main net merge to be done in August, he said.

“I feel like now I’m port of this research community,” he said. “I’m lucky to have the chance to work with Vitalik and Danny and others.”

From the classroom at the Siberia Automobile and Highway Academy to watching and waiting for the biggest blockchain upgrade in history, Kalinin has made crucial contributions to how Ethereum is moving forward. Still, he said the work will only really begin once the merge is done.

“It’s a huge shift in understanding of how Ethereum may be improved in the future,” he said.