V神新文:多维Gas定价,提高以太坊可扩展性

Odaily星球日报Publicado em 2024-05-09Última atualização em 2024-05-09

Resumo

深入探讨以太坊网络多维Gas定价的复杂性和潜力。

原文:Multidimensional gas pricing

编译:Odaily星球日报 Asher

V神新文:多维Gas定价,提高以太坊可扩展性

在以太坊网络中,资源都是通过 "Gas "这个单一资源来限制和定价的。Gas 是对处理特定交易或区块所需的 "计算工作量 "的衡量。Gas 融合了多种类型的 "努力",其中最主要的有:

  • 原始计算(如 ADD, MULTIPLY )

  • 读写以太坊存储(如 SSTORE, SLOAD, ETH transfers)

  • 数据带宽

  • 生成区块 ZK-SNARK 证明的成本

例如,这笔交易总共花费了 47085 Gas。这其中包括:(i) 21000 Gas 的 "基本费用";(ii) 1556 Gas 用于作为交易一部分的 calldata 字节;(iii) 16500 Gas 用于读写存储;(iv) 2149 Gas 用于制作日志;其余用于执行 EVM。用户必须支付的交易费与交易消耗的 Gas 成正比。一个区块最多可包含 3000 万 Gas,Gas 价格通过 EIP-1559 目标机制不断调整,确保区块平均包含 1500 万 Gas。

V神新文:多维Gas定价,提高以太坊可扩展性

演示案例

这种方法有一个主要优点:由于所有交易都合并到一个虚拟资源中,因此市场设计非常简单。优化交易以最小化成本很容易,优化区块以收取尽可能高的费用也相对容易(不包括 MEV),而且没有奇怪的激励机制鼓励某些交易与其他交易捆绑以节省费用。

但这种方法也存在一个主要的低效率问题:它将不同的资源视为可以相互转换,而网络所能处理的实际基本限制却并非如此。理解这个问题的一种方法是看下图:

V神新文:多维Gas定价,提高以太坊可扩展性

如果 𝑛 资源有明显的安全限制,那么一维 Gas 可能会使吞吐量降低高达 𝑛 倍。因此,人们对多维 Gas 概念的兴趣由来已久,通过 EIP-4844 ,我们今天实际上已经可以在以太坊上使用多维 Gas 了。这篇文章探讨了这种方法的好处,以及进一步提高这种方法的前景。

Blobs: 坎昆升级后的多维 Gas

今年年初,平均区块大小为 150 kB。其中很大一部分是卷积数据:为了安全起见,在链上存储数据的 L2 协议。这些数据的成本很高:尽管卷积上的交易成本比以太坊 L1 上的相应交易成本低 5-10 倍,但对于许多用例来说,即使是这样的成本也太高了。

这个问题最终是通过在每个区块中引入一个单独的便于卷积的数据空间(称为 "Blobs")来解决的。

在坎昆升级后,一个以太坊区块最多可包含 (i) 3000 万 Gas 和 (ii) 6 个 Blobs,每个 Blobs 可包含约 125 kB 的 calldata。这两种资源都有独立的价格,由类似 EIP-1559 的独立定价机制调整,目标是每个区块平均使用 1 500 万 Gas 和 3 个 Blobs。

因此,卷积的成本降低了 100 倍,卷积的交易量增加了 3 倍多,而理论上的最大区块大小仅略有增加:从 1.9 MB 增加到 2.6 MB。

V神新文:多维Gas定价,提高以太坊可扩展性

滚动交易费用,由 growthepie.xyz 提供。Dencun 分叉发生在 2024 年 3 月 13 日,引入了多维定价的 Blobs

多维 Gas 和无状态客户端

未来,无状态客户端将面临存储证明的问题。无状态客户端是一种新型客户端,能够在本地存储很少或不存储任何数据的情况下验证区块链。它接受证明来验证区块中特定部分的以太坊状态,无需自身存储任何数据。

一个区块平均进行约 1000 次存储读写操作,但理论上的最大值可能是上千万次。现行计划是通过将以太坊的状态树设计从 Merkle Patricia 树迁移到 Verkle 树来支持无状态客户端。然而,Verkle 树并不具备量子抗性,也不适用于较新的 STARK 证明系统。

因此,许多人希望通过二进制 Merkle 树和 STARKs 支持无状态客户端,可以完全跳过 Verkle,或在 Verkle 迁移后的几年再进行升级。虽然二进制哈希树分支的 STARK 证明具有许多优点,但生成证明的速度较慢,无法满足高速的需求。

预计未来会有一段时间内能够在不到一秒的时间内证明 1000 个值的情况,但无法达到 14,285 个值的证明速度。为了解决这一问题,提出了多维 Gas 的概念。这种方法可以分别限制和收费存储访问,确保每个区块的平均存储访问量为 1000 次,同时设置每个区块的限制为 2000 次,以提高网络的安全性和效率。

多维 Gas 的更广泛应用

状态大小增长是另一个需要考虑的资源。当增加以太坊状态大小时,全节点需要持有更多数据。与其他资源不同,状态大小增长的限制主要源自长期的持续使用而非短期峰值。因此,为了处理状态大小增长的操作,可以考虑增加一个单独的 Gas 维度。这种方法的目标是设置一个浮动价格,以特定的平均使用量为目标,而不是设定每块的限制。

这展示了多维 Gas 的强大特性,可以针对每种资源提出不同的问题:(i)每种资源的理想平均使用量是多少;(ii)每块资源的安全最大使用量是多少。通过设定这些参数,可以根据网络的安全情况来调整 Gas 的价格,而不是根据每个区块的最大使用量来调整。在处理更复杂的情况时,可以使用多种 Gas,例如,一个零到非零的 SSTORE 操作可能需要消耗不同类型的 Gas,如无状态客户端证明 Gas 和存储扩展 Gas。

每笔交易最大值:获取多维 Gas 更弱但更简单的策略

在单维 Gas 系统中,交易的 Gas 成本是根据数据和计算两者消耗的 Gas 来确定的。然而,在多维 Gas 系统中可以根据交易消耗的主要资源来确定 Gas 成本。这一方法提高了吞吐量,同时保持了安全性。

EIP-7623 提出了类似的方案,通过增加每字节的最低价格,减少了交易在区块中所占空间,但这也导致了一些问题,如单个资源消耗较多的交易仍需支付高额费用,同时也创造了数据密集型和计算密集型交易捆绑在一起以节省成本的动机。虽然这种方法有其局限性,但其带来的好处也是值得的,但如果愿意投入更多开发工作,那么有更理想的解决方案。

多维 EIP-1559 :更难但更理想的策略

多维 EIP-1559 其核心是通过跟踪 excess_blobs 参数来调整 Blob 的基本费用,以确保区块的平均使用量保持在目标水平。

当区块包含的 Blob 数量超过目标值时,基本费用会增加,以降低使用量;反之,则会减少。这种定价机制使得区块内的交易价格动态调整,以保持区块填充一半的状态。同时,短期内的使用量激增也会触发限制机制,保证了交易的合理竞争。

在以太坊中,Gas 的这种定价方式已经存在多年:早在 2020 年,EIP-1559 就引入了非常类似的机制。随着 EIP-4844 的推出,现在对 Gas 和 Blob 分别采用两种浮动价格。

对于用户和区块构建者而言,体验与之前类似,但需要适应两个单独的费用。然而,对于开发者来说,需要重新设计 EVM 功能,以适应多价格和多限制的环境,这可能会增加一些挑战。

多维定价、EVM 和子调用

在 EVM 中,存在两种 Gas 限制:每个交易设置了总 Gas 限制,以及合约调用其他合约时的单独 Gas 限制。这使得合约可以调用不信任的合约,同时确保调用后仍有剩余 Gas 用于其他计算。然而,要在不同类型的执行之间实现多维 Gas 定价存在挑战。这种多维度方案需要子调用为每种 Gas 类型提供多个限制,这将对 EVM 进行深入改变,并且不兼容现有应用程序。

多维度 Gas 提议通常只停留在两个维度上:数据和执行。数据分配在 EVM 外部,因此不需要内部更改即可分别定价。对于开发者来说,这意味着需要重新设计 EVM 及其周围基础设施,以适应多个价格和多个限制。某些情况下,优化也会变得更加困难,因为无法明确说出哪种方法更有效,这可能会影响开发流程。

虽然存在一些挑战,但可以通过实现类似于 EIP-7623 的方案来解决这些问题。这种方案可以为存储操作收取额外费用,并在交易结束时进行退款,以确保主调用仍具备足够的 Gas 来执行后续操作。

小结

无论哪种情况,值得强调的是,一旦开始引入多维执行 Gas,系统的复杂度就会显著提高,这似乎是难以避免的。

因此,我们面临着一个复杂的抉择:是否愿意在 EVM 层面上接受更多的复杂性,以换取释放 L1 可扩展性的重大收益,如果是,那么哪种具体的提案更适合协议经济和应用开发人员?很有可能,最佳方案既不是之前提到的那些,也不是上面提到的那些,我们仍有余地提出更为优雅、更为有效的解决方案。

Criptomoedas em alta

Leituras Relacionadas

If It's Not a Clear Yes, It's a No: A Nine-Year Retrospective by a VC Who Survived Four Cycles

**"Invest Only When Certain": A Nine-Year Retrospective from a VC Across Four Cycles** IOSG founder Jocy shares hard-earned lessons from nine years and over a hundred investments in Web3. The core challenge isn't identifying successful founders, but understanding why talented founders with solid ideas still fail. Through building a "failed founder database," IOSG identified six recurring failure patterns. **Founder Trait Red Flags:** 1. **Emotionally Unstable:** Founders who react defensively to criticism or publicly lash out under pressure (e.g., 80% drawdowns) often fail. Resilience is key. 2. **Lacking Hunger / Having a Fallback:** Founders with significant safety nets (family wealth, cushy fallback jobs) may lack the "do-or-die" commitment needed to survive crypto's brutal cycles. 3. **Unchecked Ego:** Includes "polished execution machines" who excel in known frameworks but struggle when paradigms shift, and "professor-types" who are technically brilliant but resistant to commercial feedback or coaching. **Project Structure Red Flags:** 4. **Token-First, Not Product-First:** Treating the token solely as a fundraising tool with no real utility or connection to product value is a major warning sign. The project should have value even if the token goes to zero. 5. **No Day-1 Exit Thesis:** Founders must have a clear, staged capital strategy from the start, understanding what each funding round needs to prove to unlock the next. "Exit before entry" is crucial. 6. **No Full-Cycle Experience:** Founders who haven't lived through a complete crypto bull/bear cycle (e.g., 2018, 2022) often underestimate their vulnerability. IOSG limits initial checks for such teams to $250k, sizing for risk. **The Positive Flipside: Desirable Founder Traits** The ideal candidate exhibits: obsessive problem-depth, being a second-time founder with a non-consensus vision, strong communication skills with *controlled* ego, relentless perseverance, and a global perspective with agency and taste (increasingly vital in the AI era). **Three Survival Tips for Founders:** 1. **Cash Flow Over Narrative:** Real revenue is what sustains projects, not vanity metrics. 2. **Tokens Are a Liability:** Avoid issuing a token unless absolutely necessary. The hidden costs (market making, liquidity, compliance) are immense, often a multi-million-dollar burden. 3. **Respect Liquidity:** Sell during peaks to build treasury, buy back to support the protocol during troughs. Be realistic about valuations and your ability to deliver for the next round. The final principle is simple yet paramount: **"If it's a borderline 'yes' or 'no,' don't invest."** In an industry that reinvents itself every few years, the discipline to consistently say "no" is the ultimate secret to longevity.

Foresight NewsHá 8m

If It's Not a Clear Yes, It's a No: A Nine-Year Retrospective by a VC Who Survived Four Cycles

Foresight NewsHá 8m

SemiAnalysis Deep Dive into CXMT: $50 Billion Revenue, An IPO Amidst a Supercycle

SemiAnalysis' in-depth report on ChangXin Memory Technologies (CXMT) details its rapid rise as China's largest upcoming semiconductor IPO. Founded in 2016 by Zhu Yiming, CXMT built its DRAM foundation on acquired patents and talent from the bankrupt German firm Qimonda. It achieved its first annual profit in 2025 after nearly a decade of significant capital support, primarily from patient Hefei municipal investors who fostered a local supply chain. The company is now capitalizing on a strong DRAM supercycle. Its revenue soared from ~$3.3B in 2024 to ~$8.6B in 2025, with Q1 2026 alone reaching ~$7.3B. SemiAnalysis projects full-year 2026 revenue could exceed $50B, driven by soaring ASPs rather than massive market share gains. While CXMT is closing the capacity gap with Micron, its product mix remains heavily focused on commodity DDR/LPDDR, which currently offers higher margins than its nascent HBM business. CXMT faces significant challenges in HBM, struggling with yield and stability for HBM3 8-Hi stacks while lagging behind the big three (Samsung, SK Hynix, Micron) in advanced nodes. However, strategic national priorities for AI self-sufficiency may push it to accelerate HBM capacity. Its complex IPO structure reveals heavy state-backed ownership and voting control over its fabs, with Alibaba appearing as both a key cloud customer and a minority shareholder. The IPO aims to raise ~$4.1B, primarily to strengthen its core DRAM manufacturing base.

marsbitHá 28m

SemiAnalysis Deep Dive into CXMT: $50 Billion Revenue, An IPO Amidst a Supercycle

marsbitHá 28m

From Corning to Ciena: The 10x Opportunity in the AI Optical Communication Chain

The transition from copper to optical communication in AI data centers is creating significant investment opportunities beyond just chipmakers. The entire photonics supply chain, from glass and fiber to connectors and test equipment, is critical. Corning, a key fiber supplier, has locked in multi-billion dollar, multi-year contracts with major cloud providers (Meta, Amazon, Google, Microsoft, OpenAI, NVIDIA), demonstrating pricing power and scale. Its profit growth is outpacing revenue growth. In the interconnect layer, Amphenol benefits from high growth in AI data centers, driven by strategic acquisitions and operational efficiency, while Credo Technology acts as a bridge between copper and optical solutions, though with high customer concentration risk. At the systems level, Ciena enables higher data capacity on existing fiber lines, with a strong backlog and cloud customer adoption. Further upstream, AXT is a bottleneck supplier of key indium phosphide wafers for lasers but faces geopolitical supply chain risks. VEO Solutions provides essential testing equipment for the entire photonics industry. A new pure-play photonics ETF (FOTO) offers a consolidated investment approach. The core thesis is that the physical limits of copper are driving an inevitable shift to optical technologies, with wealth flowing to essential, often overlooked, suppliers across the photonics value chain.

marsbitHá 40m

From Corning to Ciena: The 10x Opportunity in the AI Optical Communication Chain

marsbitHá 40m

Collector Crypt's DAU Is Only 800, Yet It's Already One of Crypto's Most Profitable Projects?

"Collector Crypt: A Highly Profitable Crypto Project with Only 800 Daily Active Users?" Collector Crypt (CARDS) is a crypto project tokenizing physical graded trading cards (primarily Pokémon) on Solana, achieving significant real-world profitability and growth. According to a Maelstrom Fund analysis, it generated approximately $53M in annualized profit in May, with a June run-rate nearing $109M, against a $550M FDV. Its core revenue driver is a digital pack-opening 'Gacha' system. The platform bulk-buys cards at a 5-15% discount. Users can open digital packs and choose to keep cards or sell them back to the platform at a 7-15% discount to market price. Most users sell back common cards, creating an efficient model: users get packs with a ~2% positive expected value, while Collector Crypt captures ~4.5% profit. The project aims to disrupt the inefficient $22.2B GMV (Q1 2026) eBay trading card market, which charges sellers 16-20% in total fees. Collector Crypt offers 2% fees, instant settlement, insured custody, and one-click trading. Beyond Gacha, future revenue streams include secondary market trading fees, infrastructure partnerships, and an eBay "snipe" tool. It holds ~$23M in card inventory and ~$10M in cash, and has already begun token buybacks. With a total supply of 2B tokens, effective circulation post-2027 unlocks is estimated at ~1.3B. Trading primarily on DEXs has so far limited large institutional entry. The project is expanding into sports cards and attracting Web2 users. Maelstrom Fund's price target is $4 by summer's end, positioning Collector Crypt at the forefront of migrating collectibles on-chain.

Foresight NewsHá 52m

Collector Crypt's DAU Is Only 800, Yet It's Already One of Crypto's Most Profitable Projects?

Foresight NewsHá 52m

Trading

Spot
Futuros

Artigos em Destaque

Como comprar GAS

Bem-vindo à HTX.com!Tornámos a compra de GAS (GAS) simples e conveniente.Segue o nosso guia passo a passo para iniciar a tua jornada no mundo das criptos.Passo 1: cria a tua conta HTXUtiliza o teu e-mail ou número de telefone para te inscreveres numa conta gratuita na HTX.Desfruta de um processo de inscrição sem complicações e desbloqueia todas as funcionalidades.Obter a minha contaPasso 2: vai para Comprar Cripto e escolhe o teu método de pagamentoCartão de crédito/débito: usa o teu visa ou mastercard para comprar GAS (GAS) instantaneamente.Saldo: usa os fundos da tua conta HTX para transacionar sem problemas.Terceiros: adicionamos métodos de pagamento populares, como Google Pay e Apple Pay, para aumentar a conveniência.P2P: transaciona diretamente com outros utilizadores na HTX.Mercado de balcão (OTC): oferecemos serviços personalizados e taxas de câmbio competitivas para os traders.Passo 3: armazena teu GAS (GAS)Depois de comprar o teu GAS (GAS), armazena-o na tua conta HTX.Alternativamente, podes enviá-lo para outro lugar através de transferência blockchain ou usá-lo para transacionar outras criptomoedas.Passo 4: transaciona GAS (GAS)Transaciona facilmente GAS (GAS) no mercado à vista da HTX.Acede simplesmente à tua conta, seleciona o teu par de trading, executa as tuas transações e monitoriza em tempo real.Oferecemos uma experiência de fácil utilização tanto para principiantes como para traders experientes.

222 Visualizações TotaisPublicado em {updateTime}Atualizado em 2026.06.02

Como comprar GAS

Discussões

Bem-vindo à Comunidade HTX. Aqui, pode manter-se informado sobre os mais recentes desenvolvimentos da plataforma e obter acesso a análises profissionais de mercado. As opiniões dos utilizadores sobre o preço de GAS (GAS) são apresentadas abaixo.

活动图片