1
0
mirror of https://github.com/lightning/bolts.git synced 2025-01-18 13:22:35 +01:00

BOLT 1,2,4,7: remove pubkey fundamental type in favor of point.

And remove `secret` and `preimage` types in favor of open-coding.

Agreed-at: http://www.erisian.com.au/meetbot/lightning-dev/2019/lightning-dev.2019-07-08-20.05.html

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2019-07-09 10:14:35 +09:30
parent 72ed1b2214
commit 6f6ea63233
4 changed files with 11 additions and 14 deletions

View File

@ -196,10 +196,7 @@ The following convenience types are also defined:
* `sha256`: a 32-byte SHA2-256 hash
* `signature`: a 64-byte bitcoin Elliptic Curve signature
* `point`: a 33-byte Elliptic Curve point (compressed encoding as per [SEC 1 standard](http://www.secg.org/sec1-v2.pdf#subsubsection.2.3.3))
* `pubkey`: a `point` explicitly for use as a public key
* `preimage`: a 32 byte value used as a preimage for a hash
* `short_channel_id`: an 8 byte value identifying a channel (see [BOLT #7](07-routing-gossip.md#definition-of-short-channel-id))
* `secret`: a 32 byte secret being revealed to the peer
## Setup Messages

View File

@ -116,7 +116,7 @@ the funding transaction and both versions of the commitment transaction.
* [`u32`:`feerate_per_kw`]
* [`u16`:`to_self_delay`]
* [`u16`:`max_accepted_htlcs`]
* [`pubkey`:`funding_pubkey`]
* [`point`:`funding_pubkey`]
* [`point`:`revocation_basepoint`]
* [`point`:`payment_basepoint`]
* [`point`:`delayed_payment_basepoint`]
@ -286,7 +286,7 @@ funding transaction and both versions of the commitment transaction.
* [`u32`:`minimum_depth`]
* [`u16`:`to_self_delay`]
* [`u16`:`max_accepted_htlcs`]
* [`pubkey`:`funding_pubkey`]
* [`point`:`funding_pubkey`]
* [`point`:`revocation_basepoint`]
* [`point`:`payment_basepoint`]
* [`point`:`delayed_payment_basepoint`]
@ -867,7 +867,7 @@ To supply the preimage:
2. data:
* [`channel_id`:`channel_id`]
* [`u64`:`id`]
* [`preimage`:`payment_preimage`]
* [`32*byte`:`payment_preimage`]
For a timed out or route-failed HTLC:
@ -1008,7 +1008,7 @@ The description of key derivation is in [BOLT #3](03-transactions.md#key-derivat
1. type: 133 (`revoke_and_ack`)
2. data:
* [`channel_id`:`channel_id`]
* [`secret`:`per_commitment_secret`]
* [`32*byte`:`per_commitment_secret`]
* [`point`:`next_per_commitment_point`]
#### Requirements
@ -1117,7 +1117,7 @@ messages are), they are independent of requirements here.
* [`channel_id`:`channel_id`]
* [`u64`:`next_local_commitment_number`]
* [`u64`:`next_remote_revocation_number`]
* [`secret`:`your_last_per_commitment_secret`] (option_data_loss_protect)
* [`32*byte`:`your_last_per_commitment_secret`] (option_data_loss_protect)
* [`point`:`my_current_per_commitment_point`] (option_data_loss_protect)
`next_local_commitment_number`: A commitment number is a 48-bit

View File

@ -154,7 +154,7 @@ The overall structure of the packet is as follows:
1. type: `onion_packet`
2. data:
* [`byte`:`version`]
* [`pubkey`:`public_key`]
* [`point`:`public_key`]
* [`1300*byte`:`hops_data`]
* [`32*byte`:`hmac`]

View File

@ -146,10 +146,10 @@ announcement message: this is accomplished by having a signature from each
* [`len*byte`:`features`]
* [`chain_hash`:`chain_hash`]
* [`short_channel_id`:`short_channel_id`]
* [`pubkey`:`node_id_1`]
* [`pubkey`:`node_id_2`]
* [`pubkey`:`bitcoin_key_1`]
* [`pubkey`:`bitcoin_key_2`]
* [`point`:`node_id_1`]
* [`point`:`node_id_2`]
* [`point`:`bitcoin_key_1`]
* [`point`:`bitcoin_key_2`]
### Requirements
@ -254,7 +254,7 @@ nodes not associated with an already known channel are ignored.
* [`u16`:`flen`]
* [`flen*byte`:`features`]
* [`u32`:`timestamp`]
* [`pubkey`:`node_id`]
* [`point`:`node_id`]
* [`3*byte`:`rgb_color`]
* [`32*byte`:`alias`]
* [`u16`:`addrlen`]