Ethereum中节点之间区块的同步过程(The Process of Synchronization between Nodes in Ethereum)

本文介绍了Ethereum中节点间区块同步的触发条件及详细过程。当节点连接到具有更高总难度值的节点,或者收到总难度值更大的区块时,会启动同步。同步过程中,低难度节点向高难度节点请求区块头,通过二分搜索找到公共祖先,然后请求区块进行链同步。
摘要由CSDN通过智能技术生成

* 产生同步的条件

在区块的同步过程中,一个节点每次只会与另外其他一个进行同步,并且只有出现以下三种情况之一的时候节点之间才会开启一次同步:

  1. 节点N connect一个新节点P,P有更大的总难度值(P节点的区块链长度更长)时,N和P之间开启一次同步
  2. 与N已经connect的节点P通告它的total difficult值比N要大,N和P之间开启一次同步
  3. N收到一个比当前其区块链上的头结点的total difficulty值更大的区块,并且在N的链中找不到这个接收到的区块的祖先节点

文献原文:

A node will only synchronise with one other node at a time. A node N starts a block synchronisation in the following cases:
1. N starts a connection to a new peer with higher advertised total difficulty(e.g. after joining or rejoining the network).
2. A node advertising a higher total difficulty than N connects to N.
3. N receives a block with higher total difficulty than the head of its current blockchain and is missing some of the block’s ancestors.

* 同步的详细过程

Node N with lower total diffficulty

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值