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

Reduce NodeOperatorsRegistry contract size #498

Conversation

Psirex
Copy link
Contributor

@Psirex Psirex commented Jan 18, 2023

The next modifications were applied to the NodeOperatorsRegistry contract to reduce the bytecode size from 27.511 Kb to 23.507 Kb:

  • Replace modifiers with internal methods
  • Refactor updateExitedValidatorsKeysCount() & unsafeUpdateExitedValidatorsKeysCount() to use the same internal method _updateExitedValidatorsKeysCount()
  • Refactor addSigningKeys(), addSigningKeysOperatorBH() to use the same internal method _addSigningKeys()
  • Refactor removeSigningKey(), removeSigningKeys(), removeSigningKeyOperatorBH(), and removeSigningKeysOperatorBH() to use the same internal method _removeUnusedSigningKeys()

@Psirex Psirex requested review from bulbozaur and rkolpakov January 19, 2023 07:39
Copy link
Contributor

@bulbozaur bulbozaur left a comment

Choose a reason for hiding this comment

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

LGTM

@Psirex Psirex merged commit a09b4d5 into staking_router_post_audit_fixes Jan 19, 2023
@TheDZhon TheDZhon deleted the staking_router_node_operators_contract_size branch February 6, 2024 18:28
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