PoUW共识机制:Proof of Useful Work

Proof of Useful Work

Background

When Satoshi designed Bitcoin, he wrestled with two primary problems. Firstly, he needed to find a way to prevent what is known as a "Sybil attack", which would allow an adversary (i.e. the bad guys) to add additional nodes to the decentralized network, until they could take control. Secondly, he needed to find a way to bring the network to consensus regarding changes to the ledger (i.e. what transactions were processed, and in which order).

当中本聪设计比特币时,他努力解决两个主要问题。 首先,他需要找到一种方法来防止所谓的“女巫攻击”,这种攻击将允许对手(即坏人)向去中心化网络添加额外的节点,直到他们能够控制为止。 其次,他需要找到一种方法,使网络就分类账的更改达成共识(即处理哪些交易以及按什么顺序处理)。

His solution was proof-of-work (now sometimes shortened to PoW). Although often described as a decentralized consensus protocol, it is both a decentralized Sybil-resistance scheme, and a consensus protocol. In order to participate in "mining" bitcoin, it is necessary for miners to run special hardware that creates large numbers of cryptographic hashes of blocks they wish to propose, until a "winning" hash is found, whereupon they can submit the block to the network. In practice, the relative number of blocks that each miner produces, and the rewards they earn, is proportional to the amount of hashes that their hardware can perform.

他的解决方案是工作量证明(现在有时简称为 PoW)。 尽管通常被描述为去中心化共识协议,但它既是去中心化的女巫抵抗方案,又是共识协议。 为了参与“挖掘”比特币,矿工有必要运行特殊的硬件,为他们希望提议的区块创建大量的加密哈希值,直到找到“获胜”哈希值,然后他们可以将该区块提交给 网络。 实际上,每个矿工产生的区块的相对数量以及他们获得的奖励与他们的硬件可以执行的哈希量成正比。

Proof-of-work solves the Sybil problem because vast volumes of hashes have to be calculated to have a chance of producing a block, which involves the dedication of expensive mining hardware, and copious amounts of electricity. As participation in the Bitcoin network grew, it quickly became too expensive for any adversary to acquire and run sufficient hashing hardware that they could perform a large enough share of the network's hashing that they might gain control (for example to double-spend). By fortune, the Sybil-resistance scheme also helped solved consensus, since hashes are random numbers, and winning hashes are discovered randomly only through brute force, and thus a random miner is assigned the job of creating each block.

工作量证明解决了 Sybil 问题,因为必须计算大量的哈希值才能有机会生成一个区块,这涉及昂贵的采矿硬件和大量的电力。 随着比特币网络参与度的增长,对于任何对手来说,获取和运行足够的哈希硬件来执行足够大的网络哈希份额以获取控制权(例如双花)很快就会变得过于昂贵。 幸运的是,女巫抵抗方案还有助于解决共识,因为哈希值是随机数,而获胜哈希值只能通过蛮力随机发现,因此随机矿工被分配创建每个块的工作。

A great advantage of proof-of-work is that it results in a chain that is produced by relatively stable, dedicated hardware, creating a secure network. Essentially, the Bitcoin network that produces blocks can be thought of as a giant decentralized hashing factory. However, the downside is that the scheme essentially works as a hashing competition, in which the total money miners spend on hashing hardware, and the large amounts of electricity necessary to keep it running, tends towards the value of the block rewards that Bitcoin provides. Moreover, the scheme does not reach consensus quickly.

工作量证明的一大优点是它产生了一条由相对稳定的专用硬件产生的链,从而创建了一个安全的网络。 本质上,产生区块的比特币网络可以被认为是一个巨大的去中心化哈希工厂。 然而,其缺点是,该计划本质上是一种哈希竞争,矿工在哈希硬件上花费的总资金,以及维持其运行所需的大量电力,往往会趋向于比特币提供的区块奖励的价值。 此外,该方案并没有很快达成共识。

As a result of the expense, the blockchain industry worked on proof-of-stake (often shortened to PoS) schemes, in which individual network nodes would be joined to the network by staking ("locking") some amount of cryptocurrency, then producing blocks, and earning rewards, in proportion to the amount of cryptocurrency that they have staked. This replaced the expense of the dedicated hashing hardware, and the electricity used to run it, with the cost of capital involved in staking. Ethereum 2.0 migrated the network from a PoW architecture to a PoS architecture. Not only did this allow the network to run much faster, because it could use alternative consensus schemes, but it prevented the environmentally-costly expenditure of electricity to power the hashing hardware.

由于费用的原因,区块链行业致力于权益证明(通常简称为 PoS)方案,其中各个网络节点将通过抵押(“锁定”)一定数量的加密货币来加入网络,然后生成 块,并根据他们所质押的加密货币数量的比例赚取奖励。 这取代了专用哈希硬件的费用以及运行它所用的电力,以及参与质押的资本成本。 以太坊 2.0 将网络从 PoW 架构迁移到 PoS 架构。 这不仅使网络运行得更快,因为它可以使用替代的共识方案,而且还避免了为哈希硬件提供电力的环境成本支出。

However, PoS has numerous challenges, which are becoming increasingly apparent. Firstly, once the need for dedicated hardware was removed, a block-producing network node (or "client") could simply be spun up anywhere, including the corporate cloud, and activated just by staking some cryptocurrency. As a result, the vast majority of nodes on PoS networks, run in the cloud. The dangers of running a blockchain in the cloud were recently brought into sharp relief – the Hetzner cloud, in Europe, recently suddenly banned Solana nodes, immediately causing 40% of its network to disappear in the blink of an eye. A PoS network running in the cloud is very different to a sovereign network, and the potential exists for cloud providers to interfere with nodes, as well as to close them down.

然而,PoS 面临着众多挑战,而且这些挑战正变得越来越明显。 首先,一旦消除了对专用硬件的需求,出块网络节点(或“客户端”)就可以在任何地方(包括企业云)简单地启动,并且只需通过抵押一些加密货币即可激活。 因此,PoS 网络上的绝大多数节点都在云端运行。 在云中运行区块链的危险最近得到了极大的缓解——欧洲的 Hetzner 云最近突然禁止了 Solana 节点,立即导致其 40% 的网络眨眼间消失。 在云中运行的 PoS 网络与主权网络非常不同,云提供商有可能干扰节点并关闭它们。

Another challenge with PoS is that cryptocurrency, by its nature, is highly liquid, raising the possibility of swift changes in network architecture and the distribution of power, which is something an attacker can potentially exploit. For example, clever manipulations of DeFi, or the catastrophic hack of an exchange, might provide an attacker with sufficient stake that they can break the network – allowing them to profit after suitably hedging their staked cryptocurrency. PoS networks often provide frameworks that make it easy to spin up new nodes on the cloud in an instant, allowing a suitably financed adversary to launch an attack by running a script.

PoS 的另一个挑战是,加密货币本质上具有高度流动性,这增加了网络架构和权力分配迅速变化的可能性,这是攻击者可能利用的东西。 例如,对 DeFi 的巧妙操纵,或对交易所的灾难性黑客攻击,可能会为攻击者提供足够的股份,使他们能够破坏网络,从而使他们在适当对冲所押注的加密货币后获利。 PoS 网络通常提供框架,可以轻松地在云端立即启动新节点,从而允许资金充足的对手通过运行脚本来发起攻击。

Proof of useful work

Proof-of-useful-work (PoUW) is the Internet Computer's answer to these kinds of considerations, and is more complex than the foregoing schemes. It involves a blockchain being produced by dedicated hardware called "node machines" that are of very similar, standardized specification. On the Internet Computer, these run highly sophisticated consensus protocols that lean into the power of advanced cryptography, often referred to as Chain Key Crypto. PoUW is concerned with membership in the network.

有用工作量证明(PoUW)是互联网计算机对这些考虑因素的回答,并且比上述方案更复杂。 它涉及由称为“节点机”的专用硬件生成的区块链,这些硬件具有非常相似的标准化规格。 在互联网计算机上,它们运行高度复杂的共识协议,这些协议依赖于高级加密技术的力量,通常称为链密钥加密。 PoUW 关注的是网络中的成员资格。

Naturally, as per PoW, the purchase, hosting and operation of node machine hardware acts as the stake. However, these machines don't do hashing, and simply produce and process blocks of transactions that represent smart contract computations. The reason that combined node machines must be built to the same standardized specification, is that rather than compete to perform hashing, they must try not to "statistically deviate" by producing more or less blocks. In essence, rather than trying to perform more computation, they try to perform the same amount of computation, and can be punished for deviating from the group.

当然,根据 PoW,节点机器硬件的购买、托管和运营就相当于权益。 然而,这些机器不进行哈希处理,只是生成和处理代表智能合约计算的交易块。 组合节点机器必须按照相同的标准化规范构建的原因是,它们必须尽量不通过产生更多或更少的块来“统计偏差”,而不是竞争执行哈希。 本质上,他们不是尝试执行更多的计算,而是尝试执行相同数量的计算,并且可能会因偏离群体而受到惩罚。

A key ingredient of the scheme is the Network Nervous System (or NNS), a sophisticated permissionless DAO that is integrated with the Internet Computer's protocols. This fully controls the network, configuring it, and upgrading the software run by node machines. Amoung its responsibilities, it combines node machines to create "subnet blockchains," which themselves are combined into a single blockchain using Chain Key Crypto. This achieves two important things. Firstly, expense aside, it is not possible for an adversary simply to add nodes to a subnet blockchain, since the NNS carefully selects nodes by looking at the node provider, the data center the node is installed within, and its geography and jurisdiction, in a scheme of "deterministic decentralization." Secondly, the NNS can remove (or "slash") nodes that statistically deviate.

该计划的一个关键要素是网络神经系统(或 NNS),这是一个与互联网计算机协议集成的复杂的无需许可的 DAO。 这可以完全控制网络、配置网络并升级节点计算机运行的软件。 在其职责中,它结合节点机器来创建“子网区块链”,这些子网区块链本身使用链密钥加密技术组合成单个区块链。 这实现了两件重要的事情。 首先,除了费用之外,对手不可能简单地将节点添加到子网区块链中,因为 NNS 通过查看节点提供商、节点所在的数据中心及其地理位置和管辖权来仔细选择节点。 “确定性去中心化”方案。 其次,NNS 可以删除(或“削减”)统计上有偏差的节点。

By applying deterministic decentralization, the NNS creates a highly secure scheme in which the Internet Computer runs on a sovereign network of dedicated hardware, formed from node machines, which machinery can be tightly held to correct behavior in order to continue its participation in block production (through which its owners, the node providers, earn rewards). In PoUW, the repetitive hashing work of PoW, whose purpose relates primarily to network operation, has been replaced by useful smart contract computation. Since this is work that must be performed anyway, a supremely efficient network is produced.

通过应用确定性去中心化,NNS 创建了一个高度安全的方案,其中互联网计算机在由节点机器组成的专用硬件的主权网络上运行,该机器可以严格保持正确的行为,以便继续参与区块生产( 通过其所有者(节点提供商)赚取奖励)。 在 PoUW 中,PoW 的重复性哈希工作(其目的主要与网络操作相关)已被有用的智能合约计算所取代。 由于这是无论如何都必须执行的工作,因此产生了极其高效的网络。

Useful historical resources

Project founder Dominic Williams was an early pioneer in the study of crypto Sybil resistance and consensus. Here in May 2015 he gives a talk discussing Sybil resistance and consensus at San Francisco Bitcoin Devs, in which he discusses the "3 E's of Sybil Resistance." Other interesting historical material that provides insights into the development of PoUW, include a panel on scalability with Vitalik Buterin and Gavin Wood, and a talk introducing consensus theory, at Ethereum's DEVCON1 later that year.

项目创始人 Dominic Williams 是加密女巫抵抗和共识研究的早期先驱。 2015 年 5 月,他在旧金山比特币开发者大会上发表了一场讨论女巫抵抗和共识的演讲,其中他讨论了“女巫抵抗的 3 个 E”。 其他有趣的历史材料提供了有关 PoUW 发展的见解,包括 Vitalik Buterin 和 Gavin Wood 的可扩展性小组,以及当年晚些时候在以太坊 DEVCON1 上介绍共识理论的演讲。

PoUW共识机制:Proof of Useful Work
arkMeta Crypto Network Limited, arkSong 2023年10月10日
标签
登录 留下评论

为 Rust canisters生成 Candid 文件
Generating Candid files for Rust canisters