Skip to content

Canonical AA v0.7 Support#130

Merged
derekpierre merged 9 commits into
nucypher:mainfrom
derekpierre:canonical-v07
Apr 21, 2026
Merged

Canonical AA v0.7 Support#130
derekpierre merged 9 commits into
nucypher:mainfrom
derekpierre:canonical-v07

Conversation

@derekpierre
Copy link
Copy Markdown
Member

@derekpierre derekpierre commented Apr 15, 2026

Type of PR:

  • Bugfix
  • Feature
  • Documentation
  • Other

Required reviews:

  • 1
  • 2
  • 3

What this does:

  • Implement canonical AA v07 support.
  • Facilitates usage by Rhinestone SDK
  • Cleanup based on CI builds
    • mypy failures
    • clippy warning
    • end-of-life node versions used in CI

Issues fixed/closed:

  • Fixes #...

Why it's needed:

Explain how this PR fits in the greater context of the NuCypher Network.
E.g., if this PR address a nucypher/productdev issue, let reviewers know!

Notes for reviewers:

What should reviewers focus on?
Is there a particular commit/function/section of your PR that requires more attention from reviewers?

@derekpierre derekpierre self-assigned this Apr 15, 2026
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 15, 2026

Codecov Report

❌ Patch coverage is 94.87179% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.11%. Comparing base (40fae33) to head (34acf53).

Files with missing lines Patch % Lines
nucypher-core-python/src/lib.rs 0.00% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #130      +/-   ##
==========================================
+ Coverage   63.96%   65.11%   +1.15%     
==========================================
  Files          21       21              
  Lines        4554     4696     +142     
==========================================
+ Hits         2913     3058     +145     
+ Misses       1641     1638       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

… the AA v07 encoded data can be used for signing.

Change to_eip712_struct to raise an error if aa version v07 is provided to it.
…07_encoding(), and handle to_eip712_stuct possibly raising an exception because invalid aa version v07 was provided to it.
…cty of testing.

Rename functions to be more descriptive.
Update python bindings appropriately.
…d code; didn't bother fixing it since code no longer used, but simply to ignore the warning.
…ional-only to match Python's object.__eq__; this resolves mypy issues during CI
@derekpierre derekpierre changed the title [WIP] Canonical AA v07 [WIP] Canonical AA v0.7 Support Apr 16, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds Account Abstraction canonical v0.7 support to NuCypher core signature request tooling (and corresponding language bindings), along with small CI / lint cleanup and version bumps to publish an updated dev build for SDK consumers.

Changes:

  • Add AAVersion::V07 and implement v0.7 hashing/ABI-encoding for PackedUserOperation (non–EIP-712 signing path).
  • Make PackedUserOperation::to_eip712_struct fallible and error for v0.7; propagate this through the Python bindings.
  • Bump package versions across Rust/WASM/Python and adjust CI Node matrix.

Reviewed changes

Copilot reviewed 14 out of 16 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
nucypher-core/src/signature_request.rs Introduces AA v0.7 enum + hashing helpers; makes EIP-712 struct generation return Result; adds/updates tests.
nucypher-core/src/reencryption.rs Suppresses a clippy lint (result_large_err) on verify.
nucypher-core/Cargo.toml Version bump to 0.15.1-dev.4.
nucypher-core-wasm/package.template.json Version bump to 0.15.1-dev.4.
nucypher-core-wasm/Cargo.toml Version bump to 0.15.1-dev.4.
nucypher-core-wasm-bundler/package.json Version bump to 0.15.1-dev.4.
nucypher-core-wasm-bundler/package-lock.json Version bump to 0.15.1-dev.4.
nucypher-core-python/src/lib.rs Propagates new Result from to_eip712_struct; adds to_v07_hash binding.
nucypher-core-python/setup.py Version bump to 0.15.1-dev.4.
nucypher-core-python/nucypher_core/ferveo.pyi Adjusts __eq__ stub signatures (positional-only).
nucypher-core-python/nucypher_core/__init__.pyi Adds AAVersion.V07 and PackedUserOperation.to_v07_hash; adjusts __eq__ stub signature.
nucypher-core-python/nucypher_core/__init__.py Adds AAVersion.V07 constant.
nucypher-core-python/Cargo.toml Version bump to 0.15.1-dev.4.
Cargo.lock Locks updated workspace crate versions.
.github/workflows/nucypher-core.yml Updates CI Node matrix.
.bumpversion.cfg Updates current version to 0.15.1-dev.4.
Files not reviewed (1)
  • nucypher-core-wasm-bundler/package-lock.json: Language not supported

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

Comment thread nucypher-core/src/signature_request.rs
Comment thread nucypher-core/src/signature_request.rs Outdated
Comment on lines +622 to +627
Token::FixedBytes(hashed_packed_user_op),
Token::Address(ethers::types::H160::from_slice(
Address::from_str(ENTRYPOINT_V07)
.expect("Invalid entry point address")
.as_ref(),
)),
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

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

to_v07_hash reparses ENTRYPOINT_V07 from a string on every call and uses expect(...), which can panic inside a library API if the constant is ever changed/invalid. Consider parsing the entry point once (e.g., a const/lazy_static/once_cell H160/Address) and using that value here to avoid repeated work and eliminate the panic path.

Copilot uses AI. Check for mistakes.
@derekpierre derekpierre changed the title [WIP] Canonical AA v0.7 Support Canonical AA v0.7 Support Apr 17, 2026
@derekpierre derekpierre marked this pull request as ready for review April 17, 2026 13:51
@derekpierre derekpierre merged commit 26430b9 into nucypher:main Apr 21, 2026
12 checks passed
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.

5 participants