Conner Fromknecht
b635b83abd
fundingmanager: rebroadcast iniatior's funding txn on restart
...
This commit alters the behavior of the fundingmanager to
rebroadcast the funding transaction of all pending-open
channels upon restart. This is applied only to single-funder
channels for which we are the initiator, and helps ensure that
funding txns do not get stuck in the face of failures or restarts.
2018-03-11 13:58:40 -07:00
Johan T. Halseth
300fb1af4a
lnwire: define ConnectionWideID
2018-03-11 17:21:23 +01:00
Johan T. Halseth
80ef16e853
peer: hand lnwire.Error to fndgMngr or link depending on chanID
2018-03-11 17:21:23 +01:00
Johan T. Halseth
33762e0f81
htlcswitch/link: fail channel on lnwire.Error
2018-03-11 17:21:23 +01:00
Johan T. Halseth
f1f1a38663
funding: add method IsPendingChannel
2018-03-11 17:20:28 +01:00
Johan T. Halseth
7252dbd934
funding: add missing mutex around activeReservations
2018-03-11 17:20:28 +01:00
Olaoluwa Osuntokun
7ea9e7cf4c
htlcswitch: fix linter warning
2018-03-10 19:09:18 -08:00
Olaoluwa Osuntokun
800eea931f
build+multi: switch from bolt to bbolt
...
In this commit, we switch from boltbd/bolt to coreos/bbolt as the
former is no longer being actively maintained.
2018-03-10 19:01:13 -08:00
Olaoluwa Osuntokun
602048ae5c
pilot: if unable to establish channel, disconnect peer
...
In this commit, we fix a quick in the main autopilot handling. If we’re
unable to establish a channel to a peer for w/e reason, then we’ll
disconnect the peer. With this tactic, we avoid unnecessarily building
up tens of peers for no reason at all.
2018-03-10 16:53:03 -08:00
Olaoluwa Osuntokun
00ab66469d
autopilot: refresh available funds on channel open/close events
2018-03-10 16:53:02 -08:00
Olaoluwa Osuntokun
ce2d5a2156
autopilot: limit the number of outstanding channel open goroutines
...
In this commit, we fix an existing bug that would at times cause us to
spiral out of control and potentially created thousands of outbound
connections. Our fix is simple: limit the total number of outstanding
channel establishment attempts. Without this limit, we have no way to
bound the number of active goroutines.
Fixes #772 .
2018-03-10 16:53:02 -08:00
Olaoluwa Osuntokun
2cb7d5b570
build: update pinned versions of lightning-onion and btcwallet
...
In this commit, we update the pinned versions of lightning-onion as
well as btcwallet.
The newest lightning-onion instance adds some logging statements when
garbage collecting expired shared secret hashes.
The new btcwallet version fixes a recently introduced bug which would
cause us to remove all unman transactions on restart if the full node
new of any of them. Instead, we’ll now only remove these unmanned
transactions if it’s reported that the transactions were double spends,
or orphans.
2018-03-10 16:43:59 -08:00
Olaoluwa Osuntokun
2a6876bde2
server: ensure the replay database is stored under the graph+network namespace
...
In this commit we modify the storage location of the sphinx replay
database to be under the precise network, and not only the graph sub
directory. Before this commit, due to the usage of filepath.Dir(), the
db would lie under /graph/, rather than say, /graph/simnet.
2018-03-10 13:02:29 -08:00
Olaoluwa Osuntokun
bfa76bad49
Merge pull request #761 from cfromknecht/switch-persistence
...
Switch Persistence [ALL]: Forwarding Packages + Sphinx Replay Protection + Circuit Persistence
2018-03-09 22:40:02 -08:00
Conner Fromknecht
6b74e28858
lnd_test: adds advanced switch persistence test, checking:
...
// 1. Carol --> Dave --> Alice --> Bob forward payment
// 2. Carol --- Dave X Alice --- Bob disconnect intermediaries
// 3. Carol --- Dave X Alice <-- Bob settle last hop
// 4. Carol --- Dave X X shutdown Bob, restart Alice
// 5. Carol <-- Dave <-- Alice X expect settle to propagate
2018-03-09 21:18:17 -08:00
Conner Fromknecht
38b04ec357
lnd_test: adds switch offline delivery outgoing offline itest
2018-03-09 21:18:16 -08:00
Conner Fromknecht
4bff32232c
lntest/node: adds SetExtraArgs to change node behavior after restart
2018-03-09 21:18:16 -08:00
Conner Fromknecht
90dec0ad6a
lntest/node: expose pprof port by default for itests
2018-03-09 21:18:16 -08:00
Conner Fromknecht
cf0ab41ce8
lnd_test: adds sphinx replay and switch persistence tests
2018-03-09 21:18:16 -08:00
Conner Fromknecht
58324e0d38
lnd_test: add wait predicate to retribution balance check
2018-03-09 21:18:16 -08:00
Conner Fromknecht
1421a91767
test_utils: init with packager
2018-03-09 21:18:15 -08:00
Conner Fromknecht
4f5edc1b2e
test_utils: init switch with channeldb
2018-03-09 21:18:15 -08:00
Conner Fromknecht
935c757102
rpcserver: allow unsafe-disconects
2018-03-09 21:18:15 -08:00
Conner Fromknecht
c976a550cb
server: initialize switch with circuit db
2018-03-09 21:18:15 -08:00
Conner Fromknecht
972d238f04
peer: remove Switch from channel link config
2018-03-09 21:18:15 -08:00
Conner Fromknecht
d468a36d69
peer: pass unsafe-replay to link config
2018-03-09 21:18:15 -08:00
Conner Fromknecht
8d0e3dc467
peer: adds FwdPkgGCTicker to channel configs
2018-03-09 21:18:14 -08:00
Conner Fromknecht
0e4be6a04a
peer: init link with batched sphinx processing
2018-03-09 21:18:14 -08:00
Conner Fromknecht
b8254803be
config: add unsafe-disconnect and unsafe-replay for testing
2018-03-09 21:18:14 -08:00
Conner Fromknecht
5de0c62ae6
breacharbiter_test: init packager
2018-03-09 21:18:14 -08:00
Conner Fromknecht
02489dc6c0
htlcswitch/test_utils: instantiate config with batch onoin processing
2018-03-09 21:08:44 -08:00
Conner Fromknecht
4f68d1beca
htlcswitch/switch_test: change forward() -> send()
2018-03-09 21:08:44 -08:00
Conner Fromknecht
1b7afc6da5
htlcswitch/mock: add mock fwding log to initSwitchWithDB
2018-03-09 21:08:44 -08:00
Conner Fromknecht
5fd1206da6
htlcswitch/switch: modifies forward method to support async invocation
2018-03-09 21:08:44 -08:00
Conner Fromknecht
fbb8f0bcce
htlcswitch/sequencer: adds a persistent emitter of payment IDs
2018-03-09 21:08:44 -08:00
Conner Fromknecht
e4fb420665
htlcswitch/packet: adds serialization to htlcPacket
2018-03-09 21:08:44 -08:00
Conner Fromknecht
3048dfd4be
htlcswitch/mock: adds Encode/Decode to mock obfuscator
2018-03-09 21:08:43 -08:00
Conner Fromknecht
3ae7772ecb
htlcswitch/mailbox_test: adds checks for reset and replay of pkts
2018-03-09 21:08:43 -08:00
Conner Fromknecht
9b00f83656
htlcswitch/mailbox: makes pkts replayable via Reset
2018-03-09 21:08:43 -08:00
Conner Fromknecht
3a186a02a9
htlcswitch/link_test: generate random preimages
2018-03-09 21:08:43 -08:00
Conner Fromknecht
101ad09e9f
htlcswitch/link: batches processing of locked in htlcs
2018-03-09 21:08:43 -08:00
Conner Fromknecht
2c3d35bb40
htlcswitch/interfaces: have HandleSwitchPacket return an error
2018-03-09 21:08:43 -08:00
Conner Fromknecht
403028da78
htlcswitch/circuit_test: use half adds in circuit map test
2018-03-09 21:08:42 -08:00
Conner Fromknecht
0b71f74199
htlcswitch/circuit_map: moves circuit map impl to own file
2018-03-09 21:08:42 -08:00
Conner Fromknecht
067b261602
htlcswitch/circuit: add half adds to circuit map
2018-03-09 21:08:42 -08:00
Olaoluwa Osuntokun
7a14b6bb32
Merge pull request #778 from cfromknecht/switch-wallet-api
...
Switch Persistence [2.5/4]: Establish Switch-Sphinx-Wallet APIs for Switch Persistence
2018-03-09 18:08:31 -08:00
Conner Fromknecht
5539e23b05
lnwallet/channel_test: convert tests to new channel API for persistence
2018-03-09 17:35:54 -08:00
Conner Fromknecht
aeecb9cdf5
breacharbiter_test: utilize update channel state transition APIs
2018-03-09 17:35:54 -08:00
Conner Fromknecht
02c65db0d1
htlcswitch/link_test: integrate new channel update APIs
2018-03-09 17:35:54 -08:00
Conner Fromknecht
1fe7c6d431
htlcswitch/link: integrate persistence changes to lnwallet APIs
2018-03-09 17:35:53 -08:00