Skip to content

feat(governance): emit PublicKeyRegistered event on public-key registration - #1068

Open
gbengaeben wants to merge 1 commit into
MettaChain:mainfrom
gbengaeben:fix/1031-governance-public-key-registration-event
Open

feat(governance): emit PublicKeyRegistered event on public-key registration#1068
gbengaeben wants to merge 1 commit into
MettaChain:mainfrom
gbengaeben:fix/1031-governance-public-key-registration-event

Conversation

@gbengaeben

Copy link
Copy Markdown

Summary

register_public_key silently overwrote a signer's stored ECDSA public key with no on-chain traceability, making signer key rotation invisible to auditors and off-chain indexers (see #1031).

Changes

  • Add a PublicKeyRegistered event carrying the signer, public_key and a timestamp.
  • Emit it on registration and on overwrite, so key rotations are recorded.
  • Add a unit test asserting the event fires with the correct signer, key and timestamp, including the overwrite path.

Verification

cargo test -p governance passes (37 tests).

Closes #1031

…ration

register_public_key previously overwrote a signer's stored ECDSA public key
without any on-chain traceability. Emit a PublicKeyRegistered event (signer,
public key, timestamp) on both registration and overwrite so signer key
rotations are observable to auditors and off-chain indexers. Add a unit test
asserting the event fires and carries the expected signer, key and timestamp.

Closes MettaChain#1031
@drips-wave

drips-wave Bot commented Aug 27, 2026

Copy link
Copy Markdown

@gbengaeben Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Governance register_public_key silently overwrites and emits no event: key rotation is invisible to auditors

1 participant