joemphilips / DotNetLightning

Utility to work with Lightning network with .NET
https://joemphilips.github.io/DotNetLightning
MIT License
39 stars 19 forks source link

accept_channel reply to request for 0.16 (max amount) channel doesn't decode #105

Open ysangkok opened 4 years ago

ysangkok commented 4 years ago
Decoding message: "0021EAE2D1E1CE2A122DECBBA4ACC3C15D5B9AF05CC69DDF33A653EC5D73B8423F970000000000000222FFFFFFFFFFFFFFFF0000000000027100000000000000000000000001000601E303D0A67F84EF9B655644AD0EF4394800A1B19BC2636899A90D07AD6D55486D3D6A0214A3353D2B0DDFA8EBFE8D68FCC06C28051F76CCE66BA99F9A6AE5CCE46E7B8B03AAF1C3DD6D9CE0922FCC797E44BFB4F119FC6B0FEAF69E3AF2508C4B4AC93CBF02FF7C534D0FAA8CB7BE5A73D8E2A6BB14E817A9C9E2ED559F240186278B998EE003D03850137D6C1CAB66C167AE6EDD931999E0D40A234F51CC37A30BCB6403337702B28EF3DAE0FE474F9CF34F07E8CA34BF5B7F900D451BEE1994D94F15DBBBE2AA0000"
System.OverflowException: Arithmetic operation resulted in an overflow.
  at DotNetLightning.Serialize.Msgs.AcceptChannel.DotNetLightning-Serialize-Msgs-ILightningSerializable`1-Deserialize (DotNetLightning.Serialize.LightningReaderStream ls) [0x00030] in <5ed4857463e88342a74503837485d45e>:0 
  at DotNetLightning.Serialize.Msgs.ILightningSerializable.deserialize[T] (DotNetLightning.Serialize.LightningReaderStream ls) [0x00008] in <5ed4857463e88342a74503837485d45e>:0 
  at DotNetLightning.Serialize.Msgs.ILightningSerializable.deserializeWithFlag (DotNetLightning.Serialize.LightningReaderStream ls) [0x00158] in <5ed4857463e88342a74503837485d45e>:0 
  at DotNetLightning.Serialize.Msgs.LightningMsg.fromBytes[T] (System.Byte[] b) [0x000c8] in <5ed4857463e88342a74503837485d45e>:0
joemphilips commented 4 years ago

hmm, I've been trying to decode the same data with rust-lightning. but it also returns Error(InvalidValue) when decoding it.

Would you mind telling me how exactly did you got this hex? @ysangkok

ysangkok commented 4 years ago

It is from c-lightning master, so I think it should be parsable, even if rust-lightning doesn't decode it. I got it by testing with geewallet, in a branch called 'htlcs'. Maybe I can narrow down the issue next weekend... But I think that if c-lightning can send it, it would be best to at least be able to decode it.

ysangkok commented 2 years ago

Closing since I don't know whether it is still relevant.

knocte commented 2 years ago

@ysangkok sorry, I would prefer if @joemphilips decides if this should be left open or not; Joe please reopen if you think this is still an issue? or if you're not sure, reopen as well and my team will look at it at some point.