-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add blockchain crate defining basic emulated blockchain structure #9
Conversation
The big missing parat are rewards and slashing. For rewards we probably need to keep track who generated signatures (including valid signatures submitted within some period after quorum has been reached). With slashing there are many questions to answer: do we and if so how do we remove slashed validator from validators set.
All of these are really good points. I'd suggest bringing them to Miguel Matos.
|
There’s no obvious way how to halt though. To remove someone from validators we need to generate a new block with new epoch. So we either generate a new epoch with minimums being breached but then can never recover since we don’t have enough stake to sign on a new validator. Or we don’t generate a new epoch and stop block production until we get new validators but in that case the validators who wanted to quite still remain in the epoch. |
I was thinking about the second option
|
But then whoever wants to quit will remain a validator until a replacement is found. This is what’s essentially implemented right now (with the exception that the chain isn’t stopped). |
Co-authored-by: Dhruv D Jain <[email protected]> Signed-off-by: Michal Nazarewicz <[email protected]>
Sorry for the delay. I would have sworn I’ve sent this PR for review
on Saturday already. Anyway here it is. The two big missing parts
are rewards and slashing.
For rewards we probably need to keep track who generated signatures
(including valid signatures submitted within some period after quorum
has been reached). I have some thoughts and draft code for handling
this but not yet finalised. I’m imagining some kind of RewardsManager
who keeps track of last blocks and marks who signed them.
With slashing there are many questions to answer: do we and if so how
do we remove slashed validator from validators set. Removal requires
creation of a new epoch and of course it only applies for the future
blocks.
And there’s overall question about configuration such as minimum
number of validators, minimum amount of stake etc. What happens if
validator quits and that brings us below the minimums? What if
validators gets slashed and that brings us below the minimums? Do we
have minimums?