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.

Key Responsibilities

  • 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

function registerValidator(
    BLS12381.G1Point calldata pubkey,
    uint256 signatureExpiry,
    BLS12381.G2Point calldata signature,
    address delegatee
) external payable

Registers a validator with their BLS public key and optional delegatee. Parameters:

NameTypeDescription
pubkeyBLS12381.G1PointThe BLS public key of the validator
signatureExpiryuint256Expiry timestamp for the signature
signatureBLS12381.G2PointBLS signature proving control of pubkey
delegateeaddressAddress of the delegatee for preconfirmations

initOptOut

function initOptOut(
    bytes32 pubKeyHash,
    uint256 signatureExpiry,
    BLS12381.G2Point calldata signature
) external

Initiates the opt-out process for a validator, starting the cooldown period. Parameters:

NameTypeDescription
pubKeyHashbytes32Hash of validator’s BLS public key
signatureExpiryuint256Expiry timestamp for the signature
signatureBLS12381.G2PointBLS signature proving control of pubkey

confirmOptOut

function confirmOptOut(bytes32 pubKeyHash) external

Confirms validator opt-out after cooldown period has elapsed. Parameters:

NameTypeDescription
pubKeyHashbytes32Hash of validator’s BLS public key

delegatePreconfDuty

function delegatePreconfDuty(
    PreconferElection calldata preconferElection,
    BLS12381.G2Point memory signature
) external

Allows a validator to delegate preconfirmation duties to a registered preconfirmer. Parameters:

NameTypeDescription
preconferElectionPreconferElectionStruct containing delegation details including validator pubkey and preconfirmer address
signatureBLS12381.G2PointBLS signature proving control of validator pubkey

revokeDelegation

function revokeDelegation(
    bytes32 validatorPubKeyHash,
    uint256 signatureExpiry,
    BLS12381.G2Point calldata signature
) external

Revokes an existing delegation for a validator. Parameters:

NameTypeDescription
validatorPubKeyHashbytes32Hash of validator’s BLS public key
signatureExpiryuint256Expiry timestamp for the signature
signatureBLS12381.G2PointBLS signature proving control of pubkey

View Functions

getDelegatedPreconfirmer

function getDelegatedPreconfirmer(bytes32 validatorPubKeyHash) external view returns (address)

Returns the current delegated preconfirmer for a validator. Parameters:

NameTypeDescription
validatorPubKeyHashbytes32Hash of validator’s BLS public key

Returns:

TypeDescription
addressAddress of the delegated preconfirmer