You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
dev-splice: newline-separated script segments fail to compile via JSON-RPC #9553
dev-splice scripts with segments separated by real newlines (\n) fail to compile when submitted via JSON-RPC, even though doc/dev-splice.7.md states segments are "separated by newlines or semicolons" and is_delimiter() in common/splice_script.c accepts \n. The identical script with ; separators compiles and executes fine.
Reproduction
Over the raw JSON-RPC unix socket (bypassing lightning-cli and clnrest entirely):
{"code":-32602,"message":"Splice script compile failed","compiler_error":["Missing sat amount. A sat amount or '*' is required here","wallet -> 500000sat\\n500000sat -> <channel_id>","^","Compiler phase: validate_and_clean"]}
A variant with +fee fails differently (Failed to parse sat amount, Compiler phase: type_data), which suggests the newline is reaching parse_splice_script but not being tokenized as TOK_DELIMITER — the segment split never happens.
Same behavior via lightning-cli dev-splice -k script_or_json=$'...\n...' (real newline in argv).
Expected
Newline-separated segments compile identically to ;-separated ones, per the documented grammar.
Version
v26.06.8 (built from source, mainnet).
Secondary issue: clnrest drops compiler_error from error responses
When the same call fails through clnrest, the HTTP 500 body is only:
The compiler_error array (the actionable detail: reason + caret position + phase) is stripped, making splice script errors undebuggable via REST. Any extra keys on RPC error objects should be passed through.
Workaround
Use ; as the segment separator — works over JSON-RPC, clnrest, and CLI.
Activity