1951 Commits

Author SHA1 Message Date
edouardparis
c2ce025a78
Merge #1376: Get timestamp of last completed poll of the blockchain
dee9554c518793b57b71965d835905300ef86fbc database: add `wallet()` method and use in `getinfo` command (Michael Mallan)
4694eaaef9f6650047ab5a527c8c7852a01ab7fe poller: don't poll now if blockchain syncing (Michael Mallan)
0f9f1f352c9bef22d7b21508d47daa77573b446c commands: return last poll timestamp from `getinfo` (Michael Mallan)
c6add0aeb1a0d16301a96745b560b94b31476d13 qa: add method to get lianad poll interval (Michael Mallan)
61e39f7d8623c288639122e295c26a0961687cb9 poller: store last poll timestamp (Michael Mallan)
e9fdcde995a57695769637228e503779c84a1aed database: get and set last poll timestamp (Michael Mallan)
a2b79f1b07bca86e955603ecb2f2489686ae901d sqlite: get and set last poll timestamp (Michael Mallan)

Pull request description:

  This is a first step towards #1373.

  The timestamp of the last completed poll of the blockchain will be stored in the database, and this value will be made available via the `getinfo` command.

ACKs for top commit:
  edouardparis:
    ACK dee9554c518793b57b71965d835905300ef86fbc

Tree-SHA512: 32706d516e9915d7320583b37990a5d907bb254905efbb0318c5eae4b27753800933d1b9e68bf43a0190c27d8a5d349f633c0e6e70ba21815ed6eed1648f0625
2024-10-24 15:38:07 +02:00
Michael Mallan
dee9554c51
database: add wallet() method and use in getinfo command
This allows us to get several values relating to the wallet
in one call.

The field names of the `Wallet` struct have been chosen to
match the corresponding DB interface methods.

Some sqlite methods will call `wallet()` instead of `db_wallet()`
to ensure consistency in output.
2024-10-24 11:27:56 +01:00
Michael Mallan
4694eaaef9
poller: don't poll now if blockchain syncing
If a user broadcasts a spend while the blockchain is syncing
(e.g. via liana-cli), we tell the poller to run now. However, if
the blockchain is still syncing, the blockchain height is likely
to increase before the poll completes and so the poller is likely
to restart multiple times.

Even if the poller doesn't restart multiple times, this change
makes the poller behaviour consistent with regard to a syncing
blockchain.
2024-10-24 11:24:32 +01:00
Michael Mallan
0f9f1f352c
commands: return last poll timestamp from getinfo 2024-10-24 11:24:31 +01:00
Michael Mallan
c6add0aeb1
qa: add method to get lianad poll interval 2024-10-24 11:24:27 +01:00
Michael Mallan
61e39f7d86
poller: store last poll timestamp 2024-10-24 11:24:25 +01:00
Michael Mallan
e9fdcde995
database: get and set last poll timestamp 2024-10-24 11:24:18 +01:00
edouardparis
c23320aaca
Merge #1394: electrum: use debug log level for sync messages
f9b7a25b40f7599c71e1e5be9bc03d9a25de7647 electrum: use debug log level for sync messages (Michael Mallan)

Pull request description:

  These sync messages appear typically every 30 seconds and are only useful for debugging purposes.

  The full scan messages can remain at info level for now as they are only expected to occur once for a new wallet and then only in case a rescan is performed.

ACKs for top commit:
  edouardparis:
    utACK f9b7a25b40f7599c71e1e5be9bc03d9a25de7647

Tree-SHA512: b0414489856b31825be9c3dac9be5422c136aed15540fcd39debeb06dc172a23742420aef2c887f1443e529db600fa453d920bf85c17f8da568ddeca6060911e
2024-10-23 13:35:26 +02:00
edouardparis
2d772d3b0c
Merge #1395: Fix lianalite resend token
e3ae1f369b32f5be542ce3df53cb652cc7be3b44 Use signWithOtp method instead of the resend endpoint (edouardparis)
2711e3443061bd2842c19a72ab8b78995b13fd97 fix clippy error redundant clone (edouardparis)

Pull request description:

  close https://github.com/wizardsardine/liana/issues/1385

ACKs for top commit:
  edouardparis:
    Self-ACK e3ae1f369b32f5be542ce3df53cb652cc7be3b44

Tree-SHA512: 12a6ee2ace8c44113e54ca821ff5e3b08236c4e2f272ea04c5eeb4eaddf496575029410c5050365fbda49200613a4385cb24905c8eb9073e76fe36d78eb4fa2a
2024-10-23 13:33:28 +02:00
edouardparis
e3ae1f369b Use signWithOtp method instead of the resend endpoint
close #1385
2024-10-23 12:53:43 +02:00
Michael Mallan
f9b7a25b40
electrum: use debug log level for sync messages
These sync messages appear typically every 30 seconds and are
only useful for debugging purposes.

The full scan messages can remain at info level for now as
they are only expected to occur once for a new wallet and then
only in case a rescan is performed.
2024-10-23 11:49:23 +01:00
edouardparis
2711e34430 fix clippy error redundant clone 2024-10-23 12:43:51 +02:00
edouardparis
1c8df3e1b1
Merge #1387: [GUI] Don't treat wallets using bitcoind as syncing
9208cd11b23a9d234cba008fff3a820bc9d3a702 gui: don't treat wallets using bitcoind as syncing (Michael Mallan)
f34bb1b79a524689400fac07f213857c7a0ebc93 gui: include node type in embedded daemon backend (Michael Mallan)

Pull request description:

  This is a follow-up to #1370.

  If the user has imported a descriptor and is using bitcoind as a local node, then they will need to perform a rescan in order
  to see past transactions. Treating the wallet as syncing in this case could mislead the user that a rescan is being performed. Therefore, it's better to keep the past behaviour here to avoid further confusion.

ACKs for top commit:
  edouardparis:
    ACK 9208cd11b23a9d234cba008fff3a820bc9d3a702

Tree-SHA512: fabb3289f01c68309cd511854b0ea249e5fa1279c736bfc61c3140ca3352dfc24a1be46c977ed21c528a67c3d1f0e16521d94aaa0ee1c17d8f9ed4f3403547d0
2024-10-22 10:35:07 +02:00
edouardparis
048be60f6a
Merge #1390: doc: fix broken link to Edouard PGP key
6e326e8e25c26a77cc66ddb0a9b526413c956f4f doc: fix broken link to Edouard PGP key (pythcoiner)

Pull request description:

  fixes #1374

ACKs for top commit:
  edouardparis:
    ACK 6e326e8e25c26a77cc66ddb0a9b526413c956f4f

Tree-SHA512: c591551871d899ea19986248ed55224a75345792cfad5c0baf17547dcd67e987df12bb0949cf3af3f87837ca423a0419f2aa5c3f4048a093c3438e4036ad9d2c
2024-10-22 09:40:13 +02:00
pythcoiner
6e326e8e25 doc: fix broken link to Edouard PGP key 2024-10-21 19:35:29 +02:00
Michael Mallan
9208cd11b2
gui: don't treat wallets using bitcoind as syncing
If the user has imported a descriptor and is using bitcoind as
a local node, then they will need to perform a rescan in order
to see past transactions.

Treating the wallet as syncing in this case could mislead the
user that a rescan is being performed. Therefore, it's better
to keep the past behaviour here to avoid further confusion.
2024-10-21 11:00:03 +01:00
Michael Mallan
f34bb1b79a
gui: include node type in embedded daemon backend
This is for convenience in case we need to know the node type
being used.

Although we expect there to always be a node type, it is kept as
`Option` to be consistent with the daemon config.
2024-10-21 11:00:01 +01:00
edouardparis
67c9262a30
Merge #1370: [GUI] Indicate wallet is syncing after completing installer
6f4eb79a5a45751a1c919565ea9c88f59fbda0ab gui: refresh cache more often while height is 0 (Michael Mallan)
a51110269c96e7a9d7c4143e0bd6f8cf27a703a3 gui(home): indicate that wallet is syncing (Michael Mallan)
b452966653da1f2d857dd5901972171aa9d1250c gui(home): track blockheight from cache (Michael Mallan)
1d1e735ae975bb73af5389090e1eee68c727c7ea ui: add loading spinner that types text (Michael Mallan)
3c46a7337c57ef646626d052a0ab23a7fa0ecb17 ui: add carousel loading spinner (Michael Mallan)
e4c1ab106d74ad193aa1ba2f5746ce598c4801e5 ui: render amount with chosen colors (Michael Mallan)
013feb3909ebed0a8850a51a7d61383f327b5d4d ui: refactor amount function (Michael Mallan)

Pull request description:

  This is to resolve #1361.

  The home page considers the wallet to be syncing if its height is 0. In this case, the balance will slowly blink and a "Syncing..." text will appear just below.

  The home page will check the wallet's height upon each cache refresh, and will reload the home page once the syncing has completed so that the updated balance is displayed without the user needing to do anything.

  Both the blinking balance and "Syncing..." text use a new `Carousel` widget that cycles through different child widgets at a specified rate.

  EDIT: I've added an extra commit to address #1363 as that is also related to the wallet height and cache refresh.

ACKs for top commit:
  edouardparis:
    ACK 6f4eb79a5a45751a1c919565ea9c88f59fbda0ab

Tree-SHA512: 04214ccb1cf998ae6f7589f2c37335416a6d39b668269c4e07e30c8713e1a0e9e46257c60cea7b19ee6d6e35cbdccaf1122d25a66e6e7e905de51fce185f9180
2024-10-18 14:46:14 +02:00
Michael Mallan
a2b79f1b07
sqlite: get and set last poll timestamp 2024-10-18 11:19:32 +01:00
edouardparis
d35a594baf
Merge #1381: Change primary and secondary button for consistency
3e33353745212e6d344c2b172941c8eae1bdcb53 change button kind for transaction save modal (edouardparis)
0c2f0de951c0fb050a9934aabc256343aed83c4c Add light background to active buttons (edouardparis)
5c9171d0903a3f674f8a3e01fc7f878ece432c6a remove unused picklist theme (edouardparis)
8546e55ffaaa1585e1f1c9d724853682087656e7 change button for secondary button for consistency (edouardparis)
08854c4940569697e634e0c7ce53316ee04a049e change secondary button ui (edouardparis)
277945dddf63295d65abb8f3a28cbe3c671f8f47 convert all primary button to secondary button (edouardparis)

Pull request description:

  close #1380

  We removed all the primary buttons, they will be introduced back in the GUI incrementally to follow a one primary button per page policy

  The secondary button is border grey then border and text green on hover, whereas primary button will have its background green to be a call to action to the user.
  The background of the secondary button is changed for a light grey in order to be consistent with items list selection.

  ![20241014_12h47m01s_grim](https://github.com/user-attachments/assets/d18feeba-1ea8-424e-b735-1c37ab9dbaa4)
  ![20241014_12h47m24s_grim](https://github.com/user-attachments/assets/ecdd69e5-674e-40a4-a784-466bccf84cfa)
  ![20241014_12h47m42s_grim](https://github.com/user-attachments/assets/c622f4f0-8935-4bcf-8f91-6ad87e1fb8df)

ACKs for top commit:
  edouardparis:
    Self-ACK 3e33353745212e6d344c2b172941c8eae1bdcb53

Tree-SHA512: ab4a2f347e4d85edeee5b38bbc5da1ff995ae8a6d62ea819ac6f23ed30881a61391b63d325268e374c9b100238fe5993d31323283abcfeb9f922051965f9ebe1
2024-10-15 12:07:05 +02:00
edouardparis
3e33353745 change button kind for transaction save modal 2024-10-15 11:47:27 +02:00
edouardparis
0c2f0de951 Add light background to active buttons 2024-10-14 12:22:10 +02:00
edouardparis
5c9171d090 remove unused picklist theme 2024-10-14 12:02:13 +02:00
edouardparis
8546e55ffa change button for secondary button for consistency 2024-10-14 11:45:13 +02:00
edouardparis
08854c4940 change secondary button ui
The secondary button is light grey border and transparent
background that has border and text green on hover.
It brings consistency with item list selection that
has green border on hover.
2024-10-14 11:36:38 +02:00
edouardparis
277945dddf convert all primary button to secondary button 2024-10-14 11:24:43 +02:00
Michael Mallan
6f4eb79a5a
gui: refresh cache more often while height is 0
The wallet's height is taken from the cache and is used to check
if the wallet has been initially synced after creation.

For the remote backend, the cache refresh should be done with the
usual frequency while the wallet's height is 0 so that the sync
completion can be detected sooner.
2024-10-11 16:00:31 +01:00
Michael Mallan
a51110269c
gui(home): indicate that wallet is syncing 2024-10-11 16:00:29 +01:00
Michael Mallan
b452966653
gui(home): track blockheight from cache 2024-10-11 16:00:27 +01:00
Michael Mallan
1d1e735ae9
ui: add loading spinner that types text 2024-10-08 10:46:07 +01:00
Michael Mallan
3c46a7337c
ui: add carousel loading spinner 2024-10-08 10:46:05 +01:00
Michael Mallan
e4c1ab106d
ui: render amount with chosen colors 2024-10-07 15:31:14 +01:00
Michael Mallan
013feb3909
ui: refactor amount function
The `amount` function can call `amount_with_size` rather than
repeating the underlying call to `render_amount`.
2024-10-07 15:28:04 +01:00
edouardparis
8fb74d1cf9
Merge #1358: hw: check if app is open before sending old version error message
37cea480b83651171739edc453a41c3dde1c14ba hw: check if app is open before sending old version error message (edouardparis)

Pull request description:

  We check if we are able to fetch master fingerprint to see if the bitcoin app is open. The error is then displayed with the generic connection error message.

ACKs for top commit:
  edouardparis:
    Self-ACK 37cea480b83651171739edc453a41c3dde1c14ba

Tree-SHA512: e477987a57d2e79ed21cd1b1e61bdbd5725d39b88913a19bb6b9fffcbddde7ef95e8065de8695517ab57e8f830d078b76b42c01f7f257ac8f02bf0f03ddfe793
2024-09-25 15:13:39 +02:00
edouardparis
37cea480b8 hw: check if app is open before sending old version error message
We check if we are able to fetch master fingerprint
to see if the bitcoin app is open. The error is then displayed
with the generic connection error message.
2024-09-25 11:24:57 +02:00
edouardparis
1374f53483
Merge #1359: fix history events and txs pagination
0219752f784db12fa7a92231e596b7f264df8523 Add processing state to next page load (edouardparis)
1a370d380655b0cf852f2a51688cd15a327e1d7e fix history events and txs pagination (edouardparis)

Pull request description:

  The problem:
  We display the button if the size of the list is a multiple of the page size. Otherwise, we assume that the user has reached a partial page, indicating they've reached the bottom. However, since we chose to include all transactions with the same block time on a single page (because it's not possible to order them by block index in the database, as we don't store the block index), this can cause the page size to exceed the set limit. As a result, the list size may not be a multiple of the page size.

  The solution:
  keep in the state if the last fetched page has a length inferior of the expected page size and do not display the button 'See more' then as we reached the bottom.

ACKs for top commit:
  jp1ac4:
    Tested ACK 0219752f78.

Tree-SHA512: acba63aaa269e1c974ca3b6ffc7e5f7545d273b6cea8cea4f380c76a3aa569eaa5ac7b413525e613e1fbb55b7076b0b541bc72f802b5c619eeef3244f3366b52
2024-09-24 12:32:21 +02:00
edouardparis
0219752f78 Add processing state to next page load 2024-09-23 11:58:46 +02:00
edouardparis
1a370d3806 fix history events and txs pagination
The problem:
We display the button if the size of the list is a multiple of the page
size. Otherwise, we assume that the user has reached a partial page,
indicating they've reached the bottom. However, since we chose to
include all transactions with the same block time on a single page
(because it's not possible to order them by block index in the database,
as we don't store the block index), this can cause the page size to
exceed the set limit. As a result, the list size may not be a multiple
of the page size.

The solution:
keep in the state if the last fetched page has a length inferior
of the expected page size and do not display the button 'See more'
then as we reached the bottom.
2024-09-20 14:32:35 +02:00
edouardparis
6e551919bd
Merge #1346: Check coldcard version and request user to upgrade
7124e09b7555f46a9c16e265eed4bf247ea8326c Check coldcard version and request user to upgrade (edouardparis)

Pull request description:

  Close #1343

ACKs for top commit:
  jp1ac4:
    utACK 7124e09b75.
  edouardparis:
    Self-ACK 7124e09b7555f46a9c16e265eed4bf247ea8326c

Tree-SHA512: 105ada9d34b36020b1be369d515486f3e245ce975a253f4b075273037345d2c7e97aa9b0921715d3e9d45c5bd5856c51f2737882188bc8d2f13dc1e8db3e82f9
2024-09-17 12:27:40 +02:00
edouardparis
7124e09b75 Check coldcard version and request user to upgrade
Close #1343
2024-09-17 11:56:51 +02:00
edouardparis
47fb6efb3b
Merge #1344: gui: add help text for electrum address
00841631760241d58f89f433be7529cc705e2b02 gui: add help text for electrum address (Michael Mallan)

Pull request description:

  This adds a short text explanation about SSL usage in Electrum addresses to both the installer and settings page.

  This is a modified version of #1342.

ACKs for top commit:
  edouardparis:
    ACK 00841631760241d58f89f433be7529cc705e2b02

Tree-SHA512: 1b25547c07afaebc3ce86bdcb8c9de8d83b9f36b1bbfabbec2303e1c57e8c64c154412081c2bc26500e2c0d1d48f764b47730ebd4fb21d1c554e7da26ce8f0fb
2024-09-16 18:06:35 +02:00
Michael Mallan
0084163176
gui: add help text for electrum address 2024-09-16 15:43:59 +01:00
Antoine Poinsot
ec3a799dc6
Merge #1338: poller: query deposit tx for all coins, including expired
d7e5997c998edd2082ce86481726d22500bba67c poller: query deposit tx for all coins, including expired (Antoine Poinsot)

Pull request description:

  This fixes a crash whereby we missed the deposit transaction of a received coin because it was also part of the expired coins list.

  See the following logs.

  ```
  [8:33 AM](https://mm.revault.dev/revault/pl/a9mazcncaff3fc88yq8oqpipgo)
  root@cirrus-ci-task-4780461782728704:/tmp/cirrus-ci-build# tail -n100 /tmp/lianad-tests-o3guj0vh/test_rescan_edge_cases_1/
  lianad/log
  b'[1726295509][liana][INFO][thread main] Watchonly wallet created.'
  b'[1726295509][liana][INFO][thread main] Loading our watchonly wallet on bitcoind.'
  b'[1726295509][liana][INFO][thread main] Watchonly wallet loaded on bitcoind and sanity checked.'
  b'[1726295510][liana::database::sqlite][INFO][thread main] Created a fresh database at /tmp/lianad-tests-o3guj0vh/test_rescan_edge_cases_1/lianad/regtest/lianad.sqlite3.'
  b'[1726295510][liana::database::sqlite][INFO][thread main] Checking if the database needs upgrading.'
  b'[1726295510][liana][INFO][thread main] Database initialized and checked.'
  b'[1726295510][liana][INFO][thread Bitcoin Network poller] Bitcoin poller started.'
  b'[1726295510][liana::jsonrpc::server][DEBUG][thread Bitcoin Network poller] Binding socket at /tmp/lianad-tests-o3guj0vh/test_rescan_edge_cases_1/lianad/regtest/lianad_rpc'
  b'[1726295510][liana][INFO][thread Bitcoin Network poller] JSONRPC server started.'
  b'[1726295510][liana::bitcoin::poller][INFO][thread Bitcoin Network poller] Block chain synchronization progress: 100.00% (129 blocks / 129 headers)'
  b'[1726295510][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Current coins: {}'
  b'[1726295510][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Newly received coins: []'
  b'[1726295510][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Newly confirmed coins: []'
  b'[1726295510][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Expired coins: []'
  b'[1726295510][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Newly spending coins: []'
  b'[1726295510][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Newly spent coins: []'
  b'[1726295510][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Missing txids: []'
  b"[1726295510][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] New tip: '(129,56fa7e0cc43c7767f68cc230df045a58a2c7cbd8e50d5ed900f39260d6e551fa)'"
  b'[1726295510][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Updates done.'
  b'[1726295510][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Checking the state of an ongoing rescan if there is any'
  b'[1726295510][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] No ongoing rescan.'
  b'[1726295511][liana::bitcoin::poller::looper][INFO][thread Bitcoin Network poller] Block chain reorganization detected. Looking for common ancestor.'
  b"[1726295511][liana::bitcoin::poller::looper][INFO][thread Bitcoin Network poller] Common ancestor found: '(117,63a3207b98d2f832f9a213c8135243b5d8f7228778aeae4aa23ca6e565bf5b1e)'. Starting rescan from there. Old tip was '(129,56fa7e0cc43c7767f68cc230df045a58a2c7cbd8e50d5ed900f39260d6e551fa)'."
  b"[1726295511][liana::bitcoin::poller::looper][INFO][thread Bitcoin Network poller] Tip was rolled back to '(117,63a3207b98d2f832f9a213c8135243b5d8f7228778aeae4aa23ca6e565bf5b1e)'."
  b'[1726295511][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Current coins: {}'
  b'[1726295511][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Newly received coins: []'
  b'[1726295511][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Newly confirmed coins: []'
  b'[1726295511][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Expired coins: []'
  b'[1726295511][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Newly spending coins: []'
  b'[1726295511][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Newly spent coins: []'
  b'[1726295511][liana::bitcoin::poller::looper][INFO][thread Bitcoin Network poller] Chain tip changed while we were updating our state. Starting over.'
  b'[1726295511][liana::bitcoin::poller::looper][INFO][thread Bitcoin Network poller] Block chain reorganization detected. Looking for common ancestor.'
  b"[1726295511][liana::bitcoin::poller::looper][INFO][thread Bitcoin Network poller] Common ancestor found: '(106,7b2a449b8287d0e29054073110c47164edfc2ab842c43415705e53722acb1e24)'. Starting rescan from there. Old tip was '(117,63a3207b98d2f832f9a213c8135243b5d8f7228778aeae4aa23ca6e565bf5b1e)'."
  b"[1726295511][liana::bitcoin::poller::looper][INFO][thread Bitcoin Network poller] Tip was rolled back to '(106,7b2a449b8287d0e29054073110c47164edfc2ab842c43415705e53722acb1e24)'."
  b'[1726295511][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Current coins: {}'
  b'[1726295511][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Newly received coins: []'
  b'[1726295511][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Newly confirmed coins: []'
  b'[1726295511][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Expired coins: []'
  b'[1726295511][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Newly spending coins: []'
  b'[1726295511][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Newly spent coins: []'
  b'[1726295511][liana::bitcoin::poller::looper][INFO][thread Bitcoin Network poller] Chain tip changed while we were updating our state. Starting over.'
  b'[1726295511][liana::bitcoin::poller::looper][INFO][thread Bitcoin Network poller] Block chain reorganization detected. Looking for common ancestor.'
  b"[1726295511][liana::bitcoin::poller::looper][INFO][thread Bitcoin Network poller] Common ancestor found: '(101,7ad2fc79a78611d1d088ce6638c8324ba496bbd2e26a1d90a2be693b5d613f05)'. Starting rescan from there. Old tip was '(106,7b2a449b8287d0e29054073110c47164edfc2ab842c43415705e53722acb1e24)'."
  b"[1726295511][liana::bitcoin::poller::looper][INFO][thread Bitcoin Network poller] Tip was rolled back to '(101,7ad2fc79a78611d1d088ce6638c8324ba496bbd2e26a1d90a2be693b5d613f05)'."
  b'[1726295511][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Current coins: {}'
  b'[1726295511][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Newly received coins: [Coin { outpoint: OutPoint { txid: 0x414ca732f0e59acef1ce6f63bdb6514dd8e0a8519671f38bb59c1b7353f6c00a, vout: 0 }, is_immature: false, block_info: None, amount: Amount(0.35600000 BTC), derivation_index: Normal { index: 2 }, is_change: false, spend_txid: None, spend_block: None }, Coin { outpoint: OutPoint { txid: 0x154afc0fd2190d65f0b5ffd466608c24bd55135666c142ae36b5a2648e0bf44e, vout: 0 }, is_immature: false, block_info: None, amount: Amount(0.35600000 BTC), derivation_index: Normal { index: 1 }, is_change: false, spend_txid: None, spend_block: None }, Coin { outpoint: OutPoint { txid: 0xaf4ef0538cdd46661de66c0175e0d053fbf82d56ff32b04c8699a56ef7f4a2f0, vout: 1 }, is_immature: false, block_info: None, amount: Amount(0.35600000 BTC), derivation_index: Normal { index: 0 }, is_change: false, spend_txid: None, spend_block: None }]'
  b'[1726295511][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Newly confirmed coins: []'
  b'[1726295511][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Expired coins: [OutPoint { txid: 0x414ca732f0e59acef1ce6f63bdb6514dd8e0a8519671f38bb59c1b7353f6c00a, vout: 0 }, OutPoint { txid: 0x154afc0fd2190d65f0b5ffd466608c24bd55135666c142ae36b5a2648e0bf44e, vout: 0 }]'
  b'[1726295511][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Newly spending coins: []'
  b'[1726295511][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Newly spent coins: []'
  b'[1726295511][liana::bitcoin::poller::looper][INFO][thread Bitcoin Network poller] Chain tip changed while we were updating our state. Starting over.'
  b'[1726295511][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Current coins: {}'
  b'[1726295511][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Newly received coins: [Coin { outpoint: OutPoint { txid: 0x414ca732f0e59acef1ce6f63bdb6514dd8e0a8519671f38bb59c1b7353f6c00a, vout: 0 }, is_immature: false, block_info: None, amount: Amount(0.35600000 BTC), derivation_index: Normal { index: 2 }, is_change: false, spend_txid: None, spend_block: None }, Coin { outpoint: OutPoint { txid: 0x154afc0fd2190d65f0b5ffd466608c24bd55135666c142ae36b5a2648e0bf44e, vout: 0 }, is_immature: false, block_info: None, amount: Amount(0.35600000 BTC), derivation_index: Normal { index: 1 }, is_change: false, spend_txid: None, spend_block: None }, Coin { outpoint: OutPoint { txid: 0xaf4ef0538cdd46661de66c0175e0d053fbf82d56ff32b04c8699a56ef7f4a2f0, vout: 1 }, is_immature: false, block_info: None, amount: Amount(0.35600000 BTC), derivation_index: Normal { index: 0 }, is_change: false, spend_txid: None, spend_block: None }]'
  b'[1726295511][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Newly confirmed coins: []'
  b'[1726295511][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Expired coins: [OutPoint { txid: 0x414ca732f0e59acef1ce6f63bdb6514dd8e0a8519671f38bb59c1b7353f6c00a, vout: 0 }]'
  b'[1726295511][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Newly spending coins: []'
  b'[1726295511][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Newly spent coins: []'
  b'[1726295511][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Missing txids: [0xaf4ef0538cdd46661de66c0175e0d053fbf82d56ff32b04c8699a56ef7f4a2f0, 0x154afc0fd2190d65f0b5ffd466608c24bd55135666c142ae36b5a2648e0bf44e]'
  b'[1726295511][liana][ERROR][thread Bitcoin Network poller] panic occurred at line 465 of file src/database/sqlite/mod.rs: Some("Database must be available: SqliteFailure(Error { code: ConstraintViolation, extended_code: 787 }, Some(\\"FOREIGN KEY constraint failed\\"))")'
  b'   0: liana::setup_panic_hook::{{closure}}'
  b'   1: std::panicking::rust_panic_with_hook'
  b'   2: std::panicking::begin_panic_handler::{{closure}}'
  b'   3: std::sys::backtrace::__rust_end_short_backtrace'
  b'   4: rust_begin_unwind'
  b'   5: core::panicking::panic_fmt'
  b'   6: core::result::unwrap_failed'
  b'   7: <liana::database::sqlite::SqliteConn as liana::database::DatabaseConnection>::new_unspent_coins'
  b'   8: liana::bitcoin::poller::looper::updates'
  b'   9: liana::bitcoin::poller::looper::updates'
  b'  10: liana::bitcoin::poller::looper::updates'
  b'  11: liana::bitcoin::poller::looper::updates'
  b'  12: liana::bitcoin::poller::looper::updates'
  b'  13: liana::bitcoin::poller::looper::updates'
  b'  14: liana::bitcoin::poller::looper::updates'
  b'  15: liana::bitcoin::poller::looper::poll'
  b'  16: liana::bitcoin::poller::Poller::poll_forever'
  b'  17: std::sys::backtrace::__rust_begin_short_backtrace'
  b'  18: core::ops::function::FnOnce::call_once{{vtable.shim}}'
  b'  19: std::sys::pal::unix:🧵:Thread:🆕:thread_start'
  b'  20: <unknown>'
  b'  21: <unknown>'
  b''
  ```

  This should fix the flaky chain functional tests in ci.

ACKs for top commit:
  jp1ac4:
    ACK d7e5997c998edd2082ce86481726d22500bba67c.

Tree-SHA512: 2d51b15c4ef5aaeac5a703fb348c637d7bb44703b783fb928d7989cc69bf2ba3874128c74679640a4737236c60734394f36ab0974a8c9bdacc3ca5f59191b702
2024-09-16 11:03:47 +02:00
edouardparis
9b7ea093f9
Merge #1337: fix wrong redirection message in settings
1d20064bebcd2451b9844231576dc0b9cef0bac7 fix wrong redirection message in settings (edouardparis)

Pull request description:

  close #1334

ACKs for top commit:
  pythcoiner:
    tACK 1d20064
  edouardparis:
    Self-ACK 1d20064bebcd2451b9844231576dc0b9cef0bac7

Tree-SHA512: fa86fbe131f5223bca56e2f4e42574be2c9d6c5cb3e5b911a2dc57c1a07620a07ed58c1bcd3b8b3bd8f3c35f4eadd0b1c9eda594ac03a70a5245ad961a8914ec
2024-09-16 10:12:31 +02:00
Antoine Poinsot
d7e5997c99
poller: query deposit tx for all coins, including expired
This fixes a crash whereby we missed the deposit transaction of a
received coin because it was also part of the expired coins list.

See the following logs.

b'[1726295509][liana][INFO][thread main] Watchonly wallet created.'
b'[1726295509][liana][INFO][thread main] Loading our watchonly wallet on bitcoind.'
b'[1726295509][liana][INFO][thread main] Watchonly wallet loaded on bitcoind and sanity checked.'
b'[1726295510][liana::database::sqlite][INFO][thread main] Created a fresh database at /tmp/lianad-tests-o3guj0vh/test_rescan_edge_cases_1/lianad/regtest/lianad.sqlite3.'
b'[1726295510][liana::database::sqlite][INFO][thread main] Checking if the database needs upgrading.'
b'[1726295510][liana][INFO][thread main] Database initialized and checked.'
b'[1726295510][liana][INFO][thread Bitcoin Network poller] Bitcoin poller started.'
b'[1726295510][liana::jsonrpc::server][DEBUG][thread Bitcoin Network poller] Binding socket at /tmp/lianad-tests-o3guj0vh/test_rescan_edge_cases_1/lianad/regtest/lianad_rpc'
b'[1726295510][liana][INFO][thread Bitcoin Network poller] JSONRPC server started.'
b'[1726295510][liana::bitcoin::poller][INFO][thread Bitcoin Network poller] Block chain synchronization progress: 100.00% (129 blocks / 129 headers)'
b'[1726295510][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Current coins: {}'
b'[1726295510][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Newly received coins: []'
b'[1726295510][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Newly confirmed coins: []'
b'[1726295510][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Expired coins: []'
b'[1726295510][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Newly spending coins: []'
b'[1726295510][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Newly spent coins: []'
b'[1726295510][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Missing txids: []'
b"[1726295510][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] New tip: '(129,56fa7e0cc43c7767f68cc230df045a58a2c7cbd8e50d5ed900f39260d6e551fa)'"
b'[1726295510][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Updates done.'
b'[1726295510][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Checking the state of an ongoing rescan if there is any'
b'[1726295510][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] No ongoing rescan.'
b'[1726295511][liana::bitcoin::poller::looper][INFO][thread Bitcoin Network poller] Block chain reorganization detected. Looking for common ancestor.'
b"[1726295511][liana::bitcoin::poller::looper][INFO][thread Bitcoin Network poller] Common ancestor found: '(117,63a3207b98d2f832f9a213c8135243b5d8f7228778aeae4aa23ca6e565bf5b1e)'. Starting rescan from there. Old tip was '(129,56fa7e0cc43c7767f68cc230df045a58a2c7cbd8e50d5ed900f39260d6e551fa)'."
b"[1726295511][liana::bitcoin::poller::looper][INFO][thread Bitcoin Network poller] Tip was rolled back to '(117,63a3207b98d2f832f9a213c8135243b5d8f7228778aeae4aa23ca6e565bf5b1e)'."
b'[1726295511][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Current coins: {}'
b'[1726295511][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Newly received coins: []'
b'[1726295511][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Newly confirmed coins: []'
b'[1726295511][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Expired coins: []'
b'[1726295511][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Newly spending coins: []'
b'[1726295511][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Newly spent coins: []'
b'[1726295511][liana::bitcoin::poller::looper][INFO][thread Bitcoin Network poller] Chain tip changed while we were updating our state. Starting over.'
b'[1726295511][liana::bitcoin::poller::looper][INFO][thread Bitcoin Network poller] Block chain reorganization detected. Looking for common ancestor.'
b"[1726295511][liana::bitcoin::poller::looper][INFO][thread Bitcoin Network poller] Common ancestor found: '(106,7b2a449b8287d0e29054073110c47164edfc2ab842c43415705e53722acb1e24)'. Starting rescan from there. Old tip was '(117,63a3207b98d2f832f9a213c8135243b5d8f7228778aeae4aa23ca6e565bf5b1e)'."
b"[1726295511][liana::bitcoin::poller::looper][INFO][thread Bitcoin Network poller] Tip was rolled back to '(106,7b2a449b8287d0e29054073110c47164edfc2ab842c43415705e53722acb1e24)'."
b'[1726295511][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Current coins: {}'
b'[1726295511][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Newly received coins: []'
b'[1726295511][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Newly confirmed coins: []'
b'[1726295511][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Expired coins: []'
b'[1726295511][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Newly spending coins: []'
b'[1726295511][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Newly spent coins: []'
b'[1726295511][liana::bitcoin::poller::looper][INFO][thread Bitcoin Network poller] Chain tip changed while we were updating our state. Starting over.'
b'[1726295511][liana::bitcoin::poller::looper][INFO][thread Bitcoin Network poller] Block chain reorganization detected. Looking for common ancestor.'
b"[1726295511][liana::bitcoin::poller::looper][INFO][thread Bitcoin Network poller] Common ancestor found: '(101,7ad2fc79a78611d1d088ce6638c8324ba496bbd2e26a1d90a2be693b5d613f05)'. Starting rescan from there. Old tip was '(106,7b2a449b8287d0e29054073110c47164edfc2ab842c43415705e53722acb1e24)'."
b"[1726295511][liana::bitcoin::poller::looper][INFO][thread Bitcoin Network poller] Tip was rolled back to '(101,7ad2fc79a78611d1d088ce6638c8324ba496bbd2e26a1d90a2be693b5d613f05)'."
b'[1726295511][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Current coins: {}'
b'[1726295511][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Newly received coins: [Coin { outpoint: OutPoint { txid: 0x414ca732f0e59acef1ce6f63bdb6514dd8e0a8519671f38bb59c1b7353f6c00a, vout: 0 }, is_immature: false, block_info: None, amount: Amount(0.35600000 BTC), derivation_index: Normal { index: 2 }, is_change: false, spend_txid: None, spend_block: None }, Coin { outpoint: OutPoint { txid: 0x154afc0fd2190d65f0b5ffd466608c24bd55135666c142ae36b5a2648e0bf44e, vout: 0 }, is_immature: false, block_info: None, amount: Amount(0.35600000 BTC), derivation_index: Normal { index: 1 }, is_change: false, spend_txid: None, spend_block: None }, Coin { outpoint: OutPoint { txid: 0xaf4ef0538cdd46661de66c0175e0d053fbf82d56ff32b04c8699a56ef7f4a2f0, vout: 1 }, is_immature: false, block_info: None, amount: Amount(0.35600000 BTC), derivation_index: Normal { index: 0 }, is_change: false, spend_txid: None, spend_block: None }]'
b'[1726295511][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Newly confirmed coins: []'
b'[1726295511][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Expired coins: [OutPoint { txid: 0x414ca732f0e59acef1ce6f63bdb6514dd8e0a8519671f38bb59c1b7353f6c00a, vout: 0 }, OutPoint { txid: 0x154afc0fd2190d65f0b5ffd466608c24bd55135666c142ae36b5a2648e0bf44e, vout: 0 }]'
b'[1726295511][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Newly spending coins: []'
b'[1726295511][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Newly spent coins: []'
b'[1726295511][liana::bitcoin::poller::looper][INFO][thread Bitcoin Network poller] Chain tip changed while we were updating our state. Starting over.'
b'[1726295511][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Current coins: {}'
b'[1726295511][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Newly received coins: [Coin { outpoint: OutPoint { txid: 0x414ca732f0e59acef1ce6f63bdb6514dd8e0a8519671f38bb59c1b7353f6c00a, vout: 0 }, is_immature: false, block_info: None, amount: Amount(0.35600000 BTC), derivation_index: Normal { index: 2 }, is_change: false, spend_txid: None, spend_block: None }, Coin { outpoint: OutPoint { txid: 0x154afc0fd2190d65f0b5ffd466608c24bd55135666c142ae36b5a2648e0bf44e, vout: 0 }, is_immature: false, block_info: None, amount: Amount(0.35600000 BTC), derivation_index: Normal { index: 1 }, is_change: false, spend_txid: None, spend_block: None }, Coin { outpoint: OutPoint { txid: 0xaf4ef0538cdd46661de66c0175e0d053fbf82d56ff32b04c8699a56ef7f4a2f0, vout: 1 }, is_immature: false, block_info: None, amount: Amount(0.35600000 BTC), derivation_index: Normal { index: 0 }, is_change: false, spend_txid: None, spend_block: None }]'
b'[1726295511][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Newly confirmed coins: []'
b'[1726295511][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Expired coins: [OutPoint { txid: 0x414ca732f0e59acef1ce6f63bdb6514dd8e0a8519671f38bb59c1b7353f6c00a, vout: 0 }]'
b'[1726295511][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Newly spending coins: []'
b'[1726295511][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Newly spent coins: []'
b'[1726295511][liana::bitcoin::poller::looper][DEBUG][thread Bitcoin Network poller] Missing txids: [0xaf4ef0538cdd46661de66c0175e0d053fbf82d56ff32b04c8699a56ef7f4a2f0, 0x154afc0fd2190d65f0b5ffd466608c24bd55135666c142ae36b5a2648e0bf44e]'
b'[1726295511][liana][ERROR][thread Bitcoin Network poller] panic occurred at line 465 of file src/database/sqlite/mod.rs: Some("Database must be available: SqliteFailure(Error { code: ConstraintViolation, extended_code: 787 }, Some(\\"FOREIGN KEY constraint failed\\"))")'
b'   0: liana::setup_panic_hook::{{closure}}'
b'   1: std::panicking::rust_panic_with_hook'
b'   2: std::panicking::begin_panic_handler::{{closure}}'
b'   3: std::sys::backtrace::__rust_end_short_backtrace'
b'   4: rust_begin_unwind'
b'   5: core::panicking::panic_fmt'
b'   6: core::result::unwrap_failed'
b'   7: <liana::database::sqlite::SqliteConn as liana::database::DatabaseConnection>::new_unspent_coins'
b'   8: liana::bitcoin::poller::looper::updates'
b'   9: liana::bitcoin::poller::looper::updates'
b'  10: liana::bitcoin::poller::looper::updates'
b'  11: liana::bitcoin::poller::looper::updates'
b'  12: liana::bitcoin::poller::looper::updates'
b'  13: liana::bitcoin::poller::looper::updates'
b'  14: liana::bitcoin::poller::looper::updates'
b'  15: liana::bitcoin::poller::looper::poll'
b'  16: liana::bitcoin::poller::Poller::poll_forever'
b'  17: std::sys::backtrace::__rust_begin_short_backtrace'
b'  18: core::ops::function::FnOnce::call_once{{vtable.shim}}'
b'  19: std::sys::pal::unix:🧵:Thread:🆕:thread_start'
b'  20: <unknown>'
b'  21: <unknown>'
b''
2024-09-14 08:46:14 +02:00
edouardparis
1d20064beb fix wrong redirection message in settings
close #1334
2024-09-13 16:36:57 +02:00
edouardparis
dde02dfa7c
Merge #1331: Update gpg key documentation with Edouard key
1cf22eb00c2d9bdc06be6c05c2a094281159f76a Update gpg key documentation with Edouard key (edouardparis)

Pull request description:

ACKs for top commit:
  pythcoiner:
    ACK 1cf22eb

Tree-SHA512: b98a985d5d22f11ee34a5f1cfc9d591c7a16bb8ae56dfbe9aeb8392307ddda8ac4937d0e51ffb506c7dffbb6e8709087f394ba71de91eb27437d8ec1c2c5f06a
2024-09-13 10:24:55 +02:00
edouardparis
1cf22eb00c Update gpg key documentation with Edouard key 2024-09-13 09:54:21 +02:00
edouardparis
9b37a148ae
Merge #1328: gui: bump version v7.0
dbd1bf57b5b93f1954653a18cd00b9db8dc73bf9 gui: Bump version v7.0 (edouardparis)

Pull request description:

ACKs for top commit:
  edouardparis:
    Self-ACK dbd1bf57b5b93f1954653a18cd00b9db8dc73bf9

Tree-SHA512: 3e6ab442022e71f4010ab2ab5c34e49ad15191d891ac84bb120338189b18f727130fe47967d1c5f506de53e445838285db387353c87a6ca33bd0a6b624e40661
2024-09-12 14:40:34 +02:00
edouardparis
dbd1bf57b5 gui: Bump version v7.0 2024-09-12 14:26:40 +02:00