-
Notifications
You must be signed in to change notification settings - Fork 1k
Refactor validator into an abstract consensus message handler #108
Comments
@muralisrini so we can't put the implementor in the payload struct. Another approach is to add a enum subtype into the
|
Murali works out the following pattern:
I updated the issue description. |
Based on the discussion, @binhn, @muralisrini, and I had today:
The flow is as follows:
|
On the In general, the consensus algo package doesn't have to be under |
@binhn: Both good points. I don't see a need for us calling Init() ourselves, I just had no idea that Go runs init() when it loads package. I modified my original post accordingly. |
Refactor the current code into an abstract consensus message handler to process
CONSENSUS
messages, and call the function on the payload with the message:The payload is an
ConsensusMessage
object:The implementor, like PBFT, will implement the following interface:
The 'consensus' package provides public functions for the implementor to interface with the validator, including broadcast messages, execute transactions, and update state.
The text was updated successfully, but these errors were encountered: