Skip to content

feat: add aztecaddress::is_valid#21072

Merged
nventuro merged 1 commit into
merge-train/fairiesfrom
nico/f-379-add-address-validity-methods-to-aztecaddress
Mar 5, 2026
Merged

feat: add aztecaddress::is_valid#21072
nventuro merged 1 commit into
merge-train/fairiesfrom
nico/f-379-add-address-validity-methods-to-aztecaddress

Conversation

@nventuro

@nventuro nventuro commented Mar 3, 2026

Copy link
Copy Markdown
Contributor

Suggested by @iAmMichaelConnor.

@nventuro nventuro requested a review from LeilaWang as a code owner March 3, 2026 19:16
@nventuro nventuro requested a review from nchamo March 4, 2026 18:05
// y^2 = x^3 - 17; x = address
let x = self.inner;
let y_squared = x * x * x - 17;
/// Returns `true` if the address is valid.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ignorable nit, but I think we can make it a little clearer

Suggested change
/// Returns `true` if the address is valid.
/// Returns if the address is valid.

or

Suggested change
/// Returns `true` if the address is valid.
/// Returns whether the address is valid.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I don't really care about these as long as we're consistent. It seems Rust uses 'returns true' (https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.is_empty, https://doc.rust-lang.org/stable/std/option/enum.Option.html#method.is_some), so I'd just appeal to authority and do that.

I'll update instances of 'whether' to reflect this.

@nventuro nventuro merged commit ef234a3 into merge-train/fairies Mar 5, 2026
13 of 14 checks passed
@nventuro nventuro deleted the nico/f-379-add-address-validity-methods-to-aztecaddress branch March 5, 2026 18:44
github-merge-queue Bot pushed a commit that referenced this pull request Mar 6, 2026
BEGIN_COMMIT_OVERRIDE
fix: empty undefined offchain messages for batch calls (#21157)
feat: add aztecaddress::is_valid (#21072)
feat: add ergonomic conversions for Noir's `Option<T>` (#21107)
chore: use returns `true` for boolean fns (#21186)
feat: add salt and secret params to env.deploy (#21183)
END_COMMIT_OVERRIDE
nventuro added a commit that referenced this pull request Mar 19, 2026
…1134, #21072, #21186, #21189, #21229, #21228, #21234, #21639) (#21745)

## Summary

Combined backport of 12 PRs to v4-next, cherry-picked in chronological
merge order:

1. #20512 — docs: add delayedpublicmutable apiref, fix misc docs
2. #20379 — feat: custom message handlers in Aztec.nr
3. #20831 — feat!: make unused msg disco fns private
4. #21024 — feat: add compile-time size check for events and error code
links
5. #21134 — chore: add warning on invalid recipients
6. #21072 — feat: add aztecaddress::is_valid
7. #21186 — chore: use returns `true` for boolean fns
8. #21189 — feat: add note hash and nullifier helper functions with
domain separation
9. #21229 — docs: small delayedpubmut update
10. #21228 — test: restore pubmut tests
11. #21234 — fix: claim contract & improve nullif docs
12. #21639 — feat!: split compute note hash and nullifier to reduce
hashing

Each PR is a separate commit (raw cherry-pick with conflicts left in),
followed by a single final commit that resolves all conflicts — making
it easy to review the conflict resolution independently.

## Conflict resolution (last commit)

- `delayed_public_mutable.nr` / `public_immutable.nr` — merged doc
comments from both sides
- `aztec.nr` macros — integrated custom message handler + split compute
functions
- `discovery/mod.nr` / `process_message.nr` — merged offchain inbox sync
+ custom handler dispatch + split compute
- `constants.nr` / `constants_tests.nr` — added new domain separators
- `Nargo.toml` — added custom_message_contract
- `netlify.toml` — merged error code redirects
- `auth_contract` — kept v4-next delay value
- `note_metadata.nr` — doc comment reformat
- `migration_notes.md` — merged migration notes from both sides
- Deleted `traits.nr` (v4-next uses `traits/` directory)


ClaudeBox log: https://claudebox.work/s/3145d1bd30977c20?run=1

---------

Co-authored-by: Nicolás Venturo <nicolas.venturo@gmail.com>
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.

2 participants