Skip to content

Commit 558613b

Browse files
0xClandestine8sunyuanypatil12
authored
refactor: natspec + interface changes (#364)
* refactor: natspec + interfaces refactor: natspec + interfaces refactor: natspec + interfaces docs: `RegistryCoordinator` natspec chore: forge fmt refactor: named mapping params docs: natspec `BLSApkRegistry` docs: natspec `BLSApkRegistry` docs: natspec `BLSApkRegistry` refactor: interface structure refactor: separate `BLSSignatureChecker` storage refactor: rename -> `IECDSAStakeRegistry` docs: natspec docs: natspec `ECDSAStakeRegistry` docs: natspec `EjectionManager` + separate storage docs: natspec docs: natspec `IndexRegistry` refactor: remove `IRegistry` chore: forge fmt chore: make storage-report docs: natspec refactor: remove `ISocketUpdater` refactor: use refactor: remove todo refactor: `///` -> `/**` refactor: improve comment refactor: rename var refactor: improve comment * fix: compiling - tests failing * refactor: test passing **mostly** * refactor: add missing gap * refactor: natspec * fix: test - state changes moved out of internal * chore: forge fmt * refactor: reorganize errors * refactor: remove override * refactor: note avsd * Yash/natspec - address comments (#372) * feat: natpsec with inheritance * feat: storage * chore: format * chore: fmt * chore: format * fix: test * fix: test --------- Co-authored-by: Michael Sun <[email protected]> Co-authored-by: Yash Patil <[email protected]>
1 parent 4954139 commit 558613b

File tree

74 files changed

+3421
-2397
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+3421
-2397
lines changed

.github/bin/storage-report.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ for file in $(find src/ -name "*.sol" ! -path "*/interfaces/*" ! -path "*/librar
3737
log "Processing contract: $contract_name"
3838

3939
# Run forge inspect and capture errors
40-
if ! forge inspect "$contract_name" storage --pretty > "$OUTPUT_DIR/$contract_name.md"; then
40+
if ! forge inspect "$contract_name" storage > "$OUTPUT_DIR/$contract_name.md"; then
4141
error "Failed to generate storage report for contract: $contract_name"
4242
else
4343
log "Storage report generated for contract: $contract_name"

bin/storage-report.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ for file in $(find src/ -name "*.sol" ! -path "*/interfaces/*" ! -path "*/librar
3737
log "Processing contract: $contract_name"
3838

3939
# Run forge inspect and capture errors
40-
if ! forge inspect "$contract_name" storage --pretty > "$OUTPUT_DIR/$contract_name.md"; then
40+
if ! forge inspect "$contract_name" storage > "$OUTPUT_DIR/$contract_name.md"; then
4141
error "Failed to generate storage report for contract: $contract_name"
4242
else
4343
log "Storage report generated for contract: $contract_name"

docs/RegistryCoordinator.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ These methods allow operators to register for/deregister from one or more quorum
4242
function registerOperator(
4343
bytes calldata quorumNumbers,
4444
string calldata socket,
45-
IBLSApkRegistry.PubkeyRegistrationParams calldata params,
45+
IBLSApkRegistryTypes.PubkeyRegistrationParams calldata params,
4646
SignatureWithSaltAndExpiry memory operatorSignature
4747
)
4848
external
@@ -88,7 +88,7 @@ If the Operator was not currently registered for any quorums, this method will r
8888
function registerOperatorWithChurn(
8989
bytes calldata quorumNumbers,
9090
string calldata socket,
91-
IBLSApkRegistry.PubkeyRegistrationParams calldata params,
91+
IBLSApkRegistryTypes.PubkeyRegistrationParams calldata params,
9292
OperatorKickParam[] calldata operatorKickParams,
9393
SignatureWithSaltAndExpiry memory churnApproverSignature,
9494
SignatureWithSaltAndExpiry memory operatorSignature
@@ -256,7 +256,7 @@ These methods are used by the Owner to configure the `RegistryCoordinator`:
256256
function createQuorum(
257257
OperatorSetParam memory operatorSetParams,
258258
uint96 minimumStake,
259-
IStakeRegistry.StrategyParams[] memory strategyParams
259+
IStakeRegistryTypes.StrategyParams[] memory strategyParams
260260
)
261261
external
262262
virtual

docs/storage-report/BLSSignatureCheckerStorage.md

Whitespace-only changes.
Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +0,0 @@
1-
2-
╭------------------+-------------+------+--------+-------+-------------------------------------------------------------------╮
3-
| Name | Type | Slot | Offset | Bytes | Contract |
4-
+============================================================================================================================+
5-
| _initialized | uint8 | 0 | 0 | 1 | src/unaudited/ECDSAServiceManagerBase.sol:ECDSAServiceManagerBase |
6-
|------------------+-------------+------+--------+-------+-------------------------------------------------------------------|
7-
| _initializing | bool | 0 | 1 | 1 | src/unaudited/ECDSAServiceManagerBase.sol:ECDSAServiceManagerBase |
8-
|------------------+-------------+------+--------+-------+-------------------------------------------------------------------|
9-
| __gap | uint256[50] | 1 | 0 | 1600 | src/unaudited/ECDSAServiceManagerBase.sol:ECDSAServiceManagerBase |
10-
|------------------+-------------+------+--------+-------+-------------------------------------------------------------------|
11-
| _owner | address | 51 | 0 | 20 | src/unaudited/ECDSAServiceManagerBase.sol:ECDSAServiceManagerBase |
12-
|------------------+-------------+------+--------+-------+-------------------------------------------------------------------|
13-
| __gap | uint256[49] | 52 | 0 | 1568 | src/unaudited/ECDSAServiceManagerBase.sol:ECDSAServiceManagerBase |
14-
|------------------+-------------+------+--------+-------+-------------------------------------------------------------------|
15-
| rewardsInitiator | address | 101 | 0 | 20 | src/unaudited/ECDSAServiceManagerBase.sol:ECDSAServiceManagerBase |
16-
|------------------+-------------+------+--------+-------+-------------------------------------------------------------------|
17-
| __GAP | uint256[49] | 102 | 0 | 1568 | src/unaudited/ECDSAServiceManagerBase.sol:ECDSAServiceManagerBase |
18-
╰------------------+-------------+------+--------+-------+-------------------------------------------------------------------╯
19-
Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +0,0 @@
1-
2-
╭----------------------------+-----------------------------------------------------------+------+--------+-------+---------------------------------------------------------╮
3-
| Name | Type | Slot | Offset | Bytes | Contract |
4-
+==========================================================================================================================================================================+
5-
| _initialized | uint8 | 0 | 0 | 1 | src/unaudited/ECDSAStakeRegistry.sol:ECDSAStakeRegistry |
6-
|----------------------------+-----------------------------------------------------------+------+--------+-------+---------------------------------------------------------|
7-
| _initializing | bool | 0 | 1 | 1 | src/unaudited/ECDSAStakeRegistry.sol:ECDSAStakeRegistry |
8-
|----------------------------+-----------------------------------------------------------+------+--------+-------+---------------------------------------------------------|
9-
| __gap | uint256[50] | 1 | 0 | 1600 | src/unaudited/ECDSAStakeRegistry.sol:ECDSAStakeRegistry |
10-
|----------------------------+-----------------------------------------------------------+------+--------+-------+---------------------------------------------------------|
11-
| _owner | address | 51 | 0 | 20 | src/unaudited/ECDSAStakeRegistry.sol:ECDSAStakeRegistry |
12-
|----------------------------+-----------------------------------------------------------+------+--------+-------+---------------------------------------------------------|
13-
| __gap | uint256[49] | 52 | 0 | 1568 | src/unaudited/ECDSAStakeRegistry.sol:ECDSAStakeRegistry |
14-
|----------------------------+-----------------------------------------------------------+------+--------+-------+---------------------------------------------------------|
15-
| _totalOperators | uint256 | 101 | 0 | 32 | src/unaudited/ECDSAStakeRegistry.sol:ECDSAStakeRegistry |
16-
|----------------------------+-----------------------------------------------------------+------+--------+-------+---------------------------------------------------------|
17-
| _quorum | struct Quorum | 102 | 0 | 32 | src/unaudited/ECDSAStakeRegistry.sol:ECDSAStakeRegistry |
18-
|----------------------------+-----------------------------------------------------------+------+--------+-------+---------------------------------------------------------|
19-
| _minimumWeight | uint256 | 103 | 0 | 32 | src/unaudited/ECDSAStakeRegistry.sol:ECDSAStakeRegistry |
20-
|----------------------------+-----------------------------------------------------------+------+--------+-------+---------------------------------------------------------|
21-
| _serviceManager | address | 104 | 0 | 20 | src/unaudited/ECDSAStakeRegistry.sol:ECDSAStakeRegistry |
22-
|----------------------------+-----------------------------------------------------------+------+--------+-------+---------------------------------------------------------|
23-
| _stakeExpiry | uint256 | 105 | 0 | 32 | src/unaudited/ECDSAStakeRegistry.sol:ECDSAStakeRegistry |
24-
|----------------------------+-----------------------------------------------------------+------+--------+-------+---------------------------------------------------------|
25-
| _operatorSigningKeyHistory | mapping(address => struct CheckpointsUpgradeable.History) | 106 | 0 | 32 | src/unaudited/ECDSAStakeRegistry.sol:ECDSAStakeRegistry |
26-
|----------------------------+-----------------------------------------------------------+------+--------+-------+---------------------------------------------------------|
27-
| _totalWeightHistory | struct CheckpointsUpgradeable.History | 107 | 0 | 32 | src/unaudited/ECDSAStakeRegistry.sol:ECDSAStakeRegistry |
28-
|----------------------------+-----------------------------------------------------------+------+--------+-------+---------------------------------------------------------|
29-
| _thresholdWeightHistory | struct CheckpointsUpgradeable.History | 108 | 0 | 32 | src/unaudited/ECDSAStakeRegistry.sol:ECDSAStakeRegistry |
30-
|----------------------------+-----------------------------------------------------------+------+--------+-------+---------------------------------------------------------|
31-
| _operatorWeightHistory | mapping(address => struct CheckpointsUpgradeable.History) | 109 | 0 | 32 | src/unaudited/ECDSAStakeRegistry.sol:ECDSAStakeRegistry |
32-
|----------------------------+-----------------------------------------------------------+------+--------+-------+---------------------------------------------------------|
33-
| _operatorRegistered | mapping(address => bool) | 110 | 0 | 32 | src/unaudited/ECDSAStakeRegistry.sol:ECDSAStakeRegistry |
34-
|----------------------------+-----------------------------------------------------------+------+--------+-------+---------------------------------------------------------|
35-
| __gap | uint256[40] | 111 | 0 | 1280 | src/unaudited/ECDSAStakeRegistry.sol:ECDSAStakeRegistry |
36-
╰----------------------------+-----------------------------------------------------------+------+--------+-------+---------------------------------------------------------╯
37-
Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +0,0 @@
1-
2-
╭----------------------------+-----------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------------------╮
3-
| Name | Type | Slot | Offset | Bytes | Contract |
4-
+=========================================================================================================================================================================================================+
5-
| _initialized | uint8 | 0 | 0 | 1 | src/unaudited/examples/ECDSAStakeRegistryEqualWeight.sol:ECDSAStakeRegistryEqualWeight |
6-
|----------------------------+-----------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------------------|
7-
| _initializing | bool | 0 | 1 | 1 | src/unaudited/examples/ECDSAStakeRegistryEqualWeight.sol:ECDSAStakeRegistryEqualWeight |
8-
|----------------------------+-----------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------------------|
9-
| __gap | uint256[50] | 1 | 0 | 1600 | src/unaudited/examples/ECDSAStakeRegistryEqualWeight.sol:ECDSAStakeRegistryEqualWeight |
10-
|----------------------------+-----------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------------------|
11-
| _owner | address | 51 | 0 | 20 | src/unaudited/examples/ECDSAStakeRegistryEqualWeight.sol:ECDSAStakeRegistryEqualWeight |
12-
|----------------------------+-----------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------------------|
13-
| __gap | uint256[49] | 52 | 0 | 1568 | src/unaudited/examples/ECDSAStakeRegistryEqualWeight.sol:ECDSAStakeRegistryEqualWeight |
14-
|----------------------------+-----------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------------------|
15-
| _totalOperators | uint256 | 101 | 0 | 32 | src/unaudited/examples/ECDSAStakeRegistryEqualWeight.sol:ECDSAStakeRegistryEqualWeight |
16-
|----------------------------+-----------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------------------|
17-
| _quorum | struct Quorum | 102 | 0 | 32 | src/unaudited/examples/ECDSAStakeRegistryEqualWeight.sol:ECDSAStakeRegistryEqualWeight |
18-
|----------------------------+-----------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------------------|
19-
| _minimumWeight | uint256 | 103 | 0 | 32 | src/unaudited/examples/ECDSAStakeRegistryEqualWeight.sol:ECDSAStakeRegistryEqualWeight |
20-
|----------------------------+-----------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------------------|
21-
| _serviceManager | address | 104 | 0 | 20 | src/unaudited/examples/ECDSAStakeRegistryEqualWeight.sol:ECDSAStakeRegistryEqualWeight |
22-
|----------------------------+-----------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------------------|
23-
| _stakeExpiry | uint256 | 105 | 0 | 32 | src/unaudited/examples/ECDSAStakeRegistryEqualWeight.sol:ECDSAStakeRegistryEqualWeight |
24-
|----------------------------+-----------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------------------|
25-
| _operatorSigningKeyHistory | mapping(address => struct CheckpointsUpgradeable.History) | 106 | 0 | 32 | src/unaudited/examples/ECDSAStakeRegistryEqualWeight.sol:ECDSAStakeRegistryEqualWeight |
26-
|----------------------------+-----------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------------------|
27-
| _totalWeightHistory | struct CheckpointsUpgradeable.History | 107 | 0 | 32 | src/unaudited/examples/ECDSAStakeRegistryEqualWeight.sol:ECDSAStakeRegistryEqualWeight |
28-
|----------------------------+-----------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------------------|
29-
| _thresholdWeightHistory | struct CheckpointsUpgradeable.History | 108 | 0 | 32 | src/unaudited/examples/ECDSAStakeRegistryEqualWeight.sol:ECDSAStakeRegistryEqualWeight |
30-
|----------------------------+-----------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------------------|
31-
| _operatorWeightHistory | mapping(address => struct CheckpointsUpgradeable.History) | 109 | 0 | 32 | src/unaudited/examples/ECDSAStakeRegistryEqualWeight.sol:ECDSAStakeRegistryEqualWeight |
32-
|----------------------------+-----------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------------------|
33-
| _operatorRegistered | mapping(address => bool) | 110 | 0 | 32 | src/unaudited/examples/ECDSAStakeRegistryEqualWeight.sol:ECDSAStakeRegistryEqualWeight |
34-
|----------------------------+-----------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------------------|
35-
| __gap | uint256[40] | 111 | 0 | 1280 | src/unaudited/examples/ECDSAStakeRegistryEqualWeight.sol:ECDSAStakeRegistryEqualWeight |
36-
|----------------------------+-----------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------------------|
37-
| allowlistedOperators | mapping(address => bool) | 151 | 0 | 32 | src/unaudited/examples/ECDSAStakeRegistryEqualWeight.sol:ECDSAStakeRegistryEqualWeight |
38-
╰----------------------------+-----------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------------------╯
39-

0 commit comments

Comments
 (0)