区块链网络中的节点是否一定要给其他节点同步数据?
/**
* Increment peer's misbehavior score. If the new value >= DISCOURAGEMENT_THRESHOLD, mark the node
* to be discouraged, meaning the peer might be disconnected and added to the discouragement filter.
* Public for unit testing.
*/
virtual void Misbehaving(const NodeId pnode, const int howmuch, const std::string& message) = 0;
区块链网络中是否一定需要全节点(存储所有交易的节点)
去中心化存储(Decentralized Storage)目前有三类解决方案
去中心化网络,没有链
链下存储,链上证明
链上存储
分叉的讲解示例
Arweave
为了激励存储更多tx的节点,Arweave的共识算法总共经历了3个版本的迭代。
对Previous Block
计算hash,然后除以 Previous Block Height
并取余,得到Recall Block Height
根据Recall Block Height
获取Recall Block
,如果没有其完整数据则返回上一步
拼接以下数据并计算hash,得到BDS
(Block Data Segment),记录在New Block
的header里面
Previous Block
的hashRecall Block
的完整数据New Block
的完整数据(包括tx list,不包括BDS
和Nonce
)调节New Block
的Nonce
,使block header的hash(RandomX,CPU友好)符合Difficulty