Skip to content

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

Security & UX improvements:

  • Sensitive settings always masked (no include_sensitive parameter)
  • Enhanced GUI import preview with danger warnings and countdown timers for critical settings
  • Category-based permissions (network, rpc, wallet, mempool, etc.)
  • No rate limiting (users control their own nodes)

GUI export/import buttons and ZMQ notifications included.

Test plan

  • RPC commands work with bitcoin-cli
  • GUI export/import functionality
  • Functional and unit tests pass

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
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.

2 participants