工作证明与股权证明:基本采矿指南

Ameer Rosic

2 years ago
 工作证明与股权证明:基本采矿指南

工作证明与股权证明:最近你可能听说过,从基于工作证明(PoW)系统的以太坊共识转移到基于所谓的股权证明。

在这篇文章中,我将向你解释工作证明与股权证明之间的主要区别,我将为您提供采矿的定义,或该过程的新数字货币通过网络发布。

此外,如果以太坊社区决定从 “工作” 到 “股份” 的过渡,采矿技术方面会发生什么变化?

本文希望成为理解上述问题的基本指南。 如果您正在寻找更详细的演练,请查看我们在以太坊上的区块链课程。

什么是工作证明?

首先,让我们从基本定义开始。

工作证明是一种协议,其主要目的是阻止网络攻击,例如分布式拒绝服务攻击 (DDoS),其目的是通过发送多个虚假请求来耗尽计算机系统的资源。

工作证明概念甚至在比特币之前就已经存在,但中本聪将这种技术应用到他/她身上 — — 我们仍然不知道中本真的是谁 — — 数字货币改变了传统交易设置的方式。

事实上,战俘的想法最初是由辛西娅 Dwork 和莫尼 Naor 发表早在 1993 年,但术语 “工作证明” 是由马库斯 · 雅各布松和 Ari Juels 在 1999 年发表的一份文件中创造的。

但是,回到今天,工作证明也许是中本 Bitcoin 白皮书(早在 2008 年发布)背后的最大想法,因为它允许不信任和分布式共识。

训练成为区块链开发者立即开始您的免费试用!

什么是不信任和分布式共识?

一个不信任的分布式共识系统意味着,如果你想从某人那里发送和/或接收资金,你不需要信任第三方服务。

当您使用传统的付款方式时,您需要信任第三方来设置您的交易(例如 Visa、万事达卡、贝宝、银行)。 他们保留自己的私人登记册,存储每个账户的交易历史和余额。

更好地解释这种行为的常见例子如下:如果 Alice 发送了 Bo勃 $100,受信任的第三方服务将借记 Alice 的账户和贷记 Boo 的账户,所以他们都必须相信这个第三方会做正确的事情。

随着比特币和其他一些数字货币,每个人都有一个副本的分类帐 (区块链),所以没有人有信任的第三方,因为任何人都可以直接验证所写的信息。

工作和采矿证明

更深入,工作证明是定义昂贵的计算机计算的要求,也称为挖掘,为了在称为区块链的分布式分类账上创建一个新的无信任交易(所谓的块),需要执行。

采矿有两个目的:

核查交易的合法性, 或避免所谓的双重开支;

通过奖励矿工执行以前的任务来创建新的数字货币。

当你想要设置一个事务时,这是幕后发生的事情:

交易被捆绑在一起,我们称之为块;

矿工核实每个区块内的交易是否合法;

为此, 矿工应解决一个被称为工作证明问题的数学难题;

奖励第一个解决每个块问题的矿工;

已验证的交易存储在公共区块链中

这个 “数学难题” 有一个关键特点:不对称。 事实上,这项工作在请求方方面必须适度艰难,但易于检查网络。 这个想法也被称为 CPU 成本功能,客户端拼图,计算谜题或 CPU 定价功能。

所有的网络矿工竞相成为第一个找到解决候选区块的数学问题的解决方案的人,这个问题不能以其他方式解决,而不是通过蛮力来解决,因此基本上需要大量的尝试。

当矿工最终找到正确的解决方案时,他/她同时向整个网络宣布,获得协议提供的加密货币奖励(奖励)。

从技术角度来看,挖掘过程是一种反散列操作:它确定一个数字(随机数),因此区块数据的加密散列算法导致小于给定的阈值。

这个阈值,称为难度,是什么决定了采矿的竞争性质:更多的计算能力被添加到网络,较高的这个参数增加,也增加了平均数量的计算所需的创建一个新的块。 这种方法还增加了区块创建的成本,推动矿工提高其采矿系统的效率,以保持积极的经济平衡。 此参数更新应大约每 14 天发生一次,并且每 10 分钟生成一次新的数据块。

工作证明不仅被比特币区块链使用,而且被以太坊和许多其他区块链使用。

一些功能的工作系统证明是不同的,因为创建专门为每个区块链,但现在我不想混淆你的想法与太技术数据。

你需要了解的重要的事情是,现在以太坊开发人员想要打开表格,使用一个新的共识系统,称为股权证明。

什么是股份证明?

股份证明是验证基于交易和达成分布式共识的不同方式。

它仍然是一个算法,目的与工作证明相同,但达到目标的过程是完全不同的。

在 2011 年,比特币论坛提出了股份的第一个想法,但使用这种方法的第一个数字货币是皮尔币在 2012 年,与 ShadowCash,Nxt,黑币,Nushares/Nubit,Qora 和导航硬币一起。

与工作证明不同,算法奖励解决数学问题的矿工,目的是验证交易和创建新的块,与股权证明,新块的创建者以确定性的方式选择,这取决于其财富,也定义为股份。

无块奖励

此外,所有的数字货币都是以前创建的,并且它们的数量永远不会改变。

这意味着在 POS 系统中没有块奖励,因此,矿工承担交易费用。

这就是为什么,事实上,在这个 POS 系统中,矿工被称为伪造。

为什么复仇想要使用 PO?

复仇社区及其创造者 Vitalik Buterin 正计划做一个硬叉,从工作证明到证明股权过渡。

但是,为什么他们想从一个切换到另一个?

在基于工作证明的分布式共识中,矿工需要大量的能量。 一次比特币交易所需的电量与 1.57 美国家庭一天供电(数据来自 2015 年)。

这些能源成本是用法定货币支付的,导致数字货币价值不断下行压力。

在最近的一项研究中,专家们认为,比特币交易可能会消耗尽可能多的电力,因为丹麦到 2020 年。

开发人员非常担心这个问题,以太坊社区希望利用股份证明方法,以获得更环保、更便宜的分布式共识。

此外,创建新块的奖励是不同的:通过工作证明,矿工可能没有拥有他/她正在挖掘的数字货币。

在证明的赌注,伪造者总是那些谁拥有铸造的硬币。

如何选择伪造者?

如果 Casper(新的股份共识协议证明)将被实施,将存在一个验证池。 用户可以加入这个池被选为伪造者。 这个过程将通过调用 Casper 合同和发送以太坊(或为以太坊网络提供权力的硬币)的功能来实现。

“你在一段时间后自动被引导,” 解释 Vitalik Buterin 自己在 Reddit 上共享的帖子。

“没有引入验证器池本身的优先级方案; 任何人都可以加入他们想要的任何一轮,而不管其他加入者的人数,” 他继续说。

每个验证者的奖励将是 “约在 2-15 % 左右”,但他尚不确定。

此外,Buterin 认为,对有效验证者(或伪造者)的数量不会施加限制,但如果验证者太多,则可降低利率,如果验证者太少,则可增加奖励,从而经济上进行监管。

一个更安全的系统?

任何计算机系统都希望免受黑客攻击的可能性,特别是如果该服务与金钱有关。

所以,主要的问题是:证明股权比证明工作更安全?

专家们很担心,社区中有几名怀疑论者。

由于技术和经济上的抑制因素,使用工作证明系统,坏行为者被切断。

事实上,编程攻击一个 PoW 网络是非常昂贵的,你需要更多的钱比你能窃取。

相反,底层的 PoS 算法必须尽可能防弹,因为如果没有特别的惩罚,基于利益相关方的网络证明可能会更便宜地攻击。

为了解决这个问题,Buterin 创建了 Casper 协议,设计了一个算法,可以使用该集合的一些情况下,一个糟糕的验证器可能会失去他们的存款。

他解释说:“经济最终在 Casper 完成,要求验证者提交存款参与,并在协议确定他们的行为违反某些规则(“削减条件”)的情况下取走他们的存款。”

斜线条件是指上述情况或用户不应该破坏的法律。

工作证明与股份证明:结论

由于 POS 系统验证器不必使用他们的计算能力,因为影响他们的机会的唯一因素是他们自己的硬币的总数和网络的当前复杂性。

因此,将来可能从 PoW 切换到 PO 可能会提供以下好处:

节能;

随着攻击变得更加昂贵,一个更安全的网络:如果黑客想要购买硬币总数的 51%,市场会因价格快速升值而作出反应。

这样,CASper 将成为一种依赖经济共识体系的保证金协议。 节点(或验证器)必须支付保证金才能成为共识的一部分,这要归功于新的块创建。 Casper 协议将确定验证者收到的奖励的具体金额,这要归功于其对保证金的控制。

如果一个验证程序创建一个 “无效” 块,他的保证金将被删除,以及他作为网络共识的一部分的特权。

换句话说,卡斯帕安全系统是基于类似的赌注。 在基于 POS 的系统中,投注是指根据共识规则,将奖励验证者与验证者投注的每个链条一起奖励验证者的交易。

所以,Casper 是基于这样的想法,即验证者将根据其他人的赌注进行赌注,并留下积极的反馈,能够加速共识。

Like what you read? Give us one like or share it to your friends

16,977
46

46
Discussion

Please to comment
newest oldest most voted

mining pools have far more than 1000eth, the pools will act as the forgers and people will contribute to the mining pool. As a result the system for most miners will stay relatively the same.

It looks like Vitalik and Ethereum team have a plethora of interwoven and conflicting interests to solve. I will start with the biggest agency problem everyone is ignoring:

1) How to give the VC’s bankrolling Ethereum a clean exit with expected returns of >20x on exit. They will be pushing hard for POS as it will create scarcity of ETH and push up their token holdings vastly for an exit. We should not ignore that the VC’s interests and ETH community interests might be wholly orthogonal to each other.

2) How to keep the little guy vested and reward his/her loyalty to maintaining the integrity of the blockchain? Is this not the whole point of blockchain? Decentralized and distributed custodians of trust? Heads up! That ideal is long dead with mining pools creating hidden centralized power structures whose interests might not always be best aligned to the future of ETH nor the little minnows contributing to their pools. So, while moving this hidden centralized (concentration of control) to POS will certainly free up restrictions for the Ethereum developers to make changes, it will not democratize anything.

3) Who is being rewarded for what economic value? This is a fundamental question that needs to be clarified. Simply having ‘staking pools’ as trust agents is going to create other imbalances. Who is going to pay for the processing of trust (transaction verification)? What is the infrastructure going to look like? Or is that also going to get centralized as we already have in banks and effectively shafting all the minnows? If someone ‘stakes’ a very large amount of ETH, but has no supporting hardware to process transactions, what is his/her economic value?
When you buy bonds/equity and get a yield, you are lending money to another entity that will invest that money in other assets to create economic value. The more speculative the assets are, the higher the risk of your investment and consequently the higher the required yield. These yields are not arbitrarily set. They are set by the market pricing the perception of default and clearing accordingly. How is the reward system of ‘staking pools’ going to work? Who is creating what economic value, who is setting the interest yields and according to what risk perceptions? And, what (crypto) economics are going to managing ETHs price inflation other than artificially restricting liquidity through ‘staking’?
One always has to ask why should one person/entity be entitled to a return without taking any risk (i.e. investment in economic generating assets)? The only concept that generates a return without creating underlying economic value is a Ponzi scheme. There, the risks are aggregated and dumped onto the last one in. So, beware of misaligned economic fundamentals.

4) How to solve the ever-increasing energy burden of crunching hashes? Maybe this constraint should also be solved by market forces and Ethereum should just create the right incentives for the market to innovate in this space?
– One thing they can do is to keep a lid on algorithm complexity growth so that it is proportional to Moore’s Law thus ensuring mining/forging overheads remain sustainable.
– Also, the increasing variable costs of crunching MH/KWh will create pressure to innovate for energy efficient solutions. Maybe the reward system can be changed to include KWh (and/or green power) consumed regardless of your regional tariff. There is a plethora of opportunities to innovation and create value here. It just needs the right incentives.

Regardless of the trust agent’s end design (POS, POW or POS/POW hybrid), my advice is that Ethereum needs to ensure that market forces determine prices, yields and transaction processing capacity. ETH’s end design needs to focus on creating the right incentives for the various stakeholders who create economic value and carry the risks and then releasing control to the community.

can someone anwser my questions

what did you mean by bets ?

is the forgers create blocs like in the POW ? and how they create it technically?

is the forgers have to stake and in the same time instale a node in his computer ?

is that node a piece of code that validate & confirm txs automaticaly ?

is the forgers has the ability to on/off that node ? and what happens if they do that ?

how this node can know if this tx are valide/legal or not ?

is this node use some computer ressources ? CPU … ?

how the other supply of coins in POS protocol minted or released ? (in total supply)

how the validator can create an invalide bloc ?

The discussion whether PoW is better than PoS or vice versa, with all their relative advantages and disadvantages needs to be discussed with a larger audience. For afterall Blockchain is all about consensus, then why not a consensus within a larger community.
If PoW requires huge computing power as a consequence high consumption of electricity, then people must be encouraged to use alternate renewable energy sources. This cannot be a reason to sacrifice the security it provides Visavis less consumption of power associated with PoS.
Entry barriers with PoW are high so not anyone can just join the network to validate the transactions which can be the case with PoS.
The very idea of Blockchain is decentralized trustless transactions without the involvement of third parties, so then what purpose Casper and such serve ?

@Larry Jackson

please larry, never ever write the marxist name of ja-fre in crypto-oriented forums – all the perversed evildoers stalin putin saddam khadaffi are marxists, same as the rulers of greece, who defaults constantly parasiting on the hard worked money of germans and other europeans. never ever believe to drug-addicted marxists who dream of total control of every and all individuals, much worse than description in “1984”. obviously you have not personal experience of the science of hatred named “marxism” even didnt visit the obscured meetings for “educating” where jung neomarxists “educate” naive goodthinkers – all they do is trainthemselves to manipulate listeners, and to explain that this is good – same as the whole-time behaviour of the human-haters in all times and all places. you dont need to believe me despite i lived more than 30 years under marxistic slavery, just look at one of the biggest oil-producers in the world – for less than ten years marxists ruined it and today there is total misery for normal people there, and even in their capital is deadly danger to get out on the street after a sundown without personal army of heavy armed bodygurads or sitting in panzer. the ruined venezuella. earlier same marxists ruined chili, saved by a real patriot, the right hand of the chilean marxist aliende named pinochet – he took the power away from marxists, invited the most educated and inteligent economical and financial experts on earth and made a miracle getting his homeland from the edge of the waterfall to the place and state of the first and most wealthy and prosperous country on the whole continent – south america. go on the other side of the globe – and observe normal prospering country divided by greedy marxists – korea. and compare both parts, who soon unite. south koreans have one from the most advanced and friendliest laws encouraging new money – cryptomoney, and north part vorbids to local citizens even phones, not speaking of internet – and this happens in 21st century, when all plan to build living places on other planets! so please larry do not fall because of goodhoping in the traps of manipmanipulators, they are all time the same, greedy to the others good. and if you still hesitate about your position to human-haters named marxists, read in wikipedia, they killed in non-war times more civilians than all wars in 20th century. but if you are interested in roots of the human-haters, go to the british museum and observe two documents in original – how some rich bankster named rotshield sent money to marx and engels with exact instructions what to write, how must it work and what results must it achieve. and dthey did it, just not in the strongest european economics named deutschland, but in the most unevolved teritory on asia – named russia, where the marxists assasinated many tousands of local people to came to power and to keep that power. after all if you still like the visions of drug-addicted neo-marxists, its you choice. but after reading this, its an educated choice.

@James Lyndon

I’d say it’s far less likely for people to join mining pools in a PoS system, for PoW you just contribute your computing power to the pool and can leave a pool anytime you want if you find the pool has some suspicious activities. For PoS you need to deposit your ether to the mining pool’s account first, then the mining pool deposit the ether to a certain locked account to join the validator pool. That’s a LOT of stake and trust you need to put to the mining pool. And depending on the implementation of the reward system, mining pools may not have any reason to exist any more, if anyone who join the validator pool can get some interests as reward, then why trust your ether to a mining pool, you can just join the validator pool yourself.

@James Lyndon

I can not agree! Plus the switch from PoW to PoS has it’s positive benefits mentioned in this article: PoS should solve the issue of unnecessary energy wasting; more people will be encouraged to participate in the validation process (no competition in solving computational puzzles will mean no demand for advanced mining hardware).

@Dmitry Buterin

You all missing a fundamental piece. the real value of any currency is the people perception. the value of any digital currency currently exists coming from perception of the miners. you need to have more individuals involved in this. by adding more machines but less people you are just creating inflation. To the subject from going pow to pos its like changing reality to fantasy. You will end up with bunch of numbers but no value. You need to be thinking how to get more people involved in this and have them believe there is a value in digital currency that will create value. Don’t be fooled with greed. Bitcoin does not have the potential to be a universal not even global currency but it showed us that such thing is possible.

Hungry for knowledge?
New guides and courses each week
Looking to invest?
Market data, analysis, and reports
Just curious?
A community of blockchain experts to help

Get started today and earn 4 bonus blocks

Already have an account? Sign In