-
Notifications
You must be signed in to change notification settings - Fork 3
Implements mir-validator, mir consensus and decouples storage #14
Conversation
Signed-off-by: Matej Pavlovic <matopavlovic@gmail.com>
Signed-off-by: Matej Pavlovic <matopavlovic@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added several cosmetic comments and suggestions!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First batch of comments. I'll post more in additional batches, so you're not blocked.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a few more comments, none of them critical.
I also skipped Lotus code that didn't seem to have anything to do with Mir, as I didn't even have a clue what they are supposed to do...
sm.NextBatch <- &Batch{ | ||
Messages: msgs, | ||
Validators: maputil.GetSortedKeys(sm.memberships[sm.currentEpoch]), | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once snapshots are supported, this will need to happen synchronously. How hard would it be to forego the channel completely and do right here what the mine
function does on reading from that channel?
In fact, maybe we could get rid of more of these channels and handle the functionality right in the state manager...
After the internal review, closing in favor of filecoin-project/lotus#9492 targeting lotus |
Related Issues
Proposed Changes
This PR integrates the Mir framework and implements a pBFT consensus algorithm over Mir. Mir is implemented as an alternative consensus algorithm for Lotus. In order to run Lotus with Mir, a new build parameter
build.Consensus
has been provided.This PR includes:
chain/consensus/mir
of Mir as a new consensus interface.mir-validator
process that implements all the mining and block producing logic for Mir.make mir-validator
can be used to compile the process. This process is responsible for ordering new transactions and proposing new blocks to the network.build/params_buildernet.go
) and a newbuild.Consensus
flag used to determine the type of consensus to use. Using the Mir consensus disables the block production andwinningPoSt
process fromlotus-miner
and forces the use of fake randomness forwindowPoSt
.lotus-miner
can still be used (and run) in a Mir Lotus network for storage-specific features (on boarding storage, starting storage and retrieval deals, markets, etc.).What's next?
We currently don't support the ability for other full nodes in the network to sync with a Mir network. Only validators running the consensus algorithm get new blocks. The next PR will include the syncing protocol (implementing #4)