Commit Graph

12839 Commits

Author SHA1 Message Date
UdjinM6
12d0782071 Translations 2020-09 (#3736)
* Update dash_en and dashstrings

* ru

* fi, vi

* 98.94%: ar, de, es, fr, it, ko, nl, pl, th, zh_TW

* >80%: ja, pt, ro, sk, tr, zh_CN

* 100%: pt, tr

* ~98%: zh_CN
2020-09-29 00:53:00 +02:00
UdjinM6
fc8ca6ad50 Bump few things and update man pages for v0.16 (#3737)
* Update nMinimumChainWork and defaultAssumeValid

* Update chainTxData

* Bump BLOCK_CHAIN_SIZE

It's 21Gb on my local machine atm, bumping to 25Gb to give it some space

* `gen-manpages.sh`

* bupm BLOCK_CHAIN_SIZE 25->30
2020-09-29 00:52:51 +02:00
dustinface
8e6706dede qt: Add PrivateSend tab in OptionsDialog, allow to show/hide PS UI (#3717)
* qt: Add PrivateSend tab in OptionsDialog, allow to show/hide PS UI

* qt: Decrease height of OptionsDialog

* Apply suggestions from code review


* qt: Remove obsolete visibility adjustments

Not longer needed since the page is just not reachable if the button is
hidden.

* qt: Make sure PrivateSend related parts are always initialized properly

Not only if its enabled on startup..

* qt: Make updatePrivateSendVisibility a slot to fix the signal connection

* qt: Fix UI updates on OverviewPage if PrivateSend enabled gets toggled

Other way of connecting the slot with true as parameter didn't work..

* qt: Only update and emit the signal for advanced PS UI if required

* qt: Update fPrivateSendEnabled in OptionsModel instead of OptionsDialog

* qt: Recover the PrivateSend enabled state if OptionsDialog gets rejected

* qt: Enable PrivateSend UI by default

* qt: Add some brackets

* qt: Add a comment

* qt: Add a linebreak to the "Enable PrivateSend features" tooltip

* qt: Remove obsolete comment


* qt: Move comment

* qt: Properly reset the previous PS state if OptionsDialog gets rejected

Handle all reject reasons not only the cancle button.
2020-09-28 13:20:20 +02:00
PastaPastaPasta
af457e143d
Fix dbfdf8cb15
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2020-09-25 17:06:17 +00:00
dustinface
dbfdf8cb15 qt: Finetune OverviewPage (#3715)
* qt: Adjust "Recent Transactions" in Overview tab

Make sure they follow the same format as the transactions in
TransactionsView.

- Removed the transaction type representing arrows
- Apply the same coloring like like in the transaction tab for
the different transaction types (orange = internal, red = outgoing,
green = incoming)

* qt: Cleanup layout of OverviewPage in css

* qt: Add three spacer (left, middle, right) and adjust layout stretch.

This allows to have the elements on the screen aligned symetrically
around the center independent from the window size/resizing.

* qt: Inrease date/amount size for "Recent Transactions" in Overview tab

* qt: Inrease number of "Recent Transactions" displayed in Overview tab

Just to fill the empty space

* qt: Make sure PS elements show as expected and adjust number of recent transactions based on PS

* qt: Adjust transaction entry generation

Co-Authored-By: UdjinM6 <UdjinM6@users.noreply.github.com>

* qt: Adjust warning message box

Co-Authored-By: UdjinM6 <UdjinM6@users.noreply.github.com>

* Move tx list style to css

* Fix tx list style for the traditional theme

* Drop (no longer needed?) min height offset in SetupTransactionList

Can't reproduce the tx list scrolling issue anymore

* Avoid recreating transaction filter from scratch every time SetupTransactionList is called

We call SetupTransactionList every second now (from privateSendStatus()) and this makes GUI unresponsive for huge wallets (I have ~400k txes in my testnet wallet) because of filter recreation/sorting. There is no need to go through all setup steps really, simply updating the limit works just fine and fixes the issue.

* qt: Fix an `if` statement

* qt: Just some refactoring

* fix code style

* bail out if `filter->rowCount() == nNumItems`

* qt: Make sure number of transactions is always correct

* Drop spacer to let recent tx list occupy max height available

* TransactionFilterProxy::setLimit should emit signals to let coresponding layouts update themselves

https://doc.qt.io/qt-5/qabstractitemmodel.html#layoutAboutToBeChanged
https://doc.qt.io/qt-5/qabstractitemmodel.html#layoutChanged

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2020-09-25 18:57:46 +02:00
xdustinface
c99d1627a8
qt: Fix compilation 2020-09-24 12:19:40 -04:00
pasta
229ea48a5a
Don't use CPrivateSendClientOptions
Signed-off-by: pasta <pasta@dashboost.org>
2020-09-24 02:18:05 -04:00
pasta
f7c683844c
3710 continued
Signed-off-by: pasta <pasta@dashboost.org>
2020-09-24 02:11:12 -04:00
dustinface
9028712b60
qt: Finetune TransactionsView (#3710)
* qt: Add missing changeEvent call in TransactionView

* qt: Use state related colors in TransactionModel

* qt: Don't colorize the text for abandoned transactions

The red icon should be obvious enough.

* qt: Drop InstantSend column from transaction view/model

* qt: Update verify.png

* qt: Extend the result string of TransactionTableModel::formatTxStatus

* qt: Drop "LLMQ based" in some status strings

* qt: Drop not longer needed ThemedColor entries

* Introduce amountColors(), add a case for `TransactionRecord::PrivateSendDenominate`

Avoid applying orange color to 0-fee mixing txes (PS denominate), use default (grey) color for them

* Tweak IS/CL status string additions a bit more

* Do not apply additional conditions, just use rec statuses

* qt: Adjust amount colors for types Generated and PrivateSendDenominate

Make them green/orange instead.

* Assign all colors explictly, drop default case

Let compiler complain about missing ones if any

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2020-09-24 01:35:27 -04:00
dustinface
f4e3bf95d0
qt: Finetune CoinControlDialog + bitcoin#14828 (#3701)
* qt: Add min-height for CoinControlTreeWidget#treeWidget::item

The rows resize without it if they get locked and the lock icon appears
besides the checkbox. Looks weird.. and especially if you press the lock
all button its just not nice.

* qt: Set background transparency for CoinControl item::hover

* Merge #14828: qt: Remove hidden columns in coin control dialog

1c28feb7d qt: Remove hidden columns in coin control dialog (João Barbosa)

Pull request description:

  Instead of having hidden columns, store the data in specific roles.

  Overlaps with #14817, fixes #11811.

Tree-SHA512: e86e9ca426b9146ac28997ca1920dbae6cc4e2e494ff94fe131d605cd6c013183fc5de10036c886a4d6dcae497ac4067de3791be0ef9c88f7ce9f57f7bd97422

* qt: Add border-bottom for tree items in CoinControl

* qt: Stretch address column in CoinControlDialog

* Adjust column width for a couple of columns

* qt: Hide PrivateSend rounds column for normal Send tab's CoinControl

* qt: Hide unrelated coins in CoinControl based on active mode. Still allow to show them.

* qt: Hide empty top level items in CoinControlDialog's tree mode

* qt: Hide tree/list radio buttons and default to list for PrivateSend

* qt: Hide address/label column in CoinControl for PrivateSend

* qt: Remove obsolete empty columns

* qt: Rename column "PS Rounds" to "Mixing Rounds"

* qt: Move border-bottom in already existing css selector

* Reveal all PS related coins in coincontrol while in PS mode, not only ones with rounds>=1

Also tweak button text

* qt: Only moving a statement a bit

* qt: Hide the "hideButton" in CoinControlDialog if PrivatSend is disabled

And make it default to show all coins in that case..

Co-authored-by: Jonas Schnelli <dev@jonasschnelli.ch>
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2020-09-24 01:23:09 -04:00
thephez
e405f553b9
RPC: Update getprivatesendinfo help (#3727) 2020-09-24 01:20:08 -04:00
UdjinM6
b4a78fb285
Fix testnet icon (#3726)
There is a bug in gdk-pixbuf which prevents ico files from being displayed correctly.
https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/issues/86

Fixed by `convert bitcoin_testnet.ico[4] -define icon:auto-resize=256,128,64,48,32,16 bitcoin_testnet.ico`
2020-09-24 01:19:52 -04:00
dustinface
3650ee6556
qt: Remove unused assets (#3721) 2020-09-24 01:19:40 -04:00
dustinface
cb078422cd
qt: Finetune RPCConsole (#3720)
* qt: Remove icons from debug console

Imo it's clear enough with the colors what commands/output and what user
inout is.

* qt: Draw network stats on the graph + Remove the QGroupBox next to it

The QGroupBox thing just added too much empty space imo.

* qt: Align ThemedStyle colors with css
2020-09-24 01:19:17 -04:00
UdjinM6
a198a74a4f
privatesend: Avoid interacting with keypool in CTransactionBuilder ctor (#3723) 2020-09-24 01:18:43 -04:00
dustinface
f601122cbd
qt: Hide remaining PrivateSend UI if PrivateSend is not enabled (#3716)
* qt: Rename two PrivateSend related labels in OptionsDialog

* qt: Hide main PrivateSend UI elements if its not enabled

- Tab button
- Menu actions

* qt: Hide PrivateSend in OptionsDialog options if its not enabled.

* qt: Hide PrivateSend filter in TransactionView if its not enabled

* Update toolbar shortcuts to match toolbar buttons visibility

* Update src/qt/transactionview.cpp

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

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2020-09-24 01:18:26 -04:00
dustinface
c7896eb657
qt: Disable missing macOS focus rects in AddressBookPage (#3711) 2020-09-24 01:17:50 -04:00
UdjinM6
c136522e84
qt: Finetune Options Dialog (#3709)
* Fix proxy port ui elements

* Fix fake net checkboxes

* Fix active options label by enabling text wrapping

* Fix options dialog resizing when font size is changed

* Move "Window" tab options into "Main" tab, drop "Window" tab

* Shrink min sizes a bit

* qt: Drop the surrounding QGroupBox in Options -> Wallet

Co-authored-by: xdustinface <xdustinfacex@gmail.com>
2020-09-24 01:17:22 -04:00
UdjinM6
bb0d5d4808
qt: Make sure send confirmation dialog uses correct font settings (#3714) 2020-09-24 01:17:01 -04:00
dustinface
ab5ffe3c11
qt: Use scaled font size for all QToolTip instances (#3708) 2020-09-24 01:16:40 -04:00
dustinface
42b606ea76
qt: Make sure font size in TransactionDescDialog is adjusted properly (#3707) 2020-09-24 01:16:21 -04:00
UdjinM6
8fa280140a
qt: Tweak few strings (#3706)
* Tweak few strings to make it easier to translate

Use args when it makes sense. Wrap 2 more strings with `tr()`.

* Fix typo
2020-09-24 01:14:12 -04:00
UdjinM6
9ded9501f8
Merge pull request #3702 from PastaPastaPasta/backport-v16-3661
[v0.16.x] Backport #3661
2020-09-14 01:33:19 +03:00
UdjinM6
5c2861538c
Merge pull request #3703 from PastaPastaPasta/backport-v16-realloc
[v0.16.x] Backport v16 realloc
2020-09-14 01:33:02 +03:00
UdjinM6
fa97aa358c
Merge pull request #3704 from PastaPastaPasta/backport-v16-even-more
[v0.16.x] Backport some more
2020-09-14 01:32:30 +03:00
dustinface
01a3a6c81a qt: Finetune ModalOverlay (#3699)
* qt: Align warning icon in ModalOverlay properly with the text

* qt: Center form layout in modaloverlay
2020-09-13 10:32:18 +02:00
dustinface
16f9d94404 qt: Make sure the statusbar reflects internal states correct (#3698)
* qt: Increase number of spinner frames

* qt: Add and use BitcoinGUI::startSpinner and BitcoinGUI::stopSpinner

* qt: Handle CMasternodeSync::Reset calls

* qt: Make sure the statusbar always reflects the sync state/progress

* qt: Add BitcoinGUI::updateProgressBarVisibility

* qt: Animate connection icon while connecting

* qt: Refactor check in BitcoinGUI::updateProgressBarVisibility

* qt: Rename some variables

* Update src/qt/bitcoingui.cpp

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

Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>
2020-09-13 10:32:10 +02:00
dustinface
19aab3a1d8
qt|wallet: Fix "Use available balance" for PrivateSend (#3700)
* wallet: Allow CoinControl in GetAnonymizedCredit + GetAnonymizedBalance

* qt: Allow CoinControl in WalletModel::getAnonymizedBalance

* qt: Use CoinControl in SendCoinsDialog::useAvailableBalance for PS

* wallet: Fix caching in GetAnonymizedCredit
2020-09-12 21:00:35 -04:00
pasta
08f2437b82
fix indentation
Signed-off-by: pasta <pasta@dashboost.org>
2020-09-12 19:10:49 -04:00
xdustinface
9e425d66c6 Partially merge #3604:
- Add BitcoinGUI::updateWalletStatus()
- Add WalletModel::getWalletModel()
- Make WalletFrame::currentWalletView public
2020-09-12 23:42:00 +02:00
dustinface
2bb94c73eb masternode|net|rpc: Improve masternode sync process (#3690)
* masternode: Replace sync states INITIAL and WAITING with BLOCKCHAIN

* masternode: Peer dependent "assume tip" timeout

I would say its enough to only wait 1 tick if we have more than 3
peers before we move over to governance sync.

* masternode: Notify the UI instantly if switched to governance sync

Without this it takes one iteration more for the UI to receive the
update.

* masternode: Notify the UI about CMasternodeSync::Reset calls

* masternode: Don't instantly reset the sync process

Give it MASTERNODE_SYNC_RESET_SECONDS (600) seconds time after the last
UpdateBlockTip call.

* rpc: Don't switch to next asset in "mnsync reset"

* rpc: Force the reset in "mnsync reset"

* net: Make sure the sync gets a reset if required after network changes

This will reset the sync process if its outdated in the following cases:

- If the connections dropped to zero
- If the connections went from zero to one
- If the network has been enabled or disabled

* Apply suggestions from code review

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

* net: Only open masternode connections if the blockchain is synced

In general it doesn't make sense to connect to masternodes before due to
MNAUTH requires blockchain sync. This could lead to failing quorum
connections/failing masternode
probing.. if a just restarted node/a out of sync node
would hit a dkg block.. Then they would not try to open those
llmq/probing connections for the next 60s (nLLMQConnectionRetryTimeout).
Thats basically what happens in tests right now and they fail without
this commit.

* test: Make sure nodes are synced when they get restored after isolation

Their sync might be out of date otherwise due to bigger mocktime bumps

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2020-09-12 22:54:56 +02:00
dustinface
aa81a06264 masternode|rpc: Remove unused code (#3689) 2020-09-12 22:54:56 +02:00
dustinface
2e92237865 qt: Improved status bar (#3688)
* qt: Adjust green color

* qt: Don't disable the HD icon

Disabling it leads to incorrect colors due to opacity.

* qt: Move the HD icon to the left

Reason: Its the only one not turning green by default if all is set
properly. So this lets is look better imo.

* qt: Increase statusbar icon size

* qt: Show lock icon in status bar also if wallet is not encrypted

Just as signal to the user!

* qt: Refine connection icon usage

* qt: Use state related colors in statusbar

* qt: Hide the HD icon for non-HD wallets

* qt: Update HD icon
2020-09-12 22:54:56 +02:00
dustinface
54ed089f97 test: Implement unit tests for CTransactionBuilder (#3677)
* makefile.test.include: Let privatesend_tests.cpp depend on ENABLE_WALLET

* test: Implement unit tests for CTransactionBuilder

* Check that we can decrease the amount and GetAmountLeft() is updated accordingly

* Check if resulting tx has a change output when expected

* Avoid pushing nullptr into vecOutputs

* Add few notes about size calculations

* nit: better readability (imo)

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2020-09-12 22:54:56 +02:00
dustinface
ab0f789be6 wallet: Fix and improve CWallet::CreateTransaction (#3668)
* wallet: Remove unused vecTxDSInTmp in CWallet::CreateTransaction

* wallet: Calculate fees earlier and respect them in change determination

* wallet: Cleanup obsolete code in CreateTransaction

This parts were needed before when the fee was calculated after the
change was assigned. But now with the previous commit the fee is
calculated upfront and respected properly from the begining. So there is
no longer a need of increasing or decreasing the change depending on the
fee as it has the correct value directly after its added.

* wallet: Try to pick other inputs if the selected ones are too small

If nChange is negative in this cases it means that the selected inputs
can't cover the amount to send and the required transaction fee. So we
just add the missing amount to nFeeRet. This leads to the algo
trying to pick larger inputs in the next loop (with nFeeRet more duffs
than in the previous loop). This process gets repeated until the selected
amount is enough to cover all the costs or until the requested amount
can't be selected anymore (not enough utxos to cover it).

* wallet: Break the loop if the transaction is ready

* wallet: Respect additional amount from previous cycles

* wallet: Respect available in coin selection, try all coins in last round

* wallet: Avoid potential infinite loop, just in case..

* wallet: Fix signing in CreateTransaction

Prior it was messed because of 60d96a1a28b55f071c6144f248e136679c44337e. 
Set coins isn't sorted the same way as txNew.vin is so it sometimes may 
pick wrong coins for signing the input.

* wallet: Fix change calculation if "subtract fee from amount" is enabled

* wallet: Return after fee calc if no or not enough amount available

Return the proper fail reason. Prior to this commit it run into
"Exceeded max tried".

Note: Only return if not enough amount is available if we can't subtract
fee from amount.

* wallet: Fix break logic if available amount is not enough

* Revert "wallet: Fix signing in CreateTransaction"

This reverts commit 5fcdc0f00e7b961ebb62c94d17d585537e911309.

* Use a vector of coins instead of a set in CreateTransaction and sort it in a BIP69 compliant way when needed

* wallet: Adjust comment

* Cleaner usage of nChangePosRequest/InOut

* Simplify some fail/try-again conditions (fixed)

* Loop through outputs to update change output position only when outputs are sorted for BIP69

No need to do this for non-bip69 cases (i.e. when a specific change output position was requested and assigned)

* Avoid implicit conversions of int-s into bool-s

* Move `nAmountLeft == nFeeRet` check higher, tweak comments

* wallet: Fix some formatting

* wallet: Improve CTxIn creation in CreateTransaction

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2020-09-12 22:54:56 +02:00
dustinface
dd55609d6b test: Implement unit tests for CWallet::CreateTransaction (#3667)
* test: Implement unit tests for CWallet::CreateTransaction

* test: Reset minRelayTxFee in CreateTransactionTest

At this point its modified from an other test when running all unit 
tests which lets this test fail unexpectedly.

* test: Lock cs_main/cs_wallet when required in CreateTransactionTest

* test: Add new test in CreateTransactionTest

Test if the wallet creation fails properly with the correct error
messages.

* test: Fixed expected test results for some CreateTransactionTest cases

* test: Fail if CreateTransaction runs into "Exceed max tries" case

* test: Adjust last return in CreateTransaction

* test: Drop dust tests
2020-09-12 22:54:56 +02:00
dustinface
9c988d5b5a privatesend|wallet|qt: Improve calculations in CreateDenominated/MakeCollateralAmounts (#3657)
* wallet: Add m_dust_feerate to CCoinControl / Use it in CreateTransaction

* privatesend: Introduce CTransactionBuilder/CTransactionBuilderOutput

Builder classes for transactions from type

Inputs: Defined by CompactTallyItem
Outputs: Simple outputs with lose reserve keys

This takes fully takes care of fee calculations and makes sure calculations are the same like those happening when actually create the transaction with CreateTransaction.

* privatesend: Improve amount/fee calculation in CreateDenominated

* privatesend: Improve amount/fee calculation in MakeCollateralAmounts

* qt: Fix decomposeTransaction's MakeCollateralAmounts detection

Align it with the three cases in CPrivateSendClientSession::MakeCollateralAmounts

* Refactor GetFee

The fee rate is always coinControl.m_feerate, also it's not used outside so should be a private method

* Simplify nBytesOutput calculations

* Drop unused GetBytesOutput()

* Make Clear(), GetBytesTotal() and GetAmountUsed() private

* Drop unused GetCoinControl()

* Make ToString() const

* Refactor `CTransactionBuilder::Commit()`

* Reorder cases in decomposeTransaction

* Fix "finished" conditions in CreateDenominated

* Fix typo

* wallet|privatesend: Refactor CCoinControl's m_dust_feerate -> m_discard_feerate

* privatesend: Drop unused member CTransactionBuilder::dustFeeRate

* privatesend: Improve CTransactionBuilder's readability

* privatesend: Make the static CTransactionBuilder::GetAmountLeft private

* wallet: Recover previous code style

* Update src/privatesend/privatesend-util.cpp

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

* Tweak CTransactionBuilder to respect potential compact size diffs

* Tweak GetFee param type

* Trivial log/comments tweaks

* privatesend: Fix countPossibleOutputs

- Fix off by one issue
- Respect max outputs threshold

* privatesend: Use GetSizeOfCompactSizeDiff in CTransactionBuilder

* Apply suggestions from code review

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

* privatesend: Rename TryAdd to CouldAdd in CTransactionBuilder

* wallet: Reset m_discard_feerate in CCoinControl::SetNull

* Respect `-paytxfee` and `settxfee`

* privatesend: Check for denominated amount only where really required

* qt: Remove obsolete IsCollateralAmount() checks

* privatesend: Don't accept negative amounts in CTransactionBuilder

* privatesend: Remove unused CConnman parameter

* use emplace_back instead of push_back

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

* fix typos

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

* make GetAmount const

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

* privatesend: Explicit capture __func__ in needMoreOutputs lambda

* privatesend: Update CTransactionBuilder::UpdateAmount

* remove const on parameter in declaration

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

* handle unsigned int -> int conversions a bit better

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

* explicitly cast to int from unsigned int.

estimateSmartFee handles it if negative

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

* Make CTransactionBuilderOutput::GetScript const

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

* privatesend: Update comments to follow doxygen

* privatesend: Add class descriptions

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>
Co-authored-by: pasta <pasta@dashboost.org>
2020-09-12 22:54:45 +02:00
dustinface
ba2dcb0399 qt: Update assets and colorize them theme related (#3574)
* qt: Replaced checkbox images with new ones

* qt: Replaced radiobutton images with new ones

* qt: Redefine arrow usage

- Removed "hover" arrows
- Rename normal -> light
- Rename pressed -> dark
- Use light as hover in dark theme and vice versa

* qt: Update icon set

* qt: Update sync spinner

* qt: Add new ThemedColor's

- ThemedColor::ORANGE
- ThemedColor::ICON_ALTERNATIVE_COLOR

* qt: Add GUIUtil::getIcon and GUIUtil::setIcon

* qt: Use themed icons where required

* qt: Make sure icons in SendCoinsEntry are updated on style changes

* qt: Make sure status bar icons are updated on style changes

* qt: Make sure icons in RPCConsole are updated on style changes

* qt: Remove icon/iconsSize in modaloverlaydialog.ui

* qt: Remove obsolete qproperty-iconSize entries from general.css

* qt: Use QToolButton's in SendVerifyMessageDialog and RPCConsole

Instead of QPushButton. This is to have the same alignment of the
iconized buttons by default like in SendCoinsEntry

* qt: Revert arrow icons

* qt: Revert HD icons
2020-09-12 20:56:40 +02:00
PastaPastaPasta
37af70a188
Merge #13622: Remove mapRequest tracking that just effects Qt display. (#3694)
* Merge #13622: Remove mapRequest tracking that just effects Qt display.

beef7ec4be725beea870a2da510d2817487601ec Remove useless mapRequest tracking that just effects Qt display. (Matt Corallo)

Pull request description:

  I thought we had removed this a long time ago, TBH, its really
  confusing feedback to users that we display whether a tx was
  broadcast to immediate neighbor nodes, given that has little
  indication of whether the tx propagated very far.

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

* drop TX_STATUS_OFFLINE

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

Co-authored-by: Wladimir J. van der Laan <laanwj@gmail.com>
2020-09-12 13:29:36 -04:00
dustinface
e13c746a7d
chainparams: Remove llmq_50_60 from regtest (#3696)
Its just not used anywhere so there is no point in starting the thread 
for it imo since it just spams the test logs with tries/failures.
2020-09-12 13:29:36 -04:00
UdjinM6
f2c1a9213c
Fix two potential issues in the way pending islocks are processed (#3678)
* Always check for previous quorum set in llmq IS

* Refactor SelectQuorumForSigning and related code

Should have no changes in behaviour

* Do not use SIGN_HEIGHT_OFFSET when checking pending IS locks, use actual chain tip

This commit actually changes the behaviour
2020-09-12 13:29:36 -04:00
pasta
82ad002541
fix reallocation backport
Signed-off-by: pasta <pasta@dashboost.org>
2020-09-12 13:27:04 -04:00
UdjinM6
eb163c53a5
Implement dynamic activation thresholds (#3692)
* Implement dynamic activation thresholds

* fix

* Revert unrelated changes

* Clarify switching to/staying in LOCKED_IN state

* Fix signal function to work correctly with num_blocks=0

* Add simplified threshold calculation and use it in tests

* Check that thresholds are decreasing, reach the min level and stay there

* Drop `;`
2020-09-12 13:27:04 -04:00
UdjinM6
7d6aba47cf
Implement Block Reward Reallocation (#3691)
* Implement Block Reward Reallocation

* Add integr. test

* drop unused variable

* Sep -> Oct

* Update test/functional/feature_block_reward_reallocation.py

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

* Revert to Sep for testnet and devnet

* validation: Refactor reallocation calculations

Makes it much more readable imo and avoids calculating the percentage
each time.

* test: Align reallocation calculation with c++ (GetMasternodePayment)

* test: Make feature_block_reward_allocation.py executable

* Make linter happy

Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>
Co-authored-by: xdustinface <xdustinfacex@gmail.com>
2020-09-12 13:27:04 -04:00
PastaPastaPasta
a70056c5a8
privatesend: Implement Random Round Mixing (#3661)
* Use GetRealOut... instead of Capped

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

* Add "ps_salt" value to walletdb

This value is used to deterministically pick a random number of rounds to mix, between N and N + GetRandomRounds. A salt is needed in addition to the inputs hash to ensure that an attacker learns nothing from looking at the blockchain.

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

* Implement Random Round Mixing

This implements "Random Round Mixing." Previously, attempted attacks on PrivateSend assumed that all inputs had been mixed for the same number of rounds. Noramlly assuming 2,4,8 or 16.

While none of these attacks have been successful, they still teach what we can do to make our system more robust, and one of those ways is to implement "Random Round Mixing".

Under the previous system, inputs were mixed up until N rounds (configured by user). At this point, the input was considered mixed, and could be private-sent. Under this new system, an input will be mixed to N rounds like prior. However, at this point, Sha256d(input, salt) will be calculated (note: this likely could be a more efficient hash function than double sha256, but that can be done in another PR / version if needed). If (hash % 2 == 0), then the input will be mixed again.
This results in an exponential decay where if you mix a set of inputs, half of those inputs will be mixed for N rounds, 1/4 will be mixed N+1, 1/8 will be mixed N+2, etc. This current implementation caps it at N+2. This results in mixing an average of N+0.875 rounds. If you removed the cap, you would mix on average N+1 rounds.

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

* Make PS salt a private member of CWallet, tweak the way it's initialized

* Introduce `CWallet::IsFullyMixed` and use it everywhere instead of comparing rounds directly to ensure consistency between coin selection logic, balance calculations and gui

* Tweak `GetRealOutpointPrivateSendRounds` to respect random rounds

* Tweak IsFullyMixed to make decision on a per-outpoint basis instead of a per-tx one

* make a comment doxygen

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

* Rename GetPrivateSendSalt InitPrivateSendSalt, since it is not a getter

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

* move the comment below GetRounds call

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

* don't use GetCappedOutpointPrivateSendRounds when printing to RPC

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

* Simplify hashing in IsFullyMixed

Uses just 1 sha256 instead of 3 (1 in SerializeHash + 2 in Hash)

* undo comment change

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

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2020-09-12 13:04:49 -04:00
PastaPastaPasta
c2f56e08a8
remove /* continued */ where is is not needed
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2020-09-10 09:56:21 -04:00
Pasta
14fd2214af
fix lint failure
Signed-off-by: Pasta <pasta@dashboost.org>
2020-09-10 09:56:08 -04:00
UdjinM6
e8d5c8e19d More of 13153 (fix LogPrintf-s) -- TODO: backport to 0.16 2020-09-08 13:12:10 -05:00
dustinface
50d7a2fecf qt: Ignore GUIUtil::updateFont calls until GUIUtil::loadFonts was called (#3687) 2020-09-08 13:09:26 -05:00
dustinface
608f481a9c qt: Fix block update signals/slots in BitcoinGUI and SendCoinsDialog (#3685) 2020-09-08 13:09:00 -05:00