You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add tree and start on tests for op state ret (#140)
* feat: add tree and start on tests for op state ret
* feat: getOperatorState tests work
* feat: complete checksignatures checks and handle extra reversions
* feat: sync tree
* fix: clarify and correct treefile
* feat: add comments on tests and update test case
* feat: check operator addresses as well
└── OperatorStateRetriever tree (*** denotes that integration tests are needed to validate path)
3
+
├── when getOperatorState(IRegistryCoordinator,bytes32,uint32) is called
4
+
│ ├── when the given operator has never registered with the given registryCoordinator (their quorumBitmapHistory has length 0)
5
+
│ │ └── it should revert with "RegistryCoordinator.getQuorumBitmapIndicesAtBlockNumber: operator has no bitmap history at blockNumber"
6
+
│ └── when the given operator has registered for the first time with the given registryCoordinator
7
+
│ ├── after the given blockNumber
8
+
│ │ └── it should revert with "RegistryCoordinator.getQuorumBitmapIndicesAtBlockNumber: operator has no bitmap history at blockNumber"
9
+
│ └── before the given blockNumber
10
+
│ ├── and was not registered for any quorums at the given blockNumber
11
+
│ │ └── it should return (0, [])
12
+
│ └── and was registered for a set of quorums at the given blockNumber
13
+
│ └── it should return
14
+
└── the given operator's quorum bitmap at the given blockNumber as the first argument and
15
+
└── a list of the list of operators (by id and stake) ordered by index for each quorum in the quorumBitmap from the first argument ascending by quorumNumber
16
+
├── when getOperatorState(IRegistryCoordinator,bytes memory,uint32) is called
17
+
│ ├── when at any of the given quorumNumbers were not created at the time of call
18
+
│ │ └── it should revert with "IndexRegistry._operatorCountAtBlockNumber: quorum does not exist"
19
+
│ ├── when at any of the given quorumNumbers were not created before or at the given blockNumber
20
+
│ │ └── it should revert with "IndexRegistry._operatorCountAtBlockNumber: quorum did not exist at given block number"
21
+
│ └── when the given quorumNumbers are created on the given registry registryCoordinator
22
+
│ └── it should return their quorum bitmap as the first argument and a list of the list of operators (by id and stake) ordered by index for each quorum in the set ascending by quorumNumber
23
+
└── when getCheckSignaturesIndices is called
24
+
├── when any of the given nonSignerOperatorIds were never registered with the given registryCoordinator
25
+
│ └── it should revert with "RegistryCoordinator.getQuorumBitmapIndexAtBlockNumber: no bitmap update found for operatorId at block number"
26
+
├── when any of the given operator has registered for the first time with the given registryCoordinator after the given blockNumber
27
+
│ └── it should revert with "RegistryCoordinator.getQuorumBitmapIndexAtBlockNumber: no bitmap update found for operatorId at block number"
28
+
├── when any of the given operator is completely deregistered with the given registryCoordinator at the given blockNumber
29
+
│ └── it should revert with "RegistryCoordinator.getQuorumBitmapIndexAtBlockNumber: no bitmap update found for operatorId at block number"
30
+
├── when any of the given quorumNumbers were not created at the time of the call
31
+
│ └── it should revert with "StakeRegistry.getTotalStakeIndicesAtBlockNumber: quorum does not exist"
32
+
├── when any of the given quorumNumbers were not created before or at the given blockNumber
33
+
│ └── it should revert with "StakeRegistry.getTotalStakeIndicesAtBlockNumber: quorum has no stake history at blockNumber"
34
+
└── otherwise
35
+
└── it should return
36
+
├── a list of the indices of the QuorumBitmapUpdates at the given blockNumber for the given nonSignerOperatorIds in the inputted quorumNumber order as the first argument
37
+
├── a list of the indices of the ApkUpdates at the given blockNumber for each quorum in the inputted quorumNumber order as the second argument
38
+
├── a list of the indices of the StakeUpdates at the given blockNumber for the total stake for each quorum in the inputted quorumNumber order as the third argument
39
+
└── a list of (a list of the indices of the stakes of each operator in each of the quorums the operator was in at the blockNumber from lowest to greatest quorumNumber they were apart of) in the order of the inputted nonSigners
0 commit comments