Andrei Dragnea shares insights on the challenges of building a blockchain with parallel architecture and what benefits this model presents.
Scalability is one of the three components of the Blockchain Trilemma described by Ethereum co-creator Vitalik Buterin, and one of the biggest challenges for blockchain-based infrastructures. Andrei Dragnea, Software Engineer at Neon Foundation, explains to Crypto Briefing how parallel structures can make blockchains more scalable, the impact they have on the decentralized ecosystem and what are Neon EVM plans for this year.
Crypto Briefing – How does a parallel structure work?
Andrei Dragnea – Okay, good question. First of all, this [parallel structure] is a concept coming from the Solana blockchain. It’s not related necessarily to Neon. We just built on top of it. It refers to the fact that the first blockchains were developed with sequential behavior in mind, meaning that we have shared the blockchain across all the nodes in the network, and the transactions that add blocks to the chain are executed sequentially.
Only one transaction at a time can modify the blockchain. This worked well in the past and it still works, let’s say quite well, for Bitcoin and Ethereum, which are blockchains that execute transactions sequentially. But as we know, the transactions per second for Ethereum are in the order of, if I remember well, 20 transactions per second or something like that, which is not very good.
And this is why gas prices are very high on Ethereum at the moment. In comparison, Solana is built around the idea of being able to execute transactions that are not related to each other in parallel, or better said, concurrently. How it does that is that Solana is designed to allow this by forcing you to specify the accounts involved in a transaction as input to that transaction.
For example, in Solana, when you have a transaction, you have to specify all the input and output accounts and also if an account will be changed in that transaction or not. If you transfer some SOL from one account to another, those two accounts will need to be marked in that transaction. Otherwise, the transaction will fail. The runtime uses this information to see if it can execute two transactions that are not related to each other at the same time.
If I transfer to you some SOL and another friend of yours transfers to his friend some SOL, these two transactions are not related to each other. On Solana, they can execute at the same time, but on Ethereum they cannot. This is the main idea behind why Solana has better throughput and also lower gas costs, because it can do more at the same time.
Crypto Briefing – What are the challenges to implementing a parallel infrastructure when designing a blockchain? Are Solana’s outages a consequence of their parallel-based model?
Andrei Dragnea – I think it’s a general question because parallel processing in computing in general involves more complexity when it comes to actually implementing it. So there are more challenges and more places where things can go wrong.
This is also how computers evolved from running only one program at a time to multitasking on one processor, where the operating system would do very fast context switching between applications. And then we arrived today, where we have multiprocessor systems where actually applications can run in parallel.
The same is true in blockchain. Operating systems have become more and more complex to handle all this complexity behind the scenes. Solana’s runtime is quite complex and has many components that are responsible for handling this parallel transaction execution.
About the Solana mainnet outage from the middle of February, I read the report about what happened and while I cannot say that the bug was related to parallel processing, it was a consequence of the overall complexity that the system has related to parallel transaction execution.
That’s because you need to make sure that you don’t, for example, make invalid changes to invalid account states. There are multiple threads of execution trying to update the state of the accounts on the blockchain and you need to make sure that that state is accurate.
There are some general problems related to parallel computing or concurrent computing that make things even more complicated. Also, the blockchain by itself, without parallel processing, is quite complicated given the cryptographic concepts that are at hand, but even more so when it comes to parallel processing.
So the main challenges, in my opinion, are the general ones that come from parallel programming in general, and this is software complexity that causes these things.
Crypto Briefing – So, implementing a parallel structure is like going against the blockchain native standard. Is it a challenge like trying to make the Ethereum Virtual Machine (EVM) compatible with zero-knowledge technology?
Andrei Dragnea – This is a good example. As I said, the main difference between Ethereum and Solana is that, on Ethereum, the transaction execution is sequential. Only one transaction at a time can be executed.
On Solana, we can have multiple transactions executed at once if they don’t have a dependency between them, and what we try to do with Neon EVM is give the benefits of parallel transaction execution from Solana to Ethereum users.
Neon EVM is a Solana program. Basically, it’s a smart contract on Solana that implements the Ethereum Virtual Machine, which is a specification saying how Ethereum smart contracts behave and need to be executed. And we add our logic on top of this, in order to allow this kind of transfer or contract calls that I told you about. We have two unrelated entities that want to call unrelated contracts on Ethereum, and they have to execute these two transactions one after another.
On the Neon EVM, they can be executed concurrently. And how we do that is quite interesting because of the big architectural difference between Ethereum and Solana. On Solana, as I said, you need to specify the input accounts for the transaction when you build the actual transaction, as it’s required by the design of the transaction protocol in Solana.
But on Ethereum, you don’t have to do that. You just specify the smart contract that you want to call, and until you execute that transaction, you don’t know which other contracts will be called, because an Ethereum smart contract by itself can call other smart contracts, like in a tree of calls, like in a normal program.
To detect this on our side, on the EVM side, we first emulate those Ethereum transactions to see what actual calls would be made if the transaction were to be executed. Then, having that emulation result, we can build the actual Solana transactions that execute the Ethereum transaction behind the scenes.
We take an Ethereum transaction, emulate it in our Neon EVM system, and then we can build the Solana transactions that are the backbone of the original Ethereum transaction.
So basically an Ethereum transaction is broken down into multiple Solana transactions that are fed into the Neon EVM Solana program. It then executes those Solana transactions using the logic of the Ethereum Virtual Machine, and afterward, the Neon Virtual Machine builds up the results back.
The end user sees an Ethereum-compatible blockchain that looks exactly like Ethereum, but behind the scenes runs on top of Solana and has the features of being able to execute transactions faster in general and cheaper. So these are our main selling points: we execute Ethereum-looking transactions in a parallel environment backed by Solana, and also with lower gas costs backed by Solana.
Crypto Briefing – Given the complex parallelized infrastructure behind Neon EVM, what are the practical impacts for the end users?
Andrei Dragnea – The main impact for the end user is also the costs, but also the user experience when it comes to some kinds of apps that are not currently available to Ethereum users or are not very user-friendly. For example, using a decentralized exchange that is built on top of Ethereum can be very unpleasant, especially if it’s integrated with the mainnet, because transactions take a lot to settle and be mined. So you don’t have a real-time experience when you want to trade something.
On Neon EVM, they get executed immediately so you get real feedback for any kind of app that you build on top of this blockchain. Also, we want to expand into the gaming field too, and in the gaming field, you need real-time feedback if you want to integrate a blockchain in a game, because people in a game don’t like to wait for transactions to be settled.
It’s also about having an experience closer to real-time processing, and the lower gas costs are an important thing for the end user. I think the gas costs are the most immediate benefit, and the latency of transactions comes second, but they somehow go hand in hand.
That’s why transactions are cheaper: because they are faster to execute and not everyone waits for other transactions to execute first before yours, and that’s because of parallel execution.
Crypto Briefing – Ethereum gas prices have been very expensive in the last few days, which turned some investors to other blockchains, such as Solana. With the bull run in full throttle, do you believe this can benefit projects like Neon EVM?
Andrei Dragnea – It’s a very good question. I feel like it’s one of those moments when we can shine because people can see that other EVM chains can be fast and cheap, which is what everyone is looking for. For Bitcoin, I think it has a history behind it, and that’s why it’s very popular.
From a technical point of view, I feel like it’s limited from many points of view because it cannot support smart contracts. You cannot build an actual application on the blockchain with Bitcoin. We chose the Ethereum blockchain to port to Solana because Ethereum has the largest smart contract platform. It’s the biggest blockchain supporting smart contracts at the moment.
We wanted to offer developers the possibility to port their existing applications from Ethereum to Neon EVM with minimal to no changes. Using the same code they wrote for Ethereum, they can deploy on Neon EVM and it works exactly the same, and you access a new market there.
Also, all the bridging logic between our system and outside, like Solana SPL tokens and not only ERC-20 compatible tokens, should make us shine at this moment with all the blockchain hype recently.
We have all the things in place and ready for this, and we’ll see what people think.