Key Responsibilities
The Taiyi Proposer Registry is a core contract that serves as the central coordination point for both Validator AVS and Gateway AVS operators in the Taiyi protocol. It manages operator registrations, validator registrations, delegations, and operational status tracking.Core Functions
Contract Setup
initialize
Name | Type | Description |
---|---|---|
_owner | address | Address of the contract owner |
setAVSContracts
Name | Type | Description |
---|---|---|
gatewayAVSAddr | address | Address of the GatewayAVS contract |
validatorAVSAddr | address | Address of the ValidatorAVS contract |
Middleware Management
addRestakingMiddlewareContract
Name | Type | Description |
---|---|---|
middlewareContract | address | Address of middleware contract to add |
removeRestakingMiddlewareContract
Name | Type | Description |
---|---|---|
middlewareContract | address | Address of middleware contract to remove |
Operator Management
registerOperator
Name | Type | Description |
---|---|---|
operatorAddress | address | The address of the operator to register |
avsType | AVSType | The type of AVS (GATEWAY or VALIDATOR) |
blsKey | bytes | The BLS public key for the operator (only for GATEWAY type) |
deregisterOperator
Name | Type | Description |
---|---|---|
operatorAddress | address | The address of the operator to deregister |
Validator Management
registerValidator
Name | Type | Description |
---|---|---|
pubkey | BLS12381.G1Point | The BLS public key of the validator |
signatureExpiry | uint256 | Expiry timestamp for the signature |
signature | BLS12381.G2Point | BLS signature proving control of pubkey |
delegatee | address | Address of the delegatee for preconfirmations |
batchRegisterValidators
Name | Type | Description |
---|---|---|
pubkeys | BLS12381.G1Point[] | Array of validator BLS public keys |
signatureExpiry | uint256 | Expiry timestamp for all signatures |
signatures | BLS12381.G2Point[] | Array of BLS signatures proving control of pubkeys |
delegatees | address[] | Array of delegatee addresses |
Opt-Out Management
initOptOut
Name | Type | Description |
---|---|---|
pubKeyHash | bytes32 | Hash of validator’s BLS public key |
signatureExpiry | uint256 | Expiry timestamp for the signature |
signature | BLS12381.G2Point | BLS signature proving control of pubkey |
confirmOptOut
Name | Type | Description |
---|---|---|
pubKeyHash | bytes32 | Hash of validator’s BLS public key |
View Functions
getGatewayAVS
Type | Description |
---|---|
IGatewayAVS | The GatewayAVS contract interface |
getValidatorAVS
Type | Description |
---|---|
IValidatorAVS | The ValidatorAVS contract interface |
getOperator
Name | Type | Description |
---|---|---|
pubKeyHash | bytes32 | Hash of the validator’s BLS public key |
Type | Description |
---|---|
address | The operator’s address |
getValidatorOperator
Name | Type | Description |
---|---|---|
pubkey | bytes | The BLS public key of the validator |
Type | Description |
---|---|
address | The operator’s address |
getValidatorStatus
Name | Type | Description |
---|---|---|
pubKeyHash | bytes32 | Hash of the validator’s BLS public key |
Type | Description |
---|---|
ValidatorStatus | The current status of the validator |
getValidator
Name | Type | Description |
---|---|---|
pubKeyHash | bytes32 | Hash of the validator’s BLS public key |
Type | Description |
---|---|
Validator | Complete validator information |
getValidatorCountForOperatorInAVS
Name | Type | Description |
---|---|---|
operator | address | The address of the operator |
Type | Description |
---|---|
uint256 | The number of validators registered to the operator |
getRegisteredOperator
Name | Type | Description |
---|---|---|
operatorAddr | address | The address of the operator |
Type | Description |
---|---|
Operator | Registration information for the operator in Gateway and Validator AVS roles |
getActiveOperatorsForAVS
Name | Type | Description |
---|---|---|
avs | address | The address of the AVS |
Type | Description |
---|---|
address[] | Array of active operator addresses |
getTotalValidatorCountForAVS
Name | Type | Description |
---|---|---|
avs | address | The address of the AVS |
Type | Description |
---|---|
uint256 | The total number of validators registered in the AVS |
TaiyiProposerRegistry.sol
Maintains registry of opted-in validators and manages their status and delegations. Handles BLS signature verification for validator registration and opt-out processes.
- Maintains registry of opted-in validators
- Handles BLS signature verification for validator registration
- Manages validator status and delegations
- Coordinates opt-in/opt-out processes with cooldown periods
Functions
registerValidator
Name | Type | Description |
---|---|---|
pubkey | BLS12381.G1Point | The BLS public key of the validator |
signatureExpiry | uint256 | Expiry timestamp for the signature |
signature | BLS12381.G2Point | BLS signature proving control of pubkey |
delegatee | address | Address of the delegatee for preconfirmations |
initOptOut
Name | Type | Description |
---|---|---|
pubKeyHash | bytes32 | Hash of validator’s BLS public key |
signatureExpiry | uint256 | Expiry timestamp for the signature |
signature | BLS12381.G2Point | BLS signature proving control of pubkey |
confirmOptOut
Name | Type | Description |
---|---|---|
pubKeyHash | bytes32 | Hash of validator’s BLS public key |
delegatePreconfDuty
Name | Type | Description |
---|---|---|
preconferElection | PreconferElection | Struct containing delegation details including validator pubkey and preconfirmer address |
signature | BLS12381.G2Point | BLS signature proving control of validator pubkey |
revokeDelegation
Name | Type | Description |
---|---|---|
validatorPubKeyHash | bytes32 | Hash of validator’s BLS public key |
signatureExpiry | uint256 | Expiry timestamp for the signature |
signature | BLS12381.G2Point | BLS signature proving control of pubkey |
View Functions
getDelegatedPreconfirmer
Name | Type | Description |
---|---|---|
validatorPubKeyHash | bytes32 | Hash of validator’s BLS public key |
Type | Description |
---|---|
address | Address of the delegated preconfirmer |