NEON Lab第二次AMA(Second AMA of Neon Lab)

NEON Lab第二次AMA(Second AMA of Neon Lab)

Neon Lab:Virtual machine from Ethereum
Scalability and liquidity from Solana

Neon EVM

本翻译文章所展示的一切信息都只是为了学习和交流目的,不能也不应成为任何财务或投资建议。

(All content shown are for communication and learning purposes, cannot and should not be viewed as any form of Financial or Investment Advice)

NEON 代理 — 高维视野的解释 NEON PROXY — HIGH-LEVEL EXPLANATION

Probably most of you know what NeonEVM Platform is. But to be on the same page, I’d like to refresh some critical aspects of our platform.

可能大多数人都知道 Neon EVM 平台是什么。但为了让大家保持信息一致,我想更新一些我们平台关键方面(的信息)。

Generally speaking, NeonEVM consists of two significant parts NeonEVM program and NeonProxy.

NeonEVM Program is a smart contract deployed on Solana and NeonProxy is a separate decentralized module.

一般来说,NeonEVM 由 NeonEVM 程序和 Neon代理(Neon Proxy)两个重要部分组成。

NeonEVM Program 是部署在 Solana 上的智能合约,NeonProxy 是一个单独的去中心化模块。

As you know, NeonEVM allows running Ethereum dApps with no code modifications on Solana (with all benefits of it like high speed and low costs).

To make it possible, you, as dApps developers, need to deploy your smart contracts into the NeonEVM program and connect the wallet (like Metamask) to the NeonProxy. Instead of or in addition to the wallet, you can connect IDE (like Remix, Truffle, Hardhat) or Front-end UI.

如您所知,NeonEVM 允许(用户)无需修改代码就能在 Solana 上运行以太坊 dApp(具有高速和低成本等所有优点)。

为了实现这一点,作为 dApp 开发人员,您需要将智能合约部署到 NeonEVM 程序中,并将钱包(如 Metamask)连接到 NeonProxy。除了钱包之外,您还可以连接 IDE(如 Remix、Truffle、Hardhat)或前端 UI。

The execution of Ethereum-like transactions in NeonEVM takes place in several steps:

  1. You send an Ethereum-like transaction to the NeonProxy

  2. NeonProxy splits and packs single Eth-like Tx into several Solana Tx and sents them to the NeonEVM program on Solana

  3. NeonEVM program unpacks and executes Eth-like Tx

在 NeonEVM 中执行类以太坊交易分几个步骤进行:

  1. 你向 NeonProxy 发送类以太坊交易

  2. NeonProxy 将单个 类以太坊交易拆分打包成多个Solana交易发送到 Solana 上的 NeonEVM 程序

  3. NeonEVM 程序解包并执行类以太坊交易

To sum up, we implemented NeonProxy to execute Eth-like Tx as it used to be in the Ethereum world without any changes in dApps code.

总而言之,我们实现了 NeonProxy 来执行类以太坊交易,而无需对 dApps 代码进行任何更改,就像它曾经在以太坊世界中一样。

And the last point I want to clarify is that several Proxy Operators run NeonProxy. So it runs in decentralized mode.

Currently, we are going to Launch Alpha and Beta with a few professional whitelisted operators.

Further, we have plans to start the operator’s onboarding process and remove the operator’s whitelist at all in the future.

So, our primary goal is to run as many Proxy operators as possible to become fully decentralized.

我最后要澄清的一点是,有几个节点运营商运行NeonProxy。所以它以去中心化模式运行。

目前,我们将与一些专业的白名单运营商一起发布 Alpha 和 Beta。

此外,我们计划在未来启动运营商的引入流程并完全移除运营商的白名单。

因此,我们的主要目标是运行尽可能多的代理运营商,以实现完全去中心化。

深度聊聊技术 TECHNICAL DEEP DIVE

During the New Year holidays, the Neon Labs team did a global test of the Neon EVM.

新年期间,团队在全球范围内测试了Neon EVM。

After testing we found a number of problems, I will voice the most critical of them

测试期间我们找到了一些问题,我讲几个最重要的:

  1. It is very common for users to fail to execute their Neon transactions.

  2. The transaction execution speed isn’t high, despite the good performance of the Solana Cluster

  3. Users often cannot get a receipt for a completed Neon transaction.

  4. We have found that at some points the public Neon Proxy spends more than 200 SOL tokens in 4 hours.

  5. When we began to study the situation more deeply, we found that Neon Proxy creates a lot of empty accounts. It’s not good, because storing extra records in Solana’s state is expensive. As result, the transaction cost is expensive for users and operators.


  1. 用户无法执行他们的 Neon 交易,这很常见。

  2. 交易执行速度不高,尽管 Solana 集群(Cluster) 的性能不错

  3. 用户经常无法获得已完成 Neon 交易的回执。

  4. 我们发现,在某些时候,公共 Neon Proxy 在 4 小时内花费了 200 多个 SOL 代币。

  5. 当我们开始更深入地研究情况时,我们发现Neon Proxy创建了大量的空账户。这不是好兆头,因为在 Solana 的状态中存储额外的记录很昂贵。结果,交易成本对用户和运营商来说都很昂贵。

The Neon Proxy prepares Neon transactions for on-chain execution on the Solana cluster.

We also found a number of problems inside the Neon EVM program.

But today’s session is dedicated to what we did inside Neon Proxy, so we will talk about the Neon EVM program in another AMA session.

We love our community and we want to provide them with a really good product.

Therefore, we decided to refine our product so that working with it would be a pleasure.

NeonProxy为在 Solana 集群上的Neon 交易准备链上执行。

我们还在 Neon EVM 程序中发现了一些问题。

但是今天的会议专门讨论我们在 Neon代理(Neon proxy) 中所做的事情,因此我们将在另一个 AMA 会议中讨论 Neon EVM 程序。

我们热爱我们的社区,我们希望为他们提供非常好的产品。

因此,我们决定改进我们的产品,以便使用它时会成为一种乐趣。

What have we done?

Let’s have a few words about how it all works.

我们做了什么?

让我们谈谈这一切是如何运作的。

Neon transactions are complex transactions, they consist of many Solana transactions.

Neon 交易是复杂的交易,它们由许多 Solana 交易组成。

The thing is that Solana limits the number of resources for the execution of a single Solana transaction. If an Ethereum-like transaction requires a lot of compute units, it cannot be performed within a single Solana transaction.

Therefore, the Neon EVM program saves the EVM state to the Solana storage. And when the Neon Web3 Proxy sends a command to the Solana Cluster, the execution of the stored Neon transaction is renewed.

So, the Neon EVM program restores the EVM state on demand and continues the Neon transaction execution from the stopping point. The process continues till the Neon transaction is completed.

问题是 Solana 限制了执行单个 Solana 交易的资源数量。如果类以太坊交易需要大量计算单元,则无法在单个 Solana 交易中执行。

因此,Neon EVM 程序将 EVM 状态保存到 Solana 存储中。并且当 Neon Web3代理(Neon Web3 Proxy)向 Solana 集群发送命令时,存储Neon 交易的执行(状态)将被更新。

因此,Neon EVM 程序按需恢复 EVM 状态并从停止点继续执行 Neon 事务。该过程一直持续到 Neon 交易完成。

The algorithm for executing Solana transactions must be such as to guarantee the execution of a whole Neon transaction.

Solana transactions are related to each other and all of them need to be executed.

执行 Solana 交易的算法必须保证整个 Neon 交易的执行。

Solana 交易相互关联,都需要被执行。

In the first versions of the algorithm, Neon proxy executed the next Solana transaction when it received confirmation of the first transaction.

This ensured that the Neon transaction would execute in its entirety, but this execution is very slow when your Neon transaction has many iterations.

在算法的第一个版本中,Neon代理(Neon proxy)在收到第一笔交易的确认后执行下一笔 Solana 交易。

这确保了 Neon 事务将完整执行,但是当您的 Neon 交易有很多迭代时,执行就非常慢。

The current version of the Solana transaction sending algorithm works quite differently.

当前版本的 Solana 交易发送算法的工作方式完全不同。

The algorithm consists of two stages.

At the first stage, the algorithm chooses the strategy for sending the transaction.

  • A Neon transaction can be completed in a single Solana transaction if it is small in size and requires few EVM steps to complete.

  • A Neon transaction can be executed in several Solana transactions if it is small in size, but it requires many EVM steps to complete. In this case, Neon Proxy creates an additional Solana account. We call it a storage account. And Neon EVM stores the EVM state in it between iterations.

  • The transaction can be large in size. In this case, Neon Proxy uploads the transaction to a separate Solana account, which we call Holder account.

该算法包括两个阶段。

在第一阶段,算法选择发送交易的策略。

  • 如果 Neon 交易规模较小且需要很少的 EVM 步骤即可完成,则可以在单个 Solana 交易中完成。

  • 一个 Neon 交易如果规模较小,可以在多个 Solana 交易中执行,但需要很多 EVM 步骤才能完成。在这种情况下,Neon代理(Neon proxy)会创建一个额外的 Solana 帐户。我们称之为存储帐户。 Neon EVM 在迭代期间将 EVM 状态存储在其中。

  • 交易规模可能很大。在这种情况下,Neon Proxy 将交易上传到一个单独的 Solana 账户,我们称之为持有者账户(Holder account)。

In the second stage, Neon Proxy creates a batch of Solana transactions and sends them all at once to the Solana node.

Next, Neon Proxy checks the execution status of each Solana transaction, and if any of them fail, Neon Proxy generates a new batch of Solana transactions and sends them back to the Solana node.

And so on until the Neon Proxy receives the Neon transaction recipe.

在第二阶段,Neon代理(Neon proxy)创建一批 Solana 交易,并一次性将它们全部发送到 Solana 节点。

接下来,Neon代理(Neon proxy)检查每个 Solana交易的执行状态,如果其中任何一个失败,Neon代理(Neon proxy)会生成新的一批 Solana 交易并将它们发送回 Solana 节点。

依此类推,直到 Neon 代理收到 Neon交易的回执。

After the implementation of the specified algorithm, it was possible to achieve a high speed of Neon transactions and guarantee their execution.

执行指定算法后,可以让Neon高速交易并保证执行。

We check the quality of the Neon EVM platform using tests from the Open Zeppelin package.

The Neon Proxy version before the new year showed us from 900 to 1400 successful tests on Solana Devnet.

The new version of Neon Proxy consistently shows more than 1730 successful tests on Solana Devnet.

我们使用 Open Zeppelin 包中的测试来检查 Neon EVM 平台的质量。

新年前的 Neon Proxy 版本向我们展示了在 Solana Devnet 上进行了 900 到 1400 次成功测试。

新版本的 Neon Proxy 在 Solana Devnet 上持续显示超过 1730 次成功测试。

The second part of Neon Proxy deals with indexing completed transactions.

As a result of revisions, we have written a new service, which we call Indexer.

This service collects information about all Neon transactions performed by all Neon operators.

And clients can get information about Neon transactions by contacting any Neon Proxy using the standard Ethereum API.

At the moment we are expanding the functionality of Neon Indexer and collecting information for our operators.

We integrate the Prometeus service, which will allow Neon operators to collect statistics on the work of their proxies and evaluate the quality of their service.

Neon Proxy 的第二部分处理索引已完成的交易。

我们编写了一个新的服务作为修订,并称之为 Indexer。

该服务收集所有 Neon 运营商执行的全部Neon 交易的信息。

客户可以通过使用标准以太坊 API 联系任何 Neon 代理来获取有关 Neon 交易的信息。

目前,我们正在扩展 Neon Indexer 的功能并为我们的运营方收集信息。

我们集成了 Prometeus 服务,这将允许 Neon 运营方收集有关其代理工作的统计数据并评估其服务质量。

接下来呢?What’s next?

We have prepared version 0.7.0.

Tomorrow we will update the public version of Neon Proxy on Devnet and the community will be able to test the final version that will work on Mainnet.

We ask the community to come and test our product.

我们准备了 0.7.0 版本。

明天我们将在 Devnet 上更新Neon代理(Neon proxy) 的公开版本,社区将能够测试在 Mainnet 上运行的最终版本。

我们请求社区来测试我们的产品。

赞赏