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

Update smart contracts to include validators storage fix #1325

Conversation

Stefan-Ethernal
Copy link
Collaborator

@Stefan-Ethernal Stefan-Ethernal commented Mar 22, 2023

Description

This PR updates smart contracts spec since there is a fix for validators storage, being made through 0xPolygon/edge-contracts#189. The main point is to introduce new field to the ValidatorMetadata, which denotes is validator active, and to filter out non-active ones when retrieved from the ChildValidatorSet SC on the client.

Changes include

  • Bugfix (non-breaking change that solves an issue)
  • Hotfix (change that solves an urgent issue, and requires immediate attention)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (change that is not backwards-compatible and/or changes current functionality)

Breaking change

Included additional IsActive parameter to validator struct, which is being persisted to the ExtraData.

Checklist

  • I have assigned this PR to myself
  • I have added at least 1 reviewer
  • I have added the relevant labels
  • I have updated the official documentation
  • I have added sufficient documentation in code

Testing

  • I have tested this code with the official test suite
  • I have tested this code manually

@Stefan-Ethernal Stefan-Ethernal added the feature New update to Polygon Edge label Mar 22, 2023
@Stefan-Ethernal Stefan-Ethernal self-assigned this Mar 22, 2023
@Stefan-Ethernal Stefan-Ethernal changed the title Update smart contracts and filter out non active validators Update smart contracts to include validators storage fix Mar 22, 2023
@Stefan-Ethernal Stefan-Ethernal marked this pull request as ready for review March 22, 2023 15:04
@Stefan-Ethernal Stefan-Ethernal added the breaking change Functionality that contains breaking changes label Mar 23, 2023
@Stefan-Ethernal Stefan-Ethernal mentioned this pull request Mar 23, 2023
11 tasks
@Stefan-Ethernal Stefan-Ethernal force-pushed the EVM-452-synchronize-the-client-with-the-changes-on-the-smart-contract branch from eaf0248 to 2459662 Compare March 24, 2023 07:29
Copy link
Contributor

@vcastellm vcastellm left a comment

Choose a reason for hiding this comment

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

What denotes if it's active or not?

@Stefan-Ethernal
Copy link
Collaborator Author

What denotes if it's active or not?

Stake amount, namely if its stake is 0, then it is inactive, otherwise, it is active. (FTR: https://github.com/0xPolygon/core-contracts/blob/dev/contracts/child/modules/CVSStaking.sol#L67-L69)

@Stefan-Ethernal Stefan-Ethernal force-pushed the EVM-452-synchronize-the-client-with-the-changes-on-the-smart-contract branch from 2459662 to 3a56fc8 Compare March 27, 2023 19:44
@Stefan-Ethernal Stefan-Ethernal merged commit 99dffd5 into develop Mar 29, 2023
@Stefan-Ethernal Stefan-Ethernal deleted the EVM-452-synchronize-the-client-with-the-changes-on-the-smart-contract branch March 29, 2023 09:36
flydax pushed a commit to polygomic/nexilix-edge that referenced this pull request Apr 17, 2023
)

* Provide hex encoded private key

* Update bridge framework

* Update withdraw command

* Simplify exit command

* Remove redundant comment

* Update smart contracts and filter out non active validators
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Functionality that contains breaking changes feature New update to Polygon Edge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants