IStakeRegistry
Last updated
Last updated
Inherits: IRegistry
Author: Layr Labs, Inc.
Registers the operator
with operatorId
for the specified quorumNumbers
.
access restricted to the RegistryCoordinator
*Preconditions (these are assumed, not validated in this contract):
quorumNumbers
has no duplicates
quorumNumbers.length
!= 0
quorumNumbers
is ordered in ascending order
the operator is not already registered*
Parameters
Name | Type | Description |
---|---|---|
Deregisters the operator with operatorId
for the specified quorumNumbers
.
access restricted to the RegistryCoordinator
*Preconditions (these are assumed, not validated in this contract):
quorumNumbers
has no duplicates
quorumNumbers.length
!= 0
quorumNumbers
is ordered in ascending order
the operator is not already deregistered
quorumNumbers
is a subset of the quorumNumbers that the operator is registered for*
Parameters
In order to register for a quorum i, an operator must have at least minimumStakeForQuorum[i]
Returns the entire operatorIdToStakeHistory[operatorId][quorumNumber]
array.
Parameters
Returns the index
-th entry in the dynamic array of total stake, totalStakeHistory
for quorum quorumNumber
.
Parameters
Returns the indices of the operator stakes for the provided quorumNumber
at the given blockNumber
Returns the indices of the total stakes for the provided quorumNumbers
at the given blockNumber
Returns the index
-th entry in the operatorIdToStakeHistory[operatorId][quorumNumber]
array.
Function will revert if index
is out-of-bounds.
Parameters
Returns the most recent stake weight for the operatorId
for a certain quorum
Function returns an OperatorStakeUpdate struct with every entry equal to 0 in the event that the operator has no stake history
Returns the stake weight corresponding to operatorId
for quorum quorumNumber
, at the index
-th entry in the operatorIdToStakeHistory[operatorId][quorumNumber]
array if the entry corresponds to the operator's stake at blockNumber
. Reverts otherwise.
Function will revert if index
is out-of-bounds.
used the BLSSignatureChecker to get past stakes of signing operators
Parameters
Returns the total stake weight for quorum quorumNumber
, at the index
-th entry in the totalStakeHistory[quorumNumber]
array if the entry corresponds to the total stake at blockNumber
. Reverts otherwise.
Function will revert if index
is out-of-bounds.
used the BLSSignatureChecker to get past stakes of signing operators
Parameters
Returns the most recent stake weight for the operatorId
for quorum quorumNumber
Function returns weight of 0 in the event that the operator has no stake history
Returns the stake of the operator for the provided quorumNumber
at the given blockNumber
Returns the stake weight from the latest entry in _totalStakeHistory
for quorum quorumNumber
.
Will revert if _totalStakeHistory[quorumNumber]
is empty.
Used for updating information on deposits of nodes.
Parameters
emitted whenever the stake of operator
is updated
struct used to store the stakes of an individual operator or the sum of all operators' stakes, for storage
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
operator
address
The address of the operator to register.
operatorId
bytes32
The id of the operator to register.
quorumNumbers
bytes
The quorum numbers the operator is registering for, where each byte is an 8 bit integer quorumNumber.
operatorId
bytes32
The id of the operator to deregister.
quorumNumbers
bytes
The quorum numbers the operator is deregistering from, where each byte is an 8 bit integer quorumNumber.
operatorId
bytes32
The id of the operator of interest.
quorumNumber
uint8
The quorum number to get the stake for.
quorumNumber
uint8
The quorum number to get the stake for.
index
uint256
Array index for lookup, within the dynamic array totalStakeHistory[quorumNumber]
.
quorumNumber
uint8
The quorum number to get the stake for.
operatorId
bytes32
The id of the operator of interest.
index
uint256
Array index for lookup, within the dynamic array operatorIdToStakeHistory[operatorId][quorumNumber]
.
quorumNumber
uint8
The quorum number to get the stake for.
blockNumber
uint32
Block number to make sure the stake is from.
operatorId
bytes32
The id of the operator of interest.
index
uint256
Array index for lookup, within the dynamic array operatorIdToStakeHistory[operatorId][quorumNumber]
.
quorumNumber
uint8
The quorum number to get the stake for.
blockNumber
uint32
Block number to make sure the stake is from.
index
uint256
Array index for lookup, within the dynamic array totalStakeHistory[quorumNumber]
.
operators
address[]
are the addresses of the operators whose stake information is getting updated