# EPF Cohort 6 – Week 7 Update At previous 2 week, I was hospitalized and underwent two additional surgeries caused by first one... Which made me completely unavailable to contribute during that time. ## Progress This Week - Recorded missed proposal presentation: [YouTube – Missed Proposal Recap](https://www.youtube.com/watch?v=Y047VIkHe9Q) - Had a live sync meeting with Saulius (from Grandine) to discuss tracing integration plans including required changes to the external `eth2_libp2p` networking submodule - Finished [Phase 1 PR](https://github.com/sntntn/grandine/pull/1) from the [Roadmap](https://hackmd.io/JX5Q0ObtQ-iStLwSmVRPVg#Phase-1-Foundational-Setup) As part of Phase 1, I focused on introducing & customizing the `tracing-subscriber` setup to ensure a smooth transition from the previous logging system. The goal was to **retain the familiar developer UX** while unlocking the **benefits of structured diagnostics** provided by `tracing`. Key highlights: - Improved existing log appearance - Enabled dynamic log filtering via `GRANDINE_LOG`, `RUST_LOG`, and module-specific overrides as a fallback - Introduced helper macros to wrap context into logs without sacrificing performance While exploring `tracing-subscriber` customization, I evaluated potential trade-offs in performance. Deeper formatting (e.g. formatting peer-related metrics directly in the subscriber layer) would likely introduce overhead or complexity. Instead, I opted for a more ergonomic and performant approach: introducing the `info_with_peers!()` macro. It wraps the `PEER_LOG_METRICS` context into log messages only **when needed**, leaving the standard `info!` macro untouched. This way: - Developers can continue using `info!()` as usual - When peer-specific context is relevant, they can call `info_with_peers!()` instead - Logging remains both performant and structured, with minimal disruption This decision balances flexibility and developer control without burdening the logging system with global context injection. ## Next Steps - Start working on **Phase 2** from the [roadmap](https://hackmd.io/JX5Q0ObtQ-iStLwSmVRPVg#Phase-1-Foundational-Setup) - Plan to backport tracing-related changes from Lighthouse on networking layer, since Grandine uses a part of Lighthouse’s [networking layer](https://github.com/sigp/lighthouse/tree/stable/beacon_node/lighthouse_network), extracted as [**eth2_libp2p**](https://github.com/grandinetech/eth2_libp2p) ## Resources - [Grandine GitHub Repository](https://github.com/grandinetech/grandine) - [Roadmap HackMD](https://hackmd.io/JX5Q0ObtQ-iStLwSmVRPVg) - [Phase 1 PR](https://github.com/sntntn/grandine/pull/1)