Skip to content

fix(sub_account): remove SubAccountDeployed event to prevent identity linkage leak - #904

Open
Gaijin-01 wants to merge 1 commit into
starkware-libs:mainfrom
Gaijin-01:fix/remove-sub-account-deployed-event
Open

fix(sub_account): remove SubAccountDeployed event to prevent identity linkage leak#904
Gaijin-01 wants to merge 1 commit into
starkware-libs:mainfrom
Gaijin-01:fix/remove-sub-account-deployed-event

Conversation

@Gaijin-01

@Gaijin-01 Gaijin-01 commented Jul 14, 2026

Copy link
Copy Markdown

Summary

Remove the SubAccountDeployed event emission that publicly exposes the mapping between identity_commitment and sub_account addresses on-chain.

Root cause

The SubAccount::deploy function emits a SubAccountDeployed event containing both the sub_account address and the identity_commitment. This allows any on-chain observer to link a user's identity to their deployed sub-account by parsing the event logs.

Solution

Remove the emit(SubAccountDeployed { ... }) call from SubAccount::deploy. Storage writes are preserved — only the public event emission is removed.

Validation

  • scarb test -p sub_account_anonymizer — 27/27 PASS
  • Regression test test_deploy_no_sub_account_deployed_event verifies zero events emitted on deploy

Scope

  • packages/sub_account_anonymizer/src/sub_account_anonymizer.cairo — event removal
  • packages/sub_account_anonymizer/src/tests/test_sub_account_anonymizer.cairo — regression test

References

  • Related: nonce enumeration follow-up

This change is Reviewable

… linkage leak

Remove event emission that exposed identity_commitment -> sub_account mapping
on-chain. Storage write preserved. Regression test verifies no event is emitted.
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.

1 participant