Make RLN persistence crash-consistent - #138
Merged
gofman8 merged 13 commits intoAug 17, 2026
Merged
Conversation
This was referenced Aug 10, 2026
dcorral
added a commit
that referenced
this pull request
Aug 12, 2026
Jainakin
force-pushed
the
hardik/rln-kv-vss-durability
branch
from
August 13, 2026 08:20
be65cbc to
249ba32
Compare
dcorral
marked this pull request as ready for review
August 17, 2026 09:07
dcorral
self-requested a review
August 17, 2026 09:11
dcorral
approved these changes
Aug 17, 2026
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Make RLN local KV and VSS replication path crash-consistent.
Why
The previous best-effort sequence could persist a new local value without its retry intent, evict an older intent when the queue reached capacity, or allow shutdown to race an in-flight remote mutation. Any of those outcomes can make a restored node silently older than the local state.
This PR establishes the durability contract only. The transactional RGB funding state machine remains separate and WIP in #139.
Independently reproduced gaps
The deterministic tests from #142 were cherry-picked into this branch. They cover three concrete invariants:
A fourth deterministic regression added during review proves that a retry drain which passed its initial admission check cannot begin a remote mutation after
stop()returns.Independent CI evidence from the test PR:
dev: https://github.com/UTEXO-Protocol/rgb-lightning-node/actions/runs/31583277702/job/94071111083The tests now live with the fix and are invoked explicitly by the normal
vss-testsworkflow, so future changes cannot regress these properties silently.Safety properties
Validation
Local validation on the current rebased head:
cargo fmt --checkSKIP_INIT=1 cargo test --features vss "test::vss::tests" -- --test-threads=1SKIP_INIT=1 cargo test --features vss "test::vss_durability_gaps" -- --test-threads=1SKIP_INIT=1 cargo test --features vss "test::vss_unreachable_openchannel::openchannel_refused_while_vss_unreachable" -- --exact --nocapture --test-threads=1SKIP_INIT=1 cargo test --features "uniffi,test-utils,vls,vss" --lib kv_store_os_kill_matrix -- --test-threads=1SKIP_INIT=1 cargo test --features "uniffi,test-utils,vls,vss" --bin rgb-lightning-node synced_kv_os_kill_matrix -- --ignored --test-threads=1The current GitHub matrix is running after rebasing onto latest
devand force-pushing the branch. Full CI remains a merge gate: https://github.com/UTEXO-Protocol/rgb-lightning-node/pull/138/checksReview and rollout notes
SyncedKvStoreare persisted protocol contracts