CHIP-2023-04 Adaptive Blocksize Limit Algorithm for Bitcoin Cash 比特现金的自适应区块大小限制算...
Title: CHIP-2023-04 Adaptive Blocksize Limit Algorithm for Bitcoin Cash
First Submission Date: 2023-04-13
Owners: bitcoincashautist (ac-A60AB5450353F40E)
Type: Technical, automation
Layers: Network, consensus-sensitive
Status: Accepted
Last Edit Date: 2024-02-03
CHIP-2023-04 比特现金的自适应区块大小限制算法(一)
Needing to coordinate manual increases to Bitcoin Cash's blocksize limit incurs a meta cost on all network participants.为比特现金手动调整区块大小限制会给所有网络参与者带来额外成本。
The need to regularly come to agreement makes the network vulnerable to social attacks.需要定期达成一致意见使得网络容易受到社会攻击。
To reduce Bitcoin Cash's social attack surface and save on meta costs for all network participants, we propose an algorithm for automatically adjusting the blocksize limit after each block, based on the exponentially weighted moving average size of previous blocks.为了减少比特现金的社会攻击面并为所有网络参与者节省额外成本,我们提出一种算法,在每个区块后自动调整区块大小限制,基于之前区块的指数加权移动平均大小。
This algorithm will have minimal to no impact on the game theory and incentives that Bitcoin Cash has today.
The algorithm will preserve the current 32 MB limit as the floor "stand-by" value, and any increase by the algorithm can be thought of as a bonus on top of that, sustained by actual transaction load.这种算法对比特现金今天的博弈论和激励几乎没有或没有影响。算法将保留当前32 MB限制作为底线“待命”值,算法的任何增加都可以被视为在此基础上的额外奖励,由实际交易负载支持。这个算法的目的是改变挖出区块增大时的默认响应。
This algorithm's purpose is to change the default response in the case of mined blocks increasing in size.
The current default is "do nothing until something is decided", and the new default will be "adjust according to this algorithm" (until something else is decided, if need be).
If there is ever a need to adjust the floor value, algorithm's parameters, or remove the algorithm, that can be done with the same amount of work that would have been required to change the blocksize limit.当前的默认值是“什么也不做,直到决定了什么”,新的默认值将是“根据此算法调整”(直到需要时决定其他方案)。如果需要调整底线值、算法参数或移除算法,可以采用与更改区块大小限制相同的工作量来完成。
Deployment [Back to Contents] Deployment of this specification is proposed for the May 2024 upgrade.本规范的部署计划在2024年5月的升级中实施。
Motivation [Back to Contents] Why a limit at all?
为什么需要一个限制?
Bitcoin Cash's blocksize limit serves several purposes. Perhaps most critically, without it, individual participants would still have their own maximum acceptable blocksizes depending on their hardware and software stack, and any difference in that configuration could lead to a chain split.比特现金的区块大小限制服务于多个目的。最关键的是,如果没有这个限制,个体参与者会根据自己的硬件和软件配置有自己的最大可接受区块大小,任何配置上的差异都可能导致链分裂。
It also works as a Denial of Service preventative measure. A sufficiently large block will bring down any service that processes BCH blocks in the back end, so an attacker with enough resources to mine a single block could deny users access to a large number of services. It is important to note that these services often have their bottlenecks outside of the full node software.它还作为防止拒绝服务攻击的措施。一个足够大的区块会使任何处理BCH区块的后端服务瘫痪,因此拥有足够资源挖出单个区块的攻击者可以拒绝用户访问大量服务。重要的是要注意,这些服务通常在全节点软件之外存在瓶颈。该限制通过限制攻击者可以强迫网络处理的低经济价值交易数量来作为垃圾邮件保护。
The limit works as spam protection by limiting the number of low economic value transactions an attacker can force the network to process. For a practical example, consider BSV: it is prohibitively expensive for service providers like block explorers and exchanges to support BSV not just because the blocks are big, but because comparatively few customers are actually paying for the services made possible by processing and storing those transactions.从实际例子来看,BSV就是一个例子:对于服务提供商如区块浏览器和交易所来说,支持BSV的成本不仅因为区块大,而且因为相对较少的客户实际上为处理和存储这些交易提供的服务支付。这些企业的解决方案是外包他们的节点,结果是一个节点极少、既不健壮也不抗审查的网络。
The solution for those businesses is to outsource their nodes, and the result is a network with extremely few nodes that is neither robust nor censorship-resistant. The flipside of the spam protection is that the blocksize limit can be thought of as a minimum technical requirement of network infrastructure.垃圾邮件保护的另一面是,区块大小限制可以被视为网络基础设施的最低技术要求。理论上,网络可以在任何时候开始一致地生产接近限制的区块(无论这些交易是否经济相关),因此限制告诉网络基础设施的维护者确切的扩展期望是什么。
Why an algorithmic blocksize limit?为什么需要算法化的区块大小限制?
Even when done in full agreement, increases to the blocksize limit require a coordinated effort to avoid risks of accidental splits: the exact moment and amount of increase must be agreed upon and specified ahead of time. That coordination effort incurs a non-zero cost on network participants. The more the network grows, the greater the meta cost will be.即使在完全一致的情况下,增加区块大小限制也需要协调努力以避免意外分裂的风险:增加的确切时刻和数量必须提前达成一致并指定。 这种协调努力对网络参与者造成了非零成本。 网络越大,元成本就越高。
And of course, very few things are ever done in "full agreement", even without social attacks intentionally dividing the community. 当然,即使没有社交攻击故意分裂社区,很少有事情能够做到“完全一致”。
The more the network grows, the greater the risk of network stakeholders entering a deadlock will be. The Bitcoin Cash network has had success arriving at reasonable processes for coming to decisions as a network, and it has become more resilient over the years. 网络越大,网络利益相关者进入僵局的风险就越大。 比特币现金网络已经成功地建立了合理的决策过程,并在这些年变得更加强韧。