From 25fc33bfbb98d7cdadaf8d3813cb9f3149d0103c Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Mon, 24 Jul 2017 12:44:14 -0700 Subject: [PATCH] glossary: move definition of `chain_hash` to BOLT #0 This commit modifies the glossary to add a new entry which defines the usage of `chain_hash` throughout the remainder of the documents. Additionally, we now also specify which chain hash we expect for Bitcoin within the glossary. This commit also modifies BOLT #2 and #7 to omit the definition of the expected `chain_hash` value for Bitcoin. --- 00-introduction.md | 11 +++++++++++ 02-peer-protocol.md | 4 +--- 07-routing-gossip.md | 2 -- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/00-introduction.md b/00-introduction.md index 738bfe5..7521933 100644 --- a/00-introduction.md +++ b/00-introduction.md @@ -110,6 +110,17 @@ This is version 0. MUST support the feature in question, while odd numbers indicate that the feature MAY be disregarded by the other endpoint. + +* `chain_hash`: + * Used in several of the BOLT documents, and denotes the genesis hash of a + target blockchain. This allows nodes to create and reference channels on + several blockchains. Nodes are to ignore any messages which reference a + `chain_hash` that are unknown to them. + + For the main chain Bitcoin blockchain, the `chain_hash` value MUST be + (encoded in hex): + `000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f`. + ## Theme Song diff --git a/02-peer-protocol.md b/02-peer-protocol.md index ee6a79d..5103399 100644 --- a/02-peer-protocol.md +++ b/02-peer-protocol.md @@ -128,9 +128,7 @@ FIXME: Describe Dangerous feature bit for larger channel amounts. #### Requirements A sending node MUST ensure that the `chain_hash` value identifies the chain they -they wish to open the channel within. For the Bitcoin blockchain, the -`chain_hash` value MUST be (encoded in hex): -`000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f`. +they wish to open the channel within. A sending node MUST ensure `temporary_channel_id` is unique from any other channel id with the same peer. The sender MUST set `funding_satoshis` diff --git a/07-routing-gossip.md b/07-routing-gossip.md index 8b119f3..0466f28 100644 --- a/07-routing-gossip.md +++ b/07-routing-gossip.md @@ -317,8 +317,6 @@ The following table specifies the meaning of the individual bits: The creating node MUST set `signature` to the signature of the double-SHA256 of the entire remaining packet after `signature` using its own `node_id`. -For the Bitcoin blockchain, the `chain_hash` value MUST be (encoded in -hex): `000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f`. The creating node MUST set `chain_hash` and `short_channel_id` to match the 32-byte hash and 8-byte channel ID that uniquely identifies the channel within the `channel_announcement` message.