Skip to content
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

Make message fields public #665

Merged
merged 1 commit into from
Aug 23, 2020

Conversation

devrandom
Copy link
Member

@devrandom devrandom commented Aug 10, 2020

No description provided.

@codecov
Copy link

codecov bot commented Aug 10, 2020

Codecov Report

Merging #665 into master will increase coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #665      +/-   ##
==========================================
+ Coverage   91.36%   91.40%   +0.04%     
==========================================
  Files          35       35              
  Lines       21703    21703              
==========================================
+ Hits        19828    19838      +10     
+ Misses       1875     1865      -10     
Impacted Files Coverage Δ
lightning/src/ln/msgs.rs 90.31% <100.00%> (ø)
lightning/src/ln/functional_tests.rs 97.18% <0.00%> (+0.17%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8ac0992...500c00a. Read the comment docs.

TheBlueMatt
TheBlueMatt previously approved these changes Aug 10, 2020
Copy link
Collaborator

@TheBlueMatt TheBlueMatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems good to me.

@devrandom devrandom force-pushed the pub-messages branch 2 times, most recently from f004fcf to 3025ad6 Compare August 11, 2020 08:41
@devrandom devrandom marked this pull request as ready for review August 11, 2020 08:42
@devrandom
Copy link
Member Author

Documented the rest of the messages. I did skip onion related messages and excess.* fields (what are those used for?). Let me know if you think they should be included.

Copy link
Collaborator

@TheBlueMatt TheBlueMatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of the docs could use a bit more detail, but looks good. I agree excess_data stuff should not be included, its there just for serialization round-trips and should never be set by users.

/// The channel ID
pub channel_id: [u8; 32],
/// The HTLC ID
pub htlc_id: u64,
pub(crate) sha256_of_onion: [u8; 32],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not expose this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't expose any of the onion stuff and this one by itself would not be useful. Should I expose these?

Copy link

@ariard ariard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall sounds good to me, we don't have to describe in details how each field must be processed, just their protocol semantic.

@ariard
Copy link

ariard commented Aug 21, 2020

Code Review ACK 010d4ba

Purpose of this PR arises in the context of increasing the scope of data verifiable by the external signer. I think comments are good enough to export fields. We can have follow-ups to describe implementation requirements with regards to processing/verifying message semantics (see #665 (comment))

Copy link
Collaborator

@TheBlueMatt TheBlueMatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good mod three slight comment notes.

@TheBlueMatt TheBlueMatt merged commit b3b4f43 into lightningdevkit:master Aug 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants