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

Remove stake lock #84

Merged
merged 9 commits into from
Oct 31, 2024
Merged

Remove stake lock #84

merged 9 commits into from
Oct 31, 2024

Conversation

Mike-CZ
Copy link
Collaborator

@Mike-CZ Mike-CZ commented Oct 29, 2024

No description provided.

Copy link
Collaborator

@thaarok thaarok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems ok to me, I just recommend to keep "unlocked" methods/etc with the unlocked prefix/suffix, since we plan to introduce a different locking later.

contracts/sfc/ConstantsManager.sol Outdated Show resolved Hide resolved
@@ -110,28 +110,8 @@ contract NodeDriver is Initializable {
);
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may simplify setGenesisValidator too:

    function setGenesisValidator(
        address _auth,
        uint256 validatorID,
        bytes calldata pubkey
    )

}
return reward;
function _scaleReward(uint256 fullReward) internal view returns (uint256) {
return (fullReward * c.rewardRatio()) / Decimal.unit();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems to be better inline into its only usage

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The scaling goes away completely.

Copy link
Collaborator

@jmpike jmpike left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove reward ratio completely. The rest looks good. Tests should be updated as well. Thanks.

@Mike-CZ Mike-CZ marked this pull request as ready for review October 31, 2024 08:50
@Mike-CZ Mike-CZ merged commit 0c6a7de into sonic_sfc Oct 31, 2024
1 of 2 checks passed
@Mike-CZ Mike-CZ deleted the mike/remove_lock branch October 31, 2024 08:50
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.

3 participants