fix(sub_account): remove SubAccountDeployed event to prevent identity linkage leak - #904
Open
Gaijin-01 wants to merge 1 commit into
Open
Conversation
… linkage leak Remove event emission that exposed identity_commitment -> sub_account mapping on-chain. Storage write preserved. Regression test verifies no event is emitted.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Remove the
SubAccountDeployedevent emission that publicly exposes the mapping betweenidentity_commitmentandsub_accountaddresses on-chain.Root cause
The
SubAccount::deployfunction emits aSubAccountDeployedevent containing both thesub_accountaddress and theidentity_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 fromSubAccount::deploy. Storage writes are preserved — only the public event emission is removed.Validation
scarb test -p sub_account_anonymizer— 27/27 PASStest_deploy_no_sub_account_deployed_eventverifies zero events emitted on deployScope
packages/sub_account_anonymizer/src/sub_account_anonymizer.cairo— event removalpackages/sub_account_anonymizer/src/tests/test_sub_account_anonymizer.cairo— regression testReferences
This change is