LOADING...
LOADING...
LOADING...
当前位置: 玩币族首页 > 币圈百科 > Patrick O'Grady 推文串

Patrick O'Grady 推文串

2021-12-18 Avalanche 来源:区块链网络

SUBNET来了!

@avalabsofficial is THRILLED to announce Subnet-EVM (https://github.com/ava-labs/subnet-evm…), a Custom VM that makes it easy for anyone to create their own EVM-compatible blockchain on #Avalanche using only a JSON file:

关注Subnet的你请注意:

Ava Labs激动地宣布Subnet EVM(支持以太坊虚拟机的子网)现已正式启动:只需使用一个JSON文件,任何人都能利用这个自定义虚拟机在Avalanche雪崩轻松创建EVM(以太坊虚拟机)兼容的区块链。

?

1/ Many people only know #Avalanche as a fast, EVM-compatible chain (\"an eth clone\" for lack of a better term). However, it is so much more.

Avalanche is a platform for running custom blockchains on a shared networking, storage, consensus, stake management, and bridging stack.

很多人只知道Avalanche雪崩协议是一个高速度、兼容EVM的公链,在他们心目中,Avalanche是一条“以太坊克隆链”。但事实上,Avalanche远非如此。

Avalanche支持多条不同的区块链利用同一个网络、储存空间、共识协议、质押机制和桥接栈运行。

?

2/ Avalanche provides low-level blockchain building blocks so developers can build their own chain fast (in this case, 90 seconds).

So far, devs have focused their attention on the \"primary network\" (C/X/P), however, I think that will all change soon.

Avalanche提供底层的区块链组件(基础设施),赋能开发人员快速构建自己的区块链(以文中教程为例,只需要90秒)。

到目前为止,开发人员关注的一直是Avalanche的主网(C链、X链和P链),但我想这很快就会改变。

3/ Based on popular demand, we decided the first \"real\" Custom VM we should create (no offense TimestampVM) to showcase the power of #Avalanche Subnets should be an easily configurable, EVM-compatible blockchain that anyone could spin up in a few moments.

为了满足多数用户的需求,我们认为,为了展示Avalanche子网的力量,我们需要打造的首个“真正”的自定义虚拟机(无意冒犯Timestamp虚拟机)应当是一个易于配置的EVM兼容区块链,任何人都能快捷地搭建这样的区块链。

4/ So, we forked Coreth, made all the gas params configurable in genesis, merged the Apricot upgrades into a single Subnet-EVM upgrade, removed atomic memory, removed multi-coin support, and removed DAO hardfork support.

The result: Subnet-EVM

于是,我们分叉出了Coreth,在genesis中将所有gas参数确定为可配置的状态,将多次Apricot升级合并为单次子网EVM升级,取消了原子内存,取消了多币支持,并取消了DAO硬分叉支持。

5/ Want to target 100M gas per second with validators on bare metal or airdrop a new native token to a set of token holders? Change a JSON file.

Looking for any easy way to test EVM optimizations? Fork Subnet-EVM and spin up your own chain to stress test with real users.

如果你希望在裸机上通过验证节点实现每秒100M gas的目标,或向一组代币持有人空投新的原生代币,调整JSON文件即可。

如果你希望用简单的方法测试EVM优化,那么你可以分叉子网EVM,建立自己的区块链,对真实用户进行压力测试。

6/ Best of all? Subnet-EVM supports EIP-1559 and is compatible with ALL EVM TOOLING OUT OF THE BOX.

Hook it up to MetaMask, Truffle, Ledger, Hardhat, TheGraph, WalletConnect, Blockscout, Remix...you name it!

最令人惊喜的是,Subnet EVM还支持EIP-1559,并兼容所有开箱即用的EVM工具。

你可以把Subnet EVM连接到MetaMask、Truffle、Ledger、Hardhat、TheGraph、WalletConnect、Blockscout、Remix或任何其他平台。

7/ ** SHORT INTERMISSION **

At this point, we'd like to pause and thank the go-ethereum community for the tireless work they do.

Subnet-EVM borrows heavily from go-ethereum and we look forward to bringing innovations that start in the world of subnets back to it.

**中场休息**

到这里,我想暂停一下Subnet EVM的介绍,感谢Go Ethereum社群作出的不懈努力。

我们的Subnet EVM很大程度上借鉴了Go Ethereum。希望我们在Subnet领域的创新可以反哺Go Ethereum。

8/ Now all this is great, but show me.

听起来很棒对不对,但具体怎么操作呢?

9/ To see the magic for yourself (locally), you'll first need to download ava-sim: https://github.com/ava-labs/ava-sim…

Next, run `./scripts/build.sh`. This will build AvalancheGo and Subnet-EVM.

在本地创建Subnet EVM,首先需要下载ava-sim:https://github.com/ava-labs/ava-sim。

接下来,运行`./scripts/build.sh`,创建AvalancheGo和Subnet EVM。

10/ Once all the dependencies are build, you can then run the Subnet-EVM example: `./scripts/subnet-evm.sh` (https://github.com/ava-labs/ava-sim#example-subnet-evm…).

You'll see a ton of logs print out as a new 5 node network starts up.

建立所有依赖关系后,运行子网EVM示例:`./scripts/subnet-evm.sh`(https://github.com/ava-labs/ava-sim#example-subnet-evm)。

你会看到,新的5个验证人节点网络启动后,会输出大量日志。

?

11/ When the AvalancheGo network is initialized, your own subnet has been created, all nodes in the network have registered as validators on the subnet, and your blockchain has been added to the subnet, you'll see a list of endpoints Subnet-EVM is reachable on:

AvalancheGo网络初始化之后,你就创建了自己的Subnet。网络中的所有节点均注册为Subnet的验证节点,你的区块链也添加到了Subnet。你会看到可访问Subnet EVM的端点列表:

?

12/ Next, open up your MetaMask settings and click \"Add Network\":

接下来,打开MetaMask设置,点击“Add Network”(添加网络):

13/ Use the URL printed out in the terminal with a \"Network Name\" and \"Currency Symbol\" of your choosing:

Network Name: WAGMI

New RPC URL: http://127.0.0.1:9650/ext/bc/hkha1ii4iUG8frs9rs8mBFsFfmUUHvHchHvCoRUWCFyzq2bob/rpc

ChainID: 43214

Symbol: WAGMI

Explorer: (leave blank)

使用终端中输出的URL和你自定义的网络名称(Network Name)和货币符号(Currency Symbol),完成设置:

Network Name: WAGMI

New RPC URL: http://127.0.0.1:9650/ext/bc/hkha1ii4iUG8frs9rs8mBFsFfmUUHvHchHvCoRUWCFyzq2bob/rpc

ChainID: 43214

Symbol: WAGMI

Explorer: (无需填写)

?

14/ Once the network is added, import the genesis account PK that was given all the funds:

56289e99c94b6912bfc12adc093c9b51124f0dc54ac7a766b2bc5ccf558d8027

This corresponds to address: 0x8db97C7cEcE249c2b98bDC0226Cc4C2A57BF

DO NOT SEND ANY REAL MONEY TO THIS ADDRESS.

添加网络后,导入Genesis账户私钥,即所有资金所在账户:56289e99c94b6912bfc12adc093c9b51124f0dc54ac7a766b2bc5ccf558d8027。

对应地址为:0x8db97C7cEcE249c2b98bDC0226Cc4C2A57BF。

请注意:不要向这个地址转入任何真正的资金。

15/ If you've done everything correctly, you'll see something like this: (just maybe not with account 17 on the top)

如果上述步骤的操作全部正确,你会看到这样的页面(只不过最上方显示的不是Account 17):

?

16/ Now you can create a transaction just like you normally would.

Note, EIP-1559 is enabled by default:

接下来,请向平时一样发送交易。

请注意,EIP-1559会默认启用。

?

17/ After a second, you'll see your transfer go through. Congratulations, you just created your own subnet, blockchain, and performed the first transaction on it!

一秒钟之后,你就会看到转账成功的提示。恭喜,你已经成功地创造了自己的Subnet,也就是自己的区块链,并完成了链上的第一笔交易。

?

18/ Now that you've created your own EVM on your own local network, give it a try on Fuji. Check it out now: https://docs.avax.network/build/tutorials/platform/create-evm-blockchain/…

You can learn more about creating your own subnet/blockchain here: https://docs.avax.network/build/tutorials/platform/create-custom-blockchain/

现在,你已经在本地网络上创造了自己的EVM,可以到Fuji测试网进行测试了,流程参见:https://docs.avax.network/build/tutorials/platform/create-evm-blockchain/。

你可以通过我们的开发者文档,详细了解如何创造自己的Subnet/区块链:https://docs.avax.network/build/tutorials/platform/create-custom-blockchain/。

19/ So, what's the catch?

For now, you have to manually add validators to your subnet (i.e. only Proof-of-Authority) and you can't natively transfer assets from your subnet back to the primary network.

Upgrades next year will add permissionless subnets + cross-subnet transfers.

那么,这中间有什么问题吗?

目前,你必须手动将节点添加到Subnet(即目前仅有权威证明算法),而且无法在平台内将资产从Subnet转回主网。

明年升级之后会支持免许可Subnet和Subnet间转账。

20/ If you’re in a hurry to bridge between the C-Chain and your new EVM (before the launch of native cross-subnet transfers), you can use ANY EVM to EVM bridge.

We've heard good things about @ChainSafeth's ChainBridge and recommend you look there first:

GitHub - ChainSafe/ChainBridge: ???? Modular Multi-Directional Blockchain Bridge to interact with Multi

如果你迫切需要从新EVM跨链到C链(在子网间转账上线前),你可以使用任何已经支持EVM到EVM的跨链桥。

据我们了解,ChainSafe的Chain Bridge是一个不错的选择,建议你了解一下:https://github.com/ChainSafe/ChainBridge

21/ We've EXTREMELY excited to see what the community creates with Subnet-EVM.

In all of the partner calls I've ever sat it, the only question I'm ever asked is how to \"create our own EVM\".

Well, now you can. No help from us required.

我们非常期待看到Avalanche社群利用Subnet EVM创造更多不凡。

我参加过很多会议和对谈,每次都有人问我怎样才能创造自己的EVM。

现在就可以了。你可以轻松创造自己的EVM,不需要平台提供任何帮助。

22/ As always, if you'd like to join us at @avalabsofficial, shoot me a DM or apply online: https://boards.greenhouse.io/avalabs?gh_src=9a15c6d64us…

Some Highlights:

* Core Blockchain Engineer (Protocol/Networking)

* Full-Stack Engineer (bridging Web2 => Web3)

* White Hat Hacker

如果你希望加入Ava Labs,欢迎私信联系,或通过以下链接在线申请:https://boards.greenhouse.io/avalabs?gh_src=9a15c6d64us。

我们正在招募的职位包括但不限于:

* 核心区块链工程师(协议/网络)

* 全栈工程师(Web2向Web3过渡)

* 白帽黑客

—-

编译者/作者:Avalanche

玩币族申明:玩币族作为开放的资讯翻译/分享平台,所提供的所有资讯仅代表作者个人观点,与玩币族平台立场无关,且不构成任何投资理财建议。文章版权归原作者所有。

LOADING...
LOADING...