Skip to content

lightningd: accept options array in plugin start - #9391

Open
daywalker90 wants to merge 1 commit into
ElementsProject:masterfrom
daywalker90:plugin-options-obj
Open

lightningd: accept options array in plugin start#9391
daywalker90 wants to merge 1 commit into
ElementsProject:masterfrom
daywalker90:plugin-options-obj

Conversation

@daywalker90

Copy link
Copy Markdown
Collaborator

The plugin start command only accepted plugin options flattened onto the RPC call (e.g. via -k/--keyword), but the plugin RPC schema documents an explicit 'options' array. This mismatch meant that callers using named parameters against generated RPC bindings (cln-rpc, grpc, protobuf), which cannot flatten arbitrary options, failed with 'unknown parameter options'.

Handle 'options' as an array of keyword=value strings, merging them with any flattened extra parameters before passing them to plugin_add_params(). Options without a value are treated as boolean flags, matching the flattened form.

Changelog-Fixed: JSON-RPC: plugin start now accepts plugin options as an options array of keyword=value strings, as documented in the plugin schema.

Fixes: #9171

Important

26.09 FREEZE August 5th: Non-bugfix PRs not ready by this date will wait for 26.12.

RC1 is scheduled on August 17th

The final release is scheduled for September 7th.

Checklist

Before submitting the PR, ensure the following tasks are completed. If an item is not applicable to your PR, please mark it as checked:

  • The changelog has been updated in the relevant commit(s) according to the guidelines.
  • Tests have been added or modified to reflect the changes.
  • Documentation has been reviewed and updated as needed.
  • Related issues have been listed and linked, including any that this PR closes.
  • Important All PRs must consider how to reverse any persistent changes for tools/lightning-downgrade

The plugin start command only accepted plugin options flattened onto
the RPC call (e.g. via -k/--keyword), but the plugin RPC schema
documents an explicit 'options' array.  This mismatch meant that callers
using named parameters against generated RPC bindings (cln-rpc, grpc,
protobuf), which cannot flatten arbitrary options, failed with
'unknown parameter options'.

Handle 'options' as an array of keyword=value strings, merging them with
any flattened extra parameters before passing them to plugin_add_params().
Options without a value are treated as boolean flags, matching the
flattened form.

Changelog-Fixed: JSON-RPC: `plugin start` now accepts plugin options as an `options` array of `keyword=value` strings, as documented in the `plugin` schema.
@daywalker90
daywalker90 requested a review from cdecker as a code owner August 7, 2026 14:07
@daywalker90 daywalker90 added the Status::Ready for Review The work has been completed and is now awaiting evaluation or approval. label Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Status::Ready for Review The work has been completed and is now awaiting evaluation or approval.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

plugin command's options argument expecting flattened options causes problem in generated rust/protobuf code

1 participant