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 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/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 diff --git a/configurator/src/lnd.conf.template b/configurator/src/lnd.conf.template index c8e5db9..b296b01 100644 --- a/configurator/src/lnd.conf.template +++ b/configurator/src/lnd.conf.template @@ -72,6 +72,15 @@ 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} + +[sweeper] +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} diff --git a/configurator/src/main.rs b/configurator/src/main.rs index 1c4d309..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")] @@ -179,9 +190,11 @@ 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, + sweeper: SweeperConfig, } #[derive(serde::Serialize, serde::Deserialize)] @@ -406,7 +419,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 { "" }, @@ -438,6 +451,13 @@ 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, + 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 fe672ae..283f7ee 100644 --- a/manifest.yaml +++ b/manifest.yaml @@ -1,9 +1,13 @@ 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, 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 418ce1b..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, @@ -53,8 +62,10 @@ 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, + "sweeper": matchSweeperOptions, }, ["recovery-window"]); export const matchRoot = shape({ diff --git a/scripts/services/getConfig.ts b/scripts/services/getConfig.ts index fd4acd9..668dafa 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", @@ -545,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 26144b8..d1b678d 100644 --- a/scripts/services/migrations.ts +++ b/scripts/services/migrations.ts @@ -210,6 +210,46 @@ 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; + 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, + { 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, + "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; + }, + true, + { version: "0.18.0", type: "down" } + ) + } }, - "0.17.5.1", + "0.18.0", );