Hash Pointer and Blockchain

hash pointer is :

  • pointer to where some info is stored, and
  • cryptographic hash of the info

if we have a hash pointer, we can

  • ask to get the info back, and
  • verify that it hasn't changed

key idea: build data structures with hash pointers
linked list: use case tamper-evident log
binary tree with hash pointers = "Merkle Tree"
Advantages of Merkle trees:

  • Tree holds many items but just need to remember the root hash
  • Can verify membership in O(log n) time/space

Variant: sorted Merkle tree
can verify non-membership in O(log n) (show items before, after the missing one)

More generally,
hash pointer can be used in any pointer-based data structure that has no cycles.

How a blockchain network runs?

  1. Users interact with the blockchain via a pair of private/public keys. They use their private key to sign their own transactions, and they are addressable on the network via their public key. The use of asymmetric cryptography brings authentication, integrity, and non-repudiation into the network. Every signed transaction is broadcasted by a user's node to its one-hop peers.
  2. The neighboring peers make sure this incoming transaction is valid before replaying it any further; invalid transactions are discarded. Eventually this transaction is spread across the entire network.
  3. The transactions that have been controlled and validated by the network using the process above during an agreed-upon time interval, are ordered and packaged into a timestamped candidate block. This is a process called mining. The mining node broadcasts this block back to the network. (The choice of the mining node and the contents of the block depend on the consensus mechanism that the network employs. )
  4. The node verify that the suggested block (a) contains valid transactions, and (b) references via hash the correct previous block on their chain. If that is the case, they add the block to their chain, and apply the transactions it contains to update their world view. If that is not the case, the proposed block is discarded. This marks the end of a round.
    Note that this is a repeating process.
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • **2014真题Directions:Read the following text. Choose the be...
    又是夜半惊坐起阅读 10,126评论 0 23
  • 生活现实而残酷,能将一个人改变的面目全非。 前日,跟一个很久未见的朋友吃饭,聊天叙旧,恍惚间,感觉彼此隔着很远。 ...
    梨落2016阅读 311评论 0 0
  • 【有这样的过往,墨色成伤】 季甘年14岁时爱过一个人。 14岁的季甘年笨笨傻傻,心思单纯...
    臭槟榔树阅读 470评论 0 2
  • 【书 目】《非暴力沟通》 【课程领拆】李玲老师 【上课时间】2017年8月3日 观察-感受-需要-请求 【作...
    MASTERJIANG阅读 152评论 0 0
  • 最优秀的商人具有深刻的内力——他们与我们一样,甚至比我们更加渴望真正的精神生活。他们的见识比我们大多数人都要广,他...
    柔光宝宝阅读 123评论 0 0