Skip to content

Conversation

@pinges
Copy link
Contributor

@pinges pinges commented Oct 9, 2025

Some clean up based on review comments from already merged PRs.


Note

Removes SyncStatusProvider from P2P wiring, introduces configurable discovery search interval/timeout, migrates discovery to Teku DiscoveryPeer, and updates related logic/tests.

  • P2P Core:
    • Remove SyncStatusProvider from P2PNetworkImpl, MaruPeerManager, factories, and call sites.
    • MaruPeerManager: accept and use p2pConfig; pass discovery config to PeerDiscoveryTask; improved stop() (disconnects peers) and concise logging.
    • P2PNetworkImpl.stop(): simplify by delegating and awaiting only libp2p stop.
    • MaruRpcResponseCallback: lower log level to trace when RPC stream is already closed.
  • Discovery:
    • Add P2PConfig.Discovery.searchInterval and searchTimeout (with defaults); parse and propagate in tests.
    • PeerDiscoveryTask: use discovery config for schedule/timeout; switch to Teku DiscoveryPeer.
    • MaruDiscoveryService: return/consume DiscoveryPeer; adjust node record listener; block on start; drop MaruDiscoveryPeer class.
  • App/Factory/CLI:
    • Update MaruAppFactory and test factories/CLI to new p2pNetworkFactory signature (no sync provider argument).
  • Tests:
    • Update integration and unit tests to new APIs and behavior; remove custom peer wrapper usage where not needed; add config fields in HopliteFriendlinessTest.

Written by Cursor Bugbot for commit d7656ad. This will update automatically on new commits. Configure here.

@codecov-commenter
Copy link

codecov-commenter commented Oct 9, 2025

Codecov Report

❌ Patch coverage is 92.30769% with 2 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@0de5672). Learn more about missing BASE report.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
p2p/src/main/kotlin/maru/p2p/MaruPeerManager.kt 83.33% 1 Missing ⚠️
...rc/main/kotlin/maru/p2p/MaruRpcResponseCallback.kt 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #417   +/-   ##
=======================================
  Coverage        ?   83.45%           
  Complexity      ?     1122           
=======================================
  Files           ?      227           
  Lines           ?     8067           
  Branches        ?      628           
=======================================
  Hits            ?     6732           
  Misses          ?     1003           
  Partials        ?      332           
Flag Coverage Δ
kotlin 83.45% <92.30%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

gauravahuja
gauravahuja previously approved these changes Oct 9, 2025
cursor[bot]

This comment was marked as outdated.

Filter94
Filter94 previously approved these changes Oct 21, 2025
@Filter94 Filter94 merged commit 1081cdb into main Nov 14, 2025
10 checks passed
@Filter94 Filter94 deleted the minorCleanup branch November 14, 2025 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants