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

Refactor: Consensus::enterCommittee #147

Open
deepesh-kn opened this issue Dec 18, 2019 · 3 comments
Open

Refactor: Consensus::enterCommittee #147

deepesh-kn opened this issue Dec 18, 2019 · 3 comments

Comments

@deepesh-kn
Copy link
Collaborator

deepesh-kn commented Dec 18, 2019

  • Update the function signature
function enterCommittee(
    bytes32 _committeeMetachainId,
    bytes32 _validatorMetachainId,
    uint256 _validatorMetablockHeight,
    address _validator,
    address _furtherMember
)
    external
  • The bytes32 _committeeMetachainId is used for the following

    • Determine for which metachain the Committee was formed.
    • To validate that the metablock round status was CommitteeFormed
  • The bytes32 _validatorMetachainId is used for the following

    • Determine the metachain that validator belongs to.
    • To check when the validator joined the core. The validator can enter the committee if the validator has joined the core at a block height that was less than committee formation height.
    • To verify that the validator is still active.
  • The uint256 _validatorMetablockHeight is required

    • This determines the latest metablockchain height for which the validator is active. The metachain for this validator can be different from the metachain for which the committee is formed.
  • The address _validator is the address of the validator which has not been added and is required

    • To check if the _validator is not slashed
    • To check if the _validator is valid when the committee is formed
  • The address _furtherMember is

    • It is the nearest validator address in the committee.
  • Reference: https://github.com/mosaicdao/mosaic-pm/blob/master/specification-discussions/20191206-consensus.md

    • For now, do not implement
      • address payable _reimbursementReceiver, and
      • reimburseGas(GAS_ENTER_COMMITTEE, _reimbursementReceiver) at the function signature as these will be defined later
@pgev
Copy link
Collaborator

pgev commented Dec 19, 2019

Drafts: pgev#3

@pgev
Copy link
Collaborator

pgev commented Feb 11, 2020

An outdated implementation for future references are here #161.

@pgev pgev assigned pgev and unassigned pgev Feb 11, 2020
@pgev
Copy link
Collaborator

pgev commented Feb 13, 2020

Moving it back as I've not worked on it properly and will not have enough time to work because of upcoming facilitator spec discussions + new sprint.

@pgev pgev removed their assignment Feb 13, 2020
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

No branches or pull requests

2 participants