Add WatchtowerStateExport endpoint for watchtower clients - #254
Draft
vincenzopalazzo wants to merge 1 commit into
Draft
Add WatchtowerStateExport endpoint for watchtower clients#254vincenzopalazzo wants to merge 1 commit into
vincenzopalazzo wants to merge 1 commit into
Conversation
Adds an opt-in endpoint (config: [watchtower] export_enabled, default false) that exports per-channel watchtower state for external clients such as a rust-teos (Eye of Satoshi) tower client: funding outpoint, channel/user IDs, to_self_delay, and the latest counterparty commitment txids + commitment numbers (the watchtower locator source), via the new ldk-node watchtower APIs. Justice transaction assembly (to_local output detection, unsigned skeleton with conservative fee, signing via Node::sign_to_local_justice_tx) is marked TODO(justice-tx) and returns signed=false with empty payload until wired. Includes the endpoint handler, proto messages, gRPC routing, client method, CLI command, and a unit test for the disabled-by-default error path. Note: Cargo.toml carries a temporary [patch] for ldk-node pointing at vincenzopalazzo/ldk-node watchtower-apis-16eaa6f (backport of lightningdevkit/ldk-node#1031 onto the pinned rev); to be dropped once the upstream API lands in a release.
|
👋 Hi! I see this is a draft PR. |
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.
Summary
WatchtowerStateExportendpoint ([watchtower] export_enabled, default false) exporting per-channel watchtower state for external clients (e.g. a rust-teos / Eye of Satoshi tower client)to_self_delay, and the latest counterparty commitment txids + commitment numbers - the watchtower locator source - via new ldk-node watchtower APIsto_localoutput detection, unsigned skeleton with conservative fee, signing viaNode::sign_to_local_justice_tx) is markedTODO(justice-tx); the endpoint returnssigned=false+ empty payload until wired - no fake datawatchtower-state-export, unit test for the disabled error path[patch]for ldk-node -> vincenzopalazzo/ldk-nodewatchtower-apis-16eaa6f(backport of Expose watchtower APIs on Node ldk-node#1031 onto the pinned rev); dropped once the upstream API lands in a releaseTest plan
cargo check,cargo check --tests,cargo test(102 tests green incl. newexport_disabled_returns_error),cargo fmt --checkwatchtower.export_enabled = true, callwatchtower-state-exportCLI against a node with channelsDRAFT: depends on lightningdevkit/ldk-node#1031 (also draft) for the upstream API shape.