From 89f6105eae9c18247224666e0c65fe36aa410b52 Mon Sep 17 00:00:00 2001 From: ueno Date: Tue, 29 Jan 2019 18:41:32 +0900 Subject: [PATCH 1/4] BOLT07: reply_channel_range parameter --- 07-routing-gossip.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/07-routing-gossip.md b/07-routing-gossip.md index 80116eef2..75af55637 100644 --- a/07-routing-gossip.md +++ b/07-routing-gossip.md @@ -655,7 +655,9 @@ The receiver of `query_channel_range`: cover the requested `first_blocknum` to `first_blocknum` plus `number_of_blocks` minus one. - For each `reply_channel_range`: - - MUST set with `chain_hash` equal to that of `query_channel_range`, + - MUST set with `chain_hash` equal to that of `query_channel_range`. + - MUST set `first_blocknum` equal to first block number of `encoded_short_ids`. + - MUST set `number_of_blocks` equal to last block number of `encoded_short_ids` minus `first_blocknum` plus one. - MUST encode a `short_channel_id` for every open channel it knows in blocks `first_blocknum` to `first_blocknum` plus `number_of_blocks` minus one. - MUST limit `number_of_blocks` to the maximum number of blocks whose results could fit in `encoded_short_ids` From f153d6100ea32da715d1d6e5d846f67e45dab11c Mon Sep 17 00:00:00 2001 From: ueno Date: Thu, 31 Jan 2019 00:17:52 +0900 Subject: [PATCH 2/4] BOLT07: reply_channel_range parameter (no encoded_short_ids) --- 07-routing-gossip.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/07-routing-gossip.md b/07-routing-gossip.md index 75af55637..32f997711 100644 --- a/07-routing-gossip.md +++ b/07-routing-gossip.md @@ -657,8 +657,11 @@ The receiver of `query_channel_range`: - For each `reply_channel_range`: - MUST set with `chain_hash` equal to that of `query_channel_range`. - MUST set `first_blocknum` equal to first block number of `encoded_short_ids`. + - SHOULD set to 0 if no `encoded_short_ids`. - MUST set `number_of_blocks` equal to last block number of `encoded_short_ids` minus `first_blocknum` plus one. + - SHOULD set to 0 if no `encoded_short_ids`. - MUST encode a `short_channel_id` for every open channel it knows in blocks `first_blocknum` to `first_blocknum` plus `number_of_blocks` minus one. + - SHOULD set `len` to 0 if no `encoded_short_ids`. - MUST limit `number_of_blocks` to the maximum number of blocks whose results could fit in `encoded_short_ids` - if does not maintain up-to-date channel information for `chain_hash`: From 6ef6c619eee730ecba475943cf612a4a323a71f9 Mon Sep 17 00:00:00 2001 From: ueno Date: Mon, 4 Feb 2019 20:39:18 +0900 Subject: [PATCH 3/4] BOLT7: reply_channel_range * `first_blocknum` and `number_of_blocks` mean checking range --- 07-routing-gossip.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/07-routing-gossip.md b/07-routing-gossip.md index 32f997711..3c5bb2448 100644 --- a/07-routing-gossip.md +++ b/07-routing-gossip.md @@ -656,10 +656,8 @@ The receiver of `query_channel_range`: `number_of_blocks` minus one. - For each `reply_channel_range`: - MUST set with `chain_hash` equal to that of `query_channel_range`. - - MUST set `first_blocknum` equal to first block number of `encoded_short_ids`. - - SHOULD set to 0 if no `encoded_short_ids`. - - MUST set `number_of_blocks` equal to last block number of `encoded_short_ids` minus `first_blocknum` plus one. - - SHOULD set to 0 if no `encoded_short_ids`. + - MUST set `first_blocknum` equal to checking first block number. + - MUST set `number_of_blocks` equal to checking number of blocks. - MUST encode a `short_channel_id` for every open channel it knows in blocks `first_blocknum` to `first_blocknum` plus `number_of_blocks` minus one. - SHOULD set `len` to 0 if no `encoded_short_ids`. - MUST limit `number_of_blocks` to the maximum number of blocks whose From 8bb70bcc24626b092507765a540cec139512f7bf Mon Sep 17 00:00:00 2001 From: ueno Date: Mon, 4 Feb 2019 20:55:02 +0900 Subject: [PATCH 4/4] BOLT7: reply_channel_range: must set encoding type --- 07-routing-gossip.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/07-routing-gossip.md b/07-routing-gossip.md index 3c5bb2448..96f24c619 100644 --- a/07-routing-gossip.md +++ b/07-routing-gossip.md @@ -659,7 +659,7 @@ The receiver of `query_channel_range`: - MUST set `first_blocknum` equal to checking first block number. - MUST set `number_of_blocks` equal to checking number of blocks. - MUST encode a `short_channel_id` for every open channel it knows in blocks `first_blocknum` to `first_blocknum` plus `number_of_blocks` minus one. - - SHOULD set `len` to 0 if no `encoded_short_ids`. + - SHOULD set encoding types even if there is no channel_ids. - MUST limit `number_of_blocks` to the maximum number of blocks whose results could fit in `encoded_short_ids` - if does not maintain up-to-date channel information for `chain_hash`: