Fix core Tokio runtime panic and add network logging
- Fix tokio runtime panic by spawning a dedicated Tokio runtime thread in CoreController. - Add central log_msg utility in src/lib.rs for debugging. - Add instrumentation/logs to join, leave, and gossip events in src/network/gossip.rs. - Add test_net.rs bin for testing gossip loopback sync. - Use std::sync::Mutex in IrohGossipState to resolve Tokio block-in-async panics.
This commit is contained in:
@@ -21,6 +21,7 @@ Before answering highly complex questions, writing macros, or optimizing code, y
|
||||
- **Rule 1 (Absolute Ground Truth):** Never guess or hallucinate syntax rules, compiler behavior, or API surfaces. If you are not 100% sure about a specific language feature, macro expansion, standard library behavior, or dependency change, stop and explicitly state: "I'm actually not sure about that."
|
||||
- **Rule 2 (No "C in Rust"):** Do not write C-style logic wrapped in Rust syntax. Prioritize idiomatic Rust patterns (e.g., using algebraic data types, proper trait bounds, combinators like `.map()` or `.and_then()`, and precise error handling with `Result` and `Option`).
|
||||
- **Rule 3 (Safe by Default):** Always default to safe, idiomatic Rust code. Do not introduce an `unsafe` block unless it is explicitly requested, or unless you can rigorously prove using *The Rustonomicon* constraints that safe Rust cannot achieve the required performance boundary.
|
||||
- **Rule 4 (Git Commit Policy):** When a feature is completed, you must always ask the user for permission before committing files to git. Never commit files automatically.
|
||||
|
||||
### 4. Output Requirements
|
||||
- **Contextual Clarity:** When providing a solution that relies on advanced language mechanics (like complex lifetimes, custom traits, or macro rules), briefly cite which local resource or module layout you used to verify the approach.
|
||||
|
||||
Reference in New Issue
Block a user