Repository navigation
LSP support - #1623
Open
chenyukang wants to merge 133 commits into
Open
LSP support #1623chenyukang wants to merge 133 commits into
chenyukang wants to merge 133 commits into
Conversation
chenyukang
force-pushed
the
lsp-support
branch
from
August 11, 2026 01:55
6d369e2 to
f1c7b85
Compare
Derive local commitment points and public nonces on demand instead of publishing and persisting every signing round. Drop legacy local caches on restore while preserving pending requests and idempotency receipts. Keep external signer validation and material history unchanged. Cover bounded local material state, restart with legacy caches, pending signature and receipt restoration, and unchanged external material requirements.
Problem: a7a4307 made a ChannelReady public channel reply to every received AnnouncementSignatures with its own cached signatures. Reestablishment already proactively replays those signatures, so two ready peers keep replying to one another. Each duplicate also rebuilds/broadcasts the channel announcement and update. The resulting ingress flood trips peer admission limits and disconnects an otherwise recovered session, making legacy recovery, repeated restarts, MPP retries and list_peers tests fail. Fix: Treat AnnouncementSignatures as an idempotent no-op once a public channel is ChannelReady, before mutating announcement state or broadcasting gossip. Keep the public-channel check and the AwaitingChannelReady path, as well as proactive cached-signature replay during funding/reestablishment. This still lets a ready peer recover the other side's missing announcement, without responding to that peer's replay indefinitely. No wire-format, persisted-schema or admission-limit changes are needed. Regression coverage: - Replay signatures repeatedly into a ready public channel and assert no outgoing messages, no gossip broadcasts and no persisted-state changes. - Reestablish asymmetric Ready/AwaitingChannelReady peers after a lost announcement; check cached replay restores readiness and then stops. - Strengthen external announcement-signing restart coverage to check both peers recover and the exact cached remote signature is restored. Both new regression tests fail on the unmodified implementation. The focused 40-test run, including all five previously failing tests, passes with this fix. Validation: - make test: default storage 1552 passed / 9 skipped; SQLite 1550 passed / 9 skipped; fiber-types 27 passed. - make clippy: all features/targets, SQLite, fiber-types and wasm32 pass. - cargo fmt --all -- --check, changed-file typos and git diff --check pass.
The public-channel restart fixture checked get_channel_signing_status for SignChannelAnnouncement, then called try_sign_pending, which queried the status a second time. If the first response was NoSignatureRequired and the announcement request arrived before the second query, the helper signed the very request the test meant to leave pending. The channel became ready, so setup waited for a consumed checkpoint until its 30s timeout. CI run 35158563757 shows this exact sequence. Pass the already-observed ChannelSigningStatus into the signing helper. The public setup now checks and acts on one snapshot; the unconstrained recovery/private-channel callers still query once before signing. Do not change production code, RPCs, timeout budgets or retry counts. Add a deterministic regression that presents a stale idle snapshot while a real announcement signature is pending. Assert that the signer store, complete signing request and absent local announcement signature remain unchanged, then explicitly sign the observed request and recover both peers. The regression fails with the old re-query behavior. Validation with CI trace logging and RUST_TEST_THREADS=2: - All 19 external signer restart tests pass with default storage and SQLite. - Repeat the signer restart, tenant restart and new announcement snapshot tests 20 times each: all 60 executions pass without timeout. - Nextest reports intermittent non-failing leaky-test warnings in default storage runs; SQLite reports none. These warnings are not suppressed. - make clippy passes, including SQLite and wasm32; fmt, changed-file typos and git diff --check also pass.
chenyukang
marked this pull request as ready for review
September 17, 2026 02:13
Add a tenant-specific opening RPC with durable retry state and frozen verification context while preserving the general external-funding RPC contract. Have the SDK persist opening intent, verify wallet funding and channel context, and install the commitment baseline automatically. Remove standalone binding flows and update the agent, Bruno scenarios, documentation, and regression tests.
Authorize inbound invoices and verify recovery before releasing preimages in E2E drivers. Allow tenant settle_invoice calls with namespace isolation coverage and require SDK signature and revocation evidence. Keep nonce reuse advisory in signing policy while preserving nonce correctness and semantic validation.
Replace signer status polling with tenant-authenticated SSE and business-layer signing notifications. Add bounded stream lifetimes, heartbeats, connection limits, session takeover, and reconnect recovery. Update the signer driver, full-payment-hash fixtures, documentation, and focused coverage.
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.
To resolve #1571
Implementation of #1625