On P2P, headers and reorgs

P2P

Direct connections

Relaying services

Client-server centralisation

To SPV or not to SPV

Headers

Reliable connectivity

A web-based headers API

  1. The application connects to the web socket and receives the tip for the server.
  2. The application requests the missing headers up to the tip.
  3. The application adds new tips from the web socket to it’s local blockchain headers.

Reorgs

  1. The application connects to the web socket and receives the tip for the server.
  2. The application requests the single header above their current height. If it does not connect there was a reorg to some part of their existing state. The application then requests headers (probably with a binary search) to locate the fork height and it then uses this as their starting point
  3. The application synchronises headers using the REST API from their starting point to fill in the missing headers.
  4. The application adds new tips from the web socket to it’s local blockchain headers.

Header service provisioning

Final thoughts

--

--

--

ElectrumSV developer

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

December 01, 2017

Most Popular Editor’s / IDE’s For Scala!

Dockerizing a Simple Python Flask Application

If you can’t have a product manager, think like one

Top Eastern European Software Development Agencies..!!!

SLAE32 — Assingment-3 (egghunter)

Machine Learning On Azure | Microsoft Azure Cloud | Dushyant Singh | Live Webinar | Chapter-1

OwlDocs: How not to document your software library

A lady knitting something in beige wool

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Roger Taylor

Roger Taylor

ElectrumSV developer

More from Medium

What exactly is bitcoin, blockchain, DLT, and its power? And why is it so important?

WHAT’S YOUR FAVOURITE FEATURE ON PLUTOS NETWORK?

IS HEDERA HASGRAPH, THE RIVAL TO BLOCKCHAIN ?

Covering Celo [December 2021]