1492 Commits

Author SHA1 Message Date
jp1ac4
a997a7bcff
gui: don't rely on cookie to check successful start 2024-03-11 11:35:12 +00:00
jp1ac4
5e5c3330ee
gui: use rpcauth in installer for internal bitcoind 2024-03-11 11:35:12 +00:00
jp1ac4
7584b6347b
gui: start internal bitcoind with given config
This will allow bitcoind to start also in case of using rpcauth.

The cookie file is canonicalized in the installer beforehand
instead.

There is now no need for the config parameter to be mutable.
2024-03-11 11:35:12 +00:00
jp1ac4
b5980fbc4f
gui: add sections check to internal bitcoind config test 2024-03-11 11:35:11 +00:00
jp1ac4
c3aad0f40c
gui: add optional rpcauth to internal bitcoind config
With the updated liana dependency, we also need to pass `None` to
`list_spend_txs`.
2024-03-11 11:35:11 +00:00
jp1ac4
e172ecd2f1
gui: move internal bitcoind config to bitcoind module
As part of this change, the struct fields were made public.
2024-03-11 11:17:18 +00:00
Antoine Poinsot
16afa3e992
Merge #987: lib: expose random module
daf60264d16a554f8877f28e11b5df6eab33d324 lib: expose random module (jp1ac4)

Pull request description:

  This is motivated by #929. The GUI will need to generate a salt and password for RPC user/password authentication to the managed bitcoind, and can use this module to get random bytes.

ACKs for top commit:
  darosior:
    utACK daf60264d16a554f8877f28e11b5df6eab33d324

Tree-SHA512: a6ba822bffc6f3d2e5c96be986cb5f1024640b5e71b3bb8a611080e5bcc734b25281fbc52cc1eb15f89d7c72cac8495c163a630758f66ac7e72410ecb7be34cb
2024-03-09 20:00:40 +01:00
Antoine Poinsot
147cc0b983
Merge #963: commands: increment address index if current value used for new spend
bfd6ca517b1811a888f83f14d3f6900c590dc3c1 commands: increment receive index on each use (jp1ac4)
cc5e396ace8b24e7e65bc356655463a690a25091 commands: increment change index on each use (jp1ac4)
c88224ca715ccfdc6530362b960dddd54ff64610 testutils: fix change_index (jp1ac4)

Pull request description:

  This is a fix to ensure the change index in the database is incremented if a new spend is created with a change address derived from the current index, regardless of whether this new spend is broadcast or not.

  EDIT: The same fix has been applied to the receive index.

ACKs for top commit:
  darosior:
    re-ACK bfd6ca517b1811a888f83f14d3f6900c590dc3c1

Tree-SHA512: 66f88fe95f4fb518cd93cde12787f74b6db61e6a2ad6ae27ee4f134ac039df6ce03243afde321412486c435641122ddc27baace2a15a167d3bfe20e17be22597
2024-03-09 19:40:27 +01:00
jp1ac4
bfd6ca517b
commands: increment receive index on each use
This is a similar fix as for the change index.
2024-03-09 19:15:30 +01:00
jp1ac4
cc5e396ace
commands: increment change index on each use
This is a fix to ensure the change index in the database is
incremented if a new spend is created with a change
address derived from the current index, regardless of whether
this new spend is broadcast or not.
2024-03-09 19:15:28 +01:00
jp1ac4
c88224ca71
testutils: fix change_index 2024-03-09 19:08:58 +01:00
Antoine Poinsot
f19e872814
Merge #958: database: convert CoinStatus to listcoins argument string
fa39e2ced460918d6c6c94c0e2b7dae19b612fa9 database: convert `CoinStatus` to `listcoins` argument string (jp1ac4)

Pull request description:

  This is a preliminary PR towards https://github.com/wizardsardine/liana/issues/677 and is the counterpart to the existing `CoinStatus::from_arg()` method.

  This is needed so that the GUI can pass the required string arguments to the `listcoins` RPC command when using an external Liana daemon.

ACKs for top commit:
  edouardparis:
    ACK fa39e2ced460918d6c6c94c0e2b7dae19b612fa9

Tree-SHA512: e555739e641e4be66ce4942e8294606ab001572395ed73a6c40fa2af38f076357a7c3acba4e4d756fb6d334a11107827a95c53d3f3aecfe32ceca80fc85af83a
2024-03-09 19:06:01 +01:00
Antoine Poinsot
cf299b997b
Merge #957: Get genesis timestamp from bitcoind
f2c418f79a6fe8f1d6138b12af9fdc7303b4725d get genesis timestamp from bitcoind (pythcoiner)

Pull request description:

  fixes #904

ACKs for top commit:
  jp1ac4:
    ACK f2c418f79a.

Tree-SHA512: 7b1b7c13c21b657109ab0aab0d89deb47f5f6693f95687b86c219fc109ee304c38e3ebe865d071ebbbfa890a6a754c615f5dd70f2fe8c492bdea35d0394f36eb
2024-03-09 19:04:00 +01:00
Antoine Poinsot
1819988b3f
Merge #921: Add optional txids param to listspendtxs
da1ebce5b6328f8f5636192e7434d1ba598d5516 add txids param to listspendtxs (pythcoiner)

Pull request description:

  fix #862
  - [x] daemon
  - [x] tests
  - [x] doc

ACKs for top commit:
  jp1ac4:
    ACK da1ebce5b6.

Tree-SHA512: 9696a8077bce2ba8f2abc9eda6a4cdc8654c83ffd61bc5b8419ca50e5ecc447dc78d2059e608c16e94306c27f2aaf21a77c879d21a54f24a049337545750cef7
2024-03-09 18:55:01 +01:00
Antoine Poinsot
1fe5acb673
Merge #873: commands: include unconfirmed change as coin selection candidates
c0d432057df6b2f0bc879f718489c761867fa88c spend: add warning about fee for ancestor (jp1ac4)
a38c1739b6d6bdc5944e2300f1cdf9121babf7d1 spend: return additional fee paid for ancestors (jp1ac4)
62bb4aded43a379bcf5607fd48c492fcfb84bfd5 commands: include unconfirmed change as candidates (jp1ac4)
b05b0f14e5e08ab32e78ea263531d8a587c5b184 commands: add ancestor info for user-selected unconfirmed coins (jp1ac4)
94ef66c03a17221cc9cddb8d1d463a46f0b489c9 spend: increase candidate weight to pay for ancestor (jp1ac4)
5f0022083df8354ceb03d79311317e378296629d bitcoin: add mempool_entry to interface (jp1ac4)
edbf00f17c3796dc326bfbe6ae8833c201bdc045 bitcoin: add ancestor size and fees to mempool entry (jp1ac4)
04503225bcd066dd7d4099997c56b836c29d5b31 func test: use utils function (jp1ac4)

Pull request description:

  This is a first PR towards resolving #826 that adds unconfirmed change as coin selection candidates when creating a spend.

  As per https://github.com/wizardsardine/liana/issues/826#issuecomment-1853058734, I haven't made any changes to the `rbfpsbt` command.

  We will also need to apply the same change in the GUI when selecting candidates for coin selection there (see https://github.com/wizardsardine/liana/pull/863#discussion_r1422823362).

ACKs for top commit:
  darosior:
    ACK c0d4320

Tree-SHA512: 8c17f5f8c32913f1ffae3a93ca3e8ee52ac40ee86790e41d73def5ed0c057e110e101797f778715fcd5f6bded1cd170618209323b5114a4f69c02d0ce066a2f2
2024-03-09 18:48:54 +01:00
jp1ac4
fa39e2ced4
database: convert CoinStatus to listcoins argument string 2024-03-08 08:16:04 +00:00
edouardparis
f5a15513f2
Merge #997: gui: add transaction redirection
0c1a1b8d6d6ead20fdb1af659cace229f814d9fb gui: add redirection to selected transaction panel (edouardparis)

Pull request description:

  based on #959
  This PR removes the payment section about the transaction inputs outputs for a redirection to the payment transaction (The `See transaction details` button). It makes it easy to fee bump a payment by clicking on it to be redirected to the transaction to rbf

  ![20240305_18h13m51s_grim](https://github.com/wizardsardine/liana/assets/6933020/bbb21e84-9fb6-4eed-ba93-2c4f6177cb95)

  Maybe the UX/UI of the payment should be changed to remove more transaction information, but I fear it makes the panel a little bit empty.

ACKs for top commit:
  jp1ac4:
    ACK 0c1a1b8d6d.

Tree-SHA512: f767b1cbf86cafcd0b46e5dfc0625f15719b48314de93418b73e59bd32e6dc659ab2ea3a4e2d379680c4209bfbd633c5329fe9fa2616c042dd2851f62f860498
2024-03-07 17:59:21 +01:00
edouardparis
0c1a1b8d6d gui: add redirection to selected transaction panel 2024-03-06 16:37:11 +01:00
edouardparis
505b218618
Merge #959: Refac app: keep every panel states
18e040e51ff835f5f6c8218392496865b6f8737a fix: override unpaginated pending events and txs (edouardparis)
2995df870f711966d7d275f67de70719dd1498ce fix psbts panel: keep list of psbts in background (edouardparis)
a6832ad0b7a881889e26c10c65f4d0ecd6e8c098 fix send panel: reload coins (edouardparis)
710883b6a2467e4c8fab9b2382e8227b602dfa42 Restart spend process according to current state (edouardparis)
a91fdd791aedc997e4b43e23db8af8c5382cab17 Encapsulate cache with its own message (edouardparis)
dc3d29e3f06b7cb2aa0d502edd6f7fcf0aadf458 Remove spend_txs from cache (edouardparis)
2d2cd12bda47feff6faa01cb5a1338d7f0f9f7a0 Restart new spending process on user demand (edouardparis)
ed363963b34235d49291a0da7719fd655ff7a8dc Change state load method for reload (edouardparis)
c15424abe5a3255b63d45903f14b1044af859e6a fix clippy (edouardparis)
fa4483a4b71ceb17463e89a27d1337c3cfc4d20d gui: add reload cycle to reset state (edouardparis)
c268c3a093594b76d424d935840c8c5ef6c83482 gui: load receive panel only once (edouardparis)
9b4b6fef1bee12e3e370a34c9d9c30eb437bf404 gui: refac app, keep all states (edouardparis)

Pull request description:

  This refac keeps each panel state in parallel.

ACKs for top commit:
  jp1ac4:
    ACK 18e040e51f.

Tree-SHA512: 87937a5e7cf315325e06aeda0789024a68cfb2c137cd1319445e670fa2641775a6d58cbc787271f2b73d43ff5b83e934f0561a4968afd05f8f52cff85e81a27e
2024-03-06 16:15:05 +01:00
edouardparis
18e040e51f fix: override unpaginated pending events and txs
pending events and txs are passed unpaginated and
in full list through PendingTransactions and PendingPayments.
It is useless and armful to append to them to an existing
list of pending events as a new rbf replacement event should
override the previous one and only one of them must be displayed.
2024-03-06 15:32:06 +01:00
edouardparis
2995df870f fix psbts panel: keep list of psbts in background
fix this comment:
https://github.com/wizardsardine/liana/pull/959#issuecomment-1964811858

new_preselected is changed for a preselect method that keeps the
current state of the psbts list panel and open the modal with the
selected psbt.
2024-03-06 15:32:06 +01:00
edouardparis
a6832ad0b7 fix send panel: reload coins
When going back to send panel, coins are fetched
again and passed to DefineSpendStep. A redraft
is triggered because some coins may have been
removed from the list and new coins were deposited.
2024-03-06 15:32:06 +01:00
edouardparis
710883b6a2 Restart spend process according to current state
Spend process keeps its state if it is the first step.
User can click on Clear to reset if he wants.
2024-03-06 15:32:06 +01:00
edouardparis
a91fdd791a Encapsulate cache with its own message 2024-03-05 11:32:10 +01:00
edouardparis
dc3d29e3f0 Remove spend_txs from cache 2024-03-05 11:32:10 +01:00
edouardparis
2d2cd12bda Restart new spending process on user demand 2024-03-05 11:32:10 +01:00
edouardparis
ed363963b3 Change state load method for reload 2024-03-05 11:32:10 +01:00
edouardparis
c15424abe5 fix clippy 2024-03-05 11:32:10 +01:00
edouardparis
fa4483a4b7 gui: add reload cycle to reset state
When user clicks on the sidebar menu
of the current panel, he expects the
view to reset to its initial state
without modal of transaction detail
for example.
2024-03-05 11:32:10 +01:00
edouardparis
c268c3a093 gui: load receive panel only once 2024-03-05 11:32:10 +01:00
edouardparis
9b4b6fef1b gui: refac app, keep all states 2024-03-05 11:32:10 +01:00
edouardparis
3420c54793
Merge #974: gui: add max button for spend recipients
46cd0f4923c5fe59a5ff08134c850d9a9ceb345a gui: add max checkbox for spend recipients (jp1ac4)
83fa9a9c924bb1326b859f1d2d5aac58c291e960 gui: unset amount left to select if form invalid (jp1ac4)
fba77a30e2aa9984cbda0fdaf40736ff1b0e57c4 gui: check if feerate is already set (jp1ac4)
d9b8285fac1288e895d4b460646f73c664d1a2ff gui: fix cargo fmt (jp1ac4)

Pull request description:

  This adds the MAX button from #546.

  The max amount is calculated within the `redraft` function based on the change output. The recipient's amount is updated directly within this same function in order to avoid another call to `redraft` after updating the amount.

  The MAX button only takes effect once when the user clicks it. If further changes are made (e.g. to feerate or other recipients), the value will not update and the user will need to click MAX again.

  Currently, the MAX button is always clickable. It would be possible to determine for each recipient whether the MAX button should be clickable for that recipient (feerate is valid and all other recipients are valid and no duplicates), but it's not a trivial change so I'm not sure if it's worth doing as I think the behaviour is quite intuitive.

ACKs for top commit:
  edouardparis:
    ACK 46cd0f4923c5fe59a5ff08134c850d9a9ceb345a

Tree-SHA512: 16f22804d630686427da196fd1627287e2e20f2e122602c385157064323113b27b9ec9c56ada162acb55d11b8084667ee3f1a9f992a2f4eef70f25c6f7a5b20b
2024-03-04 16:20:57 +01:00
jp1ac4
46cd0f4923
gui: add max checkbox for spend recipients 2024-03-04 14:55:37 +00:00
jp1ac4
83fa9a9c92
gui: unset amount left to select if form invalid 2024-03-01 11:11:23 +00:00
jp1ac4
fba77a30e2
gui: check if feerate is already set 2024-03-01 11:11:23 +00:00
jp1ac4
d9b8285fac
gui: fix cargo fmt 2024-03-01 11:11:22 +00:00
jp1ac4
daf60264d1
lib: expose random module
This is motivated by the GUI needing to generate a salt and
password for RPC user/password authentication to the
managed bitcoind.
2024-02-28 19:18:45 +00:00
edouardparis
7801fc779c
Merge #940: gui(spend): display warnings for draft PSBTs
85f5a68ed3b9bfee1488fceddb8a78321d1583a2 gui(spend): display warnings for draft PSBTs (jp1ac4)

Pull request description:

  This is to complete #811.

  It displays any warnings generated by `createspend` on the draft PSBT view, which could currently be those from https://github.com/wizardsardine/liana/pull/905 and https://github.com/wizardsardine/liana/pull/873. Once the PSBT has been saved, these warnings will no longer be shown.

  Below are some screenshots.

  With a warning:
  ![image](https://github.com/wizardsardine/liana/assets/121959000/fb2167d9-4800-4849-8622-ff20ac55623e)

  ![image](https://github.com/wizardsardine/liana/assets/121959000/e1ab9ec2-00ae-457f-81e1-9b3a2863af31)

  Without a warning:
  ![image](https://github.com/wizardsardine/liana/assets/121959000/73b5b4bd-55b5-40ee-b587-4f57bfd57b4c)

  ![image](https://github.com/wizardsardine/liana/assets/121959000/e9b23d4e-bb13-4ae7-944e-258f9c9a0abd)

ACKs for top commit:
  edouardparis:
    ACK 85f5a68ed3b9bfee1488fceddb8a78321d1583a2

Tree-SHA512: b9875801f7607f6f824ad9ab5182e93aa533ba2bbb8f9a4168c4a2a779a8f39cf77dc0b24eac7c99a0fce36c486c126144d23b0cb7ecec27ebc145ea2ffdb212
2024-02-27 17:25:28 +01:00
jp1ac4
85f5a68ed3
gui(spend): display warnings for draft PSBTs 2024-02-27 14:55:17 +00:00
Antoine Poinsot
4baf632a90
Merge #972: ci: bump bitcoind version in functional tests to 26.0
bdf8b8f625030697ca58680fd0c99c3dd3bf77af Rename IS_BITCOIND_25 to IS_NOT_BITCOIND_26 (Antoine Poinsot)
0acdccd3ac7855ebf6c519849d1ae48b35213667 ci: bump bitcoind version in functional tests to 26.0 (Antoine Poinsot)

Pull request description:

  I thought there was some hacks i do in the functional tests i needed to update but apparently i was mistaken.

ACKs for top commit:
  darosior:
    self-ACK bdf8b8f625030697ca58680fd0c99c3dd3bf77af - ran ci one last time and didn't notice any flakiness

Tree-SHA512: 0ffb6026d43ef0670e83feb19d733089e4b023937ac7851ffe2eda9b1491cd432e4abde9afb8386c66b4f2ae57506f5e25ea797d84d37fa055a43df64c5b77b0
2024-02-27 14:24:26 +01:00
Antoine Poinsot
0f35a88a94
Merge #984: descriptors: fix derived key parsing and formatting
e9bd8805e5917b05c483db5ba6b7ff34d98dc36d descriptors: fix derived key parsing and formatting (Antoine Poinsot)

Pull request description:

  This was untested, what could go wrong? Well, it was wrong of course!

ACKs for top commit:
  darosior:
    self-ACK e9bd8805e5917b05c483db5ba6b7ff34d98dc36d

Tree-SHA512: 87fb1c84d5b03e59970183882dd63020687011eb5d08e1e31bad04609bdaef0c5a6bf0b5e63be3f2248dd35249cde7d43c83b7c19415cde31bd0a08ec46315be
2024-02-27 14:19:49 +01:00
Antoine Poinsot
bdf8b8f625
Rename IS_BITCOIND_25 to IS_NOT_BITCOIND_26
for f in ; do sed -i 's/IS_BITCOIND_25/IS_NOT_BITCOIND_24/g' tests/test_misc.py; done
2024-02-27 14:18:04 +01:00
Antoine Poinsot
e9bd8805e5
descriptors: fix derived key parsing and formatting 2024-02-27 13:03:11 +01:00
pythcoiner
da1ebce5b6 add txids param to listspendtxs 2024-02-24 21:56:48 +01:00
Antoine Poinsot
0acdccd3ac
ci: bump bitcoind version in functional tests to 26.0 2024-02-22 16:52:04 +01:00
edouardparis
903328ffef
Merge #971: gui: prevent spend with duplicate addresses
8639f9b94f1fdceaee94aa927e8f9b7b07cc51f9 gui: prevent spend with duplicate addresses (jp1ac4)

Pull request description:

  Currently, if duplicate addresses are entered when creating a new spend, the user can click Next and only the second amount will be used for the draft PSBT.

  This change prevents the user clicking Next if there are duplicate addresses and stops the `redraft` function running.

ACKs for top commit:
  edouardparis:
    ACK 8639f9b94f1fdceaee94aa927e8f9b7b07cc51f9

Tree-SHA512: f2110e49e07ec04deb8997fae987998dcfeacc41bec0c770a16fe555bde0b49b67c4cc14736fb7bbb5e536abb3d2ef1e847bbe5075be751b579728aac2a98a97
2024-02-22 14:26:37 +01:00
jp1ac4
8639f9b94f
gui: prevent spend with duplicate addresses
Previously, if duplicate addresses were entered when creating
a new spend, the user could click Next and only the second
amount would be used for the draft PSBT.

This prevents the user clicking Next if there are duplicate
addresses and stops the redraft function running.
2024-02-22 12:29:52 +00:00
edouardparis
c1e2d26c63
Merge #950: [GUI] Add index into qrcode
7483988c53ee6201438283eff496302b7e647176 add index into qrcode (pythcoiner)

Pull request description:

  fixes #838

ACKs for top commit:
  edouardparis:
    utACK 7483988c53ee6201438283eff496302b7e647176

Tree-SHA512: f33dd29f2857cab08c09eca03dcb208937b6b13da9e4ef811cbc4e8e4f6bbb73f1eee629736d98bf00bd9b65be5e96987c18ede42d20c9f486c5ec4e47ada275
2024-02-20 15:32:26 +01:00
pythcoiner
f2c418f79a get genesis timestamp from bitcoind 2024-02-11 01:59:49 +01:00
edouardparis
e92cbf34d7
Merge #966: gui: bump dependencies to fix nightly build
0c665f9c3ca3791fe2d1f9a70156b1d76fd2cea2 gui: bump dependencies to fix nightly build (jp1ac4)

Pull request description:

  This includes the changes from https://github.com/dalek-cryptography/curve25519-dalek/pull/619 and https://github.com/dalek-cryptography/curve25519-dalek/pull/621.

ACKs for top commit:
  edouardparis:
    utACK 0c665f9c3ca3791fe2d1f9a70156b1d76fd2cea2

Tree-SHA512: 414f65ff0d0b102ba43506042ebb3d4acbc67a019620a044d3be4d6b8c950e8c5d5d44fe722d38a0a445b1dc374f5e374b129d32cd66b5fed27cc2d53cc7f8e7
2024-02-09 11:31:49 +01:00