From 89cfa965adad800839096ed382f17e734e7e2625 Mon Sep 17 00:00:00 2001 From: Shadowy Super Coder Date: Wed, 5 Jun 2024 10:52:06 -0600 Subject: [PATCH 1/8] update to 0.18.0 --- Dockerfile | 2 +- manifest.yaml | 6 ++++-- scripts/services/migrations.ts | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 27f0c5a..bd6c6ab 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM lightninglabs/lnd:v0.17.5-beta +FROM lightninglabs/lnd:v0.18.0-beta ARG ARCH RUN apk add --no-cache \ diff --git a/manifest.yaml b/manifest.yaml index fe672ae..d427dc5 100644 --- a/manifest.yaml +++ b/manifest.yaml @@ -1,9 +1,11 @@ id: lnd title: LND -version: 0.17.5.1 +version: 0.18.0 release-notes: |- + * Update to 0.18.0 [Release Notes](https://github.com/lightningnetwork/lnd/releases/tag/v0.18.0-beta) * Add Umbrel 1.0 migration action - * Minor changes + * Add config options for zero-conf channels + * Minor fixes license: MIT wrapper-repo: "https://github.com/Start9Labs/lnd-startos" upstream-repo: "https://github.com/lightningnetwork/lnd" diff --git a/scripts/services/migrations.ts b/scripts/services/migrations.ts index 26144b8..dd11157 100644 --- a/scripts/services/migrations.ts +++ b/scripts/services/migrations.ts @@ -211,5 +211,5 @@ export const migration: T.ExpectedExports.migration = compat.migrations }, }, }, - "0.17.5.1", + "0.18.0", ); From 2c0638353aa8aa65e792ec7af8d315766f8eb960 Mon Sep 17 00:00:00 2001 From: Shadowy Super Coder Date: Wed, 5 Jun 2024 10:56:44 -0600 Subject: [PATCH 2/8] Update buildService and releaseService --- .github/workflows/buildService.yml | 10 +++------- .github/workflows/releaseService.yml | 3 ++- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/buildService.yml b/.github/workflows/buildService.yml index a2a6633..9ab20c4 100644 --- a/.github/workflows/buildService.yml +++ b/.github/workflows/buildService.yml @@ -19,12 +19,6 @@ jobs: - name: Checkout services repository uses: actions/checkout@v4 - - name: Debug - run: | - pwd - ls -alR - - - name: Build the service package id: build run: | @@ -33,9 +27,11 @@ jobs: make PACKAGE_ID=$(yq -oy ".id" manifest.*) echo "package_id=$PACKAGE_ID" >> $GITHUB_ENV + printf "\n SHA256SUM: $(sha256sum ${PACKAGE_ID}.s9pk) \n" shell: bash + - name: Upload .s9pk uses: actions/upload-artifact@v4 with: name: ${{ env.package_id }}.s9pk - path: ./${{ env.package_id }}.s9pk + path: ./${{ env.package_id }}.s9pk \ No newline at end of file diff --git a/.github/workflows/releaseService.yml b/.github/workflows/releaseService.yml index f1eebb4..18a80aa 100644 --- a/.github/workflows/releaseService.yml +++ b/.github/workflows/releaseService.yml @@ -33,6 +33,7 @@ jobs: - name: Generate sha256 checksum run: | PACKAGE_ID=${{ env.package_id }} + printf "\n SHA256SUM: $(sha256sum ${PACKAGE_ID}.s9pk) \n" sha256sum ${PACKAGE_ID}.s9pk > ${PACKAGE_ID}.s9pk.sha256 shell: bash @@ -68,4 +69,4 @@ jobs: echo "Publish skipped: missing registry credentials." else start-sdk publish https://$S9USER:$S9PASS@$S9REGISTRY ${{ env.package_id }}.s9pk - fi + fi \ No newline at end of file From b85f90bdedef38421a3232fe1a89ebc7b3d1fbb0 Mon Sep 17 00:00:00 2001 From: Shadowy Super Coder Date: Thu, 6 Jun 2024 09:33:47 -0600 Subject: [PATCH 3/8] replace deprecated feeurl with fee.url --- configurator/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configurator/src/main.rs b/configurator/src/main.rs index 1c4d309..675876d 100644 --- a/configurator/src/main.rs +++ b/configurator/src/main.rs @@ -406,7 +406,7 @@ fn main() -> Result<(), anyhow::Error> { alias = alias, color = config.color, feeurl_row = if use_neutrino { - "feeurl=https://nodes.lightning.computer/fees/v1/btc-fee-estimates.json" + "fee.url=https://nodes.lightning.computer/fees/v1/btc-fee-estimates.json" } else { "" }, From 22bc02ab4c4e0fda458407d55e4358912bcae011 Mon Sep 17 00:00:00 2001 From: Shadowy Super Coder Date: Thu, 6 Jun 2024 11:59:06 -0600 Subject: [PATCH 4/8] add migration --- scripts/services/migrations.ts | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/scripts/services/migrations.ts b/scripts/services/migrations.ts index dd11157..500e38f 100644 --- a/scripts/services/migrations.ts +++ b/scripts/services/migrations.ts @@ -210,6 +210,33 @@ export const migration: T.ExpectedExports.migration = compat.migrations throw new Error("Cannot downgrade"); }, }, + "0.18.0": { + up: compat.migrations.updateConfig( + (config: any) => { + config.advanced["protocol-zero-conf"] = false; + config.advanced["protocol-option-scid-alias"] = false; + return config; + }, + false, + { version: "0.18.0", type: "up" } + ), + down: compat.migrations.updateConfig( + (config) => { + if (matches.shape({ + advanced: matches.shape({ + "protocol-zero-conf": matches.any, + "protocol-option-scid-alias": matches.any, + }) + }).test(config)) { + delete config.advanced["protocol-zero-conf"]; + delete config.advanced["protocol-option-scid-alias"]; + } + return config; + }, + true, + { version: "0.18.0", type: "down" } + ) + } }, "0.18.0", ); From 48a07b5bf54735b1a0aca37c8ddfe49fc8f08b41 Mon Sep 17 00:00:00 2001 From: Shadowy Super Coder Date: Thu, 6 Jun 2024 15:11:27 -0600 Subject: [PATCH 5/8] fix build errors --- Makefile | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 182985a..805f4b6 100644 --- a/Makefile +++ b/Makefile @@ -49,27 +49,27 @@ docker-images/aarch64.tar: Dockerfile docker_entrypoint.sh configurator/target/a configurator/target/aarch64-unknown-linux-musl/release/configurator: $(CONFIGURATOR_SRC) docker run --user $(UID):$(GID) --rm -v ~/.cargo/registry:/root/.cargo/registry -v "$(shell pwd)"/configurator:/home/rust/src messense/rust-musl-cross:aarch64-musl cargo build --release docker run --user $(UID):$(GID) --rm -v ~/.cargo/registry:/root/.cargo/registry -v "$(shell pwd)"/configurator:/home/rust/src messense/rust-musl-cross:aarch64-musl musl-strip target/aarch64-unknown-linux-musl/release/configurator - # Docker 26 + buildkit 0.13.2 seem to have issues with building a context that contains multiple hardlinked files, work-around that by breaking the hardlink - cp --remove-destination configurator/target/aarch64-unknown-linux-musl/release/configurator configurator/target/aarch64-unknown-linux-musl/release/configurator.tmp - mv --force configurator/target/aarch64-unknown-linux-musl/release/configurator.tmp configurator/target/aarch64-unknown-linux-musl/release/configurator +# Docker 26 + buildkit 0.13.2 seem to have issues with building a context that contains multiple hardlinked files, work-around that by breaking the hardlink + cp configurator/target/aarch64-unknown-linux-musl/release/configurator configurator/target/aarch64-unknown-linux-musl/release/configurator.tmp + mv configurator/target/aarch64-unknown-linux-musl/release/configurator.tmp configurator/target/aarch64-unknown-linux-musl/release/configurator health-check/target/aarch64-unknown-linux-musl/release/health-check: $(HEALTH_CHECK_SRC) docker run --user $(UID):$(GID) --rm -v ~/.cargo/registry:/root/.cargo/registry -v "$(shell pwd)"/health-check:/home/rust/src messense/rust-musl-cross:aarch64-musl cargo build --release docker run --user $(UID):$(GID) --rm -v ~/.cargo/registry:/root/.cargo/registry -v "$(shell pwd)"/health-check:/home/rust/src messense/rust-musl-cross:aarch64-musl musl-strip target/aarch64-unknown-linux-musl/release/health-check - cp --remove-destination health-check/target/aarch64-unknown-linux-musl/release/health-check health-check/target/aarch64-unknown-linux-musl/release/health-check.tmp - mv --force health-check/target/aarch64-unknown-linux-musl/release/health-check.tmp health-check/target/aarch64-unknown-linux-musl/release/health-check + cp health-check/target/aarch64-unknown-linux-musl/release/health-check health-check/target/aarch64-unknown-linux-musl/release/health-check.tmp + mv health-check/target/aarch64-unknown-linux-musl/release/health-check.tmp health-check/target/aarch64-unknown-linux-musl/release/health-check configurator/target/x86_64-unknown-linux-musl/release/configurator: $(CONFIGURATOR_SRC) docker run --user $(UID):$(GID) --rm -v ~/.cargo/registry:/root/.cargo/registry -v "$(shell pwd)"/configurator:/home/rust/src messense/rust-musl-cross:x86_64-musl cargo build --release docker run --user $(UID):$(GID) --rm -v ~/.cargo/registry:/root/.cargo/registry -v "$(shell pwd)"/configurator:/home/rust/src messense/rust-musl-cross:x86_64-musl musl-strip target/x86_64-unknown-linux-musl/release/configurator - cp --remove-destination configurator/target/x86_64-unknown-linux-musl/release/configurator configurator/target/x86_64-unknown-linux-musl/release/configurator.tmp - mv --force configurator/target/x86_64-unknown-linux-musl/release/configurator.tmp configurator/target/x86_64-unknown-linux-musl/release/configurator + cp configurator/target/x86_64-unknown-linux-musl/release/configurator configurator/target/x86_64-unknown-linux-musl/release/configurator.tmp + mv configurator/target/x86_64-unknown-linux-musl/release/configurator.tmp configurator/target/x86_64-unknown-linux-musl/release/configurator health-check/target/x86_64-unknown-linux-musl/release/health-check: $(HEALTH_CHECK_SRC) docker run --user $(UID):$(GID) --rm -v ~/.cargo/registry:/root/.cargo/registry -v "$(shell pwd)"/health-check:/home/rust/src messense/rust-musl-cross:x86_64-musl cargo build --release docker run --user $(UID):$(GID) --rm -v ~/.cargo/registry:/root/.cargo/registry -v "$(shell pwd)"/health-check:/home/rust/src messense/rust-musl-cross:x86_64-musl musl-strip target/x86_64-unknown-linux-musl/release/health-check - cp --remove-destination health-check/target/x86_64-unknown-linux-musl/release/health-check health-check/target/x86_64-unknown-linux-musl/release/health-check.tmp - mv --force health-check/target/x86_64-unknown-linux-musl/release/health-check.tmp health-check/target/x86_64-unknown-linux-musl/release/health-check + cp health-check/target/x86_64-unknown-linux-musl/release/health-check health-check/target/x86_64-unknown-linux-musl/release/health-check.tmp + mv health-check/target/x86_64-unknown-linux-musl/release/health-check.tmp health-check/target/x86_64-unknown-linux-musl/release/health-check scripts/embassy.js: scripts/**/*.ts deno bundle scripts/embassy.ts scripts/embassy.js From 363d9bf0e6bb280d70aa5ed54b53474780ef2b4c Mon Sep 17 00:00:00 2001 From: Shadowy Super Coder Date: Fri, 7 Jun 2024 13:21:18 -0600 Subject: [PATCH 6/8] add experimental taproot chans config --- configurator/src/lnd.conf.template | 1 + configurator/src/main.rs | 2 ++ scripts/models/setConfig.ts | 1 + scripts/services/getConfig.ts | 7 +++++++ scripts/services/migrations.ts | 3 +++ 5 files changed, 14 insertions(+) diff --git a/configurator/src/lnd.conf.template b/configurator/src/lnd.conf.template index c8e5db9..321e9ed 100644 --- a/configurator/src/lnd.conf.template +++ b/configurator/src/lnd.conf.template @@ -72,6 +72,7 @@ protocol.no-anchors={protocol_no_anchors} protocol.no-script-enforced-lease={protocol_disable_script_enforced_lease} protocol.option-scid-alias={protocol_option_scid_alias} protocol.zero-conf={protocol_zero_conf} +protocol.simple-taproot-chans={protocol_simple_taproot_chans} [bolt] db.bolt.nofreelistsync={db_bolt_no_freelist_sync} diff --git a/configurator/src/main.rs b/configurator/src/main.rs index 675876d..350529a 100644 --- a/configurator/src/main.rs +++ b/configurator/src/main.rs @@ -179,6 +179,7 @@ struct AdvancedConfig { protocol_option_scid_alias: bool, protocol_no_anchors: bool, protocol_disable_script_enforced_lease: bool, + protocol_simple_taproot_chans: bool, gc_canceled_invoices_on_startup: bool, allow_circular_route: bool, bitcoin: BitcoinChannelConfig, @@ -438,6 +439,7 @@ fn main() -> Result<(), anyhow::Error> { protocol_no_anchors = config.advanced.protocol_no_anchors, protocol_disable_script_enforced_lease = config.advanced.protocol_disable_script_enforced_lease, + protocol_simple_taproot_chans = config.advanced.protocol_simple_taproot_chans, db_bolt_no_freelist_sync = config.advanced.db_bolt_no_freelist_sync, db_bolt_auto_compact = config.advanced.db_bolt_auto_compact, db_bolt_auto_compact_min_age = config.advanced.db_bolt_auto_compact_min_age, diff --git a/scripts/models/setConfig.ts b/scripts/models/setConfig.ts index 418ce1b..83face8 100644 --- a/scripts/models/setConfig.ts +++ b/scripts/models/setConfig.ts @@ -53,6 +53,7 @@ export const matchAdvanced2 = shape({ "protocol-option-scid-alias": boolean, "protocol-no-anchors": boolean, "protocol-disable-script-enforced-lease": boolean, + "protocol-simple-taproot-chans": boolean, "gc-canceled-invoices-on-startup": boolean, bitcoin: matchBitcoin, }, ["recovery-window"]); diff --git a/scripts/services/getConfig.ts b/scripts/services/getConfig.ts index fd4acd9..d4e6f9f 100644 --- a/scripts/services/getConfig.ts +++ b/scripts/services/getConfig.ts @@ -457,6 +457,13 @@ export const getConfig: T.ExpectedExports.getConfig = compat.getConfig({ "Set to disable support for script enforced lease channel commitments. If not set, lnd will accept these channels by default if the remote channel party proposes them. Note that lnd will require 1 UTXO to be reserved for this channel type if it is enabled.\nNote: This may cause you to be unable to close a channel and your wallets may not understand why", "default": false, }, + "protocol-simple-taproot-chans": { + "type": "boolean", + "name": "Experimental Taproot Channels", + "description": + "Taproot Channels improve both privacy and cost efficiency of on-chain transactions. Note: Taproot Channels are experimental and only available for unannounced (private) channels at this time.", + "default": false, + }, "gc-canceled-invoices-on-startup": { "type": "boolean", "name": "Cleanup Canceled Invoices on Startup", diff --git a/scripts/services/migrations.ts b/scripts/services/migrations.ts index 500e38f..35a0382 100644 --- a/scripts/services/migrations.ts +++ b/scripts/services/migrations.ts @@ -215,6 +215,7 @@ export const migration: T.ExpectedExports.migration = compat.migrations (config: any) => { config.advanced["protocol-zero-conf"] = false; config.advanced["protocol-option-scid-alias"] = false; + config.advanced["protocol-simple-taproot-chans"] = false; return config; }, false, @@ -226,10 +227,12 @@ export const migration: T.ExpectedExports.migration = compat.migrations advanced: matches.shape({ "protocol-zero-conf": matches.any, "protocol-option-scid-alias": matches.any, + "protocol-simple-taproot-chans": matches.any, }) }).test(config)) { delete config.advanced["protocol-zero-conf"]; delete config.advanced["protocol-option-scid-alias"]; + delete config.advanced["protocol-simple-taproot-chans"]; } return config; }, From d42389a4f1aa750353d77c9d6cfe60e8bfe2c9b5 Mon Sep 17 00:00:00 2001 From: Shadowy Super Coder Date: Mon, 10 Jun 2024 12:35:19 -0600 Subject: [PATCH 7/8] Add sweeper config options --- configurator/src/lnd.conf.template | 8 ++++ configurator/src/main.rs | 18 ++++++++ manifest.yaml | 4 +- scripts/models/setConfig.ts | 10 +++++ scripts/services/getConfig.ts | 70 ++++++++++++++++++++++++++++++ scripts/services/migrations.ts | 10 +++++ 6 files changed, 119 insertions(+), 1 deletion(-) diff --git a/configurator/src/lnd.conf.template b/configurator/src/lnd.conf.template index 321e9ed..c319ebc 100644 --- a/configurator/src/lnd.conf.template +++ b/configurator/src/lnd.conf.template @@ -74,6 +74,14 @@ protocol.option-scid-alias={protocol_option_scid_alias} protocol.zero-conf={protocol_zero_conf} protocol.simple-taproot-chans={protocol_simple_taproot_chans} +[sweeeper] +sweeper.maxfeerate={sweeper_maxfeerate} +sweeper.nodeadlineconftarget={sweeper_nodeadlineconftarget} +sweeper.budget.tolocalratio={sweeper_budget_tolocalratio} +sweeper.budget.anchorcpfpratio={sweeper_budget_anchorcpfpratio} +sweeper.budget.deadlinehtlcratio={sweeper_budget_deadlinehtlcratio} +sweeper.budget.nodeadlinehtlcratio={sweeper_budget_nodeadlinehtlcratio} + [bolt] db.bolt.nofreelistsync={db_bolt_no_freelist_sync} db.bolt.auto-compact={db_bolt_auto_compact} diff --git a/configurator/src/main.rs b/configurator/src/main.rs index 350529a..1c6de6c 100644 --- a/configurator/src/main.rs +++ b/configurator/src/main.rs @@ -131,6 +131,17 @@ struct BitcoinChannelConfig { time_lock_delta: usize, } +#[derive(serde::Deserialize)] +#[serde(rename_all = "kebab-case")] +struct SweeperConfig { + sweeper_maxfeerate: u64, + sweeper_nodeadlineconftarget: usize, + sweeper_budget_tolocalratio: f64, + sweeper_budget_anchorcpfpratio: f64, + sweeper_budget_deadlinehtlcratio: f64, + sweeper_budget_nodeadlinehtlcratio: f64, +} + #[derive(serde::Deserialize, PartialEq, Eq)] #[serde(tag = "type")] #[serde(rename_all = "kebab-case")] @@ -183,6 +194,7 @@ struct AdvancedConfig { gc_canceled_invoices_on_startup: bool, allow_circular_route: bool, bitcoin: BitcoinChannelConfig, + sweeper: SweeperConfig, } #[derive(serde::Serialize, serde::Deserialize)] @@ -440,6 +452,12 @@ fn main() -> Result<(), anyhow::Error> { protocol_disable_script_enforced_lease = config.advanced.protocol_disable_script_enforced_lease, protocol_simple_taproot_chans = config.advanced.protocol_simple_taproot_chans, + sweeper_maxfeerate = config.advanced.sweeper.sweeper_maxfeerate, + sweeper_nodeadlineconftarget = config.advanced.sweeper.sweeper_nodeadlineconftarget, + sweeper_budget_tolocalratio = config.advanced.sweeper.sweeper_budget_tolocalratio, + sweeper_budget_anchorcpfpratio = config.advanced.sweeper.sweeper_budget_anchorcpfpratio, + sweeper_budget_deadlinehtlcratio = config.advanced.sweeper.sweeper_budget_deadlinehtlcratio, + sweeper_budget_nodeadlinehtlcratio = config.advanced.sweeper.sweeper_budget_nodeadlinehtlcratio, db_bolt_no_freelist_sync = config.advanced.db_bolt_no_freelist_sync, db_bolt_auto_compact = config.advanced.db_bolt_auto_compact, db_bolt_auto_compact_min_age = config.advanced.db_bolt_auto_compact_min_age, diff --git a/manifest.yaml b/manifest.yaml index d427dc5..283f7ee 100644 --- a/manifest.yaml +++ b/manifest.yaml @@ -4,8 +4,10 @@ version: 0.18.0 release-notes: |- * Update to 0.18.0 [Release Notes](https://github.com/lightningnetwork/lnd/releases/tag/v0.18.0-beta) * Add Umbrel 1.0 migration action - * Add config options for zero-conf channels + * Add config options for zero-conf channels, taproot channels, and sweeper settings * Minor fixes + * Notice! If LND gets stuck in "Stopping" status after the update, the solution is to restart your server. System -> Restart. + license: MIT wrapper-repo: "https://github.com/Start9Labs/lnd-startos" upstream-repo: "https://github.com/lightningnetwork/lnd" diff --git a/scripts/models/setConfig.ts b/scripts/models/setConfig.ts index 83face8..742d14d 100644 --- a/scripts/models/setConfig.ts +++ b/scripts/models/setConfig.ts @@ -36,6 +36,15 @@ export const matchBitcoin = shape({ "time-lock-delta": number, }); +export const matchSweeperOptions = shape({ + "sweeper-maxfeerate": number, + "sweeper-nodeadlineconftarget": number, + "sweeper-budget-tolocalratio": number, + "sweeper-budget-anchorcpfpratio": number, + "sweeper-budget-deadlinehtlcratio": number, + "sweeper-budget-nodeadlinehtlcratio": number, +}); + export const matchAdvanced2 = shape({ "debug-level": string, "db-bolt-no-freelist-sync": boolean, @@ -56,6 +65,7 @@ export const matchAdvanced2 = shape({ "protocol-simple-taproot-chans": boolean, "gc-canceled-invoices-on-startup": boolean, bitcoin: matchBitcoin, + "sweeper": matchSweeperOptions, }, ["recovery-window"]); export const matchRoot = shape({ diff --git a/scripts/services/getConfig.ts b/scripts/services/getConfig.ts index d4e6f9f..668dafa 100644 --- a/scripts/services/getConfig.ts +++ b/scripts/services/getConfig.ts @@ -552,6 +552,76 @@ export const getConfig: T.ExpectedExports.getConfig = compat.getConfig({ }, }, }, + "sweeper": { + "type": "object", + "name": "Sweeper Options", + "description": + "'Sweep' is a LND subservice that handles funds sent from dispute resolution contracts to the internal wallet.\nThese config values help inform the sweeper to make decisions regarding how much it burns in on-chain fees in order to recover possibly contested outputs (HTLCs and Breach outputs).\nWARNING: These settings can result in loss of funds if poorly congifured. Refer to the LND documentation for more information: https://docs.lightning.engineering/lightning-network-tools/lnd/sweeper", + "spec": { + "sweeper-maxfeerate": { + "type": "number", + "name": "Max Fee Rate", + "description": + "The max fee rate in sat/vb which can be used when sweeping funds. Setting this value too low can result in transactions not being confirmed in time, causing HTLCs to expire hence potentially losing funds.", + "nullable": false, + "range": "[1,*)", + "integral": true, + "default": 1000, + "units": "Sats/vb" + }, + "sweeper-nodeadlineconftarget": { + "type": "number", + "name": "Non-time-sensitive Sweep Confirmation Target", + "description": + "The conf target to use when sweeping non-time-sensitive outputs. This is useful for sweeping outputs that are not time-sensitive, and can be swept at a lower fee rate.", + "nullable": false, + "range": "[1,*)", + "integral": true, + "default": 1008, + "units": "Confirmations" + }, + "sweeper-budget-tolocalratio": { + "type": "number", + "name": "Budget to Local Ratio", + "description": + "The ratio (expressed as a decimal) of the value in to_local output to allocate as the budget to pay fees when sweeping it.", + "nullable": false, + "range": "[0,1)", + "integral": false, + "default": 0.5, + }, + "sweeper-budget-anchorcpfpratio": { + "type": "number", + "name": "Anchor CPFP Ratio", + "description": + "The ratio of a special value to allocate as the budget to pay fees when CPFPing a force close tx using the anchor output. The special value is the sum of all time-sensitive HTLCs on this commitment subtracted by their budgets.", + "nullable": false, + "range": "[0,1)", + "integral": false, + "default": 0.5, + }, + "sweeper-budget-deadlinehtlcratio": { + "type": "number", + "name": "Time-Sensitive HTLC Budget Ratio", + "description": + "The ratio of the value in a time-sensitive (first-level) HTLC to allocate as the budget to pay fees when sweeping it.", + "nullable": false, + "range": "[0,1)", + "integral": false, + "default": 0.5, + }, + "sweeper-budget-nodeadlinehtlcratio": { + "type": "number", + "name": "Non-Time-Sensitive HTLC Budget Ratio", + "description": + "The ratio of the value in a non-time-sensitive (second-level) HTLC to allocate as the budget to pay fees when sweeping it.", + "nullable": false, + "range": "[0,1)", + "integral": false, + "default": 0.5, + }, + } + }, }, }, }); diff --git a/scripts/services/migrations.ts b/scripts/services/migrations.ts index 35a0382..d1b678d 100644 --- a/scripts/services/migrations.ts +++ b/scripts/services/migrations.ts @@ -216,6 +216,14 @@ export const migration: T.ExpectedExports.migration = compat.migrations config.advanced["protocol-zero-conf"] = false; config.advanced["protocol-option-scid-alias"] = false; config.advanced["protocol-simple-taproot-chans"] = false; + config.advanced.sweeper = { + "sweeper-maxfeerate": 1000, + "sweeper-nodeadlineconftarget": 1008, + "sweeper-budget-tolocalratio": 0.5, + "sweeper-budget-anchorcpfpratio": 0.5, + "sweeper-budget-deadlinehtlcratio": 0.5, + "sweeper-budget-nodeadlinehtlcratio": 0.5, + } return config; }, false, @@ -228,11 +236,13 @@ export const migration: T.ExpectedExports.migration = compat.migrations "protocol-zero-conf": matches.any, "protocol-option-scid-alias": matches.any, "protocol-simple-taproot-chans": matches.any, + sweeper: matches.any, }) }).test(config)) { delete config.advanced["protocol-zero-conf"]; delete config.advanced["protocol-option-scid-alias"]; delete config.advanced["protocol-simple-taproot-chans"]; + delete config.advanced.sweeper; } return config; }, From 3ee2748ccece5e841ef35287a47b26884fb800f1 Mon Sep 17 00:00:00 2001 From: Dominion5254 Date: Mon, 10 Jun 2024 12:53:24 -0600 Subject: [PATCH 8/8] Fix typo Co-authored-by: ProofOfKeags --- configurator/src/lnd.conf.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configurator/src/lnd.conf.template b/configurator/src/lnd.conf.template index c319ebc..b296b01 100644 --- a/configurator/src/lnd.conf.template +++ b/configurator/src/lnd.conf.template @@ -74,7 +74,7 @@ protocol.option-scid-alias={protocol_option_scid_alias} protocol.zero-conf={protocol_zero_conf} protocol.simple-taproot-chans={protocol_simple_taproot_chans} -[sweeeper] +[sweeper] sweeper.maxfeerate={sweeper_maxfeerate} sweeper.nodeadlineconftarget={sweeper_nodeadlineconftarget} sweeper.budget.tolocalratio={sweeper_budget_tolocalratio}