Skip to main content

Module add_ironwood_tree

Module add_ironwood_tree 

Source
Expand description

Backfill the genesis Ironwood note commitment tree and anchor for existing databases.

The NU6.3 Ironwood column families are created empty when a v28 database is opened. A node that synced from genesis under v28 writes the (empty) Ironwood tree and its anchor at the genesis height during the genesis block commit. A node upgrading an older database committed its genesis block long ago, under code that never wrote an Ironwood tree, so the ironwood_note_commitment_tree and ironwood_anchors column families would otherwise stay empty โ€” which makes ZebraDb::ironwood_tree_for_tip panic on the next block and leaves the genesis Ironwood anchor missing for NU6.3 anchor validation.

This migration backfills the empty Ironwood tree (and its anchor) at the genesis height so the on-disk state matches a genesis-synced node. It is a no-op for genesis-synced and already-upgraded databases. The Ironwood pool reuses the Orchard note commitment tree type.

Structsยง

Upgrade
Implements DiskFormatUpgrade for backfilling the genesis Ironwood tree and anchor.

Functionsยง

check_cancelled ๐Ÿ”’
has_genesis_ironwood_tree ๐Ÿ”’
Returns true if the database has an Ironwood note commitment tree at or below the genesis height.