-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
lnrpc: re-enable custom records #3744
lnrpc: re-enable custom records #3744
Conversation
@cfromknecht, we spoke offline about the risk that we wouldn't be able to deserialize even custom records from our own database as long as odd/even checking was part of the |
f31c80a
to
3b5c934
Compare
Added the custom range check. Hopefully this PR didn't miss any entry/exit point for custom records. Because of the duplicated send interface, it is quite a few places. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice to see those custom TLVs enabled again!
My only question is about the documentation comments in the proto file.
lnrpc/rpc.proto
Outdated
application specific data during the payment attempt. If the destination | ||
does not support the specified recrods, and error will be returned. | ||
*/ | ||
map<uint64, bytes> dest_tlv = 13; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On every other field that has the type bytes
involved, we have the following comment:
When using REST, this field must be encoded as base64.
Do we want to add this here too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be consistent with the hop message, I would say this should be renamed to something like dest_custom_records
. Comment should also mention custom record range
360b3b7
to
0c6dd92
Compare
77d1038
to
fce2d0d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
fce2d0d
to
2e40d5a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just one small comment about aligning the rpc field names
lnrpc/rpc.proto
Outdated
application specific data during the payment attempt. If the destination | ||
does not support the specified recrods, and error will be returned. | ||
*/ | ||
map<uint64, bytes> dest_tlv = 13; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be consistent with the hop message, I would say this should be renamed to something like dest_custom_records
. Comment should also mention custom record range
2e40d5a
to
17c3576
Compare
This commit also modifies a previous migration. Because the change is so limited, we don't consider this a significant risk.
Remove code duplication in preparation for additional unmarshalling.
This commit also renames the rpc field for consistency. As it wasn't functional and the id doesn't change, this isn't considered a breaking change.
17c3576
to
352334d
Compare
This PR re-enables custom record sending that was disabled in #3575.
It leaves the database serialization format as is, because there currently is no functional need to change it.