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

sqldb: add new gossip v2 columns to graph tables

Public commit record

What the developer wrote

Authored by Elle Mouton

90/100 · Strong
sqldb: add new gossip v2 columns to graph tables

Add a new migration that updates the graph tables (nodes, channels and
policies) in preparation for the new columns required for V2
announcements. This migration has to be added to the set of "live"
migrations instead of "dev only" since it edits the columns of existing
tables and so changes the existing sql models. We are going to prep the
SQLStore code to handle the V2 types in the coming commits, so we need
this migration to be in place.

In this commit we also remove the TestSchemaMigrationIdempotency test
since this test fails with the new "ALTER TABLE" migrations which dont
have "IF NOT EXISTS" options like tables and indexes do. Migrations
should be idempotent anyways due to the migration tracker file and/or
the sqlc migration tracker.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification
The short version

What changed, and why it matters

This commit is a routine database schema update for an upcoming Lightning Network feature called "gossip v2." It adds new empty columns to tables that store node, channel, and routing-policy data, and updates the code that reads those tables to expect the new columns. It also removes an automated test that checked whether schema migrations could be safely run over and over, because the new migration uses SQL "ALTER TABLE" commands that are not naturally repeatable. There is no direct security vulnerability visible in the diff, but removing the idempotency test slightly weakens the project's safety net against migration mistakes.

Recommended action

Treat as a normal feature-prep commit. Re-add a targeted idempotency test for migrations that do support it, or add explicit guards (e.g., catalog checks) so ALTER TABLE migrations fail safely if re-applied. Monitor the upcoming V2 gossip implementation commits for proper validation of signature, funding_pk_script, and merkle_root_hash fields.

Security signals we found

01

Removal of an idempotency test for schema migrations

02

New nullable columns added to existing graph tables via ALTER TABLE

03

No input validation, signature verification, or authorization logic changed

04

No CVE, advisory, or vendor security disclosure referenced in commit

Risk score

Why this scored 20/100

Our methodology →
Potential impact 2/30
Exploitability 1/25
Stealth signal 1/15
Affected reach 3/15
Confidence 9/10
Evidence quality 4/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.