-
Notifications
You must be signed in to change notification settings - Fork 182
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
refactor(dojo): change usage of trace! to avoid path prefix #2830
Conversation
WalkthroughOhayo, sensei! This PR focuses on optimizing trace logging across multiple Dojo crates by replacing Changes
Assessment against linked issues
Possibly related PRs
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 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
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
crates/dojo/world/src/diff/mod.rs (1)
Line range hint
175-179
: Ohayo sensei! Consider enhancing the deployment check logging.While the current logging is good, this is a critical deployment check. Consider adding the class hash to provide more context for debugging deployment issues.
trace!( contract_address = format!("{:#066x}", world_address), + class_hash = format!("{:#066x}", provider.get_class_hash_at(BlockId::Tag(BlockTag::Pending), world_address).unwrap()), "World already deployed." );
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
crates/dojo/utils/src/tx/declarer.rs
(4 hunks)crates/dojo/utils/src/tx/deployer.rs
(1 hunks)crates/dojo/world/src/diff/mod.rs
(2 hunks)crates/dojo/world/src/remote/events_to_remote.rs
(3 hunks)
✅ Files skipped from review due to trivial changes (2)
- crates/dojo/utils/src/tx/deployer.rs
- crates/dojo/world/src/remote/events_to_remote.rs
🔇 Additional comments (4)
crates/dojo/utils/src/tx/declarer.rs (3)
17-17
: LGTM! Clean trace logging implementation.
The trace logging provides good visibility with proper hex formatting for the class hash.
Also applies to: 96-101
Line range hint 108-114
: LGTM! Comprehensive pre-declaration logging.
The trace provides all necessary context including class hash and casm class hash.
Line range hint 131-137
: LGTM! Well-structured post-declaration logging.
The trace provides comprehensive information about the successful declaration, including the transaction hash.
crates/dojo/world/src/diff/mod.rs (1)
15-15
: LGTM! Clean import.
The trace import is properly placed with other imports.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2830 +/- ##
=======================================
Coverage 55.92% 55.92%
=======================================
Files 439 439
Lines 56156 56156
=======================================
Hits 31408 31408
Misses 24748 24748 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @847850277 for adding consistency. 👍
Description
@glihm PTAL.
Related issue
close #2829
Tests
Added to documentation?
Checklist
scripts/prettier.sh
,scripts/rust_fmt.sh
,scripts/cairo_fmt.sh
)scripts/clippy.sh
,scripts/docs.sh
)Summary by CodeRabbit
Bug Fixes
tracing::trace!
withtrace!
, enhancing readability without altering functionality.New Features
new_from_chain
function for better tracking of world deployment status.