Commit cbb859e
fix: update slasher field immediately when instantEffectBlock=true
Addresses audit finding L-01: Instant slasher setting leaves stale slasher field in storage.
When a slasher is set with immediate effect (via createOperatorSets or migrateSlashers),
_updateSlasher now also updates the params.slasher field, not just pendingSlasher.
This ensures storage consistency where the raw SlasherParams struct reflects the
effective slasher immediately.
Changes:
- AllocationManager._updateSlasher(): Set params.slasher when instantEffectBlock=true
- IAllocationManager: Updated NatSpec for SlasherParams struct
- AllocationManagerHarness: Added getSlasherParams() for testing raw storage
- Unit tests: Added tests verifying storage consistency
- Docs: Updated createOperatorSets and migrateSlashers effects
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent e4bf888 commit cbb859e
File tree
5 files changed
+63
-8
lines changed- docs/core
- src
- contracts
- core
- interfaces
- test
- harnesses
- unit
5 files changed
+63
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
340 | | - | |
| 340 | + | |
341 | 341 | | |
342 | 342 | | |
343 | 343 | | |
| |||
1119 | 1119 | | |
1120 | 1120 | | |
1121 | 1121 | | |
1122 | | - | |
1123 | | - | |
1124 | | - | |
| 1122 | + | |
| 1123 | + | |
1125 | 1124 | | |
1126 | 1125 | | |
1127 | 1126 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
754 | 754 | | |
755 | 755 | | |
756 | 756 | | |
| 757 | + | |
| 758 | + | |
757 | 759 | | |
758 | 760 | | |
759 | 761 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
88 | 89 | | |
89 | 90 | | |
90 | 91 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
38 | 46 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4181 | 4181 | | |
4182 | 4182 | | |
4183 | 4183 | | |
| 4184 | + | |
| 4185 | + | |
4184 | 4186 | | |
4185 | 4187 | | |
4186 | 4188 | | |
| |||
4332 | 4334 | | |
4333 | 4335 | | |
4334 | 4336 | | |
| 4337 | + | |
| 4338 | + | |
| 4339 | + | |
| 4340 | + | |
| 4341 | + | |
| 4342 | + | |
| 4343 | + | |
| 4344 | + | |
| 4345 | + | |
| 4346 | + | |
| 4347 | + | |
| 4348 | + | |
| 4349 | + | |
| 4350 | + | |
| 4351 | + | |
| 4352 | + | |
| 4353 | + | |
| 4354 | + | |
| 4355 | + | |
| 4356 | + | |
| 4357 | + | |
| 4358 | + | |
| 4359 | + | |
| 4360 | + | |
4335 | 4361 | | |
4336 | 4362 | | |
4337 | 4363 | | |
| |||
4522 | 4548 | | |
4523 | 4549 | | |
4524 | 4550 | | |
| 4551 | + | |
| 4552 | + | |
| 4553 | + | |
| 4554 | + | |
| 4555 | + | |
| 4556 | + | |
| 4557 | + | |
| 4558 | + | |
| 4559 | + | |
| 4560 | + | |
| 4561 | + | |
| 4562 | + | |
| 4563 | + | |
| 4564 | + | |
| 4565 | + | |
| 4566 | + | |
| 4567 | + | |
| 4568 | + | |
| 4569 | + | |
4525 | 4570 | | |
4526 | 4571 | | |
4527 | 4572 | | |
| |||
0 commit comments