Commit Graph

321 Commits

Author SHA1 Message Date
tomFlowee d07a8f3355 new version 2024-02-27 19:42:39 +01:00
tomFlowee d1dc483b18 A little counter balance for big bloom filters
Last year I increased the bloom filters to make sure that bcom wallets
could be imported with their weird behavior.
The side-effect has been that wallets imported that have 3K addresses
and up start to have massive amounts of false-positives on their bloom
filter during import.
So while the hacks done before were for wallet vendors intentionally
keeping their list of private keys small (100 or so), we know we can
thus turn off said weird workarounds when the wallet is in actual fact
much larger. And thus save bandwidth.
2024-02-27 19:41:35 +01:00
tomFlowee 15411010b0 Avoid rollback when not needed
This now uses a shared-pointer and moves the creation to the point where
we know the new data is actually a transaction for us, avoiding work
when the bloom filter caught a transaction not actually for us.
2024-02-27 19:41:09 +01:00
tomFlowee 920e5d470c Split bloom filter and private-key ownership.
Now we view the creation of more private keys, and how many, as a
separate concept as the bloom-filter 'gap' counts.

This cleans up the concepts of bloom filters, we now use the
design as documented on;

https://codeberg.org/Flowee/pay/wiki/dev/bloom
2024-02-27 16:07:02 +01:00
tomFlowee fc407ee7f2 Improve debug output features. In debug builds.
This removes the 'debug' logging (again) in non-debug builds,
but it also adds a new 'debugFile' argument where the user can
point to the logs.conf (as used by all flowee server components)
which allows setting of log levels per section, and more.
2024-02-26 23:09:56 +01:00
tomFlowee a2560d98a7 Separate 'singleAccount' concept between UIs
The isSingleAccount property controls if the UI is simple or more
complex.
The single account setup doesn't show you that you have any concept on
differnt accounts at all. No account chooser etc.

On Desktop, however, we choose to always show the archived wallets
anyway. Even though its not in-your-face. Which makes the behavior
between those UIs slightly different.
The addition of the limitedArchiveView property is meant to
facilitate that.
2024-02-14 00:02:53 +01:00
tomFlowee 04c4c7ec03 Avoid using a not existing account 2024-02-14 00:02:53 +01:00
tomFlowee 8c0210b0fe Add content to desktop TransactionDetails screen. 2024-02-12 23:01:14 +01:00
tomFlowee dfa96a79a5 Handle transactions being deleted while scrolling. 2024-02-10 21:56:59 +01:00
tomFlowee 3a254cdb69 Add mutex lockers where the m_wallet is used. 2024-02-10 21:56:59 +01:00
tomFlowee f0c9db2703 Improve debug logging slightly 2024-02-10 21:56:59 +01:00
tomFlowee c48f8500b5 Fix virtual transaction showing up in some cases
In very rare cases on flusing the 'new since' feature we'd end up with a
virtual transaction created at the bottom of the list.
We now avoid this.
2024-02-10 21:56:59 +01:00
tomFlowee a6af4c8771 Remap 'tried' to a more logical backing value.
This changes 'tried' being about the amount of peers we actually
handshaked with to the amount of peers we tried to connect to at all.
2024-02-10 21:56:59 +01:00
tomFlowee a8c9fdca29 Add asserts and avoid duplicate work
When a wallet is updating we may get a lot of new transactions added in
a short amount of time, this avoids calling updateMap for each one in
turn and instead triggers an update only if there isn't one in-flight.

This takes advantage of the fact that the wallet does its update in a
different thread than the UI-one.
2024-02-10 00:28:00 +01:00
tomFlowee 61ff5172d7 Add asserts and ensure thread-safety.
Add asserts making sure we're only called in the GUI thread.
Add missing mutex locks.
2024-02-10 00:28:00 +01:00
tomFlowee 30c29fd364 Add asserts to make requirement clear. 2024-02-10 00:28:00 +01:00
tomFlowee 2facea90d8 Make this compile with older ZXIng libs too 2024-02-10 00:28:00 +01:00
tomFlowee 073ffe6e3b New feature; show fusion icon on TransactionDetails
When an input used in a transaction comes from a cash-fusion
transaction, we now put the CF logo next to it in order to
make this fact clear to the user and allow them to understand
how tracable this specific payment was.
2024-02-03 23:52:27 +01:00
tomFlowee b24a939b93 Be nice to devs. 2024-01-30 17:22:12 +01:00
tomFlowee 87d5789bc7 Move the property to the right location 2024-01-30 17:21:57 +01:00
tomFlowee 4f23501908 Fix some possible memory corruption issues.
Use deleteLater for the QObject

Use sender() in the slot instead of assuming that the class member still
points to it.
2024-01-28 20:11:46 +01:00
tomFlowee 437ee5634d Don't assert that isn't really a problem.
Hit this assert when I had the app open in the debugger for
some minutes.
2024-01-28 20:02:36 +01:00
tomFlowee 2d55f1b508 Avoid exception.
Simplify the loop by using lock() on the std::shared_ptr, which doesn't
throw.
Also follow the API change in the libs and some deeper introspection for
the actual connection status.
2024-01-28 20:01:56 +01:00
tomFlowee 483b8455b2 Improve TransactionDetails screen
* make it much faster for large transactions to open by not drawing and
then hiding the inputs/outputs that are not relevant to us.

* Allow expanding cloaked addresses by clicking on them.
* instead of a right mouse button menu, show a copy icon next to each
address.
* Add the chainprefix to the clipboard on copy.
2024-01-28 14:42:53 +01:00
tomFlowee 0fadec043b Make this method also work for transactions I receive
This now finds if there is a single output address we can honstly point
at and say "this is the beneficiary of this transaction" and we return
this.

This will be in the context of the wallet it is in, naturally.
2024-01-28 13:04:23 +01:00
tomFlowee 9758ead829 New version 2024-01-28 11:30:33 +01:00
tomFlowee 1455d90b30 Add ban / disconnect UI elements on NetView 2024-01-26 14:26:40 +01:00
tomFlowee 519b6d7532 Add button to pardon the banned.
This allows a user to re-connect to formerly banned peers.
2024-01-26 13:45:51 +01:00
tomFlowee e8adc7f94b Remove monthly pardon.
This has been solved better in flowee libs in
commit dc9ef827b.
2024-01-26 13:34:19 +01:00
tomFlowee efc4e7c7d4 Make peers show up faster in netView
A peer that has not yet handshaked is now show in this view, giving a
better indication of what is going on on platforms that do not have easy
access to a log file.
2024-01-26 12:12:45 +01:00
tomFlowee 4bf81d0db7 Fix bug: decrypting a wallet doesn't start sync 2024-01-25 21:24:47 +01:00
tomFlowee 7e8c3d5824 Cover older unconfirmed transaction display
This makes sure that we update the last-mined-date also when a
transaction is simply confirmed that was already in the wallet.
This only really shows if you were offline and only later broadcast that
transaction, which was unusual enough for me to never notice before :-)
2024-01-25 21:05:59 +01:00
tomFlowee 5c3642fd3b Swap declaration, following linter suggestion. 2024-01-25 19:48:56 +01:00
tomFlowee 667f8166d3 Complete the transform from blocktime to tx-time.
We rename the enum and add some asserts indicating the new purpose.
This also makes the code more robust with a try/catch and fixes a
possible crash when a transaction doesn't have either a date or a
blockheight.
2024-01-22 17:46:52 +01:00
tomFlowee 0011698e63 Minor fixes and adding asserts. 2024-01-19 13:01:43 +01:00
tomFlowee c63460c6f6 Refactor the broadcast of transactions
This changes two implementations of the BroadcastTxData baseclass
to now use one which is a lot more robust and thread-safe as
well as fixing various smaller issues.
2024-01-19 00:03:16 +01:00
tomFlowee 32c8cf7fcf Instead of open as tx, search for one.
This helps the user understand better what happened if the transaction
isn't known (yet) by the network, since the blockchair service gives a
weird (buggy) page in that case.
2024-01-17 11:12:47 +01:00
tomFlowee 50c1442782 Use actually unique ID for selecting new wallet
When the user creates a new wallet, use the unique ID of a wallet
to find it and use it afterwards.
2024-01-16 17:32:56 +01:00
tomFlowee bebb53b670 Add ability to scan a private key on import 2024-01-16 17:32:56 +01:00
tomFlowee 19fd943484 Add comment about the zxing deprecation warning. 2024-01-16 16:43:06 +01:00
tomFlowee b1cbf45849 Add cmake option 'skip-example' & skip that module
The final release should not include the example module as we aim
releases at normal people, not devs.
This makes the skipping of the example module part of the build
setup by simply passing in -Dskip_example=TRUE
to cmake.
2024-01-16 14:40:37 +01:00
tomFlowee c079a171d9 Make the 'initial wallet' invisible
The initial wallet is already made auto-archived after a couple of weeks
not receiving any funds. Avoiding it allocating peers.
This makes sure we also do not show it in the mobile UI in the wallets
screen.
2024-01-16 10:48:23 +01:00
tomFlowee 3c9b1e7d32 For a private key, allow showing QR. 2024-01-15 20:16:47 +01:00
tomFlowee 0f83fb7811 Import translations from crowdin 2024-01-15 18:24:40 +01:00
tomFlowee bdd64679b6 Make a tx show the creation time instead of mined
This stores the time of a transaction in the store of the wallet, and
indeed sets it when it is added to the wallet first time.
For instance when we create it or when the tx is first sent to us at
initial broadcast.

We add some logic to the model in order to put a bit more effort into
finding times of a transaction that did not get mined and (before this
code) did not get its time of creation set. Mostly this is about
rejected transactions. And there we guestimate the time instead.
2024-01-15 18:24:40 +01:00
tomFlowee 57643c4585 Move init rows to be after the constructor
This avoids using virtual methods on a not yet initialized object.
2024-01-15 18:24:40 +01:00
tomFlowee 89ee66191d Pardon old sinners after a while. 2024-01-14 17:08:22 +01:00
tomFlowee ac58fb2483 Start new vesion 2024-01-13 19:39:48 +01:00
tomFlowee 9d47c69b08 Fix backup screen showing incorrect start-height.
It now correctly shows the blockheight that the wallet was created at,
which makes sense to backup.
2024-01-13 18:17:08 +01:00
tomFlowee f63765a70c Work harder to make headerSyncComplete get called
A wallet might get stuck in silly situations like starting up when
there is no block for a long time and then not actually being online
at the moment a new block gets mined.

This fix makes sure that at startup we 'unstuck' such a wallet without
there being a need for a new block to be mined while the app is running.
2024-01-13 18:17:08 +01:00