Summary
The sample configuration says that an empty [vss].url disables VSS, but the startup argument resolver preserves the empty string and validates it as a URL. A daemon started with the documented value exits before startup.
Affected commit / version
- Commit:
af03c7f1a65135a429f05a5820600338215954dc
- Package version:
0.1.0
- Branch:
dev
Environment
- Linux (WSL2)
rustc 1.94.0
cargo 1.94.0
- No network or daemon service was used
Expected behavior
Given the sample contract:
VSS should remain disabled and startup argument resolution should succeed.
Actual behavior
The empty string remains Some("") and is rejected by validate_vss_url:
Error: Invalid VSS configuration: VSS URL `` must start with http:// or https://
Minimal local regression test
#[test]
fn empty_vss_url_disables_vss() {
let ua = resolve(&base(&[]), "[vss]\nurl = \"\"\n").unwrap();
assert!(ua.vss_url.is_none());
}
Exact command and output
cargo +1.94.0 test --locked --lib \
args::tests::empty_vss_url_disables_vss -- --exact --test-threads=1
running 1 test
... FAILED
InvalidVssConfig("VSS URL `` must start with http:// or https://")
A release binary invoked with a temporary storage directory and this config also exited 1 with the same error.
Root cause
- Sample contract:
|
[vss] |
|
# VSS server URL for cloud backup (empty = VSS disabled) |
|
#url = "" |
- Resolution/validation:
|
let vss_url = args.vss_url.or(vss.url); |
|
let vss_allow_http = args.vss_allow_http || vss.allow_http.unwrap_or(false); |
|
let vss_allow_empty_restore = |
|
args.vss_allow_empty_restore || vss.allow_empty_restore.unwrap_or(false); |
|
// Reject http:// URLs unless the host is loopback or allow_http is set. |
|
if let Some(url) = &vss_url { |
|
crate::utils::validate_vss_url(url, vss_allow_http)?; |
|
} |
args.vss_url.or(vss.url) preserves Some(""), then validation treats it as a malformed URL instead of the documented disabled sentinel.
Concrete user impact
Uncommenting the documented sample value prevents the self-hosted daemon from starting instead of leaving VSS disabled.
Fork / upstream assessment
This configuration surface is UTEXO-specific and absent from the compared upstream master commit e4008278c80495ea8a8514580b899e771feff872.
Duplicate-check evidence and limitations
I searched open and closed UTEXO and upstream issues/PRs, issue comments, review comments, commit history, and current open PR path overlaps using the config key, exact error, empty/blank URL wording, and validator name. No matching report or fix was found. PRs #139 and #140 touch the same files but contain no VSS URL hunk. Private maintainer discussions are not visible.
Suggested fix direction
Normalize an empty (preferably trimmed-empty) config value to None before URL validation, and retain a focused startup/config regression test.
Summary
The sample configuration says that an empty
[vss].urldisables VSS, but the startup argument resolver preserves the empty string and validates it as a URL. A daemon started with the documented value exits before startup.Affected commit / version
af03c7f1a65135a429f05a5820600338215954dc0.1.0devEnvironment
rustc 1.94.0cargo 1.94.0Expected behavior
Given the sample contract:
VSS should remain disabled and startup argument resolution should succeed.
Actual behavior
The empty string remains
Some("")and is rejected byvalidate_vss_url:Minimal local regression test
Exact command and output
A release binary invoked with a temporary storage directory and this config also exited 1 with the same error.
Root cause
rgb-lightning-node/sample-config.toml
Lines 126 to 128 in af03c7f
rgb-lightning-node/src/args.rs
Lines 262 to 269 in af03c7f
args.vss_url.or(vss.url)preservesSome(""), then validation treats it as a malformed URL instead of the documented disabled sentinel.Concrete user impact
Uncommenting the documented sample value prevents the self-hosted daemon from starting instead of leaving VSS disabled.
Fork / upstream assessment
This configuration surface is UTEXO-specific and absent from the compared upstream
mastercommite4008278c80495ea8a8514580b899e771feff872.Duplicate-check evidence and limitations
I searched open and closed UTEXO and upstream issues/PRs, issue comments, review comments, commit history, and current open PR path overlaps using the config key, exact error, empty/blank URL wording, and validator name. No matching report or fix was found. PRs #139 and #140 touch the same files but contain no VSS URL hunk. Private maintainer discussions are not visible.
Suggested fix direction
Normalize an empty (preferably trimmed-empty) config value to
Nonebefore URL validation, and retain a focused startup/config regression test.