Lightning LND gRPC send direct payment returns invalid_key_length error

I’m trying to send a direct payment on testnet from my node A to my node B. Both have only channels with public nodes, not between themselves, so that a route contains multiple hops.

I followed the Bidirectional-streaming RPC example from https://dev.lightning.community/guides/javascript-grpc/

//var dest_pubkey = <RECEIVER_ID_PUBKEY>;
var dest_pubkey = '033d4933c29885ab84cc5eacbcf3cd3bc87d3c36b36e81d9b09a0691946dfa3493';

var dest_pubkey_bytes = ByteBuffer.fromHex(dest_pubkey);

var call = lightning.sendPayment();
call.on('data', function(payment) {
  console.log("Payment sent:");
  console.log(payment);
});

call.write({ dest: dest_pubkey_bytes, amt: 11 });

I get the response

Payment sent:
{
  payment_error: 'invalid key length',
  payment_preimage: <Buffer >,
  payment_route: null,
  payment_hash: <Buffer 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00>
}

from which I get the impression that I am providing the wrong pub key. Is my nodes’ public identifier the pubkey which can be obtained by the identity_pubkey property from getinfo command?

When I use a Buffer instead of ByteBuffer:

var dest_pubkey_bytes = Buffer.from(dest_pubkey, 'hex');

instead of

var dest_pubkey_bytes = ByteBuffer.fromHex(dest_pubkey);

I don’t get the invalid_key_length error but an incorrect_payment_details error:

Payment sent:
{
  payment_error: 'incorrect_payment_details',
  payment_preimage: <Buffer >,
  payment_route: null,
  payment_hash: <Buffer 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00>
}

from which I get the impression that I need provide other data in the request besides dest and amt. Do I need to add something more to the request? e.g. a keysend flag or something similar to lncli sendpayment —keysend

sending direct payment via cli works:

tlncli2 sendpayment --keysend --dest 033d4933c29885ab84cc5eacbcf3cd3bc87d3c36b36e81d9b09a0691946dfa3493 --amt 11

response:

Amount + fee:   11 + 2.001 sat
Payment hash:   644beaa4aafbaa2c1c4bace2735c038446bfdaae6942e4900f511f1a0fbec1b1
Payment status: SUCCEEDED, preimage: 92a304c1c5b47afe887faf3e0e137d618c014a9d27edd6897b49411121c5d2e9

My nodes have version

lnd version 0.10.0-beta commit=v0.10.0-beta

Settling payment in Lightning Network

In HTLC, after all the parties have locked their funds in the contract, claiming payment happens in a reverse way, starting with the receiver who reveals the preimage of the corresponding payment hash. What will be the problem if it had started with the sender?

Firstly the sender has technically nothing to claim, secondly the receiver is the only one able to reveal the preimage in the first place.

After the receiver confirms receipt of the contract, it sends an acknowledgment to sender. Sender releases preimage

Do you mean the receiver would then hand the preimage to the sender ? This adds even more interactivity (if not using the Lightning Network itself to transfer the information) and also drops (partially ?) the Proof Of Payment.

I didn’t think too hard about it but it may also open up a lot of other issues, what would be the rationale for doing so ?

lightning network – What is “signature recovery”?

Bolt #11 defines a “tagged field,” n, which identifies the payee by a public key, but it isn’t required. It also requires a signature which can be verified only if the public key is known. When tagged field n is not included, something called “signature recovery” is required. How does that work?

I ask because I was thinking that if I get two invoices, I should be able to determine if they indicate the same payee. I thought tagged field ‘n’ would be great for this, but it might not be supplied. So how can I compare the two invoices to see if they came from the same node? If signature recovery is built in, I guess that means I can get the public key even if tagged field ‘n’ is missing. But how would I do that?

lightning network daemon – LND funding transaction stuck in mempool due to low fees

I have a funding transaction stuck in mempool due to low fees. Searchng around I have find that there is “BumpFee” wallet option to push your transaction. i have tried in this way:

~$ lncli wallet bumpfee [Channel_point] –sat_per_byte 150

>[lncli] rpc error: code = Unknown desc = the passed output doesn’t belong to the wallet

When type:

~ $ lncli pendingchannels

i can see the transaction waiting for confirmation, but when type:

~$ lncli wallet pendingsweeps

{
“pending_sweeps”: []
}

there arent.
The transaction is still present when type:

~ $ lncli listchaintxns

Someone can try to explain or have had similar behaviour?
Don’t found so much useful stuff in Github

https://github.com/lightningnetwork/lnd/blob/master/lnrpc/walletrpc/walletkit.proto

Lightning Network – What is a Millisatoshi? I thought Satoshi is the smallest unit?

It is not a mistake, it is literally a thousandth of a satoshi. A Satoshi is the smallest unit for Bitcoin, but a flash can do transactions with even smaller units while the channels are open. The amount will be rounded down to the nearest satoshi when the channel is closed and sent to the blockchain to meet the bitcoins limit.

Micro-payment channels – Processing of time-locked contracts based on the time elapsed in the Lightning network

Assume that in a payment route A-> B-> C A wants to pay 0.01 BTC to C. It blocks 0.01 BTC with B in the HTLC with a timeout period of, for example, 2 days and B blocks 0.01 BTC with C in the HTLC with a timeout period of 1 day. Can something be done now that if, for example, C delays in disclosing the model takes half a day, it will receive 0.005 BTC and 0.005 BTC will be returned to B. Can the contract support such dynamic payment settlement based on lost time? ? In the worst case, if C does not react, B gets back a full 0.1 BTC.

Additional power via USB3 so that a USB switch with lightning strikes works better

I have a USB-C-Blitz-HuB that has an HDMI output, a VGA output, 3 USB3 connections and an Ethernet output and has to be connected to a power supply and to the laptop. I suspect that the power supply is not sufficient to work properly, as adding more USB ports makes everything slow or packages (such as mouse actions) are lost.

My laptop has another USB-C port. Do you think it is possible to connect this port to the switch via the USB3 port and somehow make it work better?

cPanel / DirectAdmin Fully managed Real Cloud SSD VPS – lightning fast – not throttled

Yes! It's cloud server, it's lightning fast. Not throttled. 100% guaranteed resources at all times.

Based on our tests, it outperforms other well-known providers in terms of actual performance. But don't just take our word, try it out for yourself.

All of our cloud VPS are already fully managed with DirectAdmin and Softaculous. CPanel is also available as an option. The setup time is 24 hours.

If you have any questions, please send an email to sales@jonesolutions.com or chat live with us.

@@@@@@ DirectAdmin Fully Managed Cloud SSD VPS @@@@@@

Available locations: Sydney – Australia, Beauharnois – Canada, Frankfurt – Germany, Gravelines – France, Warsaw – Poland, Singapore – SG, London – UK.

– Cloud SSD VPS69 –
2 vCores (2.3 GHz)
7 GB RAM
50 GB lightning fast Enterprise NVMe SSD + 50 GB FTP remote backup (it's a great bonus !!!)
2. Storage: 50 GB lightning fast Enterprise NVMe SSD
Guaranteed bandwidth of 250 Mbit / s per month (except in Singapore and Australia)
Private network with 300 Mbit / s
DDOS protection
IP address: 2
OS – CentOS 7.x 64bit with DirectAdmin and Softaculous (option to switch to cPanel free of charge (up to 5 accounts))
Fully managed including (see https://jonesolutions.com/proactive-server-management/)

$ 69 / month | No setup fee -> Login here

————————————————– – –

– Cloud SSD VPS89 –
4 vCores (2.3 GHz)
15 GB RAM
100 GB lightning fast Enterprise NVMe SSD + 100 GB FTP remote backup (it's a great bonus !!!)
2. Storage: 100 GB lightning fast Enterprise NVMe SSD
Guaranteed bandwidth of 250 Mbit / s per month (except in Singapore and Australia)
Private network with 1000 Mbit / s
DDOS protection
IP address: 2
OS – CentOS 7.x 64bit with DirectAdmin and Softaculous (option to switch to cPanel free of charge (up to 5 accounts))
Fully managed including (see https://jonesolutions.com/proactive-server-management/)

$ 89 / month | No setup fee -> Login here

————————————————– – –

– Cloud SSD VPS159 –
8 vCores (2.3 GHz)
30 GB RAM
200 GB lightning fast Enterprise NVMe SSD + 200 GB FTP remote backup (it's a great bonus !!!)
2. Storage: 200 GB lightning fast Enterprise NVMe SSD
Guaranteed bandwidth of 500 Mbit / s per month (except in Singapore and Australia)
2000 Mbit / s private network
DDOS protection
IP address: 2
OS – CentOS 7.x 64bit with DirectAdmin and Softaculous (option to switch to cPanel free of charge (up to 5 accounts))
Fully managed including (see https://jonesolutions.com/proactive-server-management/)

$ 159 / month | No setup fee -> Login here

Note: The bandwidth in Singapore and Australia is set to 1000 GB per month.

More information: Visit https://jonesolutions.com/fully-managed-cloud-ssd-vps/

————————————————– —————-

Some testimonials about our services:

https://www.webhostingtalk.com/showt…9#post10191859
https://www.webhostingtalk.com/showt…3#post10182883
https://www.webhostingtalk.com/showt…0#post10182800
https://jonesolutions.com/testimonial-view/cecio/
http://www.webhostingtalk.com/showpo…6&postcount=12
http://www.webhostingtalk.com/showpo…7&postcount=13
http://www.webhostingtalk.com/showpo…05&postcount=1
http://www.webhostingtalk.com/showpo…07&postcount=3
http://www.webhostingtalk.com/showpo…49&postcount=5
http://www.webhostingtalk.com/showpo…53&postcount=6
http://www.webhostingtalk.com/showpo…5&postcount=16
http://www.webhostingtalk.com/showpo…79&postcount=4
http://www.webhostingtalk.com/showpo…42&postcount=8
http://www.webhostingtalk.com/showpo…0&postcount=35
http://xenforo.com/community/threads…9/#post-200451
http://www.webhostingtalk.com/showpo…75&postcount=1
http://www.webhostingtalk.com/showpo…0&postcount=15
http://www.webhostingtalk.com/showpo…4&postcount=22
http://www.webhostingtalk.com/showpo…4&postcount=11
http://www.webhostingtalk.com/showpo…4&postcount=11
http://www.webhostingtalk.com/showpo…6&postcount=15
http://www.webhostingtalk.com/showpo…63&postcount=7
http://www.webhostingtalk.com/showpo…74&postcount=6
http://www.webhostingtalk.com/showpo…97&postcount=1
http://www.webhostingtalk.com/showpo…60&postcount=1
http://www.webhostingtalk.com/showpo…4&postcount=15
http://www.vbulletin.org/forum/showp…7&postcount=12
http://www.webhostingtalk.com/showpost.php?p=4496870
http://www.webhostingtalk.com/showpost.php?p=4495732
http://www.webhostingtalk.com/showpo…82&postcount=4
http://www.webhostingtalk.com/showpo…71&postcount=7
http://www.webhostingtalk.com/showpo…31&postcount=3
http://www.webhostingtalk.com/showpo…7&postcount=21
http://www.webhostingtalk.com/showpo…8&postcount=10
http://webhostingtalk.com/showpost.p…04&postcount=2
http://www.webhostingtalk.com/showpo…45&postcount=2
http://www.webhostingtalk.com/showpo…66&postcount=3
http://www.webhostingtalk.com/showpo…66&postcount=4
http://webhostingtalk.com/showpost.p…29&postcount=1
http://webhostingtalk.com/showpost.p…91&postcount=5

————————————————– —————-

Why choose us?

1. We have been in business since December 2001 and continue to grow. We have proven it for 16 years.
2. We focus on our expertise and know that we are good at it.
3. We have a first-class support team with us, which is guaranteed to offer solutions to your support problems.
4. Your data is safe with us. We protect it with our own server management expertise.
5. We mean what we announced – 99.9% network availability guarantee.
6. All of our servers are monitored around the clock at www.monitormybox.com and will notify us if they fail.
7. Your transaction is safe with us. We use very secure payment processors for billing (e.g. 2checkout and paypal). We never store your credit card details and respect your privacy.
8. There are other good reasons to join us, but the best thing is that, as our valued customer, we are here to support you all the way because your business is important to us.

————————————————– —————-

Are you looking for Linux Reseller Hosting? Visit https://jonesolutions.com/premium-ssd-linux-reseller/
Are you looking for cPanel Fully Managed KVM VPS? Visit https://jonesolutions.com/fully-managed-kvm-vps/
Are you looking for fully managed dedicated cPanel servers? Visit https://jonesolutions.com/fully-mana…cated-servers/
Are you looking for a proactive server management service? Visit https://jonesolutions.com/proactive-server-management/
Are you looking for Acronis Backup Service? Visit https://jonesolutions.com/acronis-backup-cloud/
Are you looking for a Cloudlinux license? Visit https://jonesolutions.com/cloudlinux-license/
Are you looking for a KernelCare license? Visit https://jonesolutions.com/kernelcare-license/

Thanks a lot,
network

Lightning network without a main chain?

I've read about LN's work. I had this interesting thought, what if we don't need the main blockchain and miners to have a P2P cash system. Let me explain.

The difference between the current LN and what I thought is that people only have channels with the people they know and trust. There will be no multi-sig wallet (a limit may be set for each channel based on the trust of the other person). And if you want to close the channel, in real life you trade either Bitcoin or Fiat (no matter what unit you use). Since it is the people they trust, there will be no fraud problem.

This will be a fully p2p system. Would such a system work? I miss something