Commit Graph

18838 Commits

Author SHA1 Message Date
Jonas Schnelli
7c6cecaf29 Merge #18123: gui: Fix race in WalletModel::pollBalanceChanged
bf36a3ccc212ad4d7c5cb8f26d7a22e279fe3cec gui: Fix race in WalletModel::pollBalanceChanged (Russell Yanofsky)

Pull request description:

  Poll function was wrongly setting cached height to the current chain height instead of the chain height at the time of polling.

  This bug could cause balances to appear out of date, and was first introduced a0704a8996 (diff-2e3836af182cfb375329c3463ffd91f8L117). Before that commit, there wasn't a problem because cs_main was held during the poll update.

  Currently, the problem should be rare. But if 8937d99ce81a27ae5e1012a28323c0e26d89c50b from #17954 were merged, the problem would get worse, because the wrong cachedNumBlocks value would be set if the wallet was polled in the interval between a block being connected and it processing the BlockConnected notification.

  MarcoFalke also points out that a0704a8996 could lead to GUI hangs as well, because previously the pollBalanceChanged method, which runs on the GUI thread, would only make a nonblocking TRY_LOCK(cs_main) call, but after could make blocking LOCK(cs_main) calls, potentially locking up the GUI.

  Thanks to John Newbery for finding this bug this while reviewing https://github.com/bitcoin/bitcoin/pull/17954.

ACKs for top commit:
  Empact:
    utACK bf36a3ccc2
  jonasschnelli:
    utACK bf36a3c

Tree-SHA512: 1f4f229fa70a6d1fcf7be3806dca3252e86bc1755168fb421258389eb95aae67f863cb1216e6dc086b596c33560d1136215a4c87b5ff890abc8baaa3333b47f4
2020-10-14 12:10:11 +01:00
xdustinface
6088650438 test: Add boost/signals2/connection.hpp to lint-inlcudes.sh 2020-10-14 12:10:11 +01:00
xdustinface
1a5a1ca78a interface/qt: Remove direct src/privatesend calls
Refactored into interface::PrivateSend::Options and
interface::PrivateSend::Client
2020-10-14 12:09:45 +01:00
UdjinM6
eeadfe4d0b
Merge branch 'master' into merge_master_0.16.0.1 2020-10-14 03:53:50 +03:00
UdjinM6
25e26ae76f
rpc: Do not require a privkey corresponding to ownerAddress in protx register_* to be known by the wallet
This requirement was introduced in the initial implementation when we were signing protx payload with the owner key (#2246). This was changed later when we implemented external collateral references (#2366). The owner key is not used for anything in ProTxReg but to get CKeyID since then which we can do by simply decoding an address instead. This simplifies masternode registration process by letting an Operator to issue `protx register_prepare` on its own instead of asking an Owner. An Owner still have to sign the message provided by an Operator with his collateral address to prove collateral ownership (and authorize masternode registration).

Note: `protx register_*` rpc will no longer accept privkeys for ownerAddress. Some 3-rd party software like DMT might need to be patched to work correctly with nodes running with this fix.
2020-10-13 19:19:52 +03:00
Konstantin Shuplenkov
5f2305e5c8
build: create mountpoint for named volume (#3765) 2020-10-08 14:34:33 +03:00
xdustinface
555a184a6a interface/qt: Remove direct src/masterode calls
Refactored into interface::Node::Masternode
2020-10-05 15:41:38 +02:00
xdustinface
e24b6228ad interface/qt: Remove direct src/llmq calls
Refactored into interface::Node::LLMQ
2020-10-05 15:13:34 +02:00
xdustinface
6c900725c2 interface/qt: Remove direct src/evo calls
Refactored into interface::Node::EVO
2020-10-05 15:13:34 +02:00
xdustinface
3139459c71 qt|privatesend: Remove unused wallet inlcudes 2020-10-05 15:13:34 +02:00
xdustinface
07600d9aa7 qt: Cleanup in OptionsDialog
Made node sense to squash it into the related OptionsDialog commit of
the initial PR because this diff uses the wallet interface which gets
introduced one commit after the related commit.
2020-10-05 15:13:34 +02:00
Russell Yanofsky
ce41506a3e Add developer notes about blocking GUI code 2020-10-05 15:13:34 +02:00
Russell Yanofsky
1133dfc1ce Use WalletBalances struct in Qt
Suggested by John Newbery <john@johnnewbery.com>
https://github.com/bitcoin/bitcoin/pull/10244#discussion_r177504284
2020-10-05 15:13:34 +02:00
Russell Yanofsky
8549622027 Remove direct bitcoin calls from qt/sendcoinsdialog.cpp 2020-10-05 15:13:34 +02:00
Russell Yanofsky
e4e00cbbdd Remove direct bitcoin access from qt/guiutil.cpp 2020-10-05 15:13:34 +02:00
Russell Yanofsky
155324e867 Remove direct bitcoin calls from qt transaction table files 2020-10-05 15:13:34 +02:00
Russell Yanofsky
b2f7e1d1eb Remove direct bitcoin calls from qt/paymentserver.cpp 2020-10-05 15:13:34 +02:00
Russell Yanofsky
50f7d661ab Remove direct bitcoin calls from qt/addresstablemodel.cpp 2020-10-05 15:13:34 +02:00
Russell Yanofsky
7bb2d25c3d Remove direct bitcoin calls from qt/coincontroldialog.cpp 2020-10-05 15:13:34 +02:00
Russell Yanofsky
bda6fc4be9 Remove most direct bitcoin calls from qt/walletmodel.cpp 2020-10-05 15:13:31 +02:00
PastaPastaPasta
204df7bc6e
update public part of windows code signing certificate (#3749)
* update public part of windows code signing certificate

Signed-off-by: pasta <pasta@dashboost.org>

* Fixing line-breaks

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2020-10-05 14:57:01 +03:00
Oleg Girko
ba35dae02d
depends: Update Qt download url. (#3756)
Signed-off-by: Oleg Girko <ol@infoserver.lv>

Co-authored-by: Oleg Girko <ol@infoserver.lv>
2020-10-05 14:56:15 +03:00
Russell Yanofsky
6298c97c29 Remove direct bitcoin calls from qt/optionsdialog.cpp 2020-10-05 02:01:17 +02:00
Russell Yanofsky
a19c1f8b88 Remove direct bitcoin calls from qt/rpcconsole.cpp 2020-10-05 02:01:17 +02:00
Russell Yanofsky
80286d777a Remove direct bitcoin calls from qt/bantablemodel.cpp 2020-10-05 02:01:17 +02:00
Russell Yanofsky
59cec79288 Remove direct bitcoin calls from qt/peertablemodel.cpp 2020-10-05 02:01:17 +02:00
Russell Yanofsky
5512eca39c Remove direct bitcoin calls from qt/intro.cpp 2020-10-05 02:01:15 +02:00
Russell Yanofsky
7fe386a00f Remove direct bitcoin calls from qt/clientmodel.cpp 2020-10-03 21:36:31 +02:00
Russell Yanofsky
2856f46424 Remove direct bitcoin calls from qt/splashscreen.cpp 2020-10-03 21:36:31 +02:00
Russell Yanofsky
2fdf3d8c64 Remove direct bitcoin calls from qt/utilitydialog.cpp 2020-10-03 21:36:31 +02:00
Russell Yanofsky
50f1a6205e Remove direct bitcoin calls from qt/bitcoingui.cpp 2020-10-03 21:36:31 +02:00
Russell Yanofsky
f45e095566 Remove direct bitcoin calls from qt/optionsmodel.cpp 2020-10-03 21:36:27 +02:00
Russell Yanofsky
e709f5a45e Remove direct bitcoin calls from qt/bitcoin.cpp 2020-10-03 21:17:37 +02:00
Russell Yanofsky
98473af332 Add src/interface/README.md 2020-10-03 21:17:37 +02:00
dustinface
b8d1a4f315
qt: Make sure there is a valid theme set in the options (#3755)
* qt: Add GUIUtil::isValidTheme()

Check if a given string is a valid theme.

* qt: Make sure there is a valid theme set in the options
2020-10-02 22:50:17 +03:00
PastaPastaPasta
b3c8306867
Make the build an actual release (#3753)
* Make the build an actual release

Signed-off-by: pasta <pasta@dashboost.org>

* bump build version

Signed-off-by: pasta <pasta@dashboost.org>

* bump diff version

Signed-off-by: pasta <pasta@dashboost.org>
2020-09-30 19:58:44 +03:00
thephez
bc9fa667e5
docs: Several more suggestions (#3751) 2020-09-30 19:52:42 +03:00
UdjinM6
81ce9c451a
qt: More asset cleanup (#3735)
* Drop icon sources (svg) we no longer use

* Rename some icons to better match their content

* Drop chevron/console prompt icon

We do not show it in Dash specific themes and Traditional is just fine with a simple ">" label

* bitcoin -> dash for icons

* Adjust `contrib/debian/copyright`

Dashify it + we no longer use icons mentioned there

* `mogrify src/qt/res/*/*.png`

* `python3 contrib/devtools/optimize-pngs.py`

Total reduction: 68072 bytes
2020-09-30 16:08:11 +03:00
UdjinM6
1624c681df
Always harden osx binaries when creating detached sigs (#3752)
This is required for macos app notarization https://developer.apple.com/documentation/xcode/notarizing_macos_software_before_distribution
2020-09-30 15:32:24 +03:00
thephez
73d8805dc9
contrib: Added thephez.pgp (#3750) 2020-09-30 15:30:55 +03:00
PastaPastaPasta
7058fd7dfc
test: Optimize feature_block_reward_reallocation.py (#3743)
* test: Optimize feature_block_reward_reallocation.py

Signed-off-by: pasta <pasta@dashboost.org>

* use submitblock instead of p2p.send_blocks_and_test in one more place

* drop empty line

* make sure all nodes are synced after reallocation is done

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2020-09-30 15:30:20 +03:00
dustinface
0c960a5efe
doc: Remove trailing whitespaces in release notes (#3747) 2020-09-29 17:02:24 +03:00
UdjinM6
4c669c0449
[v0.16.x] v0.16 release notes (#3582)
* Archive v0.15 release notes

* Drop changes in release notes accidentally introduced by #3426

* Draft v0.16 release notes

* Update doc/release-notes.md

Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>

* Some additions to 0.16 release notes

* Fix typos

* Format/TODO

* Drop `is`

* Block Reward Reallocation, Dynamic Activation Thresholds, PrivateSend coins and fees, PrivateSend Random Round Mixing, GUI, sporks, cmd, commits, contributors

* Apply suggestions from code review

Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>

* Apply few more suggestions

* docs: some release note suggestions

* Update PRs/commits list

Replace "Merged branch .."+commits with the regular "<PR name> (<PR number)" thing

* Apply suggestions from code review

Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>

* Update doc/release-notes.md

Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>

* Update doc/release-notes.md

Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>

* Add recent PRs

* Apply suggestions from code review

Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>

* Format/fix trailing whitespaces

* Fix duplicate whitespaces

* doc: Add details about block reward reallocation

* Update doc/release-notes.md

Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>

* Apply suggestions from code review - wrap file names in ``

Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>

* doc: Some adjustments in the GUI part

Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>
Co-authored-by: Alexander Block <ablock84@gmail.com>
Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>
Co-authored-by: thephez <thephez@users.noreply.github.com>
Co-authored-by: xdustinface <xdustinfacex@gmail.com>
2020-09-29 07:12:35 +03:00
UdjinM6
58adf53ef3
Merge pull request #3745 from xdustinface/pr-backport-remaining
[v0.16.x] Backport remaining PRs
2020-09-29 04:27:24 +03:00
dustinface
24dfb64c9f
qt: Fix font family updates (#3746)
* qt: Update the application font if the font family gets changed

* qt: Make sure recent transactions have the correct font family

Introduced because QListView is ignored in GUIUtil::updateFonts, so its base font family doesn't change, hence the recent transactions don't adjust because the painter's font doesn't change.

* Store initial font size

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2020-09-29 04:09:20 +03:00
UdjinM6
37fe9a6e2f Fix mempool sync (#3725)
* masternode: Fix mempool sync

Make sure the mempool sync requests only happen after the blockchain
sync is done.

* Refactor

Loop only if `-syncmempool`=true, make `if` a bit more readable

Co-authored-by: xdustinface <xdustinfacex@gmail.com>
2020-09-29 03:04:19 +02:00
xdustinface
69b77765ba qt: Fix font family updates (#3746)
* qt: Update the application font if the font family gets changed

* qt: Make sure recent transactions have the correct font family

Introduced because QListView is ignored in GUIUtil::updateFonts, so its base font family doesn't change, hence the recent transactions don't adjust because the painter's font doesn't change.

* Store initial font size
2020-09-29 03:04:19 +02:00
xdustinface
cf2da32ffe qt: Fix font size and scaling issues (#3734)
* qt: Make sure font size in MasternodeList gets scaled as expected

* qt: Make sure font size in ShutdownWindow gets scaled as expected

* qt: Drop obsolete application font updates

* qt: Scale QMenu and QMessageBox globally

To make sure non-custom context menus + QMessageBox instances createy by
static calls like QMessageBox::critical are scaled also.

* qt: Avoid redundant scaling for tooltips and menus

* qt: Only update widget's font if required

* qt: Merge GUIUtil::mapFontSizeUpdates into GUIUtil::mapNormalFontUpdates

* qt: Remove obsolete setFixedPitchFont call

* qt: Use setFixedPitchFont in SendCoinsEntry

* qt: Scale font size in increments of 0.25

* qt: Properly scale network traffic stats depending on font metrics

* qt: Update min/max width of OptionsDialog depending on buttons width

* qt: Emit a signal whenever any attribute of AppearanceWidget changed

* qt: Update OptionsDialog width if the appearance changed

* qt: Calculate the initial wide right after the window showed up

Make sure the visibility state of the widgets is correct before width calculations.

* qt: Call parent class showEvent + override it explicit

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>

* qt: Let OptionsDialog emit a signal if appearance gets changed

* qt: Resize main toolbar depending on visible buttons / font attributes

* qt: Reset max width after it has been set to still allow window resizing

* qt: Properly update the weight of widgets with default font attributes

* qt: Handle updates to the font attributes

* qt: Use resize() instead of setMaximumWidth()

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>

* qt: Call GUIUtil::updateFonts in ModalOverlay constructor

* qt: Make sure default fonts are stored properly for the related widget

* qt: Ignore some low level classes in GUIUtil::updateFont

* rpc: Remove obsolete `.arg()` call

* qt: Drop fixedPitchFont

* qt: Avoid redundant font updates. Let GUIUtil::updateFont handle them

* qt: Scale recent transactions on OverviewPage

They were scaled by font inheritance before

* qt: Ignore QListView in GUIUtil::updateFonts
2020-09-29 02:38:02 +02:00
UdjinM6
586f166499 qt: Fix Recent transactions list height (#3744)
* qt: Bring back setMinimumHeight for recent tx list

This partially reverts a3604f5

Turns out that we still need this at least on Windows (not sure why but tx list looks clipped there atm)

* Reduce number of items in recent tx list by 1 (for PS enabled cases only)

Most users will never see immature funds and the list is going to be too long for them most of the time
2020-09-29 02:36:39 +02:00
UdjinM6
b3d3b48cba
qt: Fix Recent transactions list height (#3744)
* qt: Bring back setMinimumHeight for recent tx list

This partially reverts a3604f5c7c

Turns out that we still need this at least on Windows (not sure why but tx list looks clipped there atm)

* Reduce number of items in recent tx list by 1 (for PS enabled cases only)

Most users will never see immature funds and the list is going to be too long for them most of the time
2020-09-29 02:16:03 +03:00