# Fue 内部 - 2022 年 11 月

By [白开水](https://paragraph.com/@baikaishui) · 2022-12-20

---

Inside Fuel — November 2022

欢迎来到**Inside Fuel**，我们对技术发展的回顾以及 Fuel 网络上发生的一切。花点时间了解所有最新消息。

🆕 Fuel最新的添加
------------

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

📰 在新闻中
-------

根据**Rust In Blockchain**[月度评论](https://rustinblockchain.org/newsletters/rib-newsletter-42/)，Fuel 是今年 11 月最活跃的基于 Rust 的项目之一，有 247 个合并的 PR，165 个已关闭的问题和 137 个未解决的问题。我们排名第四，仅次于 Parity、Sui 和 Solana。

🎙️ 博客和AMA
----------

Nick Dodson 参加了**Devs Do Something**播客，谈论**Sway**和**FuelVM**。

他还与 John Adler 一起加入了\*\*[Blockchain Capital](https://blockchain.capital/) ，解释了Fuel**以最快的模块化执行层的力量扩展**以太坊的愿景。\*\*

[![]({{DOMAIN}}/editor/youtube/play.png)](https://www.youtube.com/watch?v=eQbbHrUqcC8)

Cami Ramos 加入了**Espacio Crypto**播客（西班牙语），谈论她在发展**Fuel**开发者社区方面的经验。

🌴 Sway 日
---------

我们主持了Sway Day的第二集，这是一个关于所有 Sway 的月度讨论。这一次，主要话题是Predicates - Why and how you should use them。在那里，我们有机会拥有我们的一个授权项目 Poolshark 的创始人，Poolshark是一个基于 Fuel 的具有价格-时间优先功能的去中心化交易所。

阅读TL;DR并在此处收听重播👇：

> — Sway (@SwayLang) [December 5, 2022](https://twitter.com/SwayLang/status/1599811440348520453?ref_src=twsrc%5Etfw)

公开露面
----

### 🌉 以太坊基金会

我们参加并赞助了在湾区举行的第一届 EthSF，这是一个为期 3 天的黑客马拉松，黑客们在今年 11 月联手构建 DApp。\*\*[在此处](https://fuel-labs.ghost.io/ethsf22-recap/)\*\*阅读有关获奖项目的更多信息。

* * *

💻 技术更新
-------

Fuelup
------

#### 什么是 Fuelup?

[Fuelup](https://github.com/FuelLabs/fuelup#installation)是[Fuel](https://fuel.network/)的官方包管理器和多路复用器，它从官方发布渠道安装\*\*Fuel 工具链。\*\*它使您能够轻松安装预打包的工具链，使它们保持最新状态，甚至可以创建自定义工具链并在它们之间切换。

二进制文件通过 Fuelup 作为代理执行，允许灵活地执行工具。

[它使用forc](https://github.com/FuelLabs/sway/tree/master/forc)和[fuel-core](https://github.com/FuelLabs/fuel-core)为通用平台简化了构建和维护 Sway 应用程序。

*   Introduction of testnet-specific toolchains: `beta-1` and `beta-2` toolchains. Installable through `fuelup toolchain install beta-2` for example;
    
*   `forc-doc` and `fuel-indexer` are now packaged in a default toolchain;
    
*   `fuelup` has completions thanks to an external contributor [@0xYYY](https://github.com/0xYYY);
    
*   `fuelup update` can be used as a shorthand for `fuelup toolchain install latest|nightly`;
    

Sway 图书馆
--------

此存储库的目的是包含用户可以导入和使用的不属于标准库的库。

这些库包含辅助函数、通用标准和其他对区块链开发有价值的工具。

_\*⚠️ 注意：_**_Sway 是一种正在大力开发的语言，因此库可能_**_不是\*最符合人体工程学的。随着时间的推移，他们应该会收到更新/改进，以演示如何在实际用例中使用 Sway。_

到目前为止，可以使用以下库：

*   [Binary Merkle Proof](https://github.com/FuelLabs/sway-libs/blob/master/sway_libs/src/merkle_proof)用于验证链下计算的 Binary Merkle Trees。
    
*   [Non-Fungible Token (NFT)](https://github.com/FuelLabs/sway-libs/blob/master/sway_libs/src/nft)是一个代币库，它提供独特的收藏品，通过代币 ID 识别和区分。
    
*   [String](https://github.com/FuelLabs/sway-libs/blob/master/sway_libs/src/string)是一个接口，用于实现 UTF-8 编码的动态长度字符串。
    
*   [Signed Integers](https://github.com/FuelLabs/sway-libs/blob/master/sway_libs/src/signed_integers)是一个实现有符号整数的接口。
    
*   [Unsigned Fixed Point 64 bit](https://github.com/FuelLabs/sway-libs/blob/master/sway_libs/src/fixed_point/ufp/ufp64)是实现定点 64 位数字的接口。
    

Sway 应用程序
---------

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

话虽这么说，存储库应该被视为一个活跃的项目，因为应用程序将得到积极维护，因此它们很可能永远不会达到最终形式！

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

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

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

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

*   新的英语拍卖应用程序。拍卖允许卖家根据初始价格和底价出售他们想要出售的资产。用户竞价直至达到底价或时间届满；
    
*   新名称注册应用程序，允许用户拥有可用于转移资产的人类可读名称。这意味着用户不必使用hex随机字符的格式；相反，他们可以使用一个好记的词/名字来转移；
    
*   新的场外交易 (OTC) Swap Predicate 应用程序展示了一个概念验证，其中要交换的硬币被锁定在 predicates 后面。任何人都可以花费这些硬币，只要他们的交易将一定数量的硬币发送回提供的地址——从而完成两方之间的无状态原子交换。
    

> \*\*\*注意：\*\*\*_这个最小的例子可以作为整个订单簿交换的基础，其中订单在链下流通，并仅通过谓词的资金和支出来结算。这种设计的性能将比存储支持的智能合约实现高出几个数量级。_

*   新的\*\*自动做市商 (AMM)\*\*应用程序。它允许用户通过流动性池交换资产；
    

Sway
----

#### 什么是 Sway?

[Sway 是一种用于为Fuel 虚拟机 (FuelVM)](https://github.com/FuelLabs/fuel-specs)编写智能合约的语言， FuelVM 是一种专为 Fuel 区块链设计的超快、区块链优化的 VM。它深受 Rust 的启发，旨在为区块链生态系统带来现代语言开发和性能。立即通过[Sway Book](https://fuellabs.github.io/sway/latest/)和[FuelVM Bootcamp](https://www.youtube.com/watch?v=GKNuaFcPaXc)开始学习[Sway 语言](https://twitter.com/SwayLang)。

### 一般更新

*   用于操作的新内在函数raw\_ptrs； 错误修复以解决 IR 中死块和错误键入的块，从而触发验证失败； 不允许分配给asm块中的初始化寄存器； 不允许asm块中的控制流操作码； 错误修复Cannot infer type有关调用站点跨度的错误； 错误修复有关泛型类型的错误； 允许raw\_ptr从脚本返回； 新的Checks-Effects-Interactions模式静态分析功能； Bug修复，控制流图节点唯一性，防止误报never used； 使用库的私有方法时出现新的编译器错误； 新建数组编译时越界分析； check\_invalid\_opcodes用于谓词的更多操作码； 改进对不必要的存储注释的警告； 修复方法调用中元数不匹配的错误消息； 不允许while谓词中的循环； 对可变数组的新支持；
    

### 标准库更新

*   New `as_u128` method for to `U256`;
    
*   New generic trait `From<T>`;
    
*   Updates and rework to the `raw_ptr` library with breaking changes;
    
*   Updates and rework to the `alloc` library with breaking changes;
    
*   General rework and reformat of the standard library;
    
*   Small optimizations to `U128` and `U256`;
    

### 工具更新

*   Removal of the `forc-explore` plugin;
    
*   New workspace building feature;
    
*   Add `[workspace]` table to workspace manifest files;
    
*   Provide a way to detect the type of manifest files and general refactor for workspace builds;
    
*   Output `manifest` file parsing errors/warnings for workspace members;
    
*   Introduction of **Sway** **Unit Tests**;
    
*   New feature to show `fn` signature and type info, visibility, and mutability on hover requests;
    

Fuel 核心
-------

*   Moved block timestamps to `TAI64` in compliance with the specs;
    
*   GraphQL Subscriptions via SSE for transaction status updates;
    
*   Upgrade to [Cynic 2.2](https://crates.io/crates/cynic/2.2.0);
    
*   Prometheus metrics for transaction pool & p2p;
    
*   Fix for block pagination in GraphQL API;
    
*   VM fixes for `MROO` & `LB`;
    

SDKs (Fuel-TS & Fuel-RS)
------------------------

*   Better debugability through parsed readable revert errors;
    
*   Predicate data encoder;
    
*   Block time manipulation, useful for testing;
    
*   Support for script arguments;
    
*   Transaction fee payment using bridged assets (e.g. ETH);
    
*   Support for parsed logs in scripts;
    
*   Contract call dependencies estimation and auto-setup: automatically sets up your contract input set and variable outputs;
    
*   New support for **EVM** addresses;
    
*   New Fuel TypeScript SDK documentation;
    
*   Rust SDK (Fuel-RS) only: Support for running contract calls in async environments (e.g. passing a contract instance to a thread);
    

* * *

关注我们
----

*   [**Twitter**](https://twitter.com/fuellabs_)
    
*   [**Discord**](http://discord.com/invite/xfpK4Pe)
    
*   [**LinkedIn**](https://www.linkedin.com/company/fuel-labs/)
    
*   [**YouTube**](https://www.youtube.com/channel/UCam2Sj3SvFSAIfDbP-4jWZQ)
    

关于我们
----

[Fuel](https://www.fuel.network/)是模块化区块链堆栈的**最快执行层**。该技术功能强大且时尚，可实现并行交易执行，为开发人员提供扩展所需的**最高灵活吞吐量**和**最高安全性**。开发人员选择[FuelVM](https://fuellabs.github.io/fuel-docs/master/vs-evm.html)是因为其**卓越的开发体验**以及**超越 EVM 限制的**能力。

成为贡献者
-----

*   [探索我们目前的职位空缺](https://jobs.lever.co/fuellabs)
    
*   [申请资助](https://1v1l4ftv9zy.typeform.com/fuelgrants)
    
*   [学习摇摆](https://fuellabs.github.io/sway/latest/)

---

*Originally published on [白开水](https://paragraph.com/@baikaishui/fue-2022-11)*
