Fuel内幕:23-23年的冬天 (Inside Fuel:Winter 22-23)

The latest news from the fastest modular execution layer.

最快的模块化设计层的最新消息!


Welcome to Inside Fuel, our review of technical developments and everything happening on the Fuel Network. Take a moment to catch up on all the latest news.
欢迎来到 Fuel内幕,我们对技术发展以及 Fuel 网络上发生的一切进行回顾。欢迎拨冗了解所有最新消息。

🆕 Fuel新成员 (Newest Additions To Fuel)

Building the fastest modular execution layer would not be possible without an incredible contributor team. Here are the newest additions to the team this month:

没有令人难以置信的贡献者团队,构建最快的模块化执行层是不可能的。以下是本月团队的最新成员:

📰 新闻 (In The News)

According to the Rust In Blockchain monthly review, Fuel is one of the most active Rust-based projects this Winter with Fuel: 548 merged PRs, 406 closed issues, and 256 open issues between December 2022 and January 2023, ranking us in the Top 5 of the most active Rust-based blockchains.

根据 Rust In Blockchain 月度回顾,Fuel是今年冬天最活跃的基于Rust的项目之一。在2022年12月至2023年1月期间,Fuel 有548个合并的PR,406个关闭的问题,以及256个开放的问题,我们在最活跃的基于Rust的区块链中排名前五。

🎙️ 博客和AMA (Podcasts & AMAs)

John Adler took part in the Bankless Podcast to explain why and how modular blockchains will set the path for the autonomous future.

John Adler 参加了 Bankless 播客,解释模块化区块链是什么以及如何为自主未来铺平道路。

Click to see video 点击查看视频

He also joined the OxResearch podcast to explain how Fuel differentiates itself from other rollups.

他还加入了 OxResearch 播客,解释 Fuel 如何与其他汇总区分开来。

Click to see video 点击查看视频

🌴 Sway日 (Sway Day)

We hosted the third episode of Sway Day, a monthly discussion about all things Sway. This time, we went over all the 2022 development accomplishments and set 2023 expectations with John Adler.

我们主持了Sway日的第三部,这是一个关于Sway所有事情的月度讨论。这一次,我们回顾了2022年的所有发展成就,并与John Adler一起设定了2023年的期望。

At the end of 2022, you can remember that:
在2022年年底,你可以记住。

  • 3,168 issues have been filled since the beginning of Sway.
    自Sway开始以来,已经覆盖了3168个问题。

  • The Sway repository has grown from 0 to 350+ stars.
    Sway repository已经从0发展到350多颗星。

  • Reentrancy analysis is possible directly at the compiler level with Sway:
    使用Sway可以直接在编译器层面进行重入分析。

Reentrancy detection is a critical function in smart contract systems. Reentrancy is the root cause of many DeFi hacks. Let's see how to detect reentrancy in the EVM and comparatively in the FuelVM. The difference is greater than you think 👀

重入检测是智能合约系统中的一个关键功能。重入是许多 DeFi 黑客攻击的根本原因。让我们看看如何在 EVM 和 FuelVM 中检测重入。差距比你想象的要大👀

1/7https://t.co/YK1OtBKqJS
— Sway (@SwayLang) February 2, 2023

  • The Fuel Labs repository has been in the Top 5 of Rust in Blockchain for an entire year in terms of closed PRs and consistently in the Top 1 in terms of opened/closed issues.

Fuel Labs仓库在一整年内,在Rust区块链中的完成PR方面一直处于前5名,在开放/完成问题方面一直处于前1名。

  • Our well-documented and approachable documentation keeps bringing more and more third-party contributors and builders (currently 25+ projects are building on Fuel).
    我们完善的文档和平易近人的文档不断带来越来越多的第三方贡献者和建设者(目前有25个以上的项目在Fuel上构建)。

  • Fuel and Sway have experienced a notable rise in popularity over the past year, marked by a substantial increase in open-source contributions and participation in our Grants Program to build projects on Fuel using Sway.
    在过去的一年里,Fuel和Sway的受欢迎程度明显上升,其标志是开源贡献和参与我们的资助计划,来使用Sway在Fuel上构建项目的大幅增加。

In 2023, you can expect:
在2023年,你可以畅想:

  • A compiler optimization in terms of bytecode size.
    在字节码规模方面的编译器优化。

  • More backends will be supported by Sway (i.e. EVM backend is already under development).
    更多的后端将被Sway支持(例如EVM后端已经在开发中)。

  • Generic and trait constraints will be improved, abstractions will be a lot more economic and powerful.
    通用和特性约束将被改进,抽象将更加经济和强大。

  • More applications to be ported from Solidity/Vyper to Sway.
    更多的应用将从Solidity/Vyper移植到Sway。

  • An improvement of the reentrancy analysis at the compiler level.
    在编译器层面改进重入分析。

  • Enhanced tooling and language features.
    增强的工具和语言特性。

💻 技术更新 (Technical Updates)

Fuelup

Fuelup是什么 (What is Fuelup?)

Fuelup is the official package manager and multiplexer for Fuel that installs The Fuel Toolchain from the official release channels. It enables you to easily install pre-packaged toolchains, keep them up to date or even create custom toolchains and switch between them.

FuelupFuel 的官方包管理器和复用器,它从官方发布渠道安装Fuel工具链 (The Fuel Toolchain)。它使您能够轻松安装预打包的工具链,使其保持最新状态,甚至创建自定义工具链并在它们之间切换。

Binaries are executed through Fuelup as proxies which allow for flexibility in the execution of tools.

二进制文件通过 Fuelup 作为代理执行,使得工具的执行变得灵活。

It simplifies building and maintaining Sway applications with forc and fuel-core for common platforms.

它为一般平台使用 forcfuel-core 简化了 Sway 应用的构建和维护。

Support for overriding toolchains added to Fuelup:

支持覆盖工具链 添加到 Fuelup:

Developers can specify a specific version of a component in a TOML file (fuel-toolchain.toml) at the root of their Sway project. fuelup will automatically use the specified version when working in that directory.

开发人员可以在其 Sway 项目根目录下的 TOML 文件 (fuel-toolchain.toml) 中指定组件的特定版本。在该目录中工作时,fuelup 将自动使用指定的版本。

The way fuelup handles binaries has also been updated - fuelup now uses a generalized store found in ~/.fuelup/store to cache your binary downloads. This means that there will be no more duplicate components of the same versions across different toolchains, and creating a new toolchain with an already downloaded component takes almost no time.

fuelup 处理二进制文件的方式也已更新 - fuelup 现在使用在 ~/.fuelup/store 中找到的通用存储来缓存您的二进制下载。这意味着将不再有跨不同工具链的相同版本的重复组件,并且使用已下载的组件创建新工具链几乎不需要时间。

Sway应用 (Sway Applications)

Sway应用仓库 The Sway Applications Repository

The purpose of the Sway Applications repository is to demonstrate what can be built with Sway and to promote good development practices.

Sway 应用存储库的目的是演示可以使用 Sway 构建的内容并促进良好的开发实践。

That being said, the repository should be deemed as a living project since the applications will be actively maintained, and thus it is likely that none of them will ever reach their final form!

所以,存储库应该被视为一个活跃的项目,因为应用将得到积极维护,因此它们很可能永远不会达到最终形式!

The repository is young so there isn't anything for anyone to use yet, however, we have lots of applications in development, and lots more planned to be worked on in the near future.

这个存储库还很年轻,所以还没有任何人可以使用,但是,我们有很多应用正在开发中,并且计划在不久的将来进行更多的工作。

So far, the applications are planned to have a smart contract to demonstrate Sway, tests written in Rust to demonstrate the Rust-SDK, and a user interface to demonstrate the use of the Typescript-SDK.

到目前为止,应用计划有一个智能合约来演示 Sway,用 Rust 编写的测试来演示 Rust-SDK,以及一个用户界面来演示 Typescript-SDK 的使用。

This part presents the applications that have gone through some level of scrutiny and have been deemed acceptable to be merged into the master branch.

这部分介绍了经过一定程度审查并被认为可以合并到主分支中的应用。

NOTE
注意

This does not mean that they are complete nor that development has ceased.

这并不意味着它们已经完成,也不意味着开发已经停止。

New Fractional NFT application: The Fractional NFT application will lock an NFT into a fractional-NFT(f-NFT) contract and allow users to purchase the newly minted fractionalized tokens. These tokens can then be bought and sold on an AMM or return them to the distribution contract if a buyback is initiated. If all tokens are returned, the admin may unlock the NFT from the f-NFT contract and regain full ownership.

新的 分割NFT(Fractional) NFT 应用:分割NFT(Fractional) 应用会锁定并将 NFT 转换为分割 NFT(f-NFT)合约,并允许用户购买新铸造的分割代币。然后可以在 AMM 上买卖这些代币,或者如果发起回购,则将它们返还给分发合约。如果返回所有代币,管理员可以从 f-NFT 合约中解锁 NFT 并重新获得完全所有权。

New Timelock application: The purpose of a timelock is to restrict the execution of a transaction to some window of time. The transaction usually involves a transfer of funds e.g. via an escrow, vesting schedule, deferred payment, etc. however, it may also be used for valueless execution i.e. calls to a contract to perform computation. The transaction arguments are hashed and stored in a queue awaiting a subsequent call for execution. A user may choose to execute the transaction during the window of time or cancel the transaction by removing it from the queue.

新时间锁应用:时间锁的目的是限制交易执行到某个时间窗口。交易通常涉及资金转移,例如通过托管、归属时间表、延期付款等。然而,它也可以用于无价值的执行,即调用合约来执行计算。交易参数被海华并存储在等待后续执行调用的队列中。用户可以选择在时间窗口内执行交易,或者通过将交易从队列中移除,来取消交易。

Sway

一般更新 (General Updates)

  • Introduction of the Sway reference, a more technical Sway source of documentation;
    引入 Sway 参考,这是一种更具技术性的 Sway 文档来源;

  • Introduction of  __smo intrinsic;
    __smo intrinsic 的介绍;

  • Start-up of the work on the EVM backend;
    启动 EVM 后端工作;

  • Introduction of configuration-time constants;
    引入 configuration-time 常量;

  • Improvement of Error messages for methods called, mismatched ABI methods, improperly used types, and more;
    改进了调用方法、不匹配的 ABI 方法、不正确使用的类型等的错误消息;

  • Addition of balance tree and output message effects to CEI analysis;
    为CEI分析添加平衡树和输出消息效果;

  • Addition of a better parser recovery for incomplete path expressions/patterns;
    为不完整的路径表达式/模式添加更好的解析器恢复;

Bug修复 (Bug fixes):

  • To trait constraint resolution to allow for the correct trait methods to be found;
    特征约束解析将允许找到正确的特征方法;

  • To dead-code-analysis to prevent false reporting dead code;
    死码分析,防止误报死码;

  • To prevent stack overflow from infinite type unification;
    防止无限类型统一导致堆栈溢出;

  • To type inference to prevent unsound type inference and internal compiler errors;
    类型推断以防止不合理的类型推断和内部编译器错误;

  • To calculate missing patterns in nested enum matching in match expressions;
    计算匹配表达式中,嵌套枚举匹配中的缺失模式;

  • To block repeated ABI/trait declarations;
    阻止重复的 ABI/特征声明;

  • To disable self-parameters for ABI methods;
    禁用 ABI 方法的自参数;

标准库更新 (Standard Library Updates)

  • Introduction of a Byte type;
    引入 Byte 类型;

  • Addition of bitwise operations for **u8****u16****u32**;
    **u8****u16****u32** 添加了按位运算;

  • Optimization of **U128** and **U256** division;
    优化 **U128****U256** 划分;

  • Remove **std::context::gas** in favor of **std::registers::context_gas()**;
    删除**std::context::gas** 以支持**std::registers::context_gas()**

  • Introduction of low-level call functionality;
    引入低级调用功能;
    Switch to using the **Bytes** type for the send_message data parameter;
    切换到对 send_message 数据参数使用 **Bytes** 类型;

  • Enhance the Result library;
    增强 Result 库;

  • Introduction of the Never enum;
    引入“永不枚举”;

工具更新 (Tooling Updates)

  • Authorization for comma-separated annotations;
    逗号分隔注释的授权;

  • Addition of CSS styling, favicon, and  --document-private-items option to forc doc;
    添加 CSS 样式、网站图标和 --document-private-items 选项到 forc doc

  • Introduction of #[test(should_revert)] attribute to indicate a unit test should revert;
    引入 #[test(should_revert)] 属性来指示单元测试应该恢复;

  • Allow the LSP to start with partial config;
    允许 LSP 以部分配置启动;

  • Addition of LSP option to hide compiler warnings and errors;
    添加 LSP 选项来隐藏编译器警告和错误;

  • Addition of the #[payable] annotation to ABI methods;
    向 ABI 方法添加#[payable] 注释;

  • Enable the LSP to work with multiple projects simultaneously;
    使 LSP 能够同时处理多个项目;

  • Addition of support for calling into contract ABIs from unit tests;
    增加了对从单元测试调用合约 ABI 的支持;

  • Addition of an interface for generating links between items & modules in forc doc;
    添加一个界面,用于在forc doc中生成项目和模块之间的链接;

Forc更新 (Forc Updates)

  • Introduction of build flag to print the dead-code-analysis graph;
    引入构建标志来打印死代码分析图

  • Introduction of workspace testing feature to forc test;
    引入工作区测试功能来进行强制测试;

  • Addition of workspace support for forc clean;
    增加了对“forc clean”的工作区支持;

  • Bug fix to prevent an occasional git checkout race when running multiple instances of forc concurrently;
    防止在同时运行多个 forc 实例时偶尔出现 git checkout 竞争的错误修复

  • Bug fix to correct executable output for arm64 binaries;
    更正 arm64 二进制文件的可执行输出的错误修复

Fuel核心 (Fuel Core)

  • P2P Block Sync (adds the ability to run syncing full-nodes):

    • Includes the addition of two new services, Synchronization, and Block Importer;
    • Enables libp2p in the standard fuel-core binary;
  • P2P 块同步(添加运行同步全节点的能力):

    • 包括添加两项新服务,同步和区块导入器;
    • 在标准Fuel核心二进制文件中启用 libp2p;
  • Ports and Adapters Re-Architecture:

    • Breaks the internals of fuel-core into easily unit-testable and reusable libraries;
    • Paves the way for alternate implementations such as light clients;
  • 端口和适配器重新架构:

    • 将 fuel-core 的内部分解为易于单元测试和可重用的库;
    • 为轻客户端等替代实现铺平道路;
  • Improved DataBase (DB) performance (less cloning);
    改进的数据库 (DB) 性能(减少克隆);

  • Introduction of gas schedule framework & revised gas prices:

    • The new framework allows us to automatically reprice the gas schedule based on benchmark output;
    • More gas price changes to come as we implement contract state merklization and optimize the DB further;
  • 引入 gas 计划框架和修改后的 gas 价格:

    • 新框架允许我们根据基准输出自动重新定价 gas 时间表;
    • 随着我们实施合约状态 merklization 并进一步优化 DB,将会有更多的 gas 价格变化;
  • Gas-metered predicates:

    • Predicates are priced using the standard gas schedule and their execution budget is deducted from the transaction gas limit. Previously they were only priced based on the number of bytes they added to the transaction;
  • 气体计量谓词:

    • 谓词使用标准 gas 计划定价,其执行预算从交易 gas 限额中扣除。以前只根据其添加到交易中的字节数来定价;
  • Replacement of the integer logarithm in the VM with Rust std lib impl from 1.67 (Now requires Rust 1.67 to use fuel-core & FueVM);
    从 1.67 开始用 Rust std lib impl 替换 VM 中的整数对数(现在需要 Rust 1.67 才能使用 fuel-core 和 FueVM);

  • Binary MMR for block headers implemented;
    实现区块头的二进制 MMR

  • Gas prices are now configurable as part of chainconfig / genesis block;
    Gas 价格现在可以作为 chainconfig / genesis 块的一部分进行配置;

  • FuelVM is now a monorepo containing all fuel-based dependencies of the VM;
    FuelVM 现在是一个 monorepo,包含 VM 的所有基于Fuel的依赖项;

  • Update of GTF arg constants to match the spec;
    更新 GTF arg 常量来匹配规范;

SDKs (Fuel-TS & Fuel-RS)

Rust SDK:

  • Easier testing infrastructure setup: describe your test wallets, contracts, scripts, predicates, and deployments all in a single macro;
    更简单的测试基础设施设置:在一个宏中描述你的测试钱包、合约、脚本、谓词和部署;

  • Parsed and human-readable revert errors to make smart contract debugging friendlier;
    解析和人类可读的恢复错误,使智能合约调试更友好;

  • Transaction fees can now be paid using Messages, i.e., bridged assets;
    现在可以使用“消息”(即跨链资产)支付交易费用;

  • Introduction of the Predicate data encoder;
    引入谓词数据编码器;

  • Rework of theabigen! macro: now supporting multiple contracts, predicates, and scripts all in the same macro invocation;
    abigen! 宏的返工:现在支持同一个宏调用中的多个契约、谓词和脚本;

  • Introduction of the predicates API;
    引入谓词 API;

  • Better dependencies importing experience;
    更好的依赖项导入体验;

Typescript SDK:

  • Better and more reliable log parsing;
    更好更可靠的日志解析;

  • Overall ergonomics improvements;
    整体人体工程学改进;

  • Introduction of abi-typegen CLI;
    abi-typegen CLI 的介绍;

  • Live documentation rework;
    实时文档返工;


敬请关注 (Follow Us)

关于我们 (About Us)

Fuel is the fastest execution layer for the modular blockchain stack. Powerful and sleek, the technology enables parallel transaction execution, empowering developers with the highest flexible throughput and maximum security required to scale. Developers choose the FuelVM for its superior developer experience and the ability to go beyond the limitations of the EVM.

Fuel 是模块化区块链技术栈的最快执行层。该技术功能强大且时尚,支持并行交易执行,为开发人员提供了扩展所需的最高灵活吞吐量最大安全性。开发人员选择 FuelVM 是因为它卓越的开发人员体验和运行能力 ,突破了 EVM 的限制**。

成为贡献者 (Become a Contributor)

赞赏