weihaopeng / W3-POC

A large-scale P2P application protocol testbed based on IPFS and Libp2p for testing W3 which is a consensusless blockchain.
MIT License
7 stars 1 forks source link

send 'node.chosenAs' msg when a node is chosen as the collector or the witness. #19

Closed weihaopeng closed 2 years ago

weihaopeng commented 2 years ago

@ericwangqing Send the 'swarm.init' or 'node.init' after config the w3.swarm to sync the swarm between different clients. The data should be nodes' brief info in the swarm in order.

{ 'node.init', swarm.nodes.map(node => node.briefObj) }
weihaopeng commented 2 years ago

Also need publicKeyString, to determine in which round the node is a witness.

ericwangqing commented 2 years ago

@weihaopeng message added, checkout and close this issue if it's fine :)

weihaopeng commented 2 years ago

@weihaopeng message added, checkout and close this issue if it's fine :)

I need to get swarm.config in swarm:init message. Because in swarm graph, a departure node is highlight and after LOCAL_UPPER_BOUND will auto downplay.

weihaopeng commented 2 years ago

done