Skip to content

light-base: add lifecycle_unstable_follow RPC subscription - #3317

Open
BigTava wants to merge 11 commits into
mainfrom
feat/lifecycle-events
Open

light-base: add lifecycle_unstable_follow RPC subscription#3317
BigTava wants to merge 11 commits into
mainfrom
feat/lifecycle-events

Conversation

@BigTava

@BigTava BigTava commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds lifecycle_unstable_follow / lifecycle_unstable_unfollow JSON-RPC methods, sharing the 32-byte bs58 subscription-id format used by transactionWatch_v1_submitAndWatch and bitswap_unstable_stream.
  • Introduces a per-chain LifecycleService broadcaster with a 128-event history for late subscribers and a bounded per-subscriber channel sized against replay so a snapshot burst cannot silently kill the subscription before it is registered for live delivery.
  • Defines seven LifecycleEvent variants (Connecting, FirstPeer, ModeDecision, WarpSyncProgress, WarpSyncFinished, BootstrapComplete, Stalled) with matching JSON schema and docstrings on both sides.
  • Spawns projection tasks in light-base/src/lib.rs that translate sync_service and network_service_chain signals into lifecycle events, plus a one-shot stall watchdog.
  • Routes each subscription through the existing background_tasks FuturesUnordered with map-lookup unsubscribe-race handling, mirroring the transactionWatch and bitswap idioms.
  • Closes Smoldot lifecycle event stream in light-base #3301

@BigTava BigTava changed the title light-base: typed lifecycle event stream light-base: lifecycle event stream Jul 30, 2026
@BigTava
BigTava force-pushed the feat/lifecycle-events branch from 92fee3b to 4d8b3ff Compare July 31, 2026 10:52
@BigTava BigTava changed the title light-base: lifecycle event stream light-base: add smoldotLifecycle_unstable_follow RPC subscription Jul 31, 2026
@BigTava
BigTava force-pushed the feat/lifecycle-events branch from 4d8b3ff to e8243e7 Compare July 31, 2026 11:17
@BigTava BigTava changed the title light-base: add smoldotLifecycle_unstable_follow RPC subscription light-base: add lifecycle_unstable_follow RPC subscription Jul 31, 2026
@BigTava
BigTava force-pushed the feat/lifecycle-events branch from e8243e7 to a320fe3 Compare July 31, 2026 11:44
Comment thread lib/src/json_rpc/methods.rs
@BigTava
BigTava force-pushed the feat/lifecycle-events branch from a320fe3 to 4432aa7 Compare July 31, 2026 13:05
@BigTava
BigTava force-pushed the feat/lifecycle-events branch from 4432aa7 to da3a47a Compare July 31, 2026 23:56
@BigTava
BigTava marked this pull request as ready for review August 4, 2026 08:35
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.

Smoldot lifecycle event stream in light-base

2 participants