Git Product home page Git Product logo

Comments (4)

TaibiaoGuo avatar TaibiaoGuo commented on June 16, 2024

请描述清楚上下文,可以提供更多信息吗?

from blockchain101.

dako40 avatar dako40 commented on June 16, 2024

前文是说pow工作量证明被用于以太坊中,后文是防止中心化特殊化使用硬件,具有抗ASIC计算的能力,更加具有去中心化分布式安全能力。

from blockchain101.

TaibiaoGuo avatar TaibiaoGuo commented on June 16, 2024

这种性质可以被称为单向性,指的是对于每一个输入,函数值都容易计算(多项式时间),但是给出一个随机输入的函数值,算出原始输入却比较困难(无法在多项式时间内使用确定性图灵机计算)。

现举一个现实生活中的例子帮助大家理解,打碎碗碟是一个很好的单向函数的例子,我们将碗碟打碎成数千片的碎片是一件很容易的事情,但要把这些碎片再拼成一个完整无缺的碗碟,却是一件非常困难的事情。

质数分解 是一个满足这种要求的方法:

质数分解将一个正整数写成几个约数的乘积,例如45这个数,它可以分解成45=3^2 × 5。根据算术基本定理,这样的分解结果应该是独一无二的,即只有一种质因子组合。我们在计算时,为了得到一个质数的约数,往往要经过多次尝试,而验证只需要一次,这就满足了单向性,也就可以被用于设计PoW算法。

更复杂一点 330 = 2 3 × 5 × 11
更复杂一点 4294967296 = 3 × 5 × 17 × 257 × 65537

那么我给出一个问题:4294967296的质数分解答案,则需要进行很多次计算得到正确的结果,而只需要一次就可以验证答案是否正确,计算这个问题的过程,就证明了你工作了,所以叫PoW(Proof of Work),以太坊的PoW算法也采用了类似的机制。

from blockchain101.

dako40 avatar dako40 commented on June 16, 2024

谢谢

from blockchain101.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.