Conner Fromknecht
e2690918a0
Merge pull request #5002 from akovalenko/master
...
lncli addinvoice: allow specifying msat with --amt_msat
2021-03-17 10:03:56 -07:00
Conner Fromknecht
482ca0ddc4
Merge pull request #5068 from wpaulino/gossip-rate-limit-config
...
lncfg: expose channel update rate limiting options
2021-03-17 09:58:53 -07:00
Conner Fromknecht
b4aa661d16
Merge pull request #5064 from ellemouton/set-coop-close-target-confs
...
multi: allow setting target confs for co-op close
2021-03-16 11:14:15 -07:00
Conner Fromknecht
53c1175407
Merge pull request #5111 from yyforyongyu/fix-feature-check
...
routing: check payment.DestFeatures against nil
2021-03-16 10:01:00 -07:00
Conner Fromknecht
7e33548e8b
Merge pull request #4775 from halseth/input-tx-size-constants
...
[input/size] Check tx size constants
2021-03-10 09:23:40 -08:00
Conner Fromknecht
8c4e32012e
Merge pull request #5070 from alexbosworth/patch-14
...
trivial: match newline style
2021-03-05 12:30:20 -08:00
Conner Fromknecht
b121d1da4e
Merge pull request #5078 from carlaKC/fix-comment
...
lnrpc: correct comment on half life seconds
2021-03-05 12:29:59 -08:00
Conner Fromknecht
e7f3fe3923
Merge pull request #5074 from cfromknecht/add-invalid-onion-payload-rpc
...
lnrpc: expose INVALID_ONION_PAYLOAD via RPC
2021-03-05 09:50:47 -08:00
Conner Fromknecht
71db3a83bc
lnrpc: expose INVALID_ONION_PAYLOAD via RPC
2021-03-04 15:27:16 -08:00
Conner Fromknecht
56b61078c5
Merge pull request #4338 from cfromknecht/set-id-index
...
channeldb+invoices: add set id index for AMP
2021-03-04 12:17:08 -08:00
Conner Fromknecht
68688d6346
invoices: replace all asserts with requires
2021-03-04 10:11:22 -08:00
Conner Fromknecht
d004442efb
lnrpc+itest: expose AMP fields on InvoiceHTLC
...
We also test that legacy keysend payments are promoted to AMP payments
on the receiver-sdie by asserting basic properties of the fields
returned via the rpc.
2021-03-04 10:11:21 -08:00
Conner Fromknecht
ffddb85e9c
tlv/bench_test: fix ESatPerKw, pass reference to uint64
2021-03-04 10:02:29 -08:00
Conner Fromknecht
7cd78afd1a
tlv/bench_test: check for errors in benchmarks
2021-03-04 10:02:29 -08:00
Conner Fromknecht
137258fb58
invoices/invoiceregistry: unbundle invalid preimage error
2021-03-03 16:28:03 -08:00
Conner Fromknecht
9da3e7fc90
invoices: filter HTLC set by set id from AMP payload
2021-03-03 16:28:02 -08:00
Conner Fromknecht
5f34880040
channeldb/invoices: continue cancel loop early
2021-03-03 16:28:02 -08:00
Conner Fromknecht
fc9af92dd9
channeldb: only accept/settle non-empty HTLC sets
...
Prior to AMP, there could only be one HTLC set. Now that there can be
multiple, we introduce the inherent risk that we might be persisting a
settle/accept of the wrong HTLC set. To migitigate this risk, we add a
check to assert that an invoice can only be transitioned into an
Accepted or Settled state if the specified HTLC set is non-empty, i.e.
has accepted HTLCs.
To do this check, we unroll the loops in UpdateInvoice to first process
any added or canceled HTLCs. This ensures that the set of accepted HTLCs
is up-to-date when we got to transition the invoice into a new state, at
which point we can accurately check that the HTLC set is non-empty.
Previously this sort of check wasn't possible because a newly added HTLC
wouldn't be populated on the invoice when going to call
updateInvoiceState.
Once the invoice-level transition checks have completed, we complete a
final pass to move the HTLCs into their final states and recompute the
amount paid.
With this refactor, it is now possible to make stronger assertions
about the invoice and the state transitions being made by the
invoiceregistry before those changes are ultimately persisted.
2021-03-03 16:28:02 -08:00
Conner Fromknecht
e1b0fe5e98
channeldb/invoices: update AMP invoice htlcs
2021-03-03 16:28:02 -08:00
Conner Fromknecht
fad25f3f26
channeldb/invoices: add invoices to set id index on update
2021-03-03 16:28:01 -08:00
Conner Fromknecht
7c0d1e0093
channeldb/invoice: map zero-value timestamps to 0
...
Mainly affects ResolveTime which can be 0 before its settled.
2021-03-03 16:26:43 -08:00
Conner Fromknecht
da049ebcf7
channeldb: ensure invoices can't be added with HTLCs
2021-03-03 16:26:43 -08:00
Conner Fromknecht
b2234703f6
invoices+channeldb: add HTLCSet method to invoice
2021-03-03 16:26:43 -08:00
Conner Fromknecht
7f05c9d3bb
channeldb/invoice: persist optional AMP fields on InvoiceHTLC
2021-03-03 16:26:43 -08:00
Conner Fromknecht
464dff09ac
invoices: expose AMPRecord() method on Payload
2021-03-03 16:26:39 -08:00
Conner Fromknecht
c9ed5927f6
Merge pull request #5038 from cfromknecht/debug-unit
...
make: add unit-debug target
2021-02-19 14:01:31 -08:00
Conner Fromknecht
17489ba6a3
lntest/itest: add websocket close to error whitelist
2021-02-18 12:14:50 -08:00
Conner Fromknecht
250bc8560e
routing: avoid modifying AssumeChannelValid in unit tests
...
This produces a race condition when reading AssumeChannelValid from a
different goroutine. Instead we isolate the test cases and initial
AssumeChannelValid properly.
2021-02-17 22:43:24 -08:00
Conner Fromknecht
f7c5236bf6
routing: dial back max concurrent block fetches
...
This commit reduces the number of concurrent validation operations the
router will perform when fully validating the channel graph. Reports
from several users indicate that GetInfo would hang for several minutes,
which is believed to be caused by attempting to validate massive amounts
of channels in parallel. This commit returns the limit back to its
original state before adding the batched gossip improvements.
We keep the 1000 concurrent validation request limit for
AssumeChannelValid, since we don't fetch blocks in that case. This
allows us to still keep the performance benefits on mobile/low-resource
devices.
2021-02-17 18:17:09 -08:00
Conner Fromknecht
1c75d92929
Merge pull request #5037 from guggero/make-docker-release
...
release: fix golang version issue in docker-release and shasum issue in verification script
2021-02-17 10:45:47 -08:00
Conner Fromknecht
7f9dcc143f
make: add unit-debug target
2021-02-17 08:47:59 -08:00
Conner Fromknecht
db5af6fc14
Merge pull request #5017 from Roasbeef/default-max-parts
...
routing: if MaxShardAmt is set, then use that as a ceiling for our splits, use default of 16 for MaxParts
2021-02-16 09:43:34 -08:00
Conner Fromknecht
8c06eb57c5
Merge pull request #5026 from cfromknecht/init-mock-fee-estimator
...
htlcswitch: init mockFeeEstimator in other LinkChannelConfigs
2021-02-15 13:03:02 -08:00
Conner Fromknecht
4fcc82251e
Merge pull request #5016 from cfromknecht/extract-channel-whitelist
...
lntest: update error log whitelist
2021-02-15 12:50:33 -08:00
Conner Fromknecht
fd3dd2cfff
Merge pull request #5023 from cfromknecht/min-required-sigs-five
...
scripts/verify-install: require 5 of 7 signatures before accepting
2021-02-15 12:17:36 -08:00
Conner Fromknecht
774d29d890
htlcswitch: init mockFeeEstimator in other LinkChannelConfigs
...
If the tests don't execute quick enough, the link will try to sample the
network fee and cause a panic. This happens semi-regularly on travis.
2021-02-15 12:14:32 -08:00
Conner Fromknecht
95eadfee2f
scripts/verify-install.sh: combine final SUCCESS logs
2021-02-15 10:00:42 -08:00
Conner Fromknecht
c03f95a63b
scripts/verify-install: bump min required signatures to 5
2021-02-15 09:59:59 -08:00
Conner Fromknecht
12182d0fc9
Merge pull request #5019 from guggero/detach-sign
...
release: create and verify detached signatures, fix hashing command on MacOS
2021-02-15 09:48:17 -08:00
Conner Fromknecht
4a96c2e55a
Merge pull request #5021 from guggero/custom-binary-verify
...
scripts: allow verification of custom binary
2021-02-12 12:04:49 -08:00
Conner Fromknecht
32507bc835
Merge pull request #5020 from guggero/expand-path
...
config: clean and expand backup file path
2021-02-12 09:19:39 -08:00
Conner Fromknecht
91a3350dd1
lntest: add Block height out of range to whitelist
2021-02-11 17:51:07 -08:00
Conner Fromknecht
cc34af4e57
lntest: add unable to extract ChannelUpdate to whitelist
2021-02-11 17:48:41 -08:00
Conner Fromknecht
76e0388368
Merge pull request #5013 from lightningnetwork/release-pin-go-version
...
github/workflows: pin exact docker release
2021-02-11 17:24:07 -08:00
Conner Fromknecht
a6b977e760
github/workflows: pin exact docker release
2021-02-11 16:05:32 -08:00
Conner Fromknecht
1ee5eb97d5
Merge pull request #5006 from wpaulino/new-rate-limit-chan-updates
...
discovery: use token bucket based rate limiting to throttle gossip
2021-02-10 17:31:41 -08:00
Conner Fromknecht
5afc6b9284
Merge pull request #4945 from cfromknecht/no-graph-sync
...
discovery: no graph sync
2021-02-10 17:07:24 -08:00
Conner Fromknecht
58e924ad1c
discovery: don't historical sync when NumActiveSyncers == 0
...
Currently when numgraphsyncpeers=0, lnd will still attempt to perform
an initial historical sync. We change this behavior here to forgoe
historical sync entirely when numgraphsyncpeers is zero, since the
routing table isn't being updated anyway while the node is active.
This permits a no-graph lnd mode where no syncing occurs at all.
2021-02-10 09:35:45 -08:00
Conner Fromknecht
a5aeca8ca2
Merge pull request #4983 from guggero/vendor-reproducible
...
make: clean mobile stubs before building release
2021-02-07 05:49:48 -08:00
Conner Fromknecht
2d9a030ae5
Merge pull request #4915 from Crypt-iQ/revsigbool_01132021
...
multi: store bool to determine retransmission ordering
2021-02-03 19:51:26 -08:00
Conner Fromknecht
7f006832fb
Merge pull request #4934 from cfromknecht/pinned-active-syncers
...
discovery: pinned syncers
2021-02-03 10:54:00 -08:00
Conner Fromknecht
814b81bd25
Merge pull request #4902 from Crypt-iQ/lntestchannels_01072021
...
lntest/channels: introduce subpackage to deduplicate static structs
2021-02-01 14:12:08 -08:00
Conner Fromknecht
ff9165070a
Merge pull request #4974 from bolatovumar/fix/typo-manged
...
Fix typo in restorechanbackup command description
2021-02-01 10:22:39 -08:00
Conner Fromknecht
faddf98391
gen_protos_docker: make image build non-quiet
...
This allows users to see progress whenever the docker image is
[re]built, and (esp on non-linux hosts) track the size of the build
context being uploaded. Currently no output is displayed, so it's hard
to attribute the source of latency, e.g. network latency, building
layers, a large work directory, etc.
2021-02-01 10:11:09 -08:00
Conner Fromknecht
bd1c5378bf
Merge pull request #4919 from joostjager/getnodeinfo-notfound
...
rpcserver: use NotFound http status code in GetNodeInfo
2021-01-31 09:43:33 -08:00
Conner Fromknecht
227fd45da2
lntest: fix linter errors
2021-01-29 01:37:37 -08:00
Conner Fromknecht
b1fee734ec
discovery/sync_manager: remove unneeded markGraphSyncing
...
AFAICT it's not possible to flip back from bein synced_to_chain, so we
remove the underlying call that could reflect this. The method is moved
into the test file since it's still used to test correctness of other
portions of the flow.
2021-01-29 00:19:48 -08:00
Conner Fromknecht
e42301dee2
lntest: call markGraphSynced from gossipSyncer
...
Rather than performing this call in the SyncManager, we give each
gossipSyncer the ability to mark the first sync completed. This permits
pinned syncers to contribute towards the rpc-level synced_to_graph
value, allowing the value to be true after the first pinned syncer or
regular syncer complets. Unlinke regular syncers, pinned syncers can
proceed in parallel possibly decreasing the waiting time if consumers
rely on this field before proceeding to load their application.
2021-01-29 00:19:48 -08:00
Conner Fromknecht
920eda26fc
lntest/graph_top: test pinned syncers
2021-01-29 00:19:48 -08:00
Conner Fromknecht
ba67f3ecaa
lntest/graph_top: remove dependence on net.Alice/Bob
2021-01-29 00:19:47 -08:00
Conner Fromknecht
fcd5cb625a
config: expose gossip.pinned-syncers for conf
...
The pinned syncer set is exposed as a comma-separated list of pubkeys.
2021-01-29 00:19:47 -08:00
Conner Fromknecht
2371fc5a8e
lnrpc: expose PINNED_SYNC for listpeers
2021-01-29 00:19:47 -08:00
Conner Fromknecht
340414356d
discovery: perform initial historical sync for pinned peers
2021-01-29 00:19:47 -08:00
Conner Fromknecht
2f0d56d539
discovery: add support for PinnedSyncers
...
A pinned syncer is an ActiveSyncer that is configured to always remain
active for the lifetime of the connection. Pinned syncers do not count
towards the total NumActiveSyncer count, which are rotated periodically.
This features allows nodes to more tightly synchronize their routing
tables by ensuring they are always receiving gossip from distinguished
subset of peers.
2021-01-29 00:19:47 -08:00
Conner Fromknecht
9e932f2a64
discovery/sync_manager: Pause/Resume HistoricalSyncTicker
...
This gives each initial historical syncer an equal amount of time before
being rotated, even if some fail.
2021-01-29 00:19:47 -08:00
Conner Fromknecht
ef0cd82c1f
discovery/sync_manager: make setHistoricalSyncer closure
2021-01-29 00:19:46 -08:00
Conner Fromknecht
72fbd1283b
discovery/sync_manager: break out IsGraphSynced check
2021-01-29 00:19:46 -08:00
Conner Fromknecht
7c6aa20bd8
discovery: handle err for linter
2021-01-29 00:19:46 -08:00
Conner Fromknecht
626e732f9b
Merge pull request #4956 from joostjager/htlc-attempt-id
...
lnrpc: add htlc attempt id
2021-01-27 17:01:08 -08:00
Conner Fromknecht
85f4d2b188
Merge pull request #4962 from halseth/halseth-gpg-key
...
scripts: add halseth key to verify script
2021-01-27 16:29:34 -08:00
Conner Fromknecht
02aa540b04
Merge pull request #4958 from halseth/netann-unknown-update
...
netann: ignore unknown channel update on startup
2021-01-27 16:27:15 -08:00
Conner Fromknecht
0ef04a749f
amp/derivation_test: add tests
2021-01-26 12:43:09 -08:00
Conner Fromknecht
cb47d0c825
amp/sharer: add recursive sharing logic
2021-01-26 12:43:09 -08:00
Conner Fromknecht
0144bdb241
amp/child: add Child deriviation
2021-01-26 12:43:08 -08:00
Conner Fromknecht
f79056e30e
Merge pull request #4920 from cfromknecht/update-rpc-feature-bits
...
lnrpc: add missing features to FeatureBit enum
2021-01-19 11:57:36 -08:00
Conner Fromknecht
1d71a2b55d
Merge pull request #4908 from halseth/anchors-reserve-utxo
...
[anchors] Reserve wallet balance for anchor fee bumping
2021-01-19 11:57:07 -08:00
Conner Fromknecht
6d437117b4
lnrpc: add missing features to FeatureBit enum
...
- WumboChannels
- Anchors
- AnchorsZeroFeeHtlc
2021-01-15 15:23:53 -08:00
Conner Fromknecht
e0e57642b6
wtclient/client: fix missed prefix log
2021-01-04 08:33:34 -08:00
Conner Fromknecht
1d3535582b
wtclient/seseion_queue: add prefix logging
2021-01-04 08:32:34 -08:00
Conner Fromknecht
de09b8d9bd
wtclient/session_negotiator: add prefix logging
2021-01-04 08:32:34 -08:00
Conner Fromknecht
505901d7b8
wtclient/task_pipeline: add prefix logging
2021-01-04 08:32:31 -08:00
Conner Fromknecht
4af24158c4
Merge pull request #4779 from halseth/anchor-htlc-aggregation
...
[anchors] HTLC second level aggregation in the sweeper
2020-12-11 16:22:17 -08:00
Conner Fromknecht
c2c520e431
make: pass dev tag to go-acc
...
Previously we were excluding non-dev test files from our coverage
report, which included interface_test.go as well as the bitcoindnotify
and btcdnotify dev tests.
2020-12-10 22:09:31 -08:00
Conner Fromknecht
ea8d02eb68
chainntnfs/test: parallelize iface tests by backend
2020-12-10 20:56:10 -08:00
Conner Fromknecht
24da512d1e
actions: update to GO_VERSION 1.15.6
2020-12-10 20:41:57 -08:00
Conner Fromknecht
d870bb5002
Merge pull request #4804 from wpaulino/proper-gossip-query-reply-chunk-splitting
...
discovery: adhere to proper channel chunk splitting for ReplyChannelRange
2020-12-10 18:10:07 -08:00
Conner Fromknecht
0d57ff2432
lnwallet/test: execute ifacet tests for each backend in parallel
2020-12-10 17:42:26 -08:00
Conner Fromknecht
87787ce771
lnwallet: move interface_test.go to it's own package
2020-12-10 17:42:26 -08:00
Conner Fromknecht
1483ed119b
make: use low-scrypt to speed up unit-race
...
This predominately affects the lnwallet unit tests which are the bulk of
the execution time.
2020-12-10 17:42:26 -08:00
Conner Fromknecht
08ee754a6d
channeldb/db: properly reinit wallet during Wipe
...
Previously we wouldn't recreate some of the top level buckets that are
now considered expected with our migration logic. This bug was
preexisting, but never surfaced because the other TLB buckets were not
touched by this unit test.
2020-12-10 17:37:58 -08:00
Conner Fromknecht
6152d013b9
Merge pull request #4842 from cfromknecht/update-btcwallet-dep
...
mod: update to btcwallet master
2020-12-09 15:45:02 -08:00
Conner Fromknecht
745ea9b70e
Merge pull request #4843 from cfromknecht/check-each-commit
...
build: check compilation of each commit
2020-12-09 13:52:49 -08:00
Conner Fromknecht
96118c7852
dep: update to btcwallet master
2020-12-09 13:30:18 -08:00
Conner Fromknecht
dce4d2abcd
build: check compilation of each commit
...
Inspired by Rust Lightning's GH action :)
2020-12-08 16:19:26 -08:00
Conner Fromknecht
2f38a7ce9c
itest: increase recovery payment amount so htlc isn't dust
2020-12-08 14:55:40 -08:00
Conner Fromknecht
592a0c5699
Merge pull request #4825 from guggero/itest-suspicion
...
itest: adjust parallelization, poll intervals and timeouts to not starve goroutines
2020-12-08 13:28:45 -08:00
Conner Fromknecht
ebb83bc0a0
Merge pull request #4830 from yyforyongyu/small-code-fix
...
multi: small code fix
2020-12-08 12:28:29 -08:00
Conner Fromknecht
b017ab67c4
rpcserver: replace sweep_all in log with send_all to match rpc arg
2020-12-07 13:45:11 -08:00
Conner Fromknecht
125dbbf0da
Merge pull request #4823 from cfromknecht/fwd-interceptor-fixes
...
itest: fwd interceptor fixes
2020-12-04 16:36:14 -08:00
Conner Fromknecht
26da2b2c9e
Merge pull request #4827 from halseth/link-test-timeouts
...
[test] Increase link test timeouts
2020-12-04 02:34:34 -08:00