Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rune handling cleanups, new DEBUG_LIGHTNINGD option #7124

Commits on Mar 19, 2024

  1. pyln-testing: use DEBUG_LIGHTNINGD to start gdb on lightningd during …

    …test.
    
    We do this for DEBUG_SUBD already, but I wanted to debug the main lightningd.
    
    (We rename --debugger to the more accurate --dev-debug-self)
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Mar 19, 2024
    Configuration menu
    Copy the full SHA
    52ab0af View commit details
    Browse the repository at this point in the history
  2. pytest: make runes amount test more specific.

    This reveals an inadequacy in our rune error reporting:
    we complain a missing parameter is "not an integer field" instead
    of "not present":
    
    ```
            # Rune requires amount_msat < 10,000!
    >       with pytest.raises(RpcError, match='Not permitted: pnameamountmsat is not present') as exc_info:
    E       AssertionError: Regex pattern did not match.
    E        Regex: 'Not permitted: pnameamountmsat is not present'
    E        Input: "RPC call failed: method: checkrune, payload: {'nodeid': '0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518', 'rune': 'b3hXuEM7Pqzk-C7HUw83xzvHOV7fmuGaWjdo-wHdfg89MCZtZXRob2Q9cGF5JnBuYW1lYW1vdW50bXNhdDwxMDAwMA==', 'method': 'pay', 'params': {'bolt11': 'lnbcrt123n1pj7flqdsp5ndqgxpwk2hf50gzm0d4ssgjnd90cwkrc8udh7lfr5x583jms7yqspp5kn5stlnkv70celgw4vmdva9m7a57drd2403vnx4whq2p5nawkh3sdq5v3jhxcmjd9c8g6t0dccsxqyjw5qcqp99qxpqysgqhrgp7wp640gyujxk0mz4l6e6dxmqp7fz8pnnpnnqjfxg2scvuzfpwlxrj332u72p5g709eqr8rwaueruce84h0qmh6kc5c2zxgg9q4qps4cu8k'}}, error: {'code': 1502, 'message': 'Not permitted: pnameamountmsat is not an integer field'}"
    ```
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Mar 19, 2024
    Configuration menu
    Copy the full SHA
    d5f6921 View commit details
    Browse the repository at this point in the history
  3. ccan: update to get rune error message fix.

    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Mar 19, 2024
    Configuration menu
    Copy the full SHA
    d285abc View commit details
    Browse the repository at this point in the history
  4. lightningd: name error messages a bit more readable.

    Rather than speaking 'rune' we should speak english in error messages.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    Reported-by: @ShahanaFarooqui
    rustyrussell committed Mar 19, 2024
    Configuration menu
    Copy the full SHA
    16de175 View commit details
    Browse the repository at this point in the history
  5. lightningd: check rune parameter names with and without punctuation.

    Changelog-Changed: runes: named parameters (e.g. `pnameamountmsat`) no longer need to remove underscores (i.e. `pnameamount_msat` now works as expected).
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Mar 19, 2024
    Configuration menu
    Copy the full SHA
    6540d29 View commit details
    Browse the repository at this point in the history