-
Notifications
You must be signed in to change notification settings - Fork 43
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
channelID received from LND gets corruptedby XUD and can't be used #745
Comments
Reason for the problem (most probably can be found here): protocolbuffers/protobuf#3666 |
May be relevant |
@sangaman @moshababo can you jump in here, looks indeed like |
I've been researching this issue for a while, it seems like all 64 bit integers defined in the proto file are being defaulted to numbers instead of strings in the generated javascript code. This causes us to lose precision anytime the number is greater than 2^55. Adding This is also a relevant issue: protocolbuffers/protobuf#1832 Still looking into what the best solution might be. |
An option is to use the protobufjs library to generate proto code instead of |
@sangaman can you please post a PR for this even if not final. |
Yes, I've been working on it. Expect a PR soon. |
This adds `jstype = JS_STRING` annotations on the channel ids in the lnd proto definition so that they use `string` types instead of numbers. Javascript does not natively support 64 bit numbers and precision can be lost, and the channel ids are known to cause issues because of this. This also adds a new package to generate type definitions from the `.proto` files. This is because of a known bug in the previously used plugin, agreatfool/grpc_tools_node_protoc_ts#10, which does not update the generated type definition when `jstype = JS_STRING` is used. Fixes #745.
This adds `jstype = JS_STRING` annotations on the channel ids in the lnd proto definition so that they use `string` types instead of numbers. Javascript does not natively support 64 bit numbers and precision can be lost, and the channel ids are known to cause issues because of this. This also adds a new package to generate type definitions from the `.proto` files. This is because of a known bug in the previously used plugin, agreatfool/grpc_tools_node_protoc_ts#10, which does not update the generated type definition when `jstype = JS_STRING` is used. Fixes #745.
This adds `jstype = JS_STRING` annotations on the channel ids in the lnd proto definition so that they use `string` types instead of numbers. Javascript does not natively support 64 bit numbers and precision can be lost, and the channel ids are known to cause issues because of this. This also adds a new package to generate type definitions from the `.proto` files. This is because of a known bug in the previously used plugin, agreatfool/grpc_tools_node_protoc_ts#10, which does not update the generated type definition when `jstype = JS_STRING` is used. Fixes #745.
I'm connected to xud1 and try to swap with it. should send BTC to xud1 and get LTC from xud1. LTC route from xud1 to me is xud1->xud2->xud3-me. When I do queryroutes on xud1 I get:
But when XUD does it gets :
If you look carefully the channelID for the first hop that XUD prints is 139024449239580670 while queryroutes shows 139024449239580673
3 at the end is missing!
As a result the swap fails since LND can't find the first channel.
The text was updated successfully, but these errors were encountered: