Function: updateRewardsBalance()
The function updates the rewards balance for a given recipient based on a verified BLS signature from the network.
Inputs
recipientAddressValidation:
recipientAddressmust not be zero.Impact: The address of the wallet that will receive the rewards.
recipientRewardsValidation:
recipientRewardsmust be greater than the rewards that therecipientAddresshas already received.Impact: Token rewards of amount
recipientRewardsare given torecipientAddress.
blsSignatureValidation N/A.
Impact A parameter necessary to verify the
encodedMessagegenerated inupdateRewardsBalance.
idsValidation The length of
idsmust not exceed 1/3 of the total number of signers, and under no circumstances can the length ofidsexceed 300, which can be adjusted bysetBLSNonSignerThresholdMax.Impact The IDs of the signers to be excluded from the BLS public-key aggregation.
Branches and code coverage (including function calls)
Intended branches
Negative behavior
Function call analysis
validateSignatureOrRevert(ids, blsSignature, Hm) -> Pairing.pairing2(BN256G1.P1(), signature, BN256G1.negate(pubkey), hashToVerify)External/Internal? Internal.
Argument control:
ids,blsSignature, andHm.Impact: Aggregates the excluded signers (
ids), updates the verification key, and verifies theencodedMessage(Hm) with theblsSignature.