-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(katana): skip legacy class when fetching compiled class hash #2998
Conversation
Ohayo, sensei! WalkthroughThe change updates the return types for closures in the dup_entries and state_update functions within the DbProvider implementation. They now return ProviderResult<Option> (using Ok(Some(...))) instead of ProviderResult. This modification enables explicit handling of absent values in both entry duplication and state updates, while the overall control flow remains unchanged. No public API declarations were modified. Changes
Sequence Diagram(s)sequenceDiagram
participant Client as Caller
participant Provider as DbProvider (dup_entries)
participant Closure as EntryProcessor
Client->>Provider: call dup_entries(entries, f)
Provider->>Closure: Process each entry with closure f
alt Valid entry present
Closure-->>Provider: return Ok(Some(result))
else No valid entry
Closure-->>Provider: return Ok(None)
end
Provider-->>Client: return ProviderResult<Option<result>>
sequenceDiagram
participant Client as Caller
participant Provider as DbProvider (state_update)
participant Closure as UpdateProcessor
Client->>Provider: call state_update(state_changes, f)
Provider->>Closure: Process nonce, class, and storage updates with closure f
alt Valid update available
Closure-->>Provider: return Ok(Some(updated_value))
else No update
Closure-->>Provider: return Ok(None)
end
Provider-->>Client: return ProviderResult<Option<updated_value>>
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms (3)
🔇 Additional comments (4)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2998 +/- ##
==========================================
- Coverage 57.14% 57.13% -0.01%
==========================================
Files 429 429
Lines 56834 56833 -1
==========================================
- Hits 32477 32474 -3
- Misses 24357 24359 +2 ☔ View full report in Codecov by Sentry. |
legacy class doesn't have a compiled class hash. in the
ClassDeclarations
table, we don't distinguish between legacy and non-legacy class. right now, we differentiate them based on whether they have a corresponding compiled class hash or not (in theCompiledClassHashes
table).Summary by CodeRabbit
- Enhanced internal data processing to better handle scenarios with missing values in state updates, improving overall system stability and reliability without altering visible functionality.