Assessment reports>Session Token>Threat Model>Function: removeBLSPublicKeyAfterWaitTime()

Function: removeBLSPublicKeyAfterWaitTime()

The function removes a BLS public key after the required wait time for a leave request has passed, without needing a signature.

Inputs

  • serviceNodeID

    • Validation: The leaveRequestTimestamp of _serviceNodes corresponding to serviceNodeID must not be zero, and the current block.timestamp must be at least 30 days past the leaveRequestTimestamp.

    • Impact: The serviceNodeID is necessary to delete specific _serviceNode and serviceNodeIDs data.

Branches and code coverage (including function calls)

Intended branches

Negative behavior

Function call analysis

  • _removeBLSPublicKey(serviceNodeID, _serviceNodes[serviceNodeID].deposit) → serviceNodeDelete(serviceNodeID)

    • External/Internal? Internal.

    • Argument control: serviceNodeID.

    • Impact: Deletes the specified data from _serviceNodes and serviceNodeIDs — also removes the specified public key from _aggregatePubKey.

  • _removeBLSPublicKey(serviceNodeID, _serviceNodes[serviceNodeID].deposit) → updateBLSNonSignerThreshold()

    • External/Internal? Internal.

    • Argument control: serviceNodeID.

    • Impact: Updates the number of signers that can be excluded from BLS signature aggregation.

Zellic © 2024Back to top ↑