Skip to main content

StakingProviderRegistry

What is StakingProviderRegistry?

StakingProviderRegistry manages the staking provider's configuration and maintains a FIFO queue of attester keys. When StakingManager needs to stake new funds, it provisions a key from this queue.

The staking provider admin is responsible for adding BLS keys and managing the provider's rewards recipient address.

StakingProviderRegistry is upgradeable via UUPS proxy.

Methods

Provider admin

Requires STAKING_PROVIDER_ADMIN_ROLE.

addKeysToProvider()

Add attester BLS keys to the provisioning queue.

function addKeysToProvider(IStakingManager.KeyStore[] calldata keyStores) external

dripQueue()

Remove exhausted keys from the front of the queue.

function dripQueue(uint256 count) external

setProviderRewardsRecipient()

Set the address that receives the provider's share of protocol fees (as stAztec).

function setProviderRewardsRecipient(address rewardsRecipient) external

Internal

getAttesterKeystore()

Provision the next key from the queue for staking. StakingManager only.

function getAttesterKeystore() external returns (IStakingManager.KeyStore memory keyStore)

View methods

getQueueLength()

Number of keys available for provisioning.

function getQueueLength() external view returns (uint256)

getStakingProviderConfig()

Provider configuration (admin address, rewards recipient).

function getStakingProviderConfig() external view returns (IStakingManager.ProviderConfig memory)

Events

event KeysAddedToProvider(address[] attesters)

New attester keys added to the provisioning queue.

event QueueDripped(address indexed attester)

Exhausted key removed from queue front.

event ProviderSet(address indexed rewardsRecipient)

Provider rewards recipient address changed.