Skip to content

feat(sub-account-anonymizer): until_undeployed flag on get_sub_accounts - #921

Merged
ittaysw merged 1 commit into
mainfrom
ittay/dappsdk/anonymizer-until-undeployed-flag
Aug 2, 2026
Merged

feat(sub-account-anonymizer): until_undeployed flag on get_sub_accounts#921
ittaysw merged 1 commit into
mainfrom
ittay/dappsdk/anonymizer-until-undeployed-flag

Conversation

@ittaysw

@ittaysw ittaysw commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

Add a trailing until_undeployed: bool to the anonymizer's get_sub_accounts view. When true, the
view stops at the first undeployed nonce and returns only the contiguous deployed prefix; when
false it resolves every nonce in [start, end) (unchanged). This lets the client resolve a user's
deployed sub-accounts in one view call instead of scanning window-by-window client-side.

Regenerating SubAccountAnonymizerABI also picks up the OpenNote.collect_policy field, from which
the committed ABI had drifted (never regenerated after CollectPolicy landed in Cairo).


This change is Reviewable

ittaysw commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@ittaysw
ittaysw force-pushed the ittay/dappsdk/client-tests branch from 7a3356d to 2225665 Compare July 16, 2026 19:33
@ittaysw
ittaysw force-pushed the ittay/dappsdk/anonymizer-until-undeployed-flag branch 2 times, most recently from a8b1487 to a4d4280 Compare July 19, 2026 11:15
@ittaysw
ittaysw force-pushed the ittay/dappsdk/client-tests branch from 2225665 to 4422591 Compare July 19, 2026 11:15
@ittaysw
ittaysw force-pushed the ittay/dappsdk/anonymizer-until-undeployed-flag branch from a4d4280 to 0c5f57e Compare July 20, 2026 05:00
@ittaysw
ittaysw force-pushed the ittay/dappsdk/client-tests branch from 4422591 to 2433d80 Compare July 20, 2026 05:00
@ittaysw
ittaysw force-pushed the ittay/dappsdk/anonymizer-until-undeployed-flag branch from 8e89d82 to 8af08f0 Compare July 28, 2026 08:46
@ittaysw
ittaysw force-pushed the ittay/dappsdk/client-tests branch from 219e73e to a6e8c46 Compare July 28, 2026 08:55
@ittaysw
ittaysw force-pushed the ittay/dappsdk/anonymizer-until-undeployed-flag branch from 8af08f0 to 2ecbda6 Compare July 28, 2026 08:56
@ittaysw
ittaysw force-pushed the ittay/dappsdk/client-tests branch from a6e8c46 to 939ce67 Compare July 28, 2026 09:03
@ittaysw
ittaysw force-pushed the ittay/dappsdk/anonymizer-until-undeployed-flag branch from 2ecbda6 to 8ae0acb Compare July 28, 2026 09:03
@ittaysw
ittaysw force-pushed the ittay/dappsdk/client-tests branch 2 times, most recently from f43d1fb to 4f2d9c0 Compare July 28, 2026 09:09
@ittaysw
ittaysw force-pushed the ittay/dappsdk/anonymizer-until-undeployed-flag branch from 8ae0acb to a3db51f Compare July 28, 2026 09:09
@ittaysw
ittaysw changed the base branch from ittay/dappsdk/client-tests to graphite-base/921 July 29, 2026 12:08

@Yoni-Starkware Yoni-Starkware left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

consider removing the is_deployed flag now

@Yoni-Starkware reviewed 5 files and all commit messages, and made 1 comment.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on ittaysw).

@ittaysw
ittaysw force-pushed the graphite-base/921 branch from 4f2d9c0 to 73acefe Compare August 2, 2026 07:02
@ittaysw
ittaysw force-pushed the ittay/dappsdk/anonymizer-until-undeployed-flag branch from a3db51f to b306453 Compare August 2, 2026 07:02
@ittaysw
ittaysw changed the base branch from graphite-base/921 to ittay/dappsdk/client-tests August 2, 2026 07:02
@ittaysw
ittaysw changed the base branch from ittay/dappsdk/client-tests to graphite-base/921 August 2, 2026 08:58
@ittaysw
ittaysw force-pushed the ittay/dappsdk/anonymizer-until-undeployed-flag branch from b306453 to f0cc325 Compare August 2, 2026 08:58
@ittaysw
ittaysw force-pushed the graphite-base/921 branch from 73acefe to 1ee4a25 Compare August 2, 2026 08:58
@graphite-app
graphite-app Bot changed the base branch from graphite-base/921 to main August 2, 2026 08:58
@ittaysw
ittaysw force-pushed the ittay/dappsdk/anonymizer-until-undeployed-flag branch 2 times, most recently from 2558027 to 6d99b87 Compare August 2, 2026 10:58
Copilot AI review requested due to automatic review settings August 2, 2026 10:58

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an until_undeployed: bool flag to the SubAccountAnonymizer get_sub_accounts view so callers can fetch the contiguous deployed sub-account prefix in a single view call (instead of client-side window scanning), and regenerates the SDK ABI to reflect the updated contract interface (including OpenNote.collect_policy).

Changes:

  • Extend get_sub_accounts (Cairo + generated TS ABI) with a trailing until_undeployed: bool parameter and implement early-stop behavior at the first undeployed nonce.
  • Update Cairo test suites to pass the new parameter and add coverage for the new early-stop semantics.
  • Document the ABI/signature change in the SDK changelog.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
sdk/src/internal/anonymizer-abi.ts Regenerated ABI reflecting the new get_sub_accounts(..., until_undeployed) parameter (and includes collect_policy).
sdk/CHANGELOG.md Notes the ABI signature change and its behavior.
packages/sub_account_anonymizer/src/sub_account_anonymizer.cairo Updates the public trait + implementation to accept until_undeployed and break on first undeployed nonce.
packages/sub_account_anonymizer/src/tests/test_sub_account_anonymizer.cairo Updates existing calls for the new arity and adds tests for the deployed-prefix behavior.
packages/privacy/src/tests/test_e2e.cairo Updates e2e call site to include the new trailing boolean argument.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread sdk/CHANGELOG.md Outdated
Comment thread packages/sub_account_anonymizer/src/tests/test_sub_account_anonymizer.cairo Outdated

ittaysw commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator Author

Merge activity

  • Aug 2, 11:01 AM UTC: Graphite couldn't merge this PR because it was not satisfying all requirements.
  • Aug 2, 11:41 AM UTC: @ittaysw merged this pull request with Graphite.

Add a trailing `until_undeployed: bool` to the anonymizer's `get_sub_accounts` view. When true, the
view stops at the first undeployed nonce and returns only the contiguous deployed prefix; when
false it resolves every nonce in [start, end) (unchanged). This lets the client resolve a user's
deployed sub-accounts in one view call instead of scanning window-by-window client-side.

Regenerating SubAccountAnonymizerABI also picks up the OpenNote.collect_policy field, from which
the committed ABI had drifted (never regenerated after CollectPolicy landed in Cairo).
@ittaysw
ittaysw force-pushed the ittay/dappsdk/anonymizer-until-undeployed-flag branch from 6d99b87 to 986be50 Compare August 2, 2026 11:10
Copilot AI review requested due to automatic review settings August 2, 2026 11:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

Suppressed comments (1)

sdk/CHANGELOG.md:20

  • This changelog entry describes a required new parameter on an existing view; that is a breaking change for any callers of get_sub_accounts (older calldata/ABIs with 3 args will revert). The changelog should explicitly label this as breaking and mention that passing false preserves the previous behavior.
  `get_sub_accounts` takes a trailing `until_undeployed: bool`: when true the view stops at the
  first undeployed nonce and returns only the contiguous deployed prefix, when false it resolves
  every nonce in the range.

@ittaysw
ittaysw merged commit 438abd6 into main Aug 2, 2026
18 of 19 checks passed
@ittaysw
ittaysw deleted the ittay/dappsdk/anonymizer-until-undeployed-flag branch August 2, 2026 11:41
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.

3 participants