Block Reference
ANCHOR_CHANNEL
Anchor Family
TYPE 0x0502 · ANCHOR FAMILY

ANCHOR_CHANNEL

Lightning channel anchor. Verifies local and remote channel pubkeys alongside a commitment number. Used to anchor Lightning channel state on-chain for backup and verification purposes.

Anchor Invertible
ANCHOR_CHANNEL LOCAL_KEY REMOTE_KEY COMMIT # 2 pubkeys + commitment_number > 0 → SATISFIED
FieldData TypeSizeSideDescription
commitment_numberNUMERIC1-4 BConditionsChannel commitment number (must be > 0)

Both public keys folded into Merkle leaf via merkle_pub_key (PubkeyCountForBlock = 2). No key fields in conditions.

No witness fields required. The commitment number is committed in conditions.

0x0502 0 3 PUBKEY · 33B PUBKEY · 33B NUMERIC · 3B Conditions = 78 bytes
0x0502 0 0 Witness = 4 bytes (empty block)
Total 82 bytes
1.Extract PUBKEY fields (verified via Merkle leaf). Need exactly 2 channel keys.
2.If fewer than 2 pubkeys → ERROR
3.Read commitment_number from NUMERIC field
4.If commitment_number ≤ 0 → UNSATISFIED
5.Otherwise → SATISFIED
ConditionResult
Fewer than 2 pubkey fieldsERROR
Missing NUMERIC fieldERROR
commitment_number ≤ 0UNSATISFIED
2 pubkeys + commitment_number > 0SATISFIED
Conditions (channel state anchor)
{
  "type": "ANCHOR_CHANNEL",
  "inverted": false,
  "fields": [
    { "type": "PUBKEY", "hex": "02a1b2c3...local channel key...33 bytes" },
    { "type": "PUBKEY", "hex": "03d4e5f6...remote channel key...33 bytes" },
    { "type": "NUMERIC", "value": 42 }
  ]
}

Anchors commitment #42 of a Lightning channel identified by the local and remote pubkeys.

Lightning Channel State Anchoring
Commit the current channel state on-chain, creating a verifiable record of the commitment number and both channel keys. Enables trustless channel state auditing without closing the channel.
Channel Backup Verification
Anchor channel parameters on-chain as a backup reference. If local state is lost, the anchored data can be used to verify the correct channel keys and latest known commitment number.
← ANCHOR ANCHOR_POOL →