Function: registerNewEncryptionKey(bytes _key)
This is the key-manager entry point that records a freshly rotated encryption key so downstream deposits can reference the latest key.
Inputs
_keyControl: Key manager (
KEY_MANAGER_ROLE).Constraints: Must be exactly 33 bytes (compressed EC public key) — otherwise, it reverts with
ErrorInvalidEncryptionKeyLength.Impact: Appended to
encryptionKeysalong with the current message queue index for later lookup.
Branches and code coverage
Intended branches
Reverts when
_key.lengthis not 33.Successful registration caches the next queue index.
Negative behavior
A caller without
KEY_MANAGER_ROLEreverts.
Function call analysis
IL1MessageQueueV2(this.messageQueueV2).nextCrossDomainMessageIndex()What is controllable? N/A.
If the return value is controllable, how is it used and how can it go wrong? N/A.
What happens if it reverts, reenters or does other unusual control flow? N/A.