ethereum / cbc-casper

GNU Affero General Public License v3.0
229 stars 44 forks source link

[WIP] Feat/network rework #108

Closed naterush closed 6 years ago

naterush commented 7 years ago

This is a huge work in progress. Lots of redesign needs to happen before this is ready to merge.

As of now, the network is maintaining a priority queue of messages. The priority of these messages is determined by some function that should be specified to the network. (Note that it is possible to have the priority of these messages change as things progress if that is wanted.) They are also prioritized by the "step" on which they will be delivered. A message with a lower step number will be delivered to its respective recipient before a message with a higher step number.

Furthermore, this function that determines the step that the messages are delivered on can be specified pairwise between any two validators. This is likely the most general model of connectivity that we will need (and one can imagine this being used to simulate peering, etc).

Here are some examples of network models we could simulate:

However, to this work, it seems we need to specify liveness strategies for the validators. As of now, the naive way of making blocks is kinda absurd (and we never actually build a blockchain). I'm not totally sure what the best way to do this is, though...

naterush commented 7 years ago

Going to keep this open for now. Likely will close and reopen a new PR - but want to keep this as a light implementation guide if we decide to pursue something like this.

naterush commented 6 years ago

Closing this 4 now.