Commit Graph
15039 Commits
Author SHA1 Message Date
Slyghtning 47bcf7af69 funding: add all parameters to batch open channel 2023-07-26 09:49:22 +02:00
Slyghtning 6631741766 lnrpc: sync BatchOpenChannel and OpenChannel params 2023-07-26 09:49:20 +02:00
Olaoluwa Osuntokun 9ed064be75 Merge pull request #7516 from hieblmi/utxo-funding
funding: fund channel with selected utxos
2023-07-25 19:19:42 +02:00
Oliver Gugger 7fdb55bd30 Merge pull request #7827 from carlaKC/cleanup-invoicetests
invoices/test: Cleanup Invoice Registry Tests
2023-07-25 13:15:34 +02:00
Oliver Gugger 0e0e8d8631 Merge pull request #7854 from matheusdtech/itest-network-conn
itest: bind to local addr in network test
2023-07-25 09:20:40 +02:00
Carla Kirk-Cohen 4645fdfb0a invoice/test: make all tests parallel
When we have tests using global variables and a mix of parallel and
non-parallel tests, odd races can appear when we run them.
2023-07-24 10:54:03 -04:00
Carla Kirk-Cohen 94e434d2f1 invoices/test: move payment address required global into test using it 2023-07-24 10:54:02 -04:00
Carla Kirk-Cohen d080d07a22 invoices/test: remove duplicate test invoice amount global
We have testInvoiceAmt and testInvoiceAmount with the same value.
2023-07-24 10:54:01 -04:00
Carla Kirk-Cohen 40f695743a invoice/test: move payment address optional into test using it
No need for a global when this is only used once.
2023-07-24 10:54:00 -04:00
Carla Kirk-Cohen ceff879f37 invoices/test: replace global testInvoice with constructor
For our relatively "static" test invoice, add a simple constructor
using the globals defined, rather than having a global invoice which
risks being mutated.
2023-07-24 10:53:58 -04:00
Matheus Degiovani 13399e9e81 itest: bind to local addr in network test
This makes the test work even if the local OS has no outside network
connections available or if DNS lookups are failing.
2023-07-24 08:47:26 -03:00
Slyghtning 23467cbb66 docs: update release notes 2023-07-24 13:07:01 +02:00
Slyghtning 396cffcd70 itest: anchor reserve test for SendOutputs 2023-07-24 13:07:01 +02:00
Slyghtning baa1419187 chanfunding: fix typo 2023-07-24 13:07:01 +02:00
Slyghtning f0579cc509 lncli: add flag utxos for openchannel 2023-07-24 13:07:01 +02:00
Slyghtning e4f0e58214 lnd: handles selected outpoints in parseOpenChannelReq 2023-07-24 13:06:59 +02:00
Slyghtning d327c92188 lnwallet: adds selected Outpoints for funding 2023-07-24 12:10:54 +02:00
Slyghtning 50acd49283 lnrpc: adds field Outpoints to fund a selected set of coins 2023-07-24 12:10:54 +02:00
Slyghtning ac523f93ee chanfunding: adds ability to fund a selected set of coins 2023-07-24 12:10:53 +02:00
Oliver Gugger c3cd93c98a Merge pull request #7723 from morehouse/fuzz_zpay32_checksum
zpay32: improve fuzz tests
2023-07-19 16:58:44 +02:00
Matt Morehouse 9200abf96e zpay32: allow fuzzer to choose invoice net
We add a parameter to select which network will be used for the fuzz
tests, rather than hardcoding the network.
2023-07-19 09:04:26 -05:00
Matt Morehouse e5fcc57bbc docs: release note for #7723 2023-07-19 09:04:22 -05:00
Matt Morehouse bd7ec84497 zpay32: help fuzzer generate valid encodings
It is very difficult for the fuzzer to create a valid checksum for each
serialized invoice, and we were therefore unable to fuzz deeper than
invoice decoding. We can help the fuzzer generate valid serialized
invoices by calculating and appending the checksum ourselves.

We also switch to using mainnet invoices to make it easier to find valid
invoices for seeding the fuzzer. We prepend the required "lnbc" prefix
ourselves to further help the fuzzer generate valid invoices.
2023-07-19 09:04:18 -05:00
Matt Morehouse 82753f091b zpay32: use message signer from unit tests
The message signer from invoice_test.go is identical to the one created
in the fuzz test. We're already using the private key from
invoice_test.go, so we may as well use the complete message signer for
simplicity.
2023-07-19 09:04:13 -05:00
Matt Morehouse 4207be6e50 zpay32: remove unused method calls
The fuzz tests call inv.MinFinalCLTVExpiry() and inv.Expiry() supposedly
to ensure the invoice is well-formed. However, those methods can never
panic or return errors and therefore provide no benefit for this
purpose.
2023-07-19 09:04:03 -05:00
Oliver Gugger 0d2f2aa802 Merge pull request #6895 from ellemouton/towerHasUnackedUpdates
wtclient: replay pending and unacked updates
2023-07-19 12:19:49 +02:00
Elle Mouton 7bf07d8875 docs: add release note for 6895 2023-07-19 10:10:15 +02:00
Elle Mouton 3ea67983b5 wtclient: replay un-acked updates onto pipeline
In this commit, the bugs demonstrated in prior commits are fixed. In the
case where an session has persisted a CommittedUpdate and the tower is
being removed, the session will now replay that update on to the main
task pipeline so that it can be backed up using a different session.
2023-07-18 16:28:27 +02:00
Elle Mouton c432899bf9 watchtower: add DeleteCommittedUpdate DB method
Add a new DeleteCommittedUpdate method to the wtdb In preparation for an
upcoming commit that will replay committed updates from one session to
another.
2023-07-18 16:28:27 +02:00
Elle Mouton cfb81c00a6 wtclient: tower with unacked updates cant be removed after restart
This commit demonstrates that if a session has persisted committed
updates and the client is restarted _after_ these committed updates have
been persisted, then removing the tower will fail.
2023-07-18 16:28:27 +02:00
Elle Mouton af1506bff1 wtclient: demo "tower has unacked updates" bug
In this commit, we demonstrate the situation where a client has
persisted CommittedUpdates but has not yet recieved Acks for them from
the tower. If this happens and the client attempts to remove the tower,
it will with the "tower has unacked updates" error.
2023-07-18 16:28:26 +02:00
Elle Mouton 552ef4bf81 wtclient: replay pending tasks on sessionQueue stop
This commit does a few things:
- First, it gives the sessionQueue access to the TowerClient task
  pipeline so that it can replay backup tasks onto the pipeline on Stop.
- Given that the above is done, the ForceQuit functionality of the
  sessionQueue and TowerClient can be removed.
- The bug demonstrated in a prior commit is now fixed due to the above
  changes.
2023-07-18 16:28:26 +02:00
Elle Mouton 449d6b5500 wtclient: fix handleStaleTower comment 2023-07-18 14:27:14 +02:00
Elle Mouton 25c4d3f1f7 wtclient: make sessionQueueSet thread safe
In preparation for an upcoming commit where multiple threads will have
access to the TowerClient sessionQueueSet, we turn it into a thread safe
struct.
2023-07-18 14:27:04 +02:00
Elle Mouton c4fec3ebc9 wtclient: show that bound tasks are not replayed
This commit demonstrates a bug. It shows that if backup tasks have been
bound to a session with a tower (ie, the tasks are in the session's
pendingQueue) and then the tower is removed and a new one is added, then
the tasks from the pendingQueue are _not_ replayed to the session with
the new tower. Instead, they are silently lost. This will be fixed in an
upcoming commit.
2023-07-18 14:26:51 +02:00
Elle Mouton feb35e65d8 wtclient: show that a client can switch towers
This commit adds a new watchtower client test to demonstrate that a
client is able to successfully switch to a new tower and continue
backing up updates to that new tower.
2023-07-18 14:26:35 +02:00
Elle Mouton d8af5fcc92 wtclient: ensure that waitForUpdates has no race condition on timeout
Enforce that the fail timeout in `waitForUpdates` is greater than the
ping timeout.
2023-07-18 14:25:58 +02:00
Elle Mouton d979f59331 wtclient: move server specific methods to serverHarness 2023-07-18 14:15:46 +02:00
Elle Mouton 2ed5788de3 wtclient: separate server from testHarness
In this commit, a serverHarness is added to the test framework. This
will allow us to create more mock servers appart from the main server.
2023-07-18 14:15:26 +02:00
Oliver Gugger 2bb28f7aaf Merge pull request #7834 from bitcoincore-dev/1689267061/e8c11b989/ee55126b5-scripts/check-release-notes.sh
scripts/check-release-notes.sh: fix bash expression
2023-07-18 12:03:30 +02:00
Carla Kirk-Cohen 17f529bfad invoices/test: rename newInvoice to reflect return value better
Test utils currently have two different test invoices - a minimalist
one that is used in a variety of test cases, and a customizable one
that is used specifically for tests concerning invoice expiry. The
latter is renamed and moved closer to the calling code to more clearly
indicate its use.
2023-07-17 09:39:40 -04:00
Oliver Gugger bd3f570107 Merge pull request #7807 from lightningnetwork/dependabot/go_modules/google.golang.org/grpc-1.53.0
build(deps): bump google.golang.org/grpc from 1.41.0 to 1.53.0
2023-07-17 14:15:25 +02:00
Oliver Gugger cbb1d943b2 Merge pull request #7831 from bitcoincore-dev/1689264113/6e68c3b2b/afbc9c629-consistent-username
docs: Make MacOS user path consistent across docs
2023-07-17 14:12:22 +02:00
@RandyMcMillan 2b7c9019eb docs/grpc/java.md: use /Users/<username>/..
Make MacOS user path consistent across docs
2023-07-14 16:44:28 -04:00
@RandyMcMillan ed94a8f3b4 docs/INSTALL.md: use /Users/<username>/..
Make MacOS user path consistent across docs
2023-07-14 16:41:52 -04:00
@RandyMcMillan f2b3674b3a scripts/check-release-notes.sh: fix bash expression 2023-07-13 12:51:40 -04:00
Oliver Gugger a6fc5d0753 Merge pull request #7826 from carlaKC/race-testinvoice
invoices/test: fix data race in TestMppPaymentWithOverpayment
2023-07-13 17:32:27 +02:00
Carla Kirk-Cohen 590d898ba0 invoices/test: fix data race in TestMppPaymentWithOverpayment
Details of race:
- A global testInvoice is used in various invoice related tests.
- All tests are running with t.Parallel.
- TestMppPaymentWithOverpayment passes a reference to the testInvoice
  to AddInvoice which writes the AddIndex.
- TestMultipleSetHeightExpiry reads the testInvoice to make a copy.
2023-07-13 10:39:35 -04:00
Oliver Gugger e8c11b9898 Merge pull request #7783 from guggero/bump-tor-dependency-ipv6-fix
mod: bump tor submodule to v1.1.1
2023-07-13 11:05:20 +02:00
Oliver Gugger bc58dce176 docs: update release notes 2023-07-13 10:17:17 +02:00