美文网首页666区块链程序员
79/666 Blockchain | why do we ne

79/666 Blockchain | why do we ne

作者: 红叔笔记 | 来源:发表于2018-11-20 21:57 被阅读100次

    这是666计划的第79篇笔记

    今天在区块链漫游指南活动后同学们讨论为什么需要一个VM的话题:


    image.png

    找了下类似问题, 好像V神有提过:

    Vitalik Buterin gave a presentation about Ethereum to Hyperledger April 28 2016 and had this slide:

    EVM Requirements

    ● Small code size (so that very many contracts from many users can be stored by one node)

    ● VM security designed around running untrusted code from arbitrary parties

    ● Multiple implementations (for cross-checking, and to mitigate developer centralization in the public chain)

    ● Perfect determinism (for consensus)

    ● Infinite loop resistance

    • This itself must be accomplished perfectly deterministically; timeouts are a no-go

    Vitalik clarified the third point as the developer centralization observed in Bitcoin, where a single implementation is deemed the protocol.

    There was no time in the presentation available to discuss the evaluation against existing virtual machines.


    determinism:

    The Ethereum blockchain was designed to be entirely deterministic. This
    means, that if I took the whole history of the network, then replayed it on
    my computer, I should always end up with the correct state.

    确保确定性, 将网络整个历史数据在个人电脑上重现, 可以得到和原来一致的状态。

    Since the internet is non-deterministic and changes over time, then every
    time I replayed all of the transactions on the network, I would receive a
    different answer.

    因为互联网是不确定的, 并且随时改变, 每次我在网络里重现transaction我可能得到的是不同的结果。

    Determinism is important so that nodes can come to a consensus. If there were a contract that required the number of upvotes on this question, the value could differ from time to time or even place to place, causing nodes in the future or without access to this site to reach different conclusions about the state of the network, thus breaking the consensus.

    确定性对所有的节点达成共识是至关重要的。 如果有一个合约针对某个问题需要大量的投票, 在不同的时间甚至空间其value都不同, 将会导致节点无法对网络状态达成统一结论, 最终破坏共识。

    By requiring that every data input is initiated through an external
    transaction, we can be sure that the blockchain itself contains all of the
    information required to verify itself. By using a single contract-level oracle
    (https://oraclize.it) instead of a network or consensus-
    level feature, we ensure that there is only one canonical result.

    要求每个数据输入都是通过外部transaction发起,我们可以肯定区块链本身包含所有的验证自己所需的信息。 通过使用单个合约级别的oracle而不是网络或共识level的feature,我们确保只有一个规范的结果。

    简单理解: 在一个确定性的封闭环境里, 确保达成共识提供有效支撑。 从这一点上我们也可以类比下JVM, 就是为了解决不同平台能得到统一的结果, 在这一点上区块链的VM也是类似。

    相关文章

      网友评论

        本文标题:79/666 Blockchain | why do we ne

        本文链接:https://www.haomeiwen.com/subject/mlrfqqtx.html