]> git.bitcoin.ninja Git - rust-lightning/commit
Impl Base AMP in the receive pipeline and expose payment_secret
authorMatt Corallo <git@bluematt.me>
Thu, 2 Jan 2020 06:23:48 +0000 (01:23 -0500)
committerMatt Corallo <git@bluematt.me>
Tue, 14 Apr 2020 23:54:17 +0000 (19:54 -0400)
commit6d1bd8bc988429a1c26e6fa0030735f9e844d022
tree37d7d40c172ea5816b6bacfd0d4790f5f4b45086
parent1442acf74b7fee98cfff950353a75f569932fbc9
Impl Base AMP in the receive pipeline and expose payment_secret

Base AMP is centered around the concept of a 'payment_secret` - an
opaque 32-byte random string which is used to authenticate the
sender to the recipient as well as tie the various HTLCs which
make up one payment together. This new field gets exposed in a
number of places, though sadly only as an Option for backwards
compatibility when sending to a receiver/receiving from a sender
which does not support Base AMP.

Sadly a huge diff here, but almost all of it is changing the method
signatures for sending/receiving/failing HTLCs and the
PaymentReceived event, which all now need to expose an
Option<[u8; 32]> for the payment_secret.

It doesn't yet properly fail back pending HTLCs when the full AMP
payment is never received (which should result in accidental
channel force-closures). Further, as sending AMP payments is not
yet supported, the only test here is a simple single-path payment
with a payment_secret in it.
fuzz/src/chanmon_consistency.rs
fuzz/src/full_stack.rs
lightning/src/ln/chanmon_update_fail_tests.rs
lightning/src/ln/channelmanager.rs
lightning/src/ln/functional_test_utils.rs
lightning/src/ln/functional_tests.rs
lightning/src/ln/msgs.rs
lightning/src/ln/onion_utils.rs
lightning/src/ln/reorg_tests.rs
lightning/src/util/events.rs
lightning/src/util/ser.rs