global: fix up quotes which are now in the master branch.

1. onion-message
2. blinded-payments
3. route-blinding
4. channel-type
5. warnings.

Now they'll be checked correctly, and if the spec changes, we'll know
to reexamine this code.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2024-03-18 13:31:06 +10:30 committed by Alex Myers
parent f0d9fc6b2e
commit ac3c178587
10 changed files with 15 additions and 17 deletions

View file

@ -174,7 +174,7 @@ static u8 *decrypt_encmsg_raw(const tal_t *ctx,
*/
subkey_from_hmac("rho", ss, &rho);
/* BOLT-onion-message #4:
/* BOLT #4:
*- If the `encrypted_data` field is missing or cannot
* be decrypted:
* - MUST return an error
@ -204,7 +204,7 @@ struct tlv_encrypted_data_tlv *decrypt_encrypted_data(const tal_t *ctx,
const u8 *cursor = decrypt_encmsg_raw(tmpctx, blinding, ss, enctlv);
size_t maxlen = tal_bytelen(cursor);
/* BOLT-onion-message #4:
/* BOLT #4:
*
* - MUST return an error if `encrypted_recipient_data` does not decrypt
* using the blinding point as described in

View file

@ -18,7 +18,7 @@ u8 **blinded_onion_hops(const tal_t *ctx,
bool first = (i == 0);
bool final = (i == tal_count(onions) - 1);
/* BOLT-blinded-payments #4:
/* BOLT #4:
* - For every node inside a blinded route:
* - MUST include the `encrypted_recipient_data` provided by the
* recipient
@ -27,6 +27,7 @@ u8 **blinded_onion_hops(const tal_t *ctx,
* recipient in `current_blinding_point`
* - If it is the final node:
* - MUST include `amt_to_forward`, `outgoing_cltv_value` and `total_amount_msat`.
*...
* - MUST NOT include any other tlv field.
*/
onions[i] = onion_blinded_hop(onions,

View file

@ -7,7 +7,7 @@
* only onion tlv payloads. */
#define ROUTING_MAX_HOPS 20
/* BOLT-f3a9f7f4e9e7a5a2997f3129e13d94090091846a #7:
/* BOLT #7:
*
* The `channel_flags` bitfield...individual bits:
*...

View file

@ -48,7 +48,7 @@ static bool decrypt_forwarding_onionmsg(const struct pubkey *blinding,
if (!encmsg)
return false;
/* BOLT-onion-message #4:
/* BOLT #4:
* - if it is not the final node according to the onion encryption:
*...
* - if the `encrypted_data_tlv` contains `path_id`:
@ -57,7 +57,7 @@ static bool decrypt_forwarding_onionmsg(const struct pubkey *blinding,
if (encmsg->path_id)
return false;
/* BOLT-onion-message #4:
/* BOLT #4:
* - SHOULD forward the message using `onion_message` to the next peer
* indicated by `next_node_id`.
*/
@ -159,7 +159,7 @@ bool onion_message_parse(const tal_t *ctx,
*final_om = NULL;
/* BOLT-onion-message #4:
/* BOLT #4:
* - if it is not the final node according to the onion encryption:
* - if the `onionmsg_tlv` contains other tlv fields than `encrypted_recipient_data`:
* - MUST ignore the message.

View file

@ -330,7 +330,7 @@ int main(int argc, char *argv[])
/* Make it use our session key! */
sphinx_path->session_key = &session_key;
/* BOLT-onion-message #4:
/* BOLT #4:
* - SHOULD set `onion_message_packet` `len` to 1366 or 32834.
*/
op = create_onionpacket(tmpctx, sphinx_path, ROUTING_INFO_SIZE,

View file

@ -23,11 +23,8 @@ struct sockaddr_un;
* * version 3 ([prop224](https://gitweb.torproject.org/torspec.git/tree/proposals/224-rend-spec-ng.txt))
* onion service addresses; Encodes:
* `[32:32_byte_ed25519_pubkey] || [2:checksum] || [1:version]`,
* where `checksum = sha3(".onion checksum" || pubkey || version)[:2]`
*/
/* BOLT-hostnames #7:
* * `5`: DNS hostname; data = `[byte:len][len*byte:hostname][u16:port]` (length up to 258)
* where `checksum = sha3(".onion checksum" || pubkey || version)[:2]`.
* * `5`: DNS hostname; data = `[1:hostname_len][hostname_len:hostname][2:port]` (length up to 258)
*/
#define TOR_V2_ADDRLEN 10

View file

@ -349,7 +349,7 @@ static char *opt_add_addr_withtype(const char *arg,
arg + strlen("dns:"),
arg);
}
/* BOLT-hostnames #7:
/* BOLT #7:
* The origin node:
* ...
* - MUST NOT announce more than one `type 5` DNS hostname.

View file

@ -93,7 +93,7 @@ static bool htlc_out_update_state(struct channel *channel,
return true;
}
/* BOLT-route-blinding #4:
/* BOLT #4:
* - if `blinding_point` is set in the incoming `update_add_htlc`:
* - MUST return an `invalid_onion_blinding` error.
* - if `current_blinding_point` is set in the onion payload and it is not the

View file

@ -179,7 +179,7 @@ routehint_candidates(const tal_t *ctx,
continue;
}
/* BOLT-channel-type #2:
/* BOLT #2:
* - if `channel_type` has `option_scid_alias` set:
* - MUST NOT use the real `short_channel_id` in
* BOLT 11 `r` fields.

View file

@ -176,7 +176,7 @@ bool extract_channel_id(const u8 *in_pkt, struct channel_id *channel_id)
*/
/* fall thru */
case WIRE_WARNING:
/* BOLT-warning #1:
/* BOLT #1:
* 1. type: 1 (`warning`)
* 2. data:
* * [`channel_id`:`channel_id`]