feat(rpc): Export GUI Policy Options for Headless Deployments#154
feat(rpc): Export GUI Policy Options for Headless Deployments#154kwsantiago wants to merge 24 commits intobitcoinknots:29.x-knotsfrom
Conversation
luke-jr
left a comment
There was a problem hiding this comment.
There's a lot to review here, so this isn't complete comments yet.
|
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. |
|
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...) |
|
@luke-jr for review purposes, would it be better to break this into several PRs, or would you rather have everything in one PR? |
|
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. |
a542761 to
8abfb47
Compare
a70f6c4 to
85d3d8e
Compare
f4deb0d to
40bead9
Compare
- 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
40bead9 to
0bf6977
Compare
- 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
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 separategetsettings)getsettingsschema: Generate JSON Forms schemasetsettings: Update individual settings (renamed fromsetsetting)updatesettings: Bulk atomic updatessubscribesettings: Change notifications