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.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值