Skip to content
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

Merged
merged 79 commits into from
Feb 21, 2025

Conversation

apenzk
Copy link
Contributor

@apenzk apenzk commented Oct 18, 2024

Summary

  • MIPs: MIP-37.
  • Categories: protocol-units

Introduces the role of acceptor in the MCR contract, see MIP-37.

The acceptor

  • should be selected based on L1 randomness
  • serves for a certain term period.
  • should be checked for liveness
  • should receive rewards for service
  • should be replaceable by volunteer attester
  • volunteer attester should receive rewards if acceptor is not live.

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

  • add acceptor role: attesters do not postconfirm or rollover anymore
  • postconfirmation by acceptor
  • rollover by acceptor
  • anyone can be acceptor

Testing

forget test ok
cargo check ok
cargo test fail

Outstanding issues

  • acceptor is always live
  • everyone can attest
  • no rewards


address[] memory attesters = getAttesters();
// map the blockhash to the attesters
uint256 leaderIndex = uint256(blockHash) % attesters.length;
Copy link
Collaborator

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.

Copy link
Contributor Author

@apenzk apenzk Oct 18, 2024

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

Copy link
Contributor Author

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 )

@apenzk apenzk changed the title [draft] update MCR to use a leader based approach [draft] update MCR to include a confirmer role Oct 21, 2024
@apenzk apenzk changed the title [draft] update MCR to include a confirmer role [draft] update MCR to include a acceptor role Feb 10, 2025
@apenzk apenzk changed the base branch from apenzk/mcr_stake to apenzk/postconfirmation February 21, 2025 09:42
@apenzk apenzk marked this pull request as ready for review February 21, 2025 10:03
@apenzk apenzk merged commit 13f8eb6 into apenzk/postconfirmation Feb 21, 2025
49 of 93 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants