Skip to content

feat(rpc): committed_fallback option for buildchainproof - #214

Merged
buffrr merged 1 commit into
spacesprotocol:mainfrom
buffrr:committed-chain-proof
Sep 21, 2026
Merged

buffrr merged 1 commit into
spacesprotocol:mainfrom
buffrr:committed-chain-proof

Conversation

@buffrr

@buffrr buffrr commented Sep 21, 2026

Copy link
Copy Markdown
Member

build_chain_proof errored when a requested record was updated after the last commit (most_recent_update > last_committed), because it resolved keys from live state but proves against the committed snapshot — so cert relays could not resolve a space right after e.g. an auction commitment moved its outpoint, until the next commit (~up to 36 blocks).

Add an optional committed_fallback flag (default false, old behavior preserved for consumers that rely on the not-yet-committed error). When true, keys are resolved against the last committed snapshot so a moved record resolves to its committed state and never errors; a not-yet-committed record proves as non-existent (correct — not anchored yet).

Reuses existing lookups: a committed snapshot is an empty-staged SpLiveSnapshot/NumLiveSnapshot (new SpStore/NumStore::read_committed), so get_space_info/get_num_info run unchanged against it; numeric->id resolution stays on the SQLite index (commit-independent). No API/result shape change.

build_chain_proof errored when a requested record was updated after the last
commit (most_recent_update > last_committed), because it resolved keys from
live state but proves against the committed snapshot — so cert relays could
not resolve a space right after e.g. an auction commitment moved its outpoint,
until the next commit (~up to 36 blocks).

Add an optional committed_fallback flag (default false, old behavior preserved
for consumers that rely on the not-yet-committed error). When true, keys are
resolved against the last committed snapshot so a moved record resolves to its
committed state and never errors; a not-yet-committed record proves as
non-existent (correct — not anchored yet).

Reuses existing lookups: a committed snapshot is an empty-staged
SpLiveSnapshot/NumLiveSnapshot (new SpStore/NumStore::read_committed), so
get_space_info/get_num_info run unchanged against it; numeric->id resolution
stays on the SQLite index (commit-independent). No API/result shape change.
@buffrr
buffrr force-pushed the committed-chain-proof branch from deb4e9f to 1fb5c0f Compare September 21, 2026 12:52
@buffrr
buffrr merged commit 6ae698f into spacesprotocol:main Sep 21, 2026
8 of 9 checks passed
@buffrr
buffrr deleted the committed-chain-proof branch September 21, 2026 12:53
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