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

Integrate with precompile of picking validator set. Feat bridge operators. #32

Merged

Conversation

nxqbao
Copy link
Contributor

@nxqbao nxqbao commented Oct 20, 2022

Description

  • Continue unfinished works in Implement rewarding for bridge operators #26
  • Integrate with precompile of sorting and arranging validator set.
  • Adjust to the requirement of syncing new validator set at end of period.
  • Add bridge operators.
  • Change meaning of the validator term. A validator has following roles: BlockProducer, BridgeOperator, or both.
  • Fix _removeCandidate function bug: removing the trailing element in _candidates
  • Fix sending wrong amount in _delegatingAmount
  • Fix tests

Discovered bug

  1. When a validator is slashed and gets deducted a staked amount to under balance, no delegators can top-up to this validator, since he will be kicked in the next period. Currently, both delegators and validators can top-up, and following side-effects get broken.

Checklist

  • I have clearly commented on all the main functions followed the NatSpec Format
  • The box that allows repo maintainers to update this PR is checked
  • I tested locally to make sure this feature/fix works

@nxqbao nxqbao force-pushed the feat/precompile-pick-validator-set-and-query-bridge-operators branch from d6ae3ed to 10e5f67 Compare October 21, 2022 05:11
@nxqbao nxqbao marked this pull request as ready for review October 21, 2022 08:07
contracts/libraries/Sorting.sol Outdated Show resolved Hide resolved
contracts/ronin/validator/RoninValidatorSet.sol Outdated Show resolved Hide resolved
contracts/interfaces/IRoninValidatorSet.sol Show resolved Hide resolved
contracts/ronin/validator/RoninValidatorSet.sol Outdated Show resolved Hide resolved
contracts/ronin/validator/RoninValidatorSet.sol Outdated Show resolved Hide resolved
contracts/ronin/validator/RoninValidatorSet.sol Outdated Show resolved Hide resolved
contracts/ronin/validator/RoninValidatorSet.sol Outdated Show resolved Hide resolved
contracts/ronin/validator/RoninValidatorSet.sol Outdated Show resolved Hide resolved
contracts/ronin/validator/RoninValidatorSet.sol Outdated Show resolved Hide resolved
@nxqbao nxqbao merged commit 3eb0823 into main Oct 24, 2022
@nxqbao nxqbao deleted the feat/precompile-pick-validator-set-and-query-bridge-operators branch October 24, 2022 09:21
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