Skip to content

feat: node operator strikes#832

Draft
vgorkavenko wants to merge 3 commits into
phase-2from
feat/node-operator-strikes
Draft

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

Conversation

@vgorkavenko

Copy link
Copy Markdown
Contributor

Description

TBD

Checklist

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

@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
/// @dev maps a strike id to its position in `active` (0 = not active).
mapping(uint256 strikeId => uint256 position) index;
/// @dev on-chain strike description; cleared on removal (empty if removed or never issued).
mapping(uint256 strikeId => string description) descriptions;

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.

This can be a part of Strike struct I think

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It would increase removing cost because we would need to swap-pop struct with string field

Comment thread src/NodeOperatorStrikes.sol Outdated
Comment thread src/NodeOperatorStrikes.sol
Comment thread src/NodeOperatorStrikes.sol Outdated

/// @inheritdoc INodeOperatorStrikes
function setStrikeThresholds(StrikeThreshold[] calldata thresholds) external onlyRole(DEFAULT_ADMIN_ROLE) {
_setStrikeThresholds(thresholds);

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.

We need to invalidateMR weights here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah, there is an addition in natspec that this method should be called along with weights refreshing for operators with strikes

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