pkel / cpr

consensus protocol research
9 stars 2 forks source link

Support custom chain progress and add Ethereum #6

Closed pkel closed 2 years ago

pkel commented 2 years ago

This PR adds the Ethereum protocol and a SSZ'16 like attack space.

Supporting Ethereum made necessary some changes to API.

  1. Protocols now define a progress property for each block. DAAs try to maintain constant progress per time. This makes DAA explicit and configurable. Before, we were doing constant number of confirmed puzzles per time which is less generic and does not apply to all protocols.
  2. Protocols now define how to extract a linear history from any block.
  3. Reward functions are now applied on the linear history of the winning block.