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

76 150 validator spot limit #19

Merged
merged 11 commits into from
Jun 3, 2024
Merged

76 150 validator spot limit #19

merged 11 commits into from
Jun 3, 2024

Conversation

SamBorisov
Copy link
Contributor

Now having limit of 150 Validators

Vitomir2 and others added 5 commits May 22, 2024 11:41
create the Participation struct and the mapping for the validator's participation;
create new status for active validator and activate it when initially stake;
update the status check of the validator with active where applicable;
set the activeFrom the current block number when activate the validator;
create new function in the ValidatorSet interface to update the lastlyActive for the validator participation;
update the unstaking to take into account the delegation when unstaking full amount;
fix tests and write some new ones to cover the new changes;
@SamBorisov SamBorisov requested a review from R-Santev May 22, 2024 08:44
contracts/ValidatorSet/IValidatorSet.sol Show resolved Hide resolved
contracts/ValidatorSet/ValidatorSetBase.sol Outdated Show resolved Hide resolved
contracts/ValidatorSet/ValidatorSetBase.sol Outdated Show resolved Hide resolved
@SamBorisov SamBorisov requested a review from R-Santev May 27, 2024 10:29
function getValidators() public view returns (address[] memory) {
return validatorsAddresses;
}

/**
* @inheritdoc IValidatorSet
*/
function getCurrentValidatorsCount() public view returns (uint256) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
function getCurrentValidatorsCount() public view returns (uint256) {
function getActiveValidatorsCount() public view returns (uint256) {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed

@@ -86,12 +86,25 @@ export function RunStakingTests(): void {
await expect(validatorSet.connect(this.signers.validators[0]).stake({ value: this.minStake })).to.not.be.reverted;
});

it("should get all active validators", async function () {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is not a Staking function to be tested here and it doesn't return active 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.

Removed tests for in Staking for seeing all validators and active count

@@ -301,14 +301,21 @@ describe("ValidatorSet", function () {
expect(currentEpochId, "currentEpochId").to.equal(2);
});

it("should get all active validators - admin", async function () {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This function doesn't get active 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.

name fixed

@SamBorisov SamBorisov requested a review from R-Santev May 28, 2024 14:11
@SamBorisov SamBorisov merged commit 2e21eb0 into main Jun 3, 2024
0 of 7 checks passed
@SamBorisov SamBorisov deleted the 76-150-validator-spot-limit branch June 3, 2024 08:06
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