pkel / cpr

consensus protocol research
9 stars 2 forks source link

Synchronize Tailstorm implementations #12

Closed pkel closed 2 years ago

pkel commented 2 years ago

The Tailstorm implementation here in this repo (spec) does not align with the C++ implementation of the protocol (impl).

Impl (full/strong) blocks do not require a proof-of-work; they are formed deterministically from $k$ sub blocks; all miners derive their own strong block as soon as they have $k$ sub blocks available; due to the determinism the resulting strong block are compatible (the same) as long as the $k$ referenced sub blocks are the same.

Spec (full/strong) blocks require a proof-of-work; there are $k-1$ sub blocks per strong block; miners share the strong block with the other nodes as soon as the required proof-of-work is solved.

I think that the difference is not substantial. However, communicating the difference is tedious and might confuse readers. It'd be better if spec and impl align. I cannot change impl, thus I'll adapt the spec.


The current DAG / proof-of-work abstraction does not support deterministic appends. In principle it could be added, but we might get away without it. At least for a first draft.

I plan to implement a new version (spec') as follows.

Spec' (full/strong) blocks do not require a proof-of-work; forming them requires $k$ sub blocks parents; all miners derive their own strong block as soon as they have $k$ sub blocks available; due to the non-determinism the resulting strong block are not compatible; each miner will mine on his own strong block until the conflict is resolved by counting confirming sub blocks; this will create a lot of strong block orphans.

This should be relatively straight forward. We have something similar (without tree-structure of sub blocks) in the $B_k$ protocol.

At a later stage, I can add support for deterministic appends. This will get rid of the orphaned strong blocks. This will transform spec' into spec.


  1. [x] Implement spec'.
  2. [x] Support deterministic appends.
pkel commented 2 years ago

Solved in #13.