-
Notifications
You must be signed in to change notification settings - Fork 86
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
[draft] update MCR to include an acceptor role #713
[draft] update MCR to include an acceptor role #713
Conversation
|
||
address[] memory attesters = getAttesters(); | ||
// map the blockhash to the attesters | ||
uint256 leaderIndex = uint256(blockHash) % attesters.length; |
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.
I'm sure this is in the MDs that I haven't gotten to you, but doesn't this particular election allow a leader to just mine for a blockhash that would elect themselves. Really, we would want quorum-based leader election if we are going to introduce a leader.
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.
It's L1 blockhash not L2. My assumption is L1 blockhash is not predictable or cannot be influenced by the L2 validators
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.
(Long term I think this is also not a great assumption but it buys time to look into a better randomness solution )
Summary
protocol-units
Introduces the role of acceptor in the MCR contract, see MIP-37.
The acceptor
Motiviation
Currently rewarding based on time of commitment and the complexity that arises from the last committer having higher commit cost and different rewards may cause race conditions, co-location and centralization.
This can be resolved by separating the tasks into attesters and acceptor, where acceptor is a new role that converts provided attester commitments into a postconfirmation and update the state (i.e., rollover to new epochs). The sole role of the attester becomes to commit.
As a simple first PoC the current acceptor could be selected based on "slow" randomness from L1. E.g. using hashes from L1-blocks.
Changelog
Testing
forget test
okcargo check
okcargo test
failOutstanding issues