Skip to content

fix: release peer lock before persistence - #101

Open
ovitrif wants to merge 2 commits into
fix/94-sigabrt-runtime-dropfrom
ovi/fix-99-release-peer-lock
Open

fix: release peer lock before persistence#101
ovitrif wants to merge 2 commits into
fix/94-sigabrt-runtime-dropfrom
ovi/fix-99-release-peer-lock

Conversation

@ovitrif

@ovitrif ovitrif commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Fixes #99

Related to synonymdev/bitkit-android#986.
Addresses the Node.listPeers ANR tracked in synonymdev/bitkit-android#1036.

Summary

  • Backport Fully switch to async KVStore persistence lightningdevkit/ldk-node#919's async KVStore peer-persistence design.
  • Serialize peer mutations with a Tokio mutex, encode each snapshot under the peer RwLock, and release that lock before awaiting persistence.
  • Preserve fork address updates, RGS recovery exclusion ordering, and retryable add, address-update, and removal failures.
  • Bridge synchronous node APIs at the runtime boundary while async event and recovery paths await persistence directly.
  • Prepare Rust and mobile binding artifacts as 0.7.0-rc.61.

Validation

  • Local verification: cargo fmt --check, git diff --check, and cargo test --features uniffi --lib (93 passed).
  • Binding verification: ./bindgen.sh completed for JVM Kotlin, Python, Swift, and Android; JVM Gradle, Swift framework assembly, Android three-ABI build-ID, 16 KiB alignment, debug-symbol, stripped-library, and AAR checks passed.
  • Swift archive verification: SHA-256 8662cdf7f52725ceab0ebf68b7ded139dfbbb0b4b5ec4e451cb5f7cce505ce68 matches Package.swift and the uploaded release asset.

QA Notes

  • This PR is stacked on fix: prevent electrum runtime self-drop #100 at 080b5f20ef3a2e6a1b706a84b087bd354bb71ecb.
  • Synchronous peer reads remain available while async persistence is pending. Failed persistence restores the previous in-memory state so the mutation can be retried.

Release

@ovitrif ovitrif self-assigned this Jul 28, 2026
@ovitrif
ovitrif requested a review from coreyphillips July 28, 2026 21:29
@ovitrif ovitrif linked an issue Jul 28, 2026 that may be closed by this pull request
ovitrif added 2 commits July 29, 2026 14:38
Backport lightningdevkit/ldk-node@d49b681 while preserving fork address updates and retryable persistence failures.
@ovitrif
ovitrif force-pushed the ovi/fix-99-release-peer-lock branch from 85ac71a to b3bd780 Compare July 29, 2026 13:02
@ovitrif
ovitrif marked this pull request as ready for review July 29, 2026 13:11
chatgpt-codex-connector[bot]

This comment was marked as resolved.

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.

fix: release peer lock before persistence

1 participant