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

Upgrade contract to increase max validators #307

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mtabasco
Copy link
Collaborator

No description provided.

import "../../SSVNetwork.sol";

contract SSVNetworkUpgradeValidatorsPerOperator is SSVNetwork {
function initializev2(uint32 validatorsPerOperatorLimit_) external reinitializer(_getInitializedVersion() + 1) {

Choose a reason for hiding this comment

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

Suggested change
function initializev2(uint32 validatorsPerOperatorLimit_) external reinitializer(_getInitializedVersion() + 1) {
function initializev2(uint32 validatorsPerOperatorLimit_) external reinitializer(2) {

I think this should do the job.

This means it can be called only once but probably it's still safer to add onlyOwner.

@mtabasco
Copy link
Collaborator Author

mtabasco commented Mar 6, 2025

Copy link

@riccardo-ssvlabs riccardo-ssvlabs left a comment

Choose a reason for hiding this comment

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

Approving with the following discussed assumptions:

  • only the owner will be able to call the new initializev2 function
  • we are ok with having this function callable multiple times, so it is not a real initializer anymore but it is more similar to a set function.

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