Commit Graph

91 Commits

Author SHA1 Message Date
Wilmer Paulino
7946d0a256
multi: remove ErrDoubleSpend check for PublishTransaction
In this commit, we address a lingering issue within some subsystems that
are responsible for broadcasting transactions. Previously,
ErrDoubleSpend indicated that a transaction was already included in the
mempool/chain. This error was then modified to actually be returned for
conflicting transactions, but its callers were not modified accordingly.
This would lead to conflicting transactions to be interpreted as valid,
when they shouldn't be.
2019-03-13 17:57:19 -07:00
Conner Fromknecht
4a0fc3e980
watchtower/multi: thread ChainHash to server 2019-02-08 20:02:17 -08:00
Conner Fromknecht
b3a9650ff9
watchtower/wtserver/server: use CheckRemoteInit to validate Init msgs 2019-02-08 20:02:11 -08: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
Olaoluwa Osuntokun
16d69e8551
Merge pull request #2605 from cfromknecht/wtwire-uniform-feature-names
watchtower/wtwire/features: make wtwire features uniform
2019-02-08 18:39:37 -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
a00fc148c8
watchtower/wtclient/backup_task: make sweep pkscript independent of session
This commit changes when the sweep pkscript
is assigned in the construction of the justice
transaction. Currently, the sweep pkscript is
assigned when the task is bound to a session.
However, we will moving to an assignment where
a unique sweep pkscript is used per channel to
prevent address inflation. Hence, this commit
makes the sweep pkscript a state dependent
variable, since it can be known at the time the
channel id is assigned.
2019-02-06 18:24:30 -08:00
Conner Fromknecht
fe9f703b5b
watchtower/wtclient/backup_task: correct txweight + update test vectors 2019-02-06 18:24:30 -08:00
Conner Fromknecht
e13d88f3f3
watchtower/wtclient/backup_task_internal_test: adds backupTask utests 2019-02-05 18:27:19 -08:00
Conner Fromknecht
8f98522f13
watchtower/wtclient/backup_task: adds backupTask 2019-02-05 18:27:13 -08:00
Conner Fromknecht
09e71a1d49
watchtower/multi: use ComputeJusticeTxOuts, test altruist+reward 2019-02-01 17:30:13 -08:00
Conner Fromknecht
9054a3ee4c
watchtower/wtpolicy/policy: add ComputeJusticeTxOuts 2019-02-01 17:26:48 -08:00
Conner Fromknecht
1703502505
watchtower/wtpolicy: add ComputeRewardOutputs 2019-02-01 17:19:33 -08:00
Conner Fromknecht
6b3691a86e
watchtower/wtpolicy: add ComputAltruistOutput calc 2019-02-01 17:19:27 -08:00
Olaoluwa Osuntokun
55ed7769a5
Merge pull request #2514 from cfromknecht/add-wtmock-pkg
watchtower/multi: move MockSigner+MockPeer to wtmock
2019-01-31 19:13:47 -08:00
Conner Fromknecht
9fe284923a
watchtower/wtserver: read RewardBase from CreateSession 2019-01-31 18:17:35 -08:00
Conner Fromknecht
46a86a863a
wtwire/create_session: add RewardBase field to CreateSession 2019-01-31 18:17:35 -08:00
Conner Fromknecht
26f4131102
watchtower/wtpolicy: add RewardBase to Policy 2019-01-31 18:17:35 -08:00
Conner Fromknecht
43120fd08c
watchtower/multi: move MockSigner+MockPeer to wtmock 2019-01-31 18:16:02 -08:00
Joost Jager
9e012ecc93
multi: move Input interface and related code
This commit is a step to split the lnwallet package. It puts the Input
interface and implementations in a separate package along with all their
dependencies from lnwallet.
2019-01-31 13:25:33 +01:00
Conner Fromknecht
f78319d32c
watchtower/wtserver/server: return valid reward script 2019-01-17 22:19:28 -08:00
Olaoluwa Osuntokun
099d260318
Merge pull request #2320 from cfromknecht/wtpolicy
[watchtower] add wtpolicy.Policy and wtserver message logging
2019-01-16 14:05:59 -08:00
Olaoluwa Osuntokun
5b2afaff8f
Merge pull request #2448 from cfromknecht/watchtower-pkg
watchtower pkg
2019-01-15 20:01:50 -08:00
Conner Fromknecht
45cfa65b47
watchtower/wtserver/server: handle missed err case from read msg 2019-01-15 19:46:04 -08:00
Conner Fromknecht
4a2fb1b4d0
watchtower/wtserver/server: log sent/recvd wire messages 2019-01-15 19:38:41 -08:00
Conner Fromknecht
00db396b51
watchtower/wtwire/summary: adds message summaries 2019-01-15 19:38:41 -08:00
Conner Fromknecht
b32afd9001
watchtower/conf_experimental: adds CLI options in experimental builds 2019-01-14 19:42:34 -08:00
Conner Fromknecht
a9d21799a8
watchtower/conf: adds non-experimental empty Conf 2019-01-14 19:42:34 -08:00
Conner Fromknecht
b1c6dd678b
watchtower/standalone: adds Standalone watchtower 2019-01-14 19:42:34 -08:00
Conner Fromknecht
e0b72580f5
watchtower/errors: adds pkg level errors 2019-01-14 19:42:34 -08:00
Conner Fromknecht
2a6dbb9d78
watchtower/config: add capstone Config struct 2019-01-14 19:42:34 -08:00
Conner Fromknecht
25daa538e2
watchtower/interface: adds composite DB iface 2019-01-14 19:42:33 -08:00
Conner Fromknecht
7a8669a531
watchtower/log: add WTWR subsystem logger 2019-01-14 19:42:33 -08:00
Conner Fromknecht
f66e713b35
watchtower/blob/justice_kit_test: test witness script/stack construction 2019-01-10 15:59:54 -08:00
Conner Fromknecht
ca3e06b785
watchtower/wtserver: reject unknown blob types 2019-01-10 15:59:54 -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
c315d74347
watchtower/wtpolicy/policy: adds watchtower policy 2019-01-10 15:59:54 -08:00
Conner Fromknecht
cf1b8ba78f
watchtower/blob/type_test: adds Flag and Type unit tests 2019-01-10 15:59:54 -08:00
Conner Fromknecht
bc09c6dbae
watchtower/blob/type: introduces blob type flags
Adds flags for reward outputs and commitment outputs.
The fixed-size encoding for commitment outputs is
treated as a flag, so that the blob format can be
modified, extended, or replaced in future iterations.
2019-01-10 15:35:07 -08:00
Conner Fromknecht
bb8469d8ee
watchtower/lookout: correct txid + session id logging 2019-01-07 19:20:45 -08:00
Conner Fromknecht
226640aa3c
watchtower/wtwire/wtwire: fix missed error handling 2018-12-06 15:49:53 -08:00
Olaoluwa Osuntokun
00001e7dad
watchtower: fix linter errors 2018-11-29 21:26:02 -08:00
Olaoluwa Osuntokun
fd82200a15
Merge pull request #2140 from cfromknecht/wtserver-move
[watchtower/wtserver] rename server package, add godocs, general code health
2018-11-28 15:07:01 -08:00
Conner Fromknecht
ba53879b2b
watchtower/wtserver/server: add missing godocs + code move 2018-11-02 15:59:47 -07:00
Conner Fromknecht
7cdbb786d6
watchtower/wtserver: move from watchtower/server 2018-11-02 15:51:06 -07:00