Skip to content

feat(rpc): Export GUI Policy Options for Headless Deployments#154

Open
kwsantiago wants to merge 24 commits intobitcoinknots:29.x-knotsfrom
privkeyio:kwsantiago/gui-options-rpc-export
Open

feat(rpc): Export GUI Policy Options for Headless Deployments#154
kwsantiago wants to merge 24 commits intobitcoinknots:29.x-knotsfrom
privkeyio:kwsantiago/gui-options-rpc-export

Conversation

@kwsantiago
Copy link

@kwsantiago kwsantiago commented Jul 29, 2025

Summary

Add RPC commands to export/import GUI policy settings for headless systems (Start9, Umbrel).
Relates to #130

Changes

  • dumpsettings: Export settings to JSON with optional detailed metadata (replaces separate getsettings)
  • getsettingsschema: Generate JSON Forms schema
  • setsettings: Update individual settings (renamed from setsetting)
  • updatesettings: Bulk atomic updates
  • subscribesettings: Change notifications

Copy link
Collaborator

@luke-jr luke-jr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a lot to review here, so this isn't complete comments yet.

@kwsantiago
Copy link
Author

Thank you for taking a look @luke-jr I greatly appreciate it.

This is still a WIP and there's more I'd like to do here, but your comments are really helpful as I work through this to ensure it meets Knots' standards.

@luke-jr
Copy link
Collaborator

luke-jr commented Jul 30, 2025

One issue is going to be review. This is largely one giant commit, which makes it difficult. Can you break it up into smaller steps?

You're also putting a lot in the RPC code. At the end of this, we should ideally have RPC and GUI using the same code for changing settings. So an internal interface for updatesettings called by both would be appropriate. There's a lot of existing parsing code that you can probably reuse too (eg, boolean string to boolean UniValue conversions...)

@kwsantiago
Copy link
Author

@luke-jr for review purposes, would it be better to break this into several PRs, or would you rather have everything in one PR?

@luke-jr
Copy link
Collaborator

luke-jr commented Jul 30, 2025

Multiple PRs could make sense, but there's tradeoffs. As long as it's broken up into logical separate commits, that's probably good enough.

@kwsantiago kwsantiago force-pushed the kwsantiago/gui-options-rpc-export branch from a542761 to 8abfb47 Compare July 30, 2025 23:46
@kwsantiago kwsantiago changed the title RPC: Export GUI Policy Options for Headless Deployments feat(rpc): Export GUI Policy Options for Headless Deployments Oct 14, 2025
@kwsantiago kwsantiago force-pushed the kwsantiago/gui-options-rpc-export branch from a70f6c4 to 85d3d8e Compare October 14, 2025 01:13
@kwsantiago kwsantiago changed the base branch from 28.x-knots to 29.x-knots October 14, 2025 01:13
@kwsantiago kwsantiago requested a review from luke-jr October 14, 2025 01:33
@kwsantiago kwsantiago marked this pull request as ready for review October 14, 2025 01:33
@kwsantiago kwsantiago marked this pull request as draft October 14, 2025 15:56
@kwsantiago kwsantiago force-pushed the kwsantiago/gui-options-rpc-export branch 2 times, most recently from f4deb0d to 40bead9 Compare January 8, 2026 21:26
@kwsantiago kwsantiago marked this pull request as ready for review January 8, 2026 21:26
- Remove fake CheckSettingsPermission (always returned true)
- Add proxy/onion/connect/whitelist to sensitive settings masking
- Fix setsetting to use LockSettings instead of ForceSetArg (split-brain)
- Fix metadata type crash (getInt on string UniValue)
- Fix thread-safe singleton init with std::call_once
- Fix subscription memory leak (shared_ptr -> weak_ptr)
- Fix std::stod crash on malformed input
- Implement ValidateNumericRange/ValidateStringOptions (were stubs)
- Fix AmountToSatoshi to use ParseMoney
- Remove duplicate updatesettings RPC (~330 lines)
- Fix RPCResult definitions for OBJ_DYN inner types
- Fix ZMQ SettingChanged visibility and includes
- Replace default credentials in examples with placeholders
@kwsantiago kwsantiago force-pushed the kwsantiago/gui-options-rpc-export branch from 40bead9 to 0bf6977 Compare February 16, 2026 22:38
- Add test scripts to test_runner.py BASE_SCRIPTS list
- Fix clang-tidy: push_back -> emplace_back, const ref copies
- Register RPC commands in fuzz test safe/unsafe lists
- Remove unused bitcoin-build-config.h includes
- Fix trailing whitespace and bare except clauses
- Replace locale-dependent std::stoll with ToIntegral
- Remove contrib/settings-examples (lint/shellcheck issues)
- Fix file permissions on test scripts
- Replace std::to_string with strprintf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants