AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Informational 15 Bitcoin

bwatch: poll chain and append blocks

Public commit record

What the developer wrote

Authored by Sangbida Chaudhuri

68/100 · Adequate
bwatch: poll chain and append blocks

Add the chain-polling loop. A timer fires bwatch_poll_chain, which calls
getchaininfo to learn bitcoind's tip; if we're behind, we fetch the next
block via getrawblockbyheight, append it to the in-memory history and
persist it to the datastore. After each successful persist we reschedule
the timer at zero delay so we keep fetching back-to-back until we catch
up to the chain tip. Once getchaininfo reports no new block, we settle
into the steady-state cadence (30s by default, tunable via the
--bwatch-poll-interval option).

This commit only handles the happy path. Reorg detection, watchman
notifications and watch matching land in subsequent commits.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit adds a routine background loop to a new Core Lightning plugin called bwatch. The plugin periodically asks Bitcoin for the latest block, downloads any missing blocks one at a time, keeps an in-memory history, and saves each block to the plugin's datastore. It is described by the author as the 'happy path' only; handling of chain reorganizations, watch notifications, and matching logic is explicitly left for later commits. There is no security-relevant behavior, vulnerability, or incident described in the commit or supplied references.

Recommended action

No security action required. This is a feature-introduction commit for a new plugin's normal block-sync loop. Reviewers may want to verify that the deferred reorg-detection and parent-hash validation commits are merged before this plugin is used in production, but that is outside the scope of this commit.

Security signals we found

No strong security signals were identified.

Risk score

Why this scored 15/100

Our methodology →
Potential impact 0/30
Exploitability 0/25
Stealth signal 0/15
Affected reach 0/15
Confidence 10/10
Evidence quality 5/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.