Home > Politics > Body

EIP4844、Blob和Blob Gas:以太坊坎昆升级你需了解的核心内容

clock
2024-03-13 11:51:54
详解以太坊坎昆升级核心内容EIP4844 Blob

撰文:0xjs@金色财经

以太坊Dencun升级后,以太坊将采用EIP-4844,通常称为proto-danksharding。此次升级引入了类型3(Type-3)交易(注:以太坊之前有Type-0,Type-1,Type-2交易),为L2网络带来了新的机会和复杂性,以优化它们与以太坊基础层的结算方式。

本文揭开EIP-4844的细节,并探讨其对L2网络和更广泛的区块链生态系统的潜在影响。

问题:高昂的L2 Gas费 

L2解决方案通过处理链下交易,然后定期在以太坊 L1 上结算,从而来提高可扩展性并降低交易成本。

目前,L2 交易在 L1 上的结算是通过 L1 calldata发布批量的 L2 交易信息来完成的。对于 L2 来说,与通过 calldata 进行发布相关的成本是一笔巨大的支出。

根据Dune用户niftytable创建的Dashboard “Rollup Economics”,L2们为了把交易信息提交到以太坊主网,2023年12月花费了超过15000枚ETH,2024年2月花费了超过10000枚ETH,2024年3月还没过半已经花费了超过7000枚ETH。

F769Pn7MclW8upOJg9YUB8o1lJ7RPhdecDEI5rmr.png

解决方案:Blob交易

EIP-4844 通过为数据创建“blob”空间来解决以太坊上的可扩展性问题,L2 可以使用这些blob空间来代替calldata进行结算。一个主要预期后果是 L2 的费用降低。 

有关Type-3交易和Blob的一些详细信息:

  • 每个区块最多可以有 6 个 blob

  • 每个Type-3交易可以有 1 或 6 个 blob

  • 每个 blob 最多可存储 128kb 的数据。如果未使用整个128kb,则 tx 发送方仍需支付 128kb blob 空间费用。

  • Blob只需要存储 4096 个 epoch(约18天)。这被认为足够长,可供 L2 的所有参与者检索,但也足够短,以保持硬盘使用的可管理性。这使得 blob 的价格比永久存储的 calldata 便宜。

可以将Blob视为一种新型工具,其中Rollup可以有效地存储交易和证明数据,从而在将这些信息发送到主网时节省Gas费用。这种新型交易为L2与 L1 区块空间交互提供了更好的方式。

QFNQWw63LDRkgIoAoafgyVWDxCAMz9slXr9prqnv.png

初步的粗略估计显示,Blob将使Rollup交易成本节省10-100倍。

新的交易和区块头字段

Type-3 交易有两个新字段:

  • max_fee_per_blob_gas:用户愿意为每个 Blob Gas 支付的最高费用

  • blob_versioned_hashes:kzg_to_versioned_hash 的哈希输出列表。 

在 EIP-4844 中,区块头还将有两个新字段:

  • blob_gas_used:区块中交易消耗的 Blob Gas 总量

  • excess_blob_gas:在区块之前消耗的 Blob Gas 总量超过目标。这用于设置 Blob Gas 定价。

Blob的传播

以太坊有一个内存池mempool,它临时存储Type-0、Type-1和Type-2交易。Type-3交易也将位于内存池中,但 blob 的实际内容将通过共识客户端blob sidecar 进行传播,并且不用到达执行客户端。Type-3交易仅包含对 blob(哈希)的引用,而不包含 blob 本身。 

了解 Blob基本费用

EIP-4844 创建了一个新的 Blob Gas 市场。该市场的运作方式与 EIP-1559 类似,根据供需情况改变 blob 基本费用。 

iBBsYwW8eUR2Uqqht9yEvrJrr4At4u4abwmBVX6C.png

EIP-4844 按照以下定价规则运行:

  • 如果区块中的 blob 数量多于目标(当前为 3),则增加 blob 基本费用。

  • 如果区块中的 blob少于目标,则减少 blob 基本费用。

  • 如果区块中的 blob 数量与目标相同,则不要更改 blob 基本费用。

除了这种新的定价机制之外,Type-3 交易仍将具有max_fee_per_gas 和max_priority_fee_per_gas字段,并受现有 EIP-1559 市场的约束。除了 Blob 空间之外,Type-3 交易仍然需要为其使用的 EVM 空间付费。

对以太坊L2的影响

Blob 预计将大幅降低发布到以太坊主网的成本,从而导致L2市场发生转变。生态系统中的许多人预测,大多数情况下,blob 基本费用将接近最低水平。 

然而,这一引入将为 L2 运营商带来新的复杂性,他们现在需要在使用Type-2和 Type-3 费用机制之间做出决定,以将其汇总上链。有时,常规Type-2 批处理交易比 Type-3  Blob 交易更昂贵,反之亦然。因此,每个 L2 都必须监控两个独立的市场,以确定根据当前网络条件使用哪个市场更有利。

预计 L2 可能不需要整个 blob 空间,可能会出现 L2 时序研究:1)等待并完全填充一个 blob 和/或 2)与其他 L2 协调以共享 blob 空间。 

Dencun升级和EIP 4844为L2网络带来了新的机会,但也会给以太坊带来更多的可观测性挑战。随着Type-3 交易进入市场,L2 将需要管理这些变化带来的新机会。

Web3 Desktop Trading Tool
Stay ahead of the game in the cryptocurrency space.

7x24 Newsflash

15:00 2025-03-13
Hyperliquid Announces 20% Margin Rate Requirement
According to official sources, Hyperliquid has announced that it will implement a 20% margin requirement effective March 15.
14:57 2025-03-13
He Yi encouraged Zhao Changpeng to apply for amnesty from Trump
On March 13, He Yi, co-founder of Binance, responded to the Wall Street Journal's report on Binance.US and Zhao Changpeng on social media, saying, "Why doesn't Zhao Changpeng try to apply for amnesty from Trump? What if the amnesty really happens? Believe that good things will always happen."
14:41 2025-03-13
BNB fell below $580
The market shows that BNB has fallen below $580 and is now quoted at $579.89, with a 24-hour increase of 3.02%. The market is volatile, so please do a good job in risk control.
14:38 2025-03-13
US authorities seized 749 bitcoins linked to the Silk Road drug trade this month
On March 13, according to Forbes, earlier this month, the U.S. Attorney for the Western District of Texas ordered the seizure of just over 749 bitcoins, worth about $62.50 million. The order also involves hundreds of thousands of various currencies as well as gold coins and bars. According to the Department of Justice, the assets were linked to illegal activities carried out by two men, one of whom was a Silk Road drug dealer and the other who assisted him in the laundering of Canadian drugs.
14:18 2025-03-13
The draft defense white paper shows that the European Commission will propose a comprehensive simplified defense regulation by June 2025.
The draft defense white paper shows that the European Commission will propose a comprehensive simplified defense regulation by June 2025.
14:17 2025-03-13
Circle issues 250 million USDC on Solana Network
According to Whale Alert (@whale_alert), Circle issued 250 million additional USDC on the Solana network.
14:15 2025-03-13
The 30-minute chart of the order flow shows that New York gold futures are long and short here, or constitute... Click to view the latest changes in the order flow > >
The 30-minute chart of the order flow shows that New York gold futures are long and short here, or constitute... Click to view the latest changes in the order flow > >
14:08 2025-03-13
The main contract of Shanghai tin rose by 6.00% during the day, and is now reported at 281,080.00 yuan/ton.
The main contract of Shanghai tin rose by 6.00% during the day, and is now reported at 281,080.00 yuan/ton.
14:08 2025-03-13
The main contract of Shanghai tin futures rose by more than 5% and is now reported at 279,200 yuan/ton.
The main contract of Shanghai tin futures rose by more than 5% and is now reported at 279,200 yuan/ton.
14:04 2025-03-13
Futures Hotspot Tracking
The two major labor unions are on strike simultaneously, and Argentina's soybean crushing plants are shut down! Will soybean oil and soybean meal prices soar?
13:59 2025-03-13
US Senator Lummis: The US Senate Banking Committee will consider the stablecoin-related GENIUS bill today
U.S. Senator Cynthia Lummis, chair of the U.S. Senate Banking Subcommittee on Digital Assets, said that the U.S. Senate Banking Committee will today conduct final consideration (markup) of Senator Hagerty's proposed GENIUS bill, which includes: clearly defining payment stablecoins, establishing clear procedures for institutions seeking to issue stablecoins, and promoting responsible innovation and protecting consumer rights.
13:59 2025-03-13
Circle plans to bring newly acquired Hashnote under license in Bermuda
Circle plans to bring its recently acquired Hashnote tokenized money market fund under Bermuda's regulatory purview and under the existing Digital Asset Business Act license. Hashnote-issued USYC is the largest tokenized money market fund with nearly $1 billion in assets.