Skip to content

feat: node operator strikes#832

Open
vgorkavenko wants to merge 7 commits into
phase-2from
feat/node-operator-strikes
Open

feat: node operator strikes#832
vgorkavenko wants to merge 7 commits into
phase-2from
feat/node-operator-strikes

Conversation

@vgorkavenko

@vgorkavenko vgorkavenko commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Description

  • New NodeOperatorStrikes: committee-issued strikes that cut a Node Operator's allocation weight (→0) via active strike count function.
  • Wired into MetaRegistry as an IWeightBoostProvider (per-operator).
  • Committee issues/removes; expired strikes removable permissionlessly.
  • Deploy wiring + unit tests.

Checklist

  • Appropriate PR labels applied
  • Test coverage maintained (just coverage)
    • Tests are added/updated
  • Documentation maintained
    • No need to update

@vgorkavenko vgorkavenko force-pushed the feat/node-operator-strikes branch from 2ef143c to 808e273 Compare June 26, 2026 08:27
@vgorkavenko vgorkavenko changed the title Feat/node operator strikes feat: node operator strikes Jun 26, 2026
Comment thread src/NodeOperatorStrikes.sol Outdated
Comment thread src/NodeOperatorStrikes.sol Outdated
Comment thread src/NodeOperatorStrikes.sol Outdated
Comment thread src/NodeOperatorStrikes.sol Outdated
Comment thread src/NodeOperatorStrikes.sol
Comment thread src/NodeOperatorStrikes.sol Outdated
Comment thread src/NodeOperatorStrikes.sol Outdated
Comment thread src/NodeOperatorStrikes.sol Outdated
Comment thread src/NodeOperatorStrikes.sol
Comment thread src/NodeOperatorStrikes.sol Outdated
Comment thread src/NodeOperatorStrikes.sol
@vgorkavenko vgorkavenko force-pushed the feat/node-operator-strikes branch from 9973a53 to bc1724d Compare June 30, 2026 10:41
@vgorkavenko vgorkavenko marked this pull request as ready for review July 8, 2026 13:30
@vgorkavenko vgorkavenko requested a review from a team as a code owner July 8, 2026 13:30
@vgorkavenko vgorkavenko requested review from madlabman and skhomuti July 8, 2026 13:30
function initialize(address admin) external initializer {
if (admin == address(0)) revert ZeroAdminAddress();
_grantRole(DEFAULT_ADMIN_ROLE, admin);
// TODO: set initial tiers here

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Create a task for it

if (descLength == 0 || descLength > MAX_DESCRIPTION_LENGTH) revert InvalidDescription();

uint256 lifetime = input.lifetime;
if (lifetime == 0) revert InvalidLifetime();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Fix func order pls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants