Skip to content

fix: store a sub-handle's final cert over a stale temp - #88

Merged
buffrr merged 1 commit into
mainfrom
fix-subhandle-finalize
Aug 6, 2026
Merged

fix: store a sub-handle's final cert over a stale temp#88
buffrr merged 1 commit into
mainfrom
fix-subhandle-finalize

Conversation

@buffrr

@buffrr buffrr commented Aug 6, 2026

Copy link
Copy Markdown
Member

No description provided.

A sub-handle's own commitment is Unknown (finality is proven through the parent
space's handle tree, not its own on-chain commitment), so is_better_than has no
commitment height to compare between a temp and its finalization. A finalize carries
a fresher anchor but usually EMPTY owner records, so is_better_than falls through to
the records comparison and rejects it before reaching the anchor tiebreaker — leaving
the relay serving a stale temp that no longer verifies against the tip.

Accept a strictly fresher proof from the same key that doesn't downgrade finality
(anchor advances and sovereignty rank does not regress), even when is_better_than is
false; the existing merge preserves the owner's records onto the fresh final. Incoming
certs are already verified against current anchors, so a higher anchor is genuine
fresher chain truth.

Adds test_finalize_without_commitment_upgrade_replaces_temp covering the Unknown-
commitment sub-handle case (the existing test only covered the Exists-commitment one).
@buffrr
buffrr merged commit f2a085d into main Aug 6, 2026
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.

1 participant