Canonical AA v0.7 Support#130
Conversation
Codecov Report❌ Patch coverage is
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. 🚀 New features to boost your workflow:
|
… 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.
d2888fb to
06926f2
Compare
…07_encoding(), and handle to_eip712_stuct possibly raising an exception because invalid aa version v07 was provided to it.
06926f2 to
39af6d4
Compare
…cty of testing. Rename functions to be more descriptive. Update python bindings appropriately.
39af6d4 to
d9cb06e
Compare
…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
There was a problem hiding this comment.
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::V07and implement v0.7 hashing/ABI-encoding forPackedUserOperation(non–EIP-712 signing path). - Make
PackedUserOperation::to_eip712_structfallible 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.
| 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(), | ||
| )), |
There was a problem hiding this comment.
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.
Type of PR:
Required reviews:
What this does:
Issues fixed/closed:
Why it's needed:
Notes for reviewers: