Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughAdded Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #657 +/- ##
=======================================
Coverage 96.15% 96.15%
=======================================
Files 59 59
Lines 6104 6110 +6
=======================================
+ Hits 5869 5875 +6
Misses 235 235 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/accounts/src/smart_account/storage.rs`:
- Around line 556-561: The current logic skips verifier-side canonicalization
for singleton external signers and mandates batch_canonicalize_key for multi-key
cases, which allows malformed single key_data to be stored and breaks verifiers
that only implement canonicalize_key; change the flow around key_batch and
VerifierClient::new so every external key is always canonicalized: call
VerifierClient::batch_canonicalize_key when key_batch.len() > 1 as an
optimization but fall back to calling VerifierClient::canonicalize_key per key
(or call canonicalize_key for singletons) whenever batch_canonicalize_key is
unavailable or returns no result, validate against MAX_EXTERNAL_KEY_SIZE as
before, and add a regression test that stores a single short external key
(singleton) to ensure per-key canonicalization runs and rejects malformed
key_data.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: ebef629c-d543-45b7-9e55-0f4a92487265
📒 Files selected for processing (8)
examples/multisig-smart-account/ed25519-verifier/src/contract.rsexamples/multisig-smart-account/webauthn-verifier/src/contract.rspackages/accounts/src/smart_account/mod.rspackages/accounts/src/smart_account/storage.rspackages/accounts/src/smart_account/test/context_rules.rspackages/accounts/src/verifiers/ed25519.rspackages/accounts/src/verifiers/mod.rspackages/accounts/src/verifiers/webauthn.rs
ozgunozerk
left a comment
There was a problem hiding this comment.
instead of creating a mutable vector, pushing to it, and iterating through it for duplicate detection, we can utilize HashMap with () values (since we don't have HashSet in soroban_sdk).
I think, this should be more convenient in terms of both performance and the code readability and the intention behind it.
Fixes #639
Fixes #643
Fixes #644
PR Checklist
Summary by CodeRabbit