Commit Graph

17878 Commits

Author SHA1 Message Date
dustinface
067622764c qt: Disable macOS system focus rectangles for dash themes (#3556)
* qt: Disable macOS system focus rectangles for dash themes

The focus rects drawn by macOS are in the color the user selected in the
OS settings as selection color. This just doesn't always fit into the coloring of the dash specific themes.

* Apply review suggestion

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

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2020-09-01 18:46:28 +02:00
UdjinM6
d296cbdca1 Merge pull request #3555 from xdustinface/pr-ui-2-fonts
qt: Implement application wide font management
2020-09-01 18:46:28 +02:00
dustinface
b409254587 qt: Redesign of the main toolbar (#3554)
* qt: Replaced QAction with QToolButton for BitcoinGUI toolbar buttons.

This allows setting a size policy for the toolbar buttons so that
they are stretched over the toolbar and resize on window size changes.

* qt: Give the BitcoinGUI's toolbar more style

* qt: Give the toolbar logo a higher resolution

This also removes the blue logo because its not longer used.

* qt: Restore the traditional themes toolbar previous styles and logo
2020-09-01 18:46:28 +02:00
dustinface
c5fcc811d6 qt: Generalized css files, simple design changes, added scripts to keep track of color usage (#3508)
* qt: Send tab - Generalized related CSS and some redesign

- Removed grey boxes around labels of SendCoinEntry
- Changed button styles for add/clear button
- Removed padding for send button

* qt: Overview tab - Generalized related CSS and some redesign

- Removed grey boxes around balance labels

* qt: Receive tab & QPushButton - Generalized related CSS and some redesign

- Removed grey boxes around "Label", "Amount", "Message" and "Requested
payment history" labels and increased their textsize
- Changed the color of the "Requested payment history" label
- Adjusted the style of the "Clear", "Remove" and "Show" buttons

* qt: Transaction tab - Generalized related CSS and some redesign

- Increased size of selected sum labels

* qt: Masternode tab - Generalized related CSS and some redesign

- Increased the size of the "Filter list" and "Node count" labels

* qt: CoinControl dialog - Generalized related CSS and some redesign

- Removed alternated coloring

* qt: Sync overlay - Generalized related CSS and some redesign

- Adjusted colors
- Added rounded border

* qt: About dialog - Generalized related CSS

* qt: Edit address dialog - Generalized related CSS

* qt: Help message dialog - Generalized related CSS

* qt: RPC console  - Generalized related CSS and some redesign

- Changed colors for network activity legend (signal colors TBD in a
code change commit)

* qt: Options dialog - Generalized related CSS

* qt: Ask passphrase dialog - Generalized related CSS

* qt: Addressbook page - Generalized related CSS

* qt: Sign/Verify dialog - Generalized related CSS

* qt: Open URI dialog - Generalized related CSS

* qt: Generalized remaining individual Qt classes

* qt: Fixed indentation in css files

* qt: Use newlines for multiple selector entries

* qt: Formal cleanups in all css files

* qt: Add copyright and file description to all css files

* qt: Add update_colors.py, prepare css files for scripted color updates

- update_colors.py is a python script which parses the css files and prints some
details about their color usage into appropriate files in the css/colors directory. It also
updates the <colors></colors> section for each css file.
- Added <colors></colors> section to css files for automated color updates by update_colors.py

* qt/contrib: Moved update_colors.py to update-css-files.py 

This also moves the file from src/qt/res/css to contrib/devtools

* build: Remove files in src/qt/res/css/colors when running "make clean"

* git: Add src/qt/res/css/colors/* to gitignore and remove the files from the repo

* path -> css_folder_path

* Resolve path and fail early

* Create 'colors/' if it doesn't exist and fail if smth went wrong

* Run git after all filesystem preparations are done

* qt: Fix background-color of bgWidget in trad.css

Its #AARRGGBB not #RRGGBBAA!

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

* qt: Run update_colors.py

* contrib: Use case insensitive regex for color matching

* qt: Update colors in css files

* contrib: Remove obsolete import in update-css-files.py

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2020-09-01 18:46:28 +02:00
UdjinM6
d42877998e
Merge pull request #3670 from PastaPastaPasta/more-v16-backports
[v0.16.x] Backport pending PRs
2020-09-01 18:28:25 +03:00
UdjinM6
8aeeb97995
Print exception origin in crash messages (#3653)
* Print exception origin in crash messages

We use `PrintExceptionContinue` in many places and we pass crash origin to it as a param but we never use it. Also, change the param name to better match its meaning.

* Update src/util.cpp

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

Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>
2020-08-23 11:54:37 -05:00
UdjinM6
bd5c047e28
Implement a safer version of GetCrashInfoFromException (#3652)
* Implement a safer version of GetCrashInfoFromException

`abi::__cxa_current_exception_type()` can return `null`, handle this properly

* Update src/stacktraces.cpp

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

* Update src/stacktraces.cpp

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

Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>
2020-08-23 11:54:10 -05:00
dustinface
4414b5c3c7
llmq: Fix spork check in CSigSharesManager::ForceReAnnouncement (#3650)
It seems like the idea here was to avoid announcing already available sigshares for a signhash to everyone if concentrated recovery is enabled. But by returning there if `IsAllMembersConnectedEnabled` equals to `false` we disable the re-announcements prior to the spork activation, where we want to still have them and re-enable if the spork is enabled where we don't want to have them.
2020-08-23 11:53:45 -05:00
Akshay CM
c232f2a12d
[RPC] Show address of fundDest when no funds (#3649) 2020-08-23 11:53:30 -05:00
UdjinM6
abe3d578b2
Include protocol version into MNAUTH (#3631)
* Include protocol version into MNAUTH

* Introduce MNAUTH_NODE_VER_VERSION = 70218
2020-08-23 11:52:22 -05:00
CryptoTeller
4db8968d4a
rpc: update help text for BLS operator key arguments (#3628)
* Update rpcevo.cpp

I would like to mirror docs.dash.org/en/stable/masternodes/maintenance.html#proupservtx by adding the specific term "BLS" to the rpc help menu to differentiate this is not a dash address key like the other ownerkey votingkey. We had this changed on the docs site to help clarify for people who were missing the point this was the operator BLS key.

* Update rpcevo.cpp
2020-08-23 11:50:58 -05:00
dustinface
bbb0064b60
init: Fix crash due to -litemode and improve its deprecation warning (#3626)
* init: Fix `-litemode` crash due to not connected CClientUIInterface signal

Prior to this commit the signal
`CClientUIInterface::ThreadSafeMessageBox` is not connected to a slot in
Qt at the time its emitted when `-litemode` is used. The signal gets
emitted from `InitWarning`, in `InitParameterInteraction`. This happens
currently before `BitcoinGUI` gets created by
`app.createWindow(networkStyle.data())` in `dash.cpp` where the
signal becomes connected to the slot. After this commit the litemode
`InitWarning` will be called in `AppInitParameterInteraction` which runs
after `BitcoinGUI` has been created, means the signal will be connected
then at that point and the crash is fixed.

* init: Improve -litemode deprecation warning

- Always show a basic warning if `-litemode` gets used no matter if its
activated or not.
- Let the user know when -disablegovernance gets forced by -litemode.
2020-08-23 11:50:30 -05:00
UdjinM6
8d99e7836c
Fix -resetguisettings (#3624) 2020-08-23 11:49:09 -05:00
PastaPastaPasta
508fc2db4b
privatesend: Increase max participants to 20 (#3610)
* Add spork to change max mixing participants to 20

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

* Also change min participants on devnet/testnet

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

* adjust formatting

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

* add nPoolNewMinParticipants under regtest

Signed-off-by: pasta <pasta@dashboost.org>
2020-08-23 11:48:17 -05:00
dustinface
f425316eed
util: Change TraceThread's "name" type: "const char*" -> "const std::string" (#3609)
Having "const char*" leads to undefined behaviour if the "const char*"
is deallocated before the thread used it.

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

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2020-08-23 11:47:47 -05:00
Alexander Block
a170c649b8
Fail GetTransaction when the block from txindex is not in mapBlockIndex (#3606)
This indicates a previous crash where the TX made it into the txindex but
the block was not flushed to disk. When dashd is restarted then, there is
a short time where GetTransaction would return a non-existant block, while
callers very often assume that the returned block hash is known.
2020-08-23 11:47:27 -05:00
dustinface
62c3fb5748
llmq: Fix thread handling in CDKGSessionManager and CDKGSessionHandler (#3601)
* llqm: Fix thread handling in CDKGSessionManager and CDKGSessionHandler

* llmq: Removed unused thread_pool from CDKGSessionManager

* Tweak `CDKGSessionHandler::StartThread()`

* llmq: Simplify CDKGSessionHandler's thread naming

* llmq: Make sure CDKGSessionHandler uses a valid LLMQ type

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

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2020-08-23 11:46:58 -05:00
dustinface
aa3bec6106
evo: Avoid some unnecessary copying in BuildNewListFromBlock (#3594) 2020-08-23 11:46:27 -05:00
PastaPastaPasta
6a249f59b6
Merge #13564: [wallet] loadwallet shouldn't create new wallets. (#3592)
ea65182f03 [wallet] loadwallet shouldn't create new wallets. (John Newbery)

Pull request description:

  A bug in the initial implementation of loadwallet meant that if the
  arguement was a directory that didn't contain a wallet.dat file, a new
  wallet would be created in that directory. Fix that so that if a
  directory is passed in, it must contain a wallet.dat file.

  Bug reported by promag (João Barbosa).

Tree-SHA512: 0a59fa8a33fde51a88544ad288b00e4995284fe16424f643076aaba42b8244fff362145217650ee53d518dfab7efbed4237632c34cdd3dcbbecaa9ecaab5fd7b

Co-authored-by: MarcoFalke <falke.marco@gmail.com>
2020-08-23 11:46:10 -05:00
UdjinM6
b45b1373a0
Prefer creating larger denoms at the second step of CreateDenominated (#3589)
This also means less smaller denoms (which could be good for privacy) and fixes a bug (not mixing all the available funds), see comments in code for more info.
2020-08-23 11:45:49 -05:00
UdjinM6
bac02d0c9a
More accurate fee calculation in CreateDenominated (#3588)
* More accurate fee calculation in CreateDenominated

* Apply suggestions from code review

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

* Fix `finished` conditions

Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>
2020-08-23 11:45:18 -05:00
PastaPastaPasta
baf18a35d5
More pruning improvements (#3579)
* explicitly check that -disablegovernance is true for pruned mode.

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

* try to set -disablegovernance and -txindex if pruned mode is enabled

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

* Adjust InitWarning when governance validation is disabled

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

* Check for deprecated -litemode earlier

* Move -disablegovernance warning into AppInitParameterInteraction

* Tweak -prune help text and a related comment in AppInitParameterInteraction

* Ignore init warnings in blockchain.py

* Adjust "governance validation disabled" warning depending on if running a pruned node

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

* Skip init warnings in import-rescan.py and node_network_limited.py

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2020-08-23 11:44:39 -05:00
PastaPastaPasta
0297eb428a
Change litemode to disablegovernance (#3577)
* Change litemode to disablegovernance, this makes it more clear what that flag actually does.

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

* more fLiteMode to fDisableGovernance

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

* handle -litemode being set

Signed-off-by: pasta <pasta@dashboost.org>
2020-08-23 11:43:56 -05:00
PastaPastaPasta
da38e2bf83
Change litemode from disabling all Dash specific features to disabling governance validation (#3488)
* enable privatesend by default in litemode

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

* remove useless litemode check in CPrivateSendServer::ProcessMessage, must be MN, so must have litemode off already

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

* change litemode to mean, doesn't validate governance, but has all other dash features

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

* litemode must be off for MNs cont

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

* change litemode help text

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

* don't skip MN sync in litemode

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

* drop fLiteMode in bitcoingui.cpp

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

* skip governance sync in litemode

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

* remove fLiteMode in walletview.cpp

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

* add back

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

* fix comments

* fix cache loading

* fix scheduled tasks

* Fix help text for some rpcs (revert what's left of 3478)

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2020-08-23 11:43:28 -05:00
Alexander Block
ab90b09c8d
Merge pull request #3543 from codablock/pr_v16_backports
[v0.16.x] Backport pending PRs
2020-06-26 11:08:36 +02:00
Alexander Block
772b6bfe7c Disable new connection handling and concentrated recovery for large LLMQs (#3548)
* Rename CollectSigSharesToSend to CollectSigSharesToSendConcentrated

* Allow to disable concentrated recovery and new connection handling for large LLMQs
2020-06-25 09:47:48 +02:00
dustinface
c72bc354f8 contrib: Move dustinface.pgp into contrib/gitian-keys (#3547) 2020-06-24 10:53:57 +02:00
Alexander Block
0b70380fff Fix argument handling for devnets (#3549)
* Use "devnet" instead of "dev" for network id

Otherwise one would have to use "dev.port=123" in configs, which might
be confusing as we usually name such networks "devnet".

* Fix ArgsManager::GetChainName to work with devnets again

-devnet is not a boolean arg, but a string. So we have to check for
existence only.
2020-06-24 10:04:58 +02:00
UdjinM6
5f9fc5edb6 Fix CSigningManager::VerifyRecoveredSig (#3546) 2020-06-24 10:04:43 +02:00
Alexander Block
00486eca06 Use exponential backoff timeouts for recovery (#3535)
Starting with 2 seconds.
2020-06-24 10:04:32 +02:00
Alexander Block
34c354eaad Dont skip sendmessages (#3534)
* Revert "Only call SendMessages when ProcessMessages did some work or when some time passed"

This reverts commit 24ead62905.

* Only skip SendMessages() for fMasternode connections
2020-06-23 10:59:35 +02:00
UdjinM6
40814d945e Avoid overriding validation states, return more specific states in some cases (#3541)
Also, add comments clarifying why the state isn't assigned in return-s.
2020-06-23 10:59:28 +02:00
Alexander Block
139f589b6f Don'd send SENDXXX messages to fMasternode connections (#3537)
And respect a received QSENDRECSIGS no matter if fMasternode or not. We
assume that fMasternode peers won't send QSENDRECSIGS from now on.
2020-06-18 16:29:15 +02:00
Alexander Block
f064964678 Only relay DKG messages to intra quorum connection members (#3536)
This reuses the old intra-quorum connections algorithm.
2020-06-18 16:29:05 +02:00
UdjinM6
d08b971ddb Use correct CURRENT_VERSION constants when creating ProTx-es via rpc (#3524) 2020-06-18 16:28:57 +02:00
dustinface
4ae57a2276 qt: Fix label updates in SendCoinsEntry (#3523)
Bug which leads to not filling an associated addressbook labels into the Label line edit.
2020-06-18 16:28:35 +02:00
PastaPastaPasta
1a54f0392d Revert "implemented labeler which automatically adds RPC label to anything modifying RPC files (#3499)" (#3517)
This reverts commit fe98b81b80.
2020-06-18 16:28:21 +02:00
UdjinM6
acff9998e1 UpgradeDBIfNeeded failure should require reindexing (#3516) 2020-06-18 16:28:09 +02:00
UdjinM6
1163fc70a2 Use correct CURRENT_VERSION constants when checking ProTx version (#3515) 2020-06-18 16:28:00 +02:00
UdjinM6
0186fdfe60 Fix chainlock scheduler handling (#3514)
Reindexing corrupted chain always fails otherwise.
2020-06-18 16:27:49 +02:00
UdjinM6
b4008ee4fc Some Dashification (#3513)
* Trivial Dashification

* Tweak getnetworkinfo and dumpwallet help text

We don't have RBF and Segwit

* CopyrightHolders should also check for missing "Dash Core" copyright
2020-06-18 16:27:37 +02:00
UdjinM6
ab5aeed920
Optimize MN lists cache (#3506) 2020-06-09 07:43:34 +03:00
UdjinM6
91d9329093
Make CDeterministicMN::internalId private to make sure it's set/accessed properly (#3505)
* Make internalId private to make sure it's set/accessed properly

* evo: Make internalId only accessible by the constructor

* Tweak constructors

Co-authored-by: xdustinface <xdustinfacex@gmail.com>
2020-06-09 06:53:42 +03:00
UdjinM6
232430fac9
Fix ProcessNewBlock vs EnforceBestChainLock deadlocks in ActivateBestChain (#3492)
* Drop dead code in DoInvalidateBlock

* Let ActivateBestChain skip SyncWithValidationInterfaceQueue when called from IS or CL threads

* Use CL's own scheduler instead of a global one

* Revert "Let ActivateBestChain skip SyncWithValidationInterfaceQueue when called from IS or CL threads"

This reverts commit 1c9f6da50a.
2020-06-09 06:53:16 +03:00
PastaPastaPasta
fe98b81b80
implemented labeler which automatically adds RPC label to anything modifying RPC files (#3499)
* implemented labeler which automatically adds RPC label to anything modifying RPC files

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

* add src/wallet/rpc*

Signed-off-by: pasta <pasta@dashboost.org>
2020-06-08 06:10:52 +03:00
UdjinM6
ae5faf23da
Better error handling while processing special txes (#3504)
* Return invalid state for GetTxPayload failures instead of asserting

* Throw an error when internal `find` fails instead of asserting

* Unify mnlist checks for lists created from blocks and lists created via updates of older lists with diffs

* Wrap evo block processing in try..catch to make sure all earlier introduced throws are caught

* evo/llmq: Adjust reject reasons for CFinalCommitmentTxPayload

In CheckLLMQCommitment this reject string was used so i adjusted the
other one in CQuorumBlockProcessor::GetCommitmentsFromBlock and the new
introduced in PR #3506

* return state.DoS instead of asserting in cbtx.cpp

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

Co-authored-by: xdustinface <xdustinfacex@gmail.com>
Co-authored-by: pasta <pasta@dashboost.org>
2020-06-08 05:57:57 +03:00
dustinface
13a45ec323
rpc: Validate provided keys for query_options parameter in listunspent (#3507)
With this change listunspent will throw an error if there is a wrong key
in the query_option object.
2020-06-04 14:43:51 +03:00
dustinface
9b47883884
contrib: Added dustinface.pgp (#3502) 2020-06-04 14:43:33 +03:00
dustinface
048503bcb5
qt: Some UI fixes and improvements (#3500)
* qt: Updated loadStylesheet and added general.css for shared styles

* qt: Customized QRadioButton and QCheckBox

- Introduced new images for QCheckBox and QRadioButton
- Make use of Hover/Pressed/Disabled/Indeterminate states 
- Use customized Checkboxes and Radio-Buttons in CoinControlWidget

* qt: Removed qtreeview_selected image

This looks weird in the dark theme. Will introduce new arrows here.

* qt: Redesigned arrows and their usage

- Added new arrow images
- Make use of Hover/Pressed/Disabled states for QAbstractSpinBox and 
QComboBox
- Use custom arrows in QHeaderView
- Use custom arrows in QTreeWidget branch selectors

* qt: Slightly increased checkboxes and radio buttons

* qt: Move the scrollbars css loading into loadStyleSheet

This way all windows will have the same scrollbars and not only the main 
window.

* qt: Use padding instead of margin for QTreeWidget::branch styles

Use of margin here lead to a 2px vertical line at the left edge cause of 
the background below.

* qt: Use border-image for the scrollbar arrows and adjust the size.

background-image lead to not showing the arrows here because it 
obviously was scaled incorrect with the higher resolution of the image 
files.

* qt: Add missing grey arrows and make use of disabled states of scrollbar arrows

* qt: Adjust dashThemeActive and also use it in BitcoinGUI::createToolBars

* qt: Fixed copyright year in general.css
2020-06-04 14:43:06 +03:00
PastaPastaPasta
0662f170f0
Merge #12836: Make WalletInitInterface and DummyWalletInit private, fix nullptr deref (#3498)
d894894 wallet: Refactor to WalletInitInterface* const g_wallet_init_interface (João Barbosa)
39bc2fa wallet: Make WalletInitInterface and DummyWalletInit private (João Barbosa)

Pull request description:

  Implementations of `WalletInitInterface` don't have to be public, so make them private. This makes the interface instantiation static. Also reduces `ENABLE_WALLET` usage and removes the unnecessary `src/wallet/init.h` header.

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

# Conflicts:
#	src/qt/dash.cpp
#	src/wallet/init.cpp
#	src/wallet/init.h
#	src/walletinitinterface.h

Co-authored-by: Wladimir J. van der Laan <laanwj@gmail.com>
2020-05-20 12:24:51 +03:00