Documentation Part V: channeld#2132
Merged
niftynei merged 10 commits intoElementsProject:masterfrom Dec 12, 2018
Merged
Conversation
conscott
reviewed
Dec 4, 2018
openingd/openingd.c
Outdated
| bool am_funder) | ||
| { | ||
| /* This is an event loop of its own. That's generally considered poor | ||
| * for, but we use it in a very limited way. */ |
Collaborator
There was a problem hiding this comment.
spelling: meant 'poor form' ?
conscott
reviewed
Dec 4, 2018
| /*~ This verbosity is not only useful for our own testing, but | ||
| * a courtesy to other implementaters whose brains may be so | ||
| * twisted by coding in Go, Scala and Rust that they can no | ||
| * longer read C code. */ |
conscott
reviewed
Dec 4, 2018
openingd/openingd.c
Outdated
| struct crypto_state cs; | ||
| struct pubkey next_per_commit[NUM_SIDES]; | ||
|
|
||
| /* Constriants on a channel they open. */ |
Collaborator
There was a problem hiding this comment.
Spelling: Constriants -> Constraints
conscott
reviewed
Dec 4, 2018
openingd/openingd.c
Outdated
| status_debug("aborted opening negotiation: %s", why); | ||
| /*~ The "billboard" (exposed as "status" in the JSON listpeers RPC | ||
| * call) is a transient per-channel area which indicates important | ||
| * information about what is happening. It has a "permenant" area for |
Collaborator
There was a problem hiding this comment.
Spelling: permenant -> permanent
Collaborator
|
Loving more docs! Thank you. |
9780ca9 to
4663d27
Compare
niftynei
approved these changes
Dec 10, 2018
Collaborator
niftynei
left a comment
There was a problem hiding this comment.
few typing/typo nits. these notes would have been nice to have last week when doing the work for the private channel flag 👍
openingd/openingd.c
Outdated
|
|
||
| /* Global state structure. This is only for the one specific peer and channel */ | ||
| struct state { | ||
| /* Cryptographic state needed to exchange messages with the peer */ |
Collaborator
There was a problem hiding this comment.
Assuming this is the purview of BOLT #8, would it be useful to reference it?
| } | ||
|
|
||
| /* For negotiation failures: we tell them it's their fault. */ | ||
| /*~ For negotiation failures: we tell them the parameter we didn't like. */ |
openingd/openingd.c
Outdated
| /* We ask the HSM to sign their commitment transaction for us: it knows | ||
| * our funding key, it just needs the remote funding key to create the | ||
| * witness script. It also needs the amount of the funding output, | ||
| * as segwit signatures commit to that as well, even thought it doesn't |
openingd/openingd.c
Outdated
| peer_billboard(false, | ||
| "Funding channel: create first tx, now waiting for their signature"); | ||
|
|
||
| /* Now we they send us their signature for that first commitment |
openingd/openingd.c
Outdated
| * soon) that we put it into the first version of the protocol | ||
| * because it would be painful to add in later. | ||
| * | ||
| * My logic was seemed sound: we treat new connections as an |
openingd/openingd.c
Outdated
| /* If they wanted to send an msg, do so before we waste time | ||
| * doing work. If it's a global error, we'll close | ||
| * immediately. */ | ||
| /*~ If they wanted to send an msg, do so before we waste time doing |
…per BOLT 2. And group struct state fields together into some kind of logical order. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
…lation. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
…l error. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This existed previously, but code perturbations seem to have revealed it now: test_bad_opening reports a leak. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Reported-by: Conor Scott @connscott Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Reported-by: @niftynei Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
f4a971f to
1f7ba9a
Compare
wythe
reviewed
Dec 10, 2018
Contributor
wythe
left a comment
There was a problem hiding this comment.
Very good. I think I learned something.
openingd/openingd.c
Outdated
| struct basepoints our_points; | ||
| struct pubkey our_funding_pubkey; | ||
|
|
||
| /* hsmd gives is our first per-commitment point, and peer tells us |
openingd/openingd.c
Outdated
| * protocol has a "channel_id" field in all non-gossip messages | ||
| * so it's possible. Our one-process-one-channel mechanism | ||
| * keeps things simple: if we wanted to change this, we would | ||
| * probably be best with another daemon to de-multipliex them; |
Reported-by: @wythe Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
wythe
approved these changes
Dec 12, 2018
Collaborator
|
ACK a2cf452 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.