fix: improve persisted logs and peer recovery#947
Draft
ovitrif wants to merge 14 commits into
Draft
Conversation
auto-merge was automatically disabled
May 20, 2026 14:32
Pull request was converted to draft
Collaborator
Author
|
drafted until ldk-node PR is updated and new bindings version is consumed here, then, this PR is re-validated by dev. |
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.
This PR:
bitkit_YYYY-MM-DD_HH-MM-SSfile names, and keeps retained logs bounded by age and total size.0.7.0-rc.43from feat: persist restored channel peers ldk-node#82 so announced restored channel counterparties can be recovered into the peer store and peer recovery remains retryable after transient persistence failures.Description
This is the Bitkit side of the support-ticket cleanup around oversized persisted logs and restored external Lightning channels.
The log changes keep persisted logs useful for support without allowing one long TRACE session to dominate the archive. They also stop wallet wipe/restore from clearing logs, matching iOS and preserving the exact history support needs after a recovery flow. The peer diagnostics make it easier to see whether channels, connected peers, and persisted peers line up when investigating a wallet that has channel state but no usable peer connection.
The ldk-node bump consumes synonymdev/ldk-node#82 and release v0.7.0-rc.43, which restores missing announced channel peers from the network graph during node startup and keeps recovery retryable after transient peer-store persistence failures.
Preview
N/A - logging changes.
QA Notes
Manual Tests
Self-checks
to.bitkit.dev) -> launched app and inspectedfiles/logsthroughrun-as: new persisted logs are namedbitkit_YYYY-MM-DD_HH-MM-SS.log.bitkit_2026-05-17_18-44-47.part_002.log.To Check
support_snapshot.json.regression:Recovery Mode -> wipe wallet -> restore wallet -> Drawer -> Support -> Report Issue: persisted logs from before the wipe are still available.Automated Checks
./gradlew installDevDebugon attached Pixel 10 Pro.26171910410passed, covering detekt for rc43.git diff --checkLogger.perf(...)persists viasaver.save(message)andmeasured(...)no longer checksEnv.isDebug.WakeNodeWorkerkeepsmeasured(label = "doWork", context = TAG, ...)andAGENTS.mdhas the short mechanical log naming rule.WipeWalletUseCaseno longer callsLogger.reset(), so wallet wipe/restore no longer clears persisted logs unless the user explicitly wipes logs.LogsRepocreatesbitkit_logs_YYYY-MM-DD_HH-MM-SS.zipfor sharing andbitkit_support_logs_YYYY-MM-DD_HH-MM-SS.zipfor support uploads, includessupport_snapshot.json, and accepts rotated.part_###.logfiles.CIworkflow run26171987062passed on commit9df8a3ff5, covering package-authenticatedassembleDevDebugandtestDevDebugUnitTestfor the dependency bump../gradlew compileDevDebugKotlin testDevDebugUnitTest detektreached dependency resolution but is blocked in this checkout by GitHub Packages 401 because the local GitHub token lacksread:packages.CI Notes
claude-reviewis currently failing because Claude Code subscription is no longer available; this is unrelated to the code under test.