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

[send_payment] self payment return no path found #362

Closed
gpBlockchain opened this issue Dec 2, 2024 · 1 comment · Fixed by #411
Closed

[send_payment] self payment return no path found #362

gpBlockchain opened this issue Dec 2, 2024 · 1 comment · Fixed by #411

Comments

@gpBlockchain
Copy link
Contributor

When Node 1 attempts a self-payment, it returns a "no path found" error, even though the channel is functioning normally.

channel list

  • node1(1000)-node2(0)
  • node2(1000)-node3(0)
  • node3(1000)-node1(0)
  1. node1 send_payment(node3,dry_run) return success
curl --location 'http://127.0.0.1:8228' --header 'Content-Type: application/json' --data '{
    "id": 42,
    "jsonrpc": "2.0",
    "method": "send_payment",
    "params": [
        {
            "target_pubkey": "03d3ac53802a85b7180f3dd30e765c65d825a04b2937b4ea26ae42c58153a04bbf",
            "amount": "0x3938700",
            "keysend": true,
            "dry_run": true
        }
    ]
}'
response:
{"jsonrpc": "2.0", "result": {"payment_hash": "0x2df5e3cf54f96a78b0253cdc3714b4baefe48f87a7c476db214cfd53f6859b4e", "status": "Created", "created_at": "0x19385e992ef", "last_updated_at": "0x19385e992ef", "failed_error": null, "fee": "0x0"}, "id": 42}

  1. node3 send_payment(node1,dry_run) return success
curl --location 'http://127.0.0.1:8251' --header 'Content-Type: application/json' --data '{
    "id": 42,
    "jsonrpc": "2.0",
    "method": "send_payment",
    "params": [
        {
            "target_pubkey": "02b574b6cdd36d61138ba2e54a8fa931bce0a02f3f7629cea0dd58b86d126e26c0",
            "amount": "0x3938700",
            "keysend": true,
            "dry_run": true
        }
    ]
}'
response:
{"jsonrpc": "2.0", "result": {"payment_hash": "0xf226fd6f460d146d001d3291c5d45e13c8ee0cf4bec7c180f56ae3224e0f03ac", "status": "Created", "created_at": "0x19385e992f3", "last_updated_at": "0x19385e992f3", "failed_error": null, "fee": "0x0"}, "id": 42}

  1. node1 send_payment(node1,allow_self_payment) return no path found
curl --location 'http://127.0.0.1:8228' --header 'Content-Type: application/json' --data '{
    "id": 42,
    "jsonrpc": "2.0",
    "method": "send_payment",
    "params": [
        {
            "target_pubkey": "02b574b6cdd36d61138ba2e54a8fa931bce0a02f3f7629cea0dd58b86d126e26c0",
            "amount": "0x3938700",
            "keysend": true,
            "dry_run": true,
            "allow_self_payment": true
        }
    ]
}'
response:
{"jsonrpc": "2.0", "error": {"code": -32000, "message": "Send payment error: Failed to build route, PathFind error: no path found", "data": {"target_pubkey": "02b574b6cdd36d61138ba2e54a8fa931bce0a02f3f7629cea0dd58b86d126e26c0", "amount": "0x3938700", "payment_hash": null, "final_tlc_expiry_delta": null, "tlc_expiry_limit": null, "invoice": null, "timeout": null, "max_fee_amount": null, "max_parts": null, "keysend": true, "udt_type_script": null, "allow_self_payment": true, "dry_run": true}}, "id": 42}

expected return success

log

node.log

@gpBlockchain
Copy link
Contributor Author

  1. node1 send_payment(node3,dry_run) return success
    dry_run return fee is wrong, because node1 don't have enough balance  in node1-node3 channel ,node1 send payment must via node2,so fee can't be 0x0, when i try send payment without dry_run ,return IncorrectOrUnknownPaymentDetails
curl --location 'http://127.0.0.1:8228' --header 'Content-Type: application/json' --data '{
    "id": 42,
    "jsonrpc": "2.0",
    "method": "send_payment",
    "params": [
        {
            "target_pubkey": "03d3ac53802a85b7180f3dd30e765c65d825a04b2937b4ea26ae42c58153a04bbf",
            "amount": "0x3938700",
            "keysend": true
        }
    ]
}'
response:
{"jsonrpc": "2.0", "error": {"code": -32000, "message": "Send payment error: Failed to send onion packet with error IncorrectOrUnknownPaymentDetails", "data": {"target_pubkey": "03d3ac53802a85b7180f3dd30e765c65d825a04b2937b4ea26ae42c58153a04bbf", "amount": "0x3938700", "payment_hash": null, "final_tlc_expiry_delta": null, "tlc_expiry_limit": null, "invoice": null, "timeout": null, "max_fee_amount": null, "max_parts": null, "keysend": true, "udt_type_script": null, "allow_self_payment": null, "dry_run": null}}, "id": 42}

log

  2024-12-02T06:00:01.192824Z ERROR fnn::fiber::channel: Error while processing channel command: InvalidParameter("Adding tlc Offered(0) with amount 60000000 exceeds local balance 0")
    at src/fiber/channel.rs:1847
    in ractor::actor::Actor with id: "0.6"

  2024-12-02T06:00:01.193042Z ERROR fnn::fiber::network: Failed to send payment: SendPaymentError("Failed to send onion packet with error IncorrectOrUnknownPaymentDetails")
    at src/fiber/network.rs:1596
    in ractor::actor::Actor with id: "0.2", name: "Network QmVmj2ScKUYxWzmV75MuMPa1FmdeAYhL3Wdqf8tsK8rkfR"

  2024-12-02T06:00:01.193074Z ERROR fnn::rpc::channel: channel request params SendPaymentCommandParams { target_pubkey: Some(Pubkey(PublicKey(bf4ba05381c542ae26eab437294ba025d8655c760ed33d0f18b7852a8053acd333e0f6d7410a8ad2a4dabb0aba04213d52c08456aa1d9a4b0ddbe42e06e4fa4c))), amount: Some(60000000), payment_hash: None, final_tlc_expiry_delta: None, tlc_expiry_limit: None, invoice: None, timeout: None, max_fee_amount: None, max_parts: None, keysend: Some(true), udt_type_script: None, allow_self_payment: None, dry_run: None } => error: "Send payment error: Failed to send onion packet with error IncorrectOrUnknownPaymentDetails"
    at src/rpc/channel.rs:703

#359

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant