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
To support blinded forwarding in the future, 940b491 started omitting the amount and timelock TLVs in Hop.PackHopPayload when those values are 0. However, no matching change was made to the payload decoding logic in NewPayloadFromReader and ValidateParsedPayloadTypes. As a result, onion payloads along a blinded route will fail to decode due to missing amount or timelock TLVs.
Although blinded forwarding is still a WIP, it would be good to fix this inconsistency at least for the sake of our FuzzPayload test, which currently fails with the following input:
$ cd htlcswitch/hop
$ cat testdata/fuzz/FuzzPayload/2892b85ab66a5aec6ae8f500e357b887f37b1041fd71186d4e541127e01e49b0
go test fuzz v1
[]byte("\x02\x00\x04\x0200")
$ go test -run=FuzzPayload/2892b85ab66a5aec6ae8f500e357b887f37b1041fd71186d4e541127e01e49b0
--- FAIL: FuzzPayload (0.00s)
--- FAIL: FuzzPayload/2892b85ab66a5aec6ae8f500e357b887f37b1041fd71186d4e541127e01e49b0 (0.00s)
fuzz_test.go:122:
Error Trace: htlcswitch/hop/fuzz_test.go:122
Error: Received unexpected error:
onion payload for final hop omitted record with type 2
Test: FuzzPayload/2892b85ab66a5aec6ae8f500e357b887f37b1041fd71186d4e541127e01e49b0
FAIL
exit status 1
FAIL github.com/lightningnetwork/lnd/htlcswitch/hop 0.007s
However, no matching change was made to the payload decoding logic in NewPayloadFromReader and ValidateParsedPayloadTypes
Oo, nice fuzzer catch! Since we're only making those payloads (not receiving them yet) the validation hasn't been updated.
Although blinded forwarding is still a #7298, it would be good to fix this inconsistency at least for the sake of our FuzzPayload test, which currently fails with the following input:
I'll lift a commit out of #7298 to allow these payloads in the meantime!
To support blinded forwarding in the future, 940b491 started omitting the amount and timelock TLVs in
Hop.PackHopPayload
when those values are 0. However, no matching change was made to the payload decoding logic inNewPayloadFromReader
andValidateParsedPayloadTypes
. As a result, onion payloads along a blinded route will fail to decode due to missing amount or timelock TLVs.Although blinded forwarding is still a WIP, it would be good to fix this inconsistency at least for the sake of our
FuzzPayload
test, which currently fails with the following input:CC: @carlaKC
The text was updated successfully, but these errors were encountered: