feat: node operator strikes#832
Open
vgorkavenko wants to merge 7 commits into
Open
Conversation
2ef143c to
808e273
Compare
dgusakov
reviewed
Jun 26, 2026
dgusakov
reviewed
Jun 26, 2026
9973a53 to
bc1724d
Compare
dgusakov
reviewed
Jul 9, 2026
| function initialize(address admin) external initializer { | ||
| if (admin == address(0)) revert ZeroAdminAddress(); | ||
| _grantRole(DEFAULT_ADMIN_ROLE, admin); | ||
| // TODO: set initial tiers here |
| if (descLength == 0 || descLength > MAX_DESCRIPTION_LENGTH) revert InvalidDescription(); | ||
|
|
||
| uint256 lifetime = input.lifetime; | ||
| if (lifetime == 0) revert InvalidLifetime(); |
Contributor
There was a problem hiding this comment.
Suggested change
| if (lifetime == 0) revert InvalidLifetime(); | |
| if (lifetime == 0) revert ZeroLifetime(); |
| uint256 lifetime = input.lifetime; | ||
| if (lifetime == 0) revert InvalidLifetime(); | ||
| uint256 expiry = block.timestamp + lifetime; | ||
| if (expiry > type(uint64).max) revert InvalidLifetime(); |
Contributor
There was a problem hiding this comment.
Suggested change
| if (expiry > type(uint64).max) revert InvalidLifetime(); | |
| if (expiry > type(uint64).max) revert LifetimeTooLong(); |
| } | ||
|
|
||
| /// @dev Swap-pops the id, deletes the record, emits. Caller refreshes the weight (once per batch). | ||
| function _removeStrike(OperatorStrikes storage rec, uint256 nodeOperatorId, uint256 idx, uint256 strikeId) private { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
NodeOperatorStrikes: committee-issued strikes that cut a Node Operator's allocation weight (→0) via active strike count function.IWeightBoostProvider(per-operator).Checklist
just coverage)