Delphi Digital:一文简析并行执行

币界网Published on 2024-08-16Last updated on 2024-08-16

币界网报道:

作者:Delphi Digital,翻译:xiaozou

并行执行通常被誉为区块链扩容和大规模采用的关键,可能会吸引“数十亿用户”。

1、为什么要关心状态增长管理?

因为它会影响开发人员的体验、用户支付的费用以及验证者积累的奖励,所以,状态增长管理是所有L1的关键考虑因素。

对于并行化VM(虚拟机)来说,重要的是要注意到,只有不更新相同状态的交易才能并行运行。为了不发生冲突,交易必须是顺序排序的,这意味着如果50%的交易具有相同的状态,并行执行只对其余50%独立交易有利。

XKtPxs7ClVZZkUkXn5leU4zpUIrwQlQhabeLRSne.png

2、并行执行的两种主要类型

让我们来看一下并行执行的两种主要类型:

1)确定性(Deterministic)类型

通过预定义的访问列表映射交易依赖关系,VM跟踪对存储和余额的交易依赖关系,以防止状态冲突,如Solana和Sui所示。

2)乐观(optimistic)类型

此类并行执行在假定交易不会发生冲突的情况下并行运行或顺序再执行所有交易。此类做法不需要访问列表,从而简化了开发过程,收获了Monad、MegaETH、Aptos和Sei等公链的采用。

3、以太坊的顺序执行

运行以太坊验证者(validators)需要至少8GB RAM和2.8 GHz四核CPU。然而,EVM使用单核执行交易表明它并没有完全进行硬件优化。

nrTH9iutI3sHSbhXgdvWxIIFvdACJmBI9C6wILxg.png

EVM不能并行执行交易主要受以下两个因素限制:

  • 它缺乏一种机制来识别具有共享状态依赖关系的交易。

  • 它使用RockDB和Merkle Patricia Trees存储状态数据,并发读写比较复杂。

16Ddif15UYsSBiIlpY6gIEEQbnTqXyXb20G68pnv.png

单独的并行执行不足以维持网络使用。状态增长和状态访问是下一个扩容瓶颈。

并行执行的好处可能被夸大了,因为每区块只有部分选定交易才能并行执行。这在网络拥塞期间变得非常明显,因为依赖关系重叠会减少加速增益。下图所示区块20000006的速度提高了6倍,而区块20434947的速度只提高了1.7倍。

BVl0dYRXGjIlvL0afSomEMBXmLt8NInzV6MdUrka.jpeg

我们来看来自Ghost的数据,对2024年6月初的20M区块到20.1M区块之间的10万个区块的评估表明,顺序依赖关系最小的区块在并行处理情况下执行速度更快。

UUhZCaT7wg1V2uhdJMmIkvTRbj8NDYWCFq758oa1.jpeg

4、状态增长和状态访问问题

区块链的状态包括账户、各账户余额、nonces和合约信息。随着交易频繁以及新合约的出现,特别是在像ETH这样复杂的系统中,链状态在持续扩展。

sX9NZqhuw2EaZtmv16slwlkPbndLCjXW7WzaJYkl.png

5、状态管理的经济焦点

Solana、Sui或Aptos等公链使用状态租金(state rent)等机制,对最佳的状态增长管理提供经济激励。它们通过在交易期间向用户收取存储费,防止验证者和用户支付更高的存储成本。

6、状态管理的技术焦点

大多数技术方法都围绕着高效的数据库结构展开,这些数据库结构支持使用更优的Merkle树结构进行异步读写操作。

Delphi Digital研究员Muhammad Yusuf是这样说的:并行化是一个已决问题。各链将争相支持更强大的设置和更快的虚拟机。但要真正取得长期成果,就需要强劲的状态增长和准入管理机制。”

Related Reads

Interview with PPP: How the World Cup Ignited the Prediction Market, and How to Find "Replicable Smart Money"?

Interview with PPP: World Cup Ignites Prediction Markets, How to Find “Replicable Smart Money”? With the World Cup underway, prediction markets are experiencing a historic surge in data and activity. However, most ordinary users struggle to achieve consistent profits amidst the volatility. Simply chasing "smart money" signals on social media is often ineffective due to slow manual execution. Even dedicated copy-trading tools can be misleading, as high total profits don't guarantee a strategy is suitable or sustainable for others to follow. Prediction market strategy platform PPP (Prediction Position Platform) argues that not all profitable addresses are fit for copying. Truly replicable "smart money" must demonstrate stable, long-term profitability across key metrics like win rate, max drawdown, and strategy consistency. PPP aims to solve this by building a system that structures complex on-chain data into actionable strategies for users. It employs a dual AI-modeling and manual-review process to analyze addresses based on performance, risk, capital allocation, and more, filtering out偶然性盈利 to identify statistically reliable strategies. The platform categorizes these strategies into two main products: a "Strategy Square" featuring long-term, vetted strategies with strict criteria like a six-month minimum track record, and a "Trading Leaderboard" highlighting shorter-term, high-performing opportunities from the past 30 days. Both are presented with clear style descriptions (e.g., "high implied win rate, high volatility"). Currently accessible via a Telegram Bot, PPP offers features like one-click trading, address copying, and an AI address analysis tool. It uses a subscription model and a non-custodial wallet. A trial run by the author yielded significant short-term gains, though subsequent drawdowns highlighted the importance of risk management and adjusting copy parameters per strategy. PPP’s core value lies not just in copy-trading, but in compiling and structuring混沌的交易信号 into replicable strategies, reducing information asymmetry in prediction markets. While it can’t guarantee future profits, it provides a more systematic, higher-probability entry point for users navigating the uncertain but opportunity-rich landscape, especially during events like the World Cup.

Odaily星球日报4m ago

Interview with PPP: How the World Cup Ignited the Prediction Market, and How to Find "Replicable Smart Money"?

Odaily星球日报4m ago

Bitcoin at 59,000 Is Not the Bottom, One Last Drop Needed! Chain Data and Liquidity Analysis: Where is BTC's True Bottom?

Based on analysis by trader Mr. Beggar, Bitcoin's (BTC) recent low of $59k is likely not the final cycle bottom. He argues that while a bottom is near, a final downward movement is still probable to target liquidity below that level, making a deeper low healthier for a sustainable reversal. Mr. Beggar's framework combines on-chain data for long-term cycles and liquidity-based technical analysis for shorter-term trades. His "four deep bear buying models" include Cointime Price (market cost weighted by coin holding time) and AVIV (an enhanced MVRV indicator), which currently suggest prices are nearing cyclical bottom zones. While a PSIP (Percent Supply in Profit) signal has flashed below 50%, it alone is not considered definitive; typically, the first signal is not the final bottom. He presents three potential scenarios for the current market: 1) a direct drop from here, 2) an upward liquidity sweep (stop hunt) of the recent high near $67.3k before declining, and 3) a direct reversal without new lows. He heavily discounts the third scenario due to significant un-swept liquidity in the $59k-$62.3k range, suggesting the market must revisit these levels. Mr. Beggar shares that he used on-chain signals to identify potential cycle tops in late 2024/early 2025 and later established low-leverage BTC-denominated short positions. He emphasizes the importance of risk management and staying within one's expertise ("strike zone"), warning against investing in assets like AI/semiconductor stocks simply because they are rising.

marsbit33m ago

Bitcoin at 59,000 Is Not the Bottom, One Last Drop Needed! Chain Data and Liquidity Analysis: Where is BTC's True Bottom?

marsbit33m ago

From Signal Monitoring to Strategy Copy Trading: How PPP Lowers the Barrier to Trading on Polymarket?

From Signal Monitoring to Strategy Copy Trading: How PPP Lowers the Barrier to Polymarket Trading The surge in trading demand on prediction markets like Polymarket, especially during events like the World Cup, exposes a common challenge for novice users: emotional and impulsive trading due to a lack of stable strategies and reliable signals. Prediction Position Platform (PPP) addresses this by serving as a Telegram-based tool for strategy discovery and automated copy-trading on Polymarket. PPP offers a suite of features through a subscription model. Key functionalities include 24/7 market signal monitoring (tracking smart money movements and rapid probability shifts), an "AI Address Analysis" tool to evaluate trader performance metrics, and specialized sections like a "World Cup Zone" for quick access to related markets. Its core value lies in two curated lists: the "Strategy Square," which identifies addresses suitable for long-term tracking based on comprehensive metrics like returns, win rate, and drawdowns, and the "Trading Leaderboard," highlighting recently outperforming addresses for short-term opportunities. Users can manually analyze any address or set up automated copy-trading with customizable parameters like investment amount and stop-loss. After initiating copy-trades, users can manage all positions from a unified dashboard, adjusting parameters or stopping follows as needed, and review historical performance data. Crucially, PPP employs a non-custodial wallet model, meaning user funds remain in their own self-custodied wallets, enhancing security and trust. In summary, PPP aims to reduce the learning curve and trial-and-error cost for Polymarket users by aggregating signals, curating and analyzing profitable traders, and facilitating automated, yet manageable, copy-trading execution.

Odaily星球日报33m ago

From Signal Monitoring to Strategy Copy Trading: How PPP Lowers the Barrier to Trading on Polymarket?

Odaily星球日报33m ago

From the White-Haired Stock God to the Billion-Dollar Fund Titan: The Smart People Shorting NVIDIA Are Getting Rich Using the Same Framework

From "white-haired stock god" to billionaire fund manager, those profiting from shorting NVIDIA share a common framework. The article analyzes the critical bottlenecks in the AI hardware supply chain, which have become key investment focal points. The core argument is that the real constraint on the AI boom isn't software or algorithms, but fundamental physical infrastructure. The piece dissects nine major bottlenecks, organized around the lifecycle of an AI accelerator circuit board. *Before the Board*: The pre-manufacturing stage faces constraints in EDA tools, new materials (like GaN, SiC, InP) replacing silicon, and the critical, non-renewable supply of helium for semiconductor fabrication. *On the Board*: The primary bottlenecks are High-Bandwidth Memory (HBM), essential for unleashing GPU power, and advanced packaging (e.g., CoWoS), required to integrate components. Both are in severe shortage. *Between Boards*: Chip-to-chip communication is hitting limits with copper, pushing photonics and optical interconnects (CPO) as the next-gen solution, with NVIDIA heavily investing in this area. *Around the Board*: Power delivery requires new materials (GaN/SiC) for efficient voltage conversion from 48V to sub-1V. High-density AI racks (120kW+) are forcing a shift from air to liquid cooling as the standard. *Beyond the Board*: The ultimate bottleneck is electricity. AI data centers consume power equivalent to mid-sized cities, and grid expansion lags far behind demand, causing project delays and a scramble for power contracts. Prominent investors like Leopold and "white-haired stock god" are heavily betting on these infrastructure bottlenecks. Leopold's fund, for instance, holds no NVIDIA stock but uses massive put options to short the semiconductor sector while going long on power and physical infrastructure. His thesis is that while chip competition may eventually erode margins, the scarcity of foundational elements like electricity is more persistent. The framework's validity is tied to the supply-demand gap. Major new capacity in HBM and photonics is scheduled for 2027-2028, but demand continues to outpace it. Experts like Intel's CEO suggest no relief before 2028. However, the article warns of a potential reversal around 2028-2029 if AI capex slows and new capacity floods the market, turning scarcity into oversupply. Until then, the imbalance persists.

链捕手1h ago

From the White-Haired Stock God to the Billion-Dollar Fund Titan: The Smart People Shorting NVIDIA Are Getting Rich Using the Same Framework

链捕手1h ago

Trading

Spot
Futures
活动图片