pyrsia / pyrsia

Decentralized Package Network
https://pyrsia.io/
Apache License 2.0
298 stars 42 forks source link

Explore: better ways to distribute new blocks #1247

Open erwin1 opened 2 years ago

erwin1 commented 2 years ago

Current situation:

When a new block is added, this procedure is followed:

Problems with this:

Image

Proposed solution:

efrisch commented 2 years ago

One recommendation from the libp2p team was implementing the ping protocol. Which is more of a heartbeat in libp2p. From here, "The ping protocol is a simple liveness check that peers can use to quickly see if another peer is online."

efrisch commented 2 years ago

Sorry, for this ticket, I meant graphsync should be investigated.

betarelease commented 1 year ago

Moving this to 0.2.2 since this is not going to be releasable in 2 weeks.

erwin1 commented 1 year ago

It was discussed and decided to do this in several iterations:

  1. one authorized node - many regular nodes: Replace the current block broadcast in the Blockchain Service with gossipsub #1345
  2. one authorized node - many regular nodes: Keep blocks/logs up-to-date even if node missed out on new block messages #1346
  3. a few authorized nodes - many regular nodes: Make sure this mechanism also works when there are multiple authorized nodes (simple consensus)
  4. Multiple authorized/multiple regular nodes: Add real consensus mechanism
betarelease commented 1 year ago

Is this exploration done now? @efrisch