Commit Graph

6080 Commits

Author SHA1 Message Date
Wilmer Paulino
1ee8d7518c
chainntnfs/btcdnotify: add chainParams parameter to btcdnotify.New
In this commit, we add the current chain parameters to the BtcdNotifier.
This will be used in a future commit in order to convert outputs scripts
into addresses. This is needed since the btcd backend uses these
addresses to detect whether the script encoded within it was spent by a
transaction in the chain.
2019-01-21 13:57:43 -08:00
Wilmer Paulino
7f644019b8
chainntnfs/txnotifier_test: update tests with new registration changes 2019-01-21 13:57:43 -08:00
Wilmer Paulino
c3d5204f09
chainntnfs/txnotifier: refactor ProcessRelevantSpendTx to detect script spends
In this commit, we refactor the TxNotifier's ProcessRelevantSpendTx to
also detect script spends. This can easily be done as the transaction
filtering logic was refactored into its own method in a previous commit.
2019-01-21 13:57:43 -08:00
Wilmer Paulino
8042d4f1c8
chainntnfs/txnotifier: batch update confirm and spends hints for scripts 2019-01-21 13:57:43 -08:00
Wilmer Paulino
f4f5c1ef8b
chainntnfs/txnotifier: support reorg detection for scripts 2019-01-21 13:57:43 -08:00
Wilmer Paulino
83c8ccb3eb
chainntnfs/txnotifier: notify confirmations and spends of scripts at tip 2019-01-21 13:57:43 -08:00
Wilmer Paulino
ecd70deb8c
chainntnfs/txnotifer: detect confirmations and spends of scripts at tip
In this commit, we modify the TxNotifier's ConnectTip method to also
detect whether a registered script has been confirmed or spent on-chain
by a transaction in the connected block. Once detected, notifications
for them will be queued up for dispatch as with txids/outpoints.

We've also refactored the ConnectTip method into smaller and reusable
methods, which will serve useful later.
2019-01-21 13:57:43 -08:00
Wilmer Paulino
b579c23310
chainntnfs/txnotifier: support registration of scripts for spends 2019-01-21 13:57:43 -08:00
Wilmer Paulino
0f4ff2d09c
chainntnfs/txnotifier: support registration of scripts for confirmations 2019-01-21 13:57:43 -08:00
Wilmer Paulino
a0d3b7d9e3
chainntnfs: support caching confirm/spend hints for scripts
In this commit, we refactor the HeightHintCache and its underlying
interfaces to be able to manipulate hints for ConfRequests and
SpendRequests. By doing so, we'll be able to manipulate hints for
scripts if the request includes either a zero hash or a zero outpoint.
2019-01-21 13:57:43 -08:00
Wilmer Paulino
de0adc4d52
chainntnfs/txnotifier: add ConfRequest and SpendRequest structs
These structs allow us to request notifications for either
txids/outpoints or output scripts. We'll be using these in later commits
to index confirmation and spend requests within the TxNotifier.
2019-01-21 13:57:43 -08:00
Wilmer Paulino
cdf2a65db6
build: update deps to support detecting script spends within rescans 2019-01-21 13:57:43 -08:00
Olaoluwa Osuntokun
4537c63dbd
Merge pull request #2504 from Roasbeef/vendor-with-release
build: update release.sh to contain vendor archive + source code
2019-01-18 19:16:36 -08:00
Olaoluwa Osuntokun
9c344ec311
Merge pull request #2499 from Roasbeef/code-cont-replace
docs: add new section to contribution guidelines for go mod replace
2019-01-18 18:19:55 -08:00
Olaoluwa Osuntokun
aa5e3fed43
Merge pull request #2503 from cfromknecht/wtserver-reward-script
watchtower/wtserver/server: return valid reward script
2019-01-18 12:51:52 -08:00
Olaoluwa Osuntokun
df45cc19a3
build: update release.sh to contain vendor archive + source code
In this commit, we update the release script to include a directory
containing all of our vendored dependencies. This makes out releases
more self contained as they can be built using `go build -mod=vendor`
without requiring any package fetching.

Additionally, we pacakge the entire source as well.

Fixes #1550.
2019-01-17 23:40:11 -08:00
Conner Fromknecht
f78319d32c
watchtower/wtserver/server: return valid reward script 2019-01-17 22:19:28 -08:00
Conner Fromknecht
7e1b399437
Merge pull request #2494 from halseth/make-flakehunter-build-itest
[trivial] build lnd-itest before flakehunting
2019-01-17 19:22:01 -08:00
Olaoluwa Osuntokun
9cda05ee8a
docs: add new section to contribution guidelines for go mod replace
In this commit, we add a new section to the code contribution guidelines
explaining how to use `go mod replace`. This will be a common procedure
for any developer that needs to make a change in any of our sister
projects, so it's nice to have this outlined in a single place.
2019-01-17 16:50:06 -08:00
Olaoluwa Osuntokun
c3ebe6c77d
Merge pull request #2402 from Roasbeef/update-install-directions
docs/INSTALL.md: update Go installation options for Linux
2019-01-17 16:33:06 -08:00
Johan T. Halseth
4cbc6e6e07
make: build lnd-itest before flakehunting 2019-01-17 14:40:20 +01:00
Joost Jager
6ae55168b8
Merge pull request #2486 from joostjager/split-resolvers
cnct: split resolvers in separate files
2019-01-17 08:57:22 +01: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
32a5f6821a
Merge pull request #1621 from halseth/integration-tests-split-backend-miner
[Integration tests] Split chain backend and miner
2019-01-16 14:02:52 -08:00
Joost Jager
4ec3fc3b1a
cnct: split resolvers in separate files 2019-01-16 20:03:59 +01:00
Johan T. Halseth
5dc87ad4d7
gitignore: ignore .minerlogs folder 2019-01-16 10:11:47 +01:00
Johan T. Halseth
2b16fb7271
lnd_test: fix reorg test by using new Node RPC
Since the chain backend and miner is now seperate nodes, the reorg test
must be slightly rewritten. We use the Btcd Node RPC to connect and
disconnect the three bitcoin nodes in question (chain backend, miner,
temp miner) to control the reorg scenario.
2019-01-16 10:10:22 +01:00
Johan T. Halseth
92b984a233
lnd_test+lntest: seperate miner and chain backend
Since we are no longer passing in the miner as the chain backend, we
don't have to export the fields.
2019-01-16 10:10:22 +01:00
Johan T. Halseth
989fe50da8
lntest: define BackendCfg and btcd impl
BackendCfg is an interface that can be backed by different Bitcoin node
implementations. We currently use the btcdHarness as our chain backend.
2019-01-16 09:44:29 +01:00
Olaoluwa Osuntokun
cb1df51a3a
Merge pull request #2479 from wpaulino/signer-server-compilation-fix
lnrpc/signrpc/signer_server: fix incorrect lnwallet.InputScript field
2019-01-15 21:39:45 -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
Olaoluwa Osuntokun
53a181ce49
Merge pull request #2439 from cfromknecht/wtpolicy-blob-type
wtpolicy: migrate to using wtpolicy.Policy + blob bitvector flags
2019-01-15 19:30:56 -08:00
Wilmer Paulino
3420d6d917
lnrpc/signrpc/signer_server: fix incorrect lnwallet.InputScript field 2019-01-15 19:27:28 -08:00
Olaoluwa Osuntokun
8bde0e736f
Merge pull request #2473 from Roasbeef/list-channels-initiator
lnrpc+rpc: add initiator field to listchannels
2019-01-15 18:29:13 -08:00
Olaoluwa Osuntokun
7df0e6fafe
Merge pull request #2466 from yancyribbens/enable-docker-mainnet
enable btcd and btcctl mainnet to be invoked from docker
2019-01-15 16:59:42 -08:00
Olaoluwa Osuntokun
114f0a8918
rpc: populate new initiator field in ListChannels response 2019-01-15 16:51:35 -08:00
Olaoluwa Osuntokun
5d0a371a7d lnrpc: add Initiator field to ListChannels resposne 2019-01-15 16:51:00 -08:00
Olaoluwa Osuntokun
b700b969e8
Merge pull request #2463 from wpaulino/notify-when-offline
server: implement notifications for disconnected peers
2019-01-15 16:47:29 -08:00
Olaoluwa Osuntokun
509bed614c
Merge pull request #2198 from Roasbeef/sendall-rpc
multi: add ability to sweep all coins in the the wallet to an addr to sendcoins
2019-01-15 14:49:17 -08:00
Wilmer Paulino
cbce6e03fc
server: implement notifications for disconnected peers 2019-01-14 22:44:45 -08:00
Olaoluwa Osuntokun
490ce4cd37
Merge pull request #2471 from jonathancross/aezeed
Fixup aezeed README (typos)
2019-01-14 21:36:55 -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