Lightning Network `channel_update` message Flag clarification
This is a lnd.log line:
2019-01-11 12:20:13.904 [DBG] PEER: Sending ChannelUpdate(chain_hash=000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f, short_chan_id=601495532567724033, flag=256, update_time=2019-01-11 12:19:08 +0100 CET) to 46.229.165.136:9735
Since I cannot find a direct correlation with the spec at https://github.com/lightningnetwork/lightning-rfc/blob/master/07-routing-gossip.md
can someone clarify the "flag" value?
Where can I find the information below?
[1:message_flags]
[1:channel_flags]
[2:cltv_expiry_delta]
[8:htlc_minimum_msat]
[4:fee_base_msat]
[4:fee_proportional_millionths]
[8:htlc_maximum_msat] (option_channel_htlc_max)
Are they encoded in some way in this "flag"? How?
lightning-network lightning-network-daemon lightning-rfc channels
New contributor
Stefano Angieri is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
This is a lnd.log line:
2019-01-11 12:20:13.904 [DBG] PEER: Sending ChannelUpdate(chain_hash=000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f, short_chan_id=601495532567724033, flag=256, update_time=2019-01-11 12:19:08 +0100 CET) to 46.229.165.136:9735
Since I cannot find a direct correlation with the spec at https://github.com/lightningnetwork/lightning-rfc/blob/master/07-routing-gossip.md
can someone clarify the "flag" value?
Where can I find the information below?
[1:message_flags]
[1:channel_flags]
[2:cltv_expiry_delta]
[8:htlc_minimum_msat]
[4:fee_base_msat]
[4:fee_proportional_millionths]
[8:htlc_maximum_msat] (option_channel_htlc_max)
Are they encoded in some way in this "flag"? How?
lightning-network lightning-network-daemon lightning-rfc channels
New contributor
Stefano Angieri is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
This is a lnd.log line:
2019-01-11 12:20:13.904 [DBG] PEER: Sending ChannelUpdate(chain_hash=000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f, short_chan_id=601495532567724033, flag=256, update_time=2019-01-11 12:19:08 +0100 CET) to 46.229.165.136:9735
Since I cannot find a direct correlation with the spec at https://github.com/lightningnetwork/lightning-rfc/blob/master/07-routing-gossip.md
can someone clarify the "flag" value?
Where can I find the information below?
[1:message_flags]
[1:channel_flags]
[2:cltv_expiry_delta]
[8:htlc_minimum_msat]
[4:fee_base_msat]
[4:fee_proportional_millionths]
[8:htlc_maximum_msat] (option_channel_htlc_max)
Are they encoded in some way in this "flag"? How?
lightning-network lightning-network-daemon lightning-rfc channels
New contributor
Stefano Angieri is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
This is a lnd.log line:
2019-01-11 12:20:13.904 [DBG] PEER: Sending ChannelUpdate(chain_hash=000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f, short_chan_id=601495532567724033, flag=256, update_time=2019-01-11 12:19:08 +0100 CET) to 46.229.165.136:9735
Since I cannot find a direct correlation with the spec at https://github.com/lightningnetwork/lightning-rfc/blob/master/07-routing-gossip.md
can someone clarify the "flag" value?
Where can I find the information below?
[1:message_flags]
[1:channel_flags]
[2:cltv_expiry_delta]
[8:htlc_minimum_msat]
[4:fee_base_msat]
[4:fee_proportional_millionths]
[8:htlc_maximum_msat] (option_channel_htlc_max)
Are they encoded in some way in this "flag"? How?
lightning-network lightning-network-daemon lightning-rfc channels
lightning-network lightning-network-daemon lightning-rfc channels
New contributor
Stefano Angieri is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Stefano Angieri is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
edited Jan 11 at 19:01
cdecker
7,02312954
7,02312954
New contributor
Stefano Angieri is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked Jan 11 at 16:16
Stefano AngieriStefano Angieri
161
161
New contributor
Stefano Angieri is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Stefano Angieri is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Stefano Angieri is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
The flags field (2 bytes) has been split into two different (1 byte) fields, the message_flags (most significant bits) and the channel_flags field (least significant bits). Hence the flags value displayed in lnd has the message_flags byte set to 0x00 and the message_flags set to 0x01.
message_flags indicates that this channel_update has some optional fields appended to the end. In this case it has the 0th bit set, which corresponds to the option_channel_htlc_max option, hence the channel_update has an additional field htlc_maximum_msat appended.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "308"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Stefano Angieri is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fbitcoin.stackexchange.com%2fquestions%2f83576%2flightning-network-channel-update-message-flag-clarification%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
The flags field (2 bytes) has been split into two different (1 byte) fields, the message_flags (most significant bits) and the channel_flags field (least significant bits). Hence the flags value displayed in lnd has the message_flags byte set to 0x00 and the message_flags set to 0x01.
message_flags indicates that this channel_update has some optional fields appended to the end. In this case it has the 0th bit set, which corresponds to the option_channel_htlc_max option, hence the channel_update has an additional field htlc_maximum_msat appended.
add a comment |
The flags field (2 bytes) has been split into two different (1 byte) fields, the message_flags (most significant bits) and the channel_flags field (least significant bits). Hence the flags value displayed in lnd has the message_flags byte set to 0x00 and the message_flags set to 0x01.
message_flags indicates that this channel_update has some optional fields appended to the end. In this case it has the 0th bit set, which corresponds to the option_channel_htlc_max option, hence the channel_update has an additional field htlc_maximum_msat appended.
add a comment |
The flags field (2 bytes) has been split into two different (1 byte) fields, the message_flags (most significant bits) and the channel_flags field (least significant bits). Hence the flags value displayed in lnd has the message_flags byte set to 0x00 and the message_flags set to 0x01.
message_flags indicates that this channel_update has some optional fields appended to the end. In this case it has the 0th bit set, which corresponds to the option_channel_htlc_max option, hence the channel_update has an additional field htlc_maximum_msat appended.
The flags field (2 bytes) has been split into two different (1 byte) fields, the message_flags (most significant bits) and the channel_flags field (least significant bits). Hence the flags value displayed in lnd has the message_flags byte set to 0x00 and the message_flags set to 0x01.
message_flags indicates that this channel_update has some optional fields appended to the end. In this case it has the 0th bit set, which corresponds to the option_channel_htlc_max option, hence the channel_update has an additional field htlc_maximum_msat appended.
answered Jan 11 at 19:08
cdeckercdecker
7,02312954
7,02312954
add a comment |
add a comment |
Stefano Angieri is a new contributor. Be nice, and check out our Code of Conduct.
Stefano Angieri is a new contributor. Be nice, and check out our Code of Conduct.
Stefano Angieri is a new contributor. Be nice, and check out our Code of Conduct.
Stefano Angieri is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Bitcoin Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fbitcoin.stackexchange.com%2fquestions%2f83576%2flightning-network-channel-update-message-flag-clarification%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown