47 Commits

Author SHA1 Message Date
chuangjinglu
bcfd8d5b47 multi: fix some function names in interface comment
Signed-off-by: chuangjinglu <chuangjinglu@outlook.com>
2024-11-25 10:49:00 +08:00
Matt Morehouse
9dd921243d wtwire: explain emptyMsg parameter in function comment
This makes it unnecessary to explain the argument at every call site, so
we can simplify each fuzz target.
2024-11-13 15:53:29 -06:00
Matt Morehouse
567ff5d751 wtwire: remove incorrect function comment
The harness doesn't return anything, so don't say that it does.
2024-11-13 15:53:29 -06:00
Matt Morehouse
e2f7eb963f wtwire: move message prefixing to the harness
The prefixing is done every time the harness is used, so it may as well
reside in the harness itself.

Since we already pass an empty message of the correct type, we can use
that message to get the required prefix bytes.
2024-11-13 15:53:29 -06:00
Matt Morehouse
38f9f795e4 wtwire: s/harness/wireMsgHarness
This slightly more descriptive name obviates the repetitive comments at
every call site.
2024-11-13 15:53:29 -06:00
Elle Mouton
20a107600f watchtower: add new TaprootCommit Type and flag
This commit adds a new FlagTaprootChannel Flag which is then used to
construct a new blob Type: TypeAltruistTaprootCommit. New watchtower
feature bits are also added (4/5).
2024-01-18 17:56:49 +02:00
Matt Morehouse
4c2e712581 wtwire: use require package for fuzz tests
Simplify code by using the require package instead of t.Fatal().
2023-05-23 08:37:22 -05:00
Matt Morehouse
e15d3e898e brontide,lnwire,wtwire,zpay32: appease linter
Address all linter complaints for the newly migrated fuzz tests.
2022-11-11 08:44:30 -06:00
Matt Morehouse
5a48568806 brontide,lnwire,wtwire,zpay32: use CamelCase
Rename fuzz test functions to use CamelCase.
2022-11-11 08:44:24 -06:00
Conner
1ed2a1bc28 wtwire: migrate fuzz tests 2022-11-11 08:44:01 -06:00
Carsten Otto
378478eb1a multi: fix typos and grammar issues in comments [skip ci] 2022-10-17 09:40:22 +02:00
ueno
c6c7f94668 docs: fix typo in watchtower document and code comment [skip ci] 2022-09-13 22:06:30 +09:00
Oliver Gugger
7dfe4018ce multi: use btcd's btcec/v2 and btcutil modules
This commit was previously split into the following parts to ease
review:
 - 2d746f68: replace imports
 - 4008f0fd: use ecdsa.Signature
 - 849e33d1: remove btcec.S256()
 - b8f6ebbd: use v2 library correctly
 - fa80bca9: bump go modules
2022-03-09 19:02:37 +01:00
yyforyongyu
879d3cc86c wtwire: remove reference from lnwire 2021-08-10 05:36:08 +08:00
Conner Fromknecht
069296c46c watchtower/wtwire: add AnchorCommit feature bits
Adds the optional/required feature bit pair for negotiating sessions for
anchor channels under features bits 2+3.
2020-11-25 15:03:49 -08:00
Conner Fromknecht
2510ec00f5 watchtower/wtwire/init: use feature.ValidateRequired
This allows us to remove the custom error type originally implemented
for this purpose.
2020-01-08 12:26:00 -08:00
Olaoluwa Osuntokun
777ed104a3 chainfee: create new chainfee package extracting fees from lnwallet
In this commit, we create a new chainfee package, that houses all fee
related functionality used within the codebase. The creation of this new
package furthers our long-term goal of extracting functionality from the
bloated `lnwallet` package into new distinct packages. Additionally,
this new packages resolves a class of import cycle that could arise if a
new package that was imported by something in `lnwallet` wanted to use
the existing fee related functions in the prior `lnwallet` package.
2019-10-31 16:41:57 -07:00
Conner Fromknecht
2d47618055 watchtower/multi: define AltruistSessions feature bit as 0/1 2019-06-13 19:54:21 -07:00
Conner Fromknecht
86e1d111e5 watchtower/wtwire/message: bump wtwire messages outside reserved ranges
BOLT01 reserves the following ranges:
 - Setup & Control (types 0-31)
 - Channel (types 32-127)
 - Commitment (types 128-255)
 - Routing (types 256-511)

The wtwire messages now occupy 600-607.
2019-06-13 19:54:21 -07:00
Conner Fromknecht
17b2140cb5 multi: fix spelling mistakes 2019-05-04 15:35:37 -07:00
Conner Fromknecht
1000223c71 watchtower/wtwire/error_code: add DeleteSessionCodeNotFound string 2019-04-23 20:06:56 -07:00
Conner Fromknecht
9b1bc9fd79 watchtower/wtwire/create_session_reply: return last applied 2019-04-23 20:05:47 -07:00
Conner Fromknecht
3d934d0978 watchtower/wtwire: add DeleteSession and DeleteSessionReply message 2019-03-19 19:38:09 -07:00
Conner Fromknecht
99dbbf48aa watchtower/wtwire/error_code: add human-readable descriptors 2019-03-15 02:29:55 -07:00
Conner Fromknecht
9c70f49901 watchtower/wtwire/create_session_reply: remove extra Reject from code 2019-03-15 02:29:42 -07:00
Conner Fromknecht
4c7111256e watchtower/wtwire/features: remove local/global feature names...
in favor of a universal FeatureNames index.
2019-02-08 20:02:05 -08:00
Conner Fromknecht
40df51eaaa watchtower/wtwire/init_test: table test CheckRemoteInit 2019-02-08 20:01:59 -08:00
Conner Fromknecht
572537874b watchtower/wtwire/init: add CheckRemoteInit method 2019-02-08 20:01:54 -08:00
Olaoluwa Osuntokun
f4dfcc35aa Merge pull request #2606 from cfromknecht/wtwire-init-connection-features
watchtower/multi: send connection features + chain hash in Init
2019-02-08 18:48:54 -08:00
Conner Fromknecht
0045ad567d watchtower/wtwire/features: make wtwire feature uniform 2019-02-07 16:13:42 -08:00
Conner Fromknecht
4dbade64dd watchtower/multi: send connection features + chain hash in Init 2019-02-06 20:09:19 -08:00
Conner Fromknecht
46a86a863a wtwire/create_session: add RewardBase field to CreateSession 2019-01-31 18:17:35 -08:00
Conner Fromknecht
00db396b51 watchtower/wtwire/summary: adds message summaries 2019-01-15 19:38:41 -08:00
Conner Fromknecht
4f3655ba93 watchtower/wtwire/create_session_reply: add reject blob type code 2019-01-10 15:59:54 -08:00
Conner Fromknecht
b746bf86c2 watchtower/multi: switch over to wtpolicy
migrate to using wtpolicy.Policy in wtwire messages and wtserver
2019-01-10 15:59:54 -08:00
Conner Fromknecht
226640aa3c watchtower/wtwire/wtwire: fix missed error handling 2018-12-06 15:49:53 -08:00
Conner Fromknecht
8acd13a094 watchtower/wtwire/wtwire_test: adds quick tests wtwire msgs 2018-10-23 18:28:30 -07:00
Conner Fromknecht
42a4b373a6 watchtower/wtwire/state_update_reply: ack w/ highest seqnum or error 2018-10-23 18:28:28 -07:00
Conner Fromknecht
fdd3ad3149 watchtower/wtwire/state_update: sends encrypted blobs 2018-10-23 18:28:27 -07:00
Conner Fromknecht
216c77e10e watchtower/wtwire/create_session_reply: accept/deny session init 2018-10-23 18:28:26 -07:00
Conner Fromknecht
71541bc94e watchtower/wtwire/create_session: propose new session 2018-10-23 18:28:25 -07:00
Conner Fromknecht
9ab620c7be watchtower/wtwire/error_code: add shared error codes 2018-10-23 18:28:23 -07:00
Conner Fromknecht
999466c860 watchtower/wtwire/error: add generic error message 2018-10-23 18:28:22 -07:00
Conner Fromknecht
d171df5184 watchtower/wtwire/features: add watchtower feature bits 2018-10-23 18:28:20 -07:00
Conner Fromknecht
5ba95585e5 watchtower/wtwire/init: borrow LN init msg for WT init 2018-10-23 18:28:19 -07:00
Conner Fromknecht
49b2a3bdb5 watchtower/wtwire/message: define wtwire message interface 2018-10-23 18:28:18 -07:00
Conner Fromknecht
4325d9ec1e watchtower/wtwire/wtwire: add watchtower message codec 2018-10-23 18:23:08 -07:00