Commit Graph
100 Commits
Author SHA1 Message Date
Conner Fromknecht c338fdc2f2 Merge pull request #2535 from federicobond/once-refactor
multi: replace manual CAS with sync.Once in component start/stop
2019-06-06 12:51:51 +02:00
Conner Fromknecht b26b88a1e2 lnwallet/channel: use proper commitment output sorting 2019-06-05 08:35:06 +02:00
Conner Fromknecht a627c65d65 lnwallet/commit_sort: add commit sorting with htlc tie breaker 2019-06-05 08:34:45 +02:00
Conner Fromknecht a826d85dac lntest/itest/lnd_test: assert payreq in listpayment matches paid invoice 2019-05-30 14:18:04 -07:00
Conner Fromknecht 7960849995 rpcserver: thread payreq to PaymentCreationInfo 2019-05-29 16:31:32 -07:00
Conner Fromknecht 078734b511 routing/router: set payreq before persisting PaymentCreationInfo 2019-05-29 16:31:12 -07:00
Conner Fromknecht db8d63801f lnrpc: expose payreq in list payments 2019-05-29 16:30:51 -07:00
Conner Fromknecht f802ebddba Merge pull request #3087 from joostjager/move-itest
lntest: move itest into package
2019-05-29 16:29:06 -07:00
Conner Fromknecht f8287b0080 Merge pull request #2985 from johng/sub-batch
Broadcast gossip announcements in sub batches
2019-05-28 17:05:06 -07:00
Conner Fromknecht cd285d6bb8 Merge pull request #3129 from Roasbeef/scb-fix-windows
chanbackup: close temp SCB file before rename
2019-05-28 16:11:30 -07:00
Conner Fromknecht 28bf49807e watchtower/wtdb: add CSessionStatus field to ClientSession
This commit adds persisted status bit-field to ClientSessions, that can
be used to modify behavior of their handling in the client. Currently,
only a default CSessionActive status is defined. However, the intention
is that this could later be used to signal that a session is abandoned
without needing to perform a db migration to add the field. As we move
forward with testing, this will likely be useful if a session gets
borked and we need a simple method of the client to temporarily ignore
certain sessions.

The field may be useful in signaling other types of status changes,
though this was the primary motivation that warranted the addition.
2019-05-24 18:24:41 -07:00
Conner Fromknecht 9157c88f93 watchtower/wtclient: dedup backups across restarts
Now that the committed and acked updates are persisted across restarts,
we will use them to filter out duplicate commit heights presented by the
client.
2019-05-24 18:24:41 -07:00
Conner Fromknecht 3be651b0b3 watchtower/wtdb: add ClientDB
This commit adds the full bbolt-backed client database as well as a set
of unit tests to assert that it exactly implements the same behavior as
the mock ClientDB.
2019-05-24 18:24:41 -07:00
Conner Fromknecht b35a5b8892 watchtower/wtclient: integrate ClientChannelSummaries
In this commit, we utilize the more generic ClientChanSummary instead of
exposing methods that only allow us to set and fetch sweep pkscripts.
2019-05-23 20:48:50 -07:00
Conner Fromknecht 25fc464a6e watchtower/wtdb/client_chan_summary: add ClientChanSummary
A ClientChanSummary will be inserted for each channel registered with
the client, which for now will just track the sweep pkscript to use. In
the future, this will be extended with additional information to enable
the client to efficiently compute which historical states need to be
backed up under a given policy.
2019-05-23 20:48:36 -07:00
Conner Fromknecht 440ae7818a watchtower/wtmock/client_db: adjust mock clientdb behavior
In advance of the upcoming wtdb.ClientDB, we'll modify the behavior
of the mockdb to be more like the final bbolt backed one, and assert
that all or our tests are still passing.
2019-05-23 20:48:23 -07:00
Conner Fromknecht 2a904cb69f watchtower/wtdb: add Encode/Decode methods to wtclient structs 2019-05-23 20:48:08 -07:00
Conner Fromknecht 1db9bf2fd4 watchtower/wtdb: create embedded ClientSessionBody
This commit splits out the portions of the ClientSession into an
embedded ClientSessionBody, since these fields will be serialized
together on-disk.
2019-05-23 20:47:49 -07:00
Conner Fromknecht 5ad9530502 watchtower/wtdb: return sorted ClientSession.CommittedUpdates
This commit replaces the map-based CommittedUpdates field with a slice.
When reading from disk, these will already be sorted by bbolt, so the
client restore the updates as presented without needing to sort them
first.

Since the key in the map variant was the sequence number, we refactor
the CommittedUpdate struct to have a sequence number and an embedded
CommittedUpdateBody (which is equivalent to the old CommittedUpdate).
The database is then expected to populate the sequence number from the
key on disk.

Since the sequence number is now directly integrated in the
CommittedUpdate struct, this allow allows us to remove the now redundant
seqNum argument from CommitUpdate.
2019-05-23 20:47:36 -07:00
Conner Fromknecht 3509c0c991 watchtower/multi: use proper TowerID type
This allows serialization methods to be added with TowerID method
receivers.
2019-05-23 20:47:22 -07:00
Conner Fromknecht ec7c16fdc1 watchtower/wtdb: prepare for addition of client db
This commit renames the variables dbName to towerDBName and dbVersions
to towerDBVersions, to distinguish between the upcoming clientDBName
clientDBVersions. We also move resusable portions of the database
initialization and default endianness to its own file so that it can be
shared between both tower and client databases.
2019-05-23 20:47:08 -07:00
Conner Fromknecht b34150144d scripts/install_bitcoind: fix initial install 2019-05-22 19:21:24 -07:00
Conner Fromknecht 98f8696e68 travis: install bitcoind 0.17.1 binaries 2019-05-22 16:35:46 -07:00
Conner Fromknecht 08654786ad fundingmanager: bump max non-initiator funding timeout to 2 weeks
The previous value was set to two days, which may not be enough to
handle large fee spikes where users still which to submit channels with
a low fee and don't mind lowering their time preference. Since the
timeout is only applied to channels that we don't initiate, there's real
downside since it's not our funds that are locked up.
2019-05-18 15:21:56 -07:00
Conner Fromknecht 17ab813dcf utxonursery+chanbackup: fix range loop binding bugs 2019-05-16 20:37:30 -07:00
Conner Fromknecht 4d26e90ef3 routing/router: nil path pubkeys before spewing 2019-05-14 20:32:58 -07:00
Conner Fromknecht f79a9d97a9 Merge pull request #3068 from AdamISZ/commentfixes1
Typo corrections in various comments
2019-05-14 17:02:44 -07:00
Conner Fromknecht 3f59e31248 routing/router: break rescans on router quit
This commit reevaluates the router's quit channel between each block
during the initial call to syncGraphWithChain, which, in the worst case,
may have to scan several thousand blocks on startup if the node has not
been active for some time. Without this, attempting to stop the daemon
will not exit until the rescan has completed, which for certain backends
could be several hours.
2019-05-06 15:04:40 -07:00
Conner Fromknecht a11a8693ae peer: break sendMessage on server quit
This commit modifies sendMessage to break on the server's quit channel,
which allows synchronous callers of SendMessage or SendLazyMessage to
receive an error during server shutdown which can be independent of a
particular peer's shutdown.

As of https://github.com/lightningnetwork/lnd/pull/2916, all replies
made by gossip syncers were modified to be synchronous. In certain
cases, This would prevent the syncers from shutting down promptly, as
they would try to offload a batch a of messages that could not be
aborted. Now, an error will be propagated back to the caller, allowing
them to detect the error condition, and reevaluate their own quit
signals, releasing any waitgrouped goroutines and permitting a quick
shutdown.
2019-05-06 14:56:52 -07:00
Conner Fromknecht 17b2140cb5 multi: fix spelling mistakes 2019-05-04 15:35:37 -07:00
Conner Fromknecht 517cdd66bf Merge pull request #2189 from sparkswap/sparkswap/litecoin-regtest
add litecoin regtest to lnd
2019-04-29 15:46:15 -07:00
Conner Fromknecht 5251ebe117 discovery/syncer_test: fix benign off-by-one in DelayDOS test
Prior to this change, the numQueryResponses that we calculated would be
one more than what we actually wanted since it didn't account for the
initial QueryChannelRange msg. This resulted in the test sending one
extra delayed query than was configured. This doesn't fundamentally
impact the test, but does make what happens in the test more reflective
of the configuration.
2019-04-26 20:05:23 -07:00
Conner Fromknecht bf4543e2bd discovery/syncer: make gossip sends synchronous
This commit makes all replies in the gossip syncer synchronous, meaning
that they will wait for each message to be successfully written to the
remote peer before attempting to send the next. This helps throttle
messages the remote peer has requested, preventing unintended
disconnects when the remote peer is slow to process messages. This
changes also helps out congestion in the peer by forcing the syncer to
buffer the messages instead of dumping them into the peer's queue.
2019-04-26 20:05:10 -07:00
Conner Fromknecht ca358e9673 lnpeer+peer: use importable lnpeer.ErrPeerExiting
As a prepatory step to making gossip replies synchronous, we will move
the ErrPeerExiting error into the lnpeer package so that it can be
imported by the discovery package. With synchronous sends, this error
can now be detected and handled by goroutines in the syncer, and cause
them to exit instead of continue to sending backlogs.
2019-04-26 20:04:49 -07:00
Conner Fromknecht 23d10336c2 discovery/syncer: separate query + reply handlers
This commit creates a distinct replyHandler, completely isolating the
requesting state machine from the processing of queries from the remote
peer. Before the two were interlaced, and the syncer could only reply to
messages in certain states. Now the two will be complete separated,
which is preliminary step to make the replies synchronous (as otherwise
we would be blocking our own requesting state machine).

With this changes, the channelGraphSyncer of each peer will drive the
replyHanlder of the other. The two can now operate independently, or
even spun up conditionally depending on advertised support for gossip
queries, as shown below:

          A                                 B
 channelGraphSyncer ---control-msg--->
                                        replyHandler
 channelGraphSyncer <--control-msg----
           gossiper <--gossip-msgs----

                    <--control-msg---- channelGraphSyncer
       replyHandler
                    ---control-msg---> channelGraphSyncer
                    ---gossip-msgs---> gossiper
2019-04-26 20:03:14 -07:00
Conner Fromknecht 54c908be1a watchtower/wtserver/create_session: log missing error in create session 2019-04-26 17:22:02 -07:00
Conner Fromknecht b7cd70f186 watchtower/wtdb/tower_db_test: add mock+bolt iface tests 2019-04-26 17:21:48 -07:00
Conner Fromknecht 3ef2a36733 watchtower/wtdb/tower_db: add TowerDB and db versioning 2019-04-26 17:21:35 -07:00
Conner Fromknecht c99d1313fe watchtower/wtdb/log: add WTDB logs 2019-04-26 17:21:20 -07:00
Conner Fromknecht a36397e21a watchtower/wtdb/codec_test: encode/decode quick checks 2019-04-26 17:21:05 -07:00
Conner Fromknecht 7ba197c6a7 watchtower/wtdb: add encode/decode to session info + updates 2019-04-26 17:20:52 -07:00
Conner Fromknecht dccef4c8bf watchtower/wtdb/codec: import channeldb code for extension 2019-04-26 17:20:36 -07:00
Conner Fromknecht 678ca9feff channeldb/codec: add NewUnknownElementType constructor 2019-04-26 17:20:23 -07:00
Conner Fromknecht 2ce6228021 watchtower/wtmock/tower_db: move mock tower db to wtmock pkg 2019-04-26 17:19:58 -07:00
Conner Fromknecht d1ff783a9e watchtower/wtclient/client_test: test no ack create session 2019-04-23 20:08:02 -07:00
Conner Fromknecht 71f72894f8 watchtower/wtclient/client: ensure dispatcher can force quit...
during session creation.
2019-04-23 20:07:46 -07:00
Conner Fromknecht 9603bfa602 watchtower/wtclient/session_negotiator: don't backoff on first attempt 2019-04-23 20:07:29 -07:00
Conner Fromknecht 1622a212d7 watchtower/wtserver: add NoAckCreateSession for testing 2019-04-23 20:07:12 -07:00
Conner Fromknecht 1000223c71 watchtower/wtwire/error_code: add DeleteSessionCodeNotFound string 2019-04-23 20:06:56 -07:00
Conner Fromknecht 590f5811e8 watchtower/wtserver/server: print connFailure error code name 2019-04-23 20:06:38 -07:00
Conner Fromknecht ec6e2010d6 watchtower/wtmock: validate key index reservation 2019-04-23 20:06:20 -07:00
Conner Fromknecht 978a0a8de6 watchtower/wtserver/server: permit unused session overrwite 2019-04-23 20:06:04 -07:00
Conner Fromknecht 9b1bc9fd79 watchtower/wtwire/create_session_reply: return last applied 2019-04-23 20:05:47 -07:00
Conner Fromknecht 9aa775e64e watchtower/wtserver/server: only generate addrs for reward sessions 2019-04-23 20:05:29 -07:00
Conner Fromknecht 999cbbdc54 watchtower/wtserver/server: check blob type first 2019-04-23 20:05:12 -07:00
Conner Fromknecht bebe6461a9 watchtower/wtclient: use HD session key derivation 2019-04-23 20:04:55 -07:00
Conner Fromknecht 0404aedede watchtower/wtclient/interface+wtmock: add session key reservation 2019-04-23 20:04:40 -07:00
Conner Fromknecht df390df966 watchtower/wtmock/client_db: clone bytes w/ nil 2019-04-23 20:04:23 -07:00
Conner Fromknecht c6f95c5667 watchtower/wtdb/client_session: replace keydesc w/ KeyIndex 2019-04-23 20:04:06 -07:00
Conner Fromknecht 2f9f46cf24 keychain/derivation: adds watchtower session key family 2019-04-23 20:03:48 -07:00
Conner Fromknecht 3af6eafc8e watchtower/wtclient/interface: add SecretKeyRing iface 2019-04-23 20:03:15 -07:00
Conner Fromknecht 7d99005dde watchtower/wtclient/interface: add LoadTower and mock impl 2019-04-23 19:17:21 -07:00
Conner Fromknecht 1c22474ad3 Merge pull request #2989 from meeDamian/gateway-v1.0.5
Update jackpal/gateway to v1.0.5
2019-04-23 14:14:30 -07:00
Conner Fromknecht e3a6de1554 lncfg/workers: reduce default write pool workers to 8
Now that the write pool no longer executes blocking i/o operations, it
is safe to reduce this number considerably. The write pool now only
handles encoding and encryption of messages, making problem
computationally bound and thus dependent on available CPUs. The
descriptions of the workers configs is also updated to explain how users
should set these on their on machines.
2019-04-22 16:30:27 -07:00
Conner Fromknecht e013577a4f peer: remove write backoff
This commit removes the write backoff, since subsequent retries no
longer need to access the write pool. Subsequent flushes will resume
writing any partial writes that occurred before the timeout until the
message is received or the idle write timer is triggered.

In the future, we can add callbacks that execute on write events
timeouts. This can be useful for mobile clients that might roam, as the
timeout could indicate the connection is dead even if the OS has not
reported it closed. The callback can be used then, for example, to
initiate another outbound connection to test whether or not the issue is
related to the connection.
2019-04-22 16:05:41 -07:00
Conner Fromknecht bfbf3015ad peer: replace Write with split WriteMessage then Flush methods
This commit modifies the way the link writes messages to the wire, by
first buffering ciphertexts to the connection using WriteMessage, and
then calling Flush separately. Currently, the call to Write tries to do
both, which can result in a blocking operation for up to the duration of
the write timeout. Splitting these operations permits less blocking in
the write pool, since now we only need to use a write worker to
serialize and encrypt the plaintext.

After the write pool is released, the peer then attempts to flush the
message using the appropriate write timeout. If a timeout error occurs,
the peer will continue to flush the message w/o serializing or
encrypting the message again, until the message is fully written to the
wire or the write idle timer disconnects the peer.
2019-04-22 16:05:26 -07:00
Conner Fromknecht f8345d38fb peer: only set ping time once
As a preliminary step to integrating the separated WriteMessage and
Flush calls in the peer, we'll modify the peer to only set a timestamp
on Ping messages once. This makes sense for two reasons, 1) if the
message has already been partially written, we have already committed to
a ping time, and 2) a ciphertext containing the first ping time will
already be buffered in the connection, and we will only be attempting to
Flush on timeout errors.
2019-04-22 16:05:10 -07:00
Conner Fromknecht 6bc32871fd brontide/conn: expose WriteMessage and Flush on brontide.Conn
This commit exposes the WriteMessage and Flush interfaces of the
underlying brontide.Machine, such that callers can have greater
flexibility in when blocking network operations take place.
2019-04-22 16:04:53 -07:00
Conner Fromknecht 12ec999252 brontide/noise_test: defer wait group decrement
If any of the checks in the goroutine fail, the test will deadlock since
the waitgroup is never released.
2019-04-22 16:04:37 -07:00
Conner Fromknecht e3728da478 brontide/noise_test: add TestFlush 2019-04-22 16:04:24 -07:00
Conner Fromknecht 333caac09c brontide/noise_test: add timeoutWriter 2019-04-22 16:04:08 -07:00
Conner Fromknecht 73cf352daa brontide/conn: migrate to WriteMessage + Flush
This commit modifies WriteMessage to only perform encryption on the
passed plaintext, and buffer the ciphertext within the connection
object. We then modify internal uses of WriteMessage to follow with a
call to Flush, which actually writes the message to the wire.
Additionally, since WriteMessage does not actually perform the write
itself, the io.Writer argument is removed from the function signature
and all call sites.
2019-04-22 16:03:56 -07:00
Conner Fromknecht ed8fe4bc82 brontide/noise: add Flush method
This commit adds a Flush method to the brontide.Machine, which can write
out a buffered message to an io.Writer. This is a preliminary change
which will allow the encryption of the plaintext to be done in a
distinct method from actually writing the bytes to the wire.
2019-04-22 16:03:39 -07:00
Conner Fromknecht ab4a6750cc Merge pull request #1865 from ExchangeUnion/litecoin-simnet
config: Experimental support for Litecoin/simnet
2019-04-19 14:43:47 -07:00
Conner Fromknecht 9946372d52 make/testing_flags: extend itest timeout from 20m to 30m 2019-04-11 18:13:33 -07:00
Conner Fromknecht fd80866627 lnd_test: bump timeout for darwin builds 2019-04-11 16:26:11 -07:00
Conner Fromknecht 5b3170d542 lnd_test: apply AsyncBenchmarkTimeout to async_payments_benchmark
It was mistakenly only applied to async_bidirectional_payments, which
can also see timeouts due to darwin fsync performance regression.
2019-04-11 15:54:21 -07:00
Conner Fromknecht 057bed2b92 htlcswitch/link: delay restored channel reestablish
This commit adds a brief delay when sending our channel reestablish
message if the link contains a restored channel to ensure we first have
a stable connection. Sending the message will cause the remote peer to
force close the channel, which currently may not be resumed reliably if
the connection is being torn town simultaneously. This delay can be
removed after the force close is reliable, but in the meantime it
improves the reliability of successfully closing out the channel and
allows the `channel_backup_restore/restore_during_creation` to pass
reliably.
2019-04-11 15:42:02 -07:00
Conner Fromknecht f19a6a0ba2 lnd_test: use WaitNoError when testing num singles in...
export_channel_backup. Fixes a local flake hit reliably on darwin.
2019-04-10 19:23:08 -07:00
Conner Fromknecht f82b7c9bac channeldb/graph: remove MarkEdgeZombie
This commit removes the MarkEdgeZombie method from channeldb. This
method is currently not used in any live code paths in production, and
is only used in unit tests. However, incorrect usage of this method
could result in an edge being present in both the zombie and channel
indexes, which deviates from any state we would expect to see in
production. Removing the method will help mitigate the potential for
writing incorrect unit tests in the future, by forcing zombie edges to
be created via the relevant, production APIs, e.g. DeleteChannelEdge.

The existing unit tests that use this method have been modified to use
the DeleteChannelEdge instead. No regressions were discovered in the
process.
2019-04-09 22:12:02 -07:00
Conner Fromknecht 4a755435e6 channeldb/graph: skip unknown edges in FetchChanInfos
This commit modifies FetchChanInfos to skip any channels that are not in
the graph at the time of the call. Currently the entire call will fail
if the edge is not found, which stalls a gossip sync in the following
scenario:

 1. Remote peer queries for a channel range
 2. We return the set of channel ids in that range
 3. A channel from that set is removed from the graph, e.g. via close.
 4. Remote peer queries for removed edge, causing the query to fail.

To remedy this, we will now skip any edges that are not known in the
database at the time of the query. This prevents the syncer state
machines from halting, which otherwise could only be resolved by
disconnecting and reconnecting.
2019-04-09 17:35:58 -07:00
Conner Fromknecht a4b4fe666a discovery: make batch size distinct from chunk size, reduce to 500
This commit reduces the number of channels a syncer will request from
the remote node in a single QueryShortChanIDs message. The current size
is derived from the chunkSize, which is meant to signal the maximum
number of short chan ids that can fit in a single ReplyChannelRange
message. For EncodingSortedPlain, this number is 8000, and we use the
same number to dictate the size of the batch from the remote peer.

We modify this by introducing a separately configurable batchSize, so
that both can be tuned independently. The value is chosen to reduce the
amount of buffering the remote party will perform, only requiring them
queue 500 responses, as opposed to 8000. In turn, this reduces larges
spikes in allocation on the remote node at the expense of a few extra
round trips for the control messages. However, will be negligible since
the control messages are much smaller than the messages being returned.
2019-04-06 15:27:26 -07:00
Conner Fromknecht 9df6af237e discovery/sync_manager: restore lazy gossip sends 2019-04-06 03:32:03 -07:00
Conner Fromknecht 25d2b1b537 Merge pull request #2885 from cfromknecht/stagger-initial-reconnect
server: stagger initial reconnects
2019-04-05 15:46:12 -07:00
Conner Fromknecht caa0e2f0b8 Merge pull request #2879 from joostjager/outgoing-go-to-chain
htlcswitch: revert forwarding policy block delta requirements
2019-04-05 15:45:30 -07:00
Conner Fromknecht 209c2c6ead Merge pull request #2841 from philippgille/patch-4
docs: fix broken TOC in Tor docs
2019-04-05 15:35:50 -07:00
Conner Fromknecht a52f013161 Merge pull request #2893 from cfromknecht/no-want-zombie
channeldb/graph: filter zombie channels in FilterKnownChanIDs
2019-04-05 14:45:11 -07:00
Conner Fromknecht a12b30f620 Merge pull request #2896 from halseth/make-fmt-routerrpc
[trivial] lnrpc/routerrpc: make fmt on router backend test
2019-04-05 14:03:31 -07:00
Conner Fromknecht e91bacd1bc channeldb/graph: filter zombie channels in FilterKnownChanIDs
This commit modifies FilterKnownChanIDs to skip edges that
we ourselves have deemed zombies. This prevents us from requesting
the updates from them, as this wastes bandwidth and cpu cycles.
2019-04-05 13:01:08 -07:00
Conner Fromknecht cf80476e01 server: stagger initial reconnects
This commit adds optional jitter to our initial reconnection to our
persistent peers. Currently we will attempt reconnections to all peers
simultaneously, which results in large amount of contention as the
number of channels a node has grows.

We resolve this by adding a randomized delay between 0 and 30 seconds
for all persistent peers. This spreads out the load and contention to
resources such as the database, read/write pools, and memory
allocations. On my node, this allows to start up with about 80% of the
memory burst compared to the all-at-once approach.

This also has a second-order effect in better distributing messages sent
at constant intervals, such as pings. This reduces the concurrent jobs
submitted to the read and write pools at any given time, resulting in
better reuse of read/write buffers and fewer bursty allocation and
garbage collection cycles.
2019-04-05 02:31:58 -07:00
Conner Fromknecht 7a718a401e Merge pull request #2890 from wpaulino/walletunlocker-rest-proxy-dest
lnd+rpcserver: refactor TLS configuration
2019-04-05 00:10:39 -07:00
Conner Fromknecht 12ec69a48b Merge pull request #2883 from cfromknecht/chan-restore-child-harness
lnd_test: use child harness chan backup restore cases
2019-04-05 00:04:25 -07:00
Conner Fromknecht 4de7d0c561 Merge pull request #2889 from grunch/fix-verifychanbackup-help
Remove equal sign on verifychanbackup cmd argument
2019-04-04 15:49:22 -07:00
Conner Fromknecht 9e8fc90754 Merge pull request #2888 from grunch/add-space-on-exportchanbackup-description
Add a missing white space on exportchanbackup command description
2019-04-04 13:08:31 -07:00
Conner Fromknecht 8f5ddf39ca lnd_test: use child harness chan backup restore cases
This prevents a panic during test failure due to a child test calling
FailNow on a parent test context. The sub tests now capture the
testing.T object provided in each closure as opposed to ignoring it and
using the parent context.
2019-04-04 02:36:32 -07:00
Conner Fromknecht d75112ce8d pool/worker: increase worker timeout to 90s
This commit increases the default worker timeout currently backing the
read and write pools. This allows the read and write pools to sustain
regular bursty traffic such as ping/pong without releasing their buffers
back to the underlying gc queue. In the future, jitter can be added to
our ping and/or gossip messages to reduce the concurrent usage of read
and write pools, which will make this change even more effective.
2019-04-04 01:51:47 -07:00
Conner Fromknecht b96da69476 Merge pull request #2880 from Roasbeef/windows-signals
signal: don't attempt to catch SIGSTOP
2019-04-03 14:36:10 -07:00
Conner Fromknecht 90ffc4a0ab chainntnfs/bitcoindnotify: improve historical conf dispatch logging 2019-04-01 18:21:07 -07:00
Conner Fromknecht 7a08825b1e chainntnfs/bitcoindnotify: always call UpdateSpendDetails
This commit fixes a bug that would cause the
notifier not to commit spend hints for items
that are not found. This is done by calling
UpdateSpendDetails with a nil detail, permitting
the notifier to begin updating the spend hints
with new blocks that arrive at tip. The change
is designed to mimic the behavior for historical
confirmation dispatch.

The symptom of this bug is needing to do many
long rescans on startup, even if new blocks
arrive after the rescan had completed. With
this change, nodes will have to do the scans
once more before their hints will be properly
updated. Restarts from then on should not
have this behavior.
2019-04-01 18:20:52 -07:00
Conner Fromknecht 5d98a94d60 channeldb: write chan updates through reject+channel cache 2019-04-01 16:34:51 -07:00