* 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>
* 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
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>
* Split -privatesenddenoms option into two to be able to specify initial/batched denom "checkpoint" and the hard cap
* Introduce MAX_PRIVATESEND_DENOM_OUTPUTS = 500 constant
Also make sure to never exceed it while looping
* Make sure to never exceed nPrivateSendDenomsBatched while creating batches
* Tweak debug logging
* Use auto for nDenomValue
* Fix detection of so called "final" denom
Now that we don't skip denoms anymore conditions are slightly different. Without this fix the "final" denom is created in a separate tx even when there is enough room in the current one.
* batched -> goal
* Tweak json and a warning
* Drop excessive checks for MAX_PRIVATESEND_DENOM_OUTPUTS in the "goal" part of the algo
Rename it to PRIVATESEND_DENOM_OUTPUTS_THRESHOLD to beter match the meaning and tweak comments
* fix log
* wallet: Add MAX_COIN_TYPE to CoinTypes to allow dynamic range checks
* rpc: Add coinType to the queryOptions object of listunspent rpc command
This allows to filter the output by CoinType:
0 -> ALL_COINS
1 -> ONLY_FULLY_MIXED
2 -> ONLY_READY_TO_MIX
3 -> ONLY_NONDENOMINATED
4 -> ONLY_1000
5 -> ONLY_PRIVATESEND_COLLATERAL
* wallet/rpc: Rename CoinType ONLY_1000 to ONLY_MASTERNODE_COLLATERAL
Make it more obvious what ONLY_1000 is in the description of the
listunspent command.
* wallet/rpc: Formatting only
Co-Authored-By: UdjinM6 <UdjinM6@users.noreply.github.com>
* wallet: Add MIN_COIN_TYPE to CoinTypes
Co-Authored-By: UdjinM6 <UdjinM6@users.noreply.github.com>
* rpc: Check the lower boundary of CoinType in listunspent's queryOptions
Co-Authored-By: UdjinM6 <UdjinM6@users.noreply.github.com>
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
* Merge #11415: [RPC] Disallow using addresses in createmultisig
1df206f Disallow using addresses in createmultisig (Andrew Chow)
Pull request description:
This PR should be the last part of #7965.
This PR makes createmultisig only accept public keys and marks the old functionality of accepting addresses as deprecated.
It also splits `_createmultisig_redeemscript` into two functions, `_createmultisig_getpubkeys` and `_createmultisig_getaddr_pubkeys`. `_createmultisig_getpubkeys` retrieves public keys from the RPC parameters and `_createmultisig_getaddr_pubkeys` retrieves addresses' public keys from the wallet. `_createmultisig_getaddr_pubkeys` requires the wallet and is only used by `addwitnessaddress` (except when `createmultisig` is used in deprecated mode).
`addwitnessaddress`'s API is also changed. Instead of returning just an address, it now returns the same thing as `createmultisig`: a JSON object with two fields, address and redeemscript.
Tree-SHA512: a5796e41935ad5e47d8165ff996a8b20d5112b5fc1a06a6d3c7f5513c13e7628a4fd37ec30fde05d8b15abfed51bc250710140f6834b13f64d0a0e47a3817969
* fix backport
Signed-off-by: pasta <pasta@dashboost.org>
* fix backport
Signed-off-by: pasta <pasta@dashboost.org>
* fix backport
Signed-off-by: pasta <pasta@dashboost.org>
* Dashify
Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>
Co-authored-by: Wladimir J. van der Laan <laanwj@gmail.com>
Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>
* Allow the creation of denoms on regtest.
Ignore the fact there are no MNs on regtest
Signed-off-by: pasta <pasta@dashboost.org>
* implement significantly improved createdenominations algorithm
Signed-off-by: pasta <pasta@dashboost.org>
* change int denomsToCreate
Signed-off-by: pasta <pasta@dashboost.org>
* Remove debugging code and use a const iterator instead of calling find multiple times
Signed-off-by: pasta <pasta@dashboost.org>
* vecDenominationsSkipped and *DenomSkipped are nolonger used
Signed-off-by: Pasta <pasta@dashboost.org>
Signed-off-by: pasta <pasta@dashboost.org>
* inputs -> outputs
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
* #3241 change PrivateSend and balance location
* include resource location back
* change back balance and privatesend checkbox position
* add new PrivateSend tab on main window and PrivateSend tray option
* adjust code formating
* revert QT TODO
* Update src/qt/forms/sendcoinsdialog.ui code formating
Co-Authored-By: UdjinM6 <UdjinM6@users.noreply.github.com>
* code formating update
* clear send dialog and remove unnecessary warning
* change clear location for better UX and performance
* remove variable used in warning
* Do not clear everything, simply unselect non-fully-mixes coins instead
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
* Warn about unselected coins
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
* Disable PrivateSend tab/menu item when PrivateSend is disabled
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
* fix tab selection bold font
* fix use available balance for PS
* change back line
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
* Introduce ONLY_PRIVATESEND coin type to select fully mixed coins only
Note: ONLY_DENOMINATED will NOT return fully mixed coins now
* Remove useless check
* Rename coin types to better match the meaning
ONLY_DENOMINATED -> ONLY_READY_TO_MIX
ONLY_PRIVATESEND -> ONLY_FULLY_MIXED
* Drop another two unnecessary checks
* qt: Allow and process URIs pasted to the payTo field of SendCoinsEntry
* qt: Prevent double invocation of the textChanged slot when pasting an URI
* qt: Keep the addressbook's label if there is already one for the address
If there is no label for the given address in the addressbook but the
URI contains a label it will use the URI's label to update the
addressbook.
* qt: Always prefer the addressbook's label over an URI's label
* Merge #12384: [Docs] Add version footnote to tor.md
39d2911 [Docs] Add version footnote to tor.md (Damian Williamson)
Pull request description:
[Docs] Add version footnote to tor.md
Added note to section 2, part -edits to `/etc/tor/torrc`- indicating this is only required for Tor version 0.2.7.0 and older, since section 3 states it is valid for Tor version 0.2.7.1 and newer. Added ref link from section 2 version footnote to section 3. Re-styled headings to work on GitHub -alternate heading style markup creation issue with numbered headings and thus headings and automatic heading links are broken-
Ref: [Issue# 12376](https://github.com/bitcoin/bitcoin/issues/12376)
Signed-off-by: Damian Williamson \<willtech@live.com.au\>
Tree-SHA512: 439f4ccc3e196011af448b220adf26b0e653ac589bf4cfbbc276c1500c9d08f209c9d6101e4d232857779d9f25164cfb222ed30e3d63de116f9121e6ebde31c3
Signed-off-by: pasta <pasta@dashboost.org>
Signed-off-by: Pasta <pasta@dashboost.org>
* bitcoin -> Dash Core
Signed-off-by: Pasta <pasta@dashboost.org>
Co-authored-by: Wladimir J. van der Laan <laanwj@gmail.com>
Replaced request.params[5] with txidFee, cause the param could be null at that index when the submit type is a masternode trigger, triggering a JSON parsing error (expected str, got null).
* llmq: Add more information to the result of CFinalCommitment::ToJson
Example output:
```
{
"version": 1,
"llmqType": 1,
"quorumHash":
"000002a20a35757fc467f0ebe8663f76e4c5df74411cc5f1735cfd92278071fe",
"signersCount": 49,
"signers": "03fbffffffffff",
"validMembersCount": 49,
"validMembers": "03fbffffffffff",
"quorumPublicKey":
"8db1108b50dd741076b577f6798f0bf382ca4d11dafd55ed14aaaf613f604aa55bf1da1f0469f75105376e440381ee23",
"quorumVvecHash":
"feedb15d5a7ca25a68d9c51036973d37925d8439d4769d7dd7bace7440089071",
"quorumSig":
"1879f6260ef427dc9542088b39e02a8e73e34c0484269cbc12108ab991d438f81e5be80a5b4b5595b6634113fdf060060c8fe190677627fb2d25f6e052c7f93598d36dd415f8f84c693c6a5943098616a1e135522852d8f572bb6e1470df4a94",
"membersSig":
"8ef7d881fcc1e8111dd82c556ab62dad56ea5ecb47a9ac067eb2057d92d27e39530630a7f77d19adc857d33eb485a1b601b2d78ac4c73742f2036089bfb1f25441f1dfcd3cfd1eed6e7d664c0e97bf75b7d7097ebd647791fbcef070fe3e3e91"
}
```
* llmq: Changed the byte order in ToHexStr(const std::vector<bool>& vBits)
* 🪲 improve evodb consistency recovering from dbcrash
* Adjust the fix
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
* Fix it
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
* Disable recovery from a crash during a fork and a corresponding part of dbcrash.py
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
* Skip some checks in CQuorumBlockProcessor when replaying blocks after the crash
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
* Process special txes in RollforwardBlock
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
* Update src/init.cpp
Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>
* Refactor and fix GetRealOutpointPrivateSendRounds
Changes:
- streamline logic
- use much more compact/direct map to store outpoint rounds
- per-wallet map instead of a static one
- hold cs_wallet
* Bail out early if one of outputs in the same tx is a non-denom one
Changes in behaviour:
- unlock coins, return keys to keypool and set state POOL_STATE_ERROR on error, reset session on timeout later
- drop POOL_STATE_SUCCESS (wasn't really used)
Due to not disconnecting the signal there the trace of the `loadwallet`
rpc command ends
in a call of `SplashScreen::ConnectWallet` for the not longer existent
splashscreen object.
7770a7da95/src/wallet/wallet.cpp (L4192)
Wasn't an issue before the `loadwallet` rpc was introduced because
`CWallet::LoadWallet` was only called once on startup.
cd53981 [docs] Add release notes for `loadwallet` RPC. (John Newbery)
a46aeb6 [wallet] [tests] Test loadwallet (John Newbery)
5d15260 [wallet] [rpc] Add loadwallet RPC (John Newbery)
876eb64 [wallet] Pass error message back from CWallet::Verify() (John Newbery)
e0e90db [wallet] Add CWallet::Verify function (John Newbery)
470316c [wallet] setup wallet background flushing in WalletInit directly (John Newbery)
59b87a2 [wallet] Fix potential memory leak in CreateWalletFromFile (John Newbery)
Pull request description:
Adds a `loadwallet` RPCs. This allows wallets to be loaded dynamically during runtime without having to stop-start the node with new `-wallet` params.
Includes functional tests and release notes.
Limitations:
- currently this functionality is only available through the RPC interface.
- wallets loaded in this way will not be displayed in the GUI.
Tree-SHA512: f80dfe32b77f5c97ea3732ac538de7d6ed7e7cd0413c2ec91096bb652ad9bccf05d847ddbe81e7cd3cd44eb8030a51a5f00083871228b1b9b0b8398994f6f9f1
e2f58f4 wallet: Make vpwallets usage thread safe (João Barbosa)
Pull request description:
This PR turns the functions introduced in #13017 thread safe. This is required to correctly support dynamically loading wallets, which is implemented in #10740.
Tree-SHA512: efaa09e501636cf957aa33de83719ce09dc0c2a19daff741a94ef10d6b7ba5dee538355b80c96ead995140f99f5df0c92fb0e22ae1adb8f397eb478280c8d8c7
c25321f Add config changes to release notes (Anthony Towns)
5e3cbe0 [tests] Unit tests for -testnet/-regtest in [test]/[regtest] sections (Anthony Towns)
005ad26 ArgsManager: special handling for -regtest and -testnet (Anthony Towns)
608415d [tests] Unit tests for network-specific config entries (Anthony Towns)
68797e2 ArgsManager: Warn when ignoring network-specific config setting (Anthony Towns)
d1fc4d9 ArgsManager: limit some options to only apply on mainnet when in default section (Anthony Towns)
8a9817d [tests] Use regtest section in functional tests configs (Anthony Towns)
30f9407 [tests] Unit tests for config file sections (Anthony Towns)
95eb66d ArgsManager: support config file sections (Anthony Towns)
4d34fcc ArgsManager: drop m_negated_args (Anthony Towns)
3673ca3 ArgsManager: keep command line and config file arguments separate (Anthony Towns)
Pull request description:
The weekly meeting on [2017-12-07](http://www.erisian.com.au/meetbot/bitcoin-core-dev/2017/bitcoin-core-dev.2017-12-07-19.00.log.html) discussed allowing options to bitcoin to have some sensitivity to what network is in use. @theuni suggested having sections in the config file:
<cfields> an alternative to that would be sections in a config file. and on the
cmdline they'd look like namespaces. so, [testnet] port=5. or -testnet::port=5.
This approach is (more or less) supported by `boost::program_options::detail::config_file_iterator` -- when it sees a `[testnet]` section with `port=5`, it will treat that the same as "testnet.port=5". So `[testnet] port=5` (or `testnet.port=5` without the section header) in bitcoin.conf and `-testnet.port=5` on the command line.
The other aspect to this question is possibly limiting some options so that there is no possibility of accidental cross-contamination across networks. For example, if you're using a particular wallet.dat on mainnet, you may not want to accidentally use the same wallet on testnet and risk reusing keys.
I've set this up so that the `-addnode` and `-wallet` options are `NETWORK_ONLY`, so that if you have a bitcoin.conf:
wallet=/secret/wallet.dat
upnp=1
and you run `bitcoind -testnet` or `bitcoind -regtest`, then the `wallet=` setting will be ignored, and should behave as if your bitcoin.conf had specified:
upnp=1
[main]
wallet=/secret/wallet.dat
For any `NETWORK_ONLY` options, if you're using `-testnet` or `-regtest`, you'll have to add the prefix to any command line options. This was necessary for `multiwallet.py` for instance.
I've left the "default" options as taking precedence over network specific ones, which might be backwards. So if you have:
maxmempool=200
[regtest]
maxmempool=100
your maxmempool will still be 200 on regtest. The advantage of doing it this way is that if you have `[regtest] maxmempool=100` in bitcoin.conf, and then say `bitcoind -regtest -maxmempool=200`, the same result is probably in line with what you expect...
The other thing to note is that I'm using the chain names from `chainparamsbase.cpp` / `ChainNameFromCommandLine`, so the sections are `[main]`, `[test]` and `[regtest]`; not `[mainnet]` or `[testnet]` as might be expected.
Thoughts? Ping @MeshCollider @laanwj @jonasschnelli @morcos
Tree-SHA512: f00b5eb75f006189987e5c15e154a42b66ee251777768c1e185d764279070fcb7c41947d8794092b912a03d985843c82e5189871416995436a6260520fb7a4db
77a733a99 [tests] Add additional unit tests for -nofoo edge cases (Anthony Towns)
af173c2be [tests] Check GetChainName works with config entries (Anthony Towns)
fa27f1c23 [tests] Add unit tests for ReadConfigStream (Anthony Towns)
087c5d204 ReadConfigStream: assume the stream is good (Anthony Towns)
6d5815aad Separate out ReadConfigStream from ReadConfigFile (Anthony Towns)
834d30341 [tests] Add unit tests for GetChainName (Anthony Towns)
11b6b5b86 Move ChainNameFromCommandLine into ArgsManager and rename to GetChainName (Anthony Towns)
Pull request description:
This does a bit of refactoring of the configuration handling code in order to add additional tests to make adding support for [test]/[regtest] sections in the config file in #11862 easier. Should not cause any behaviour changes.
Tree-SHA512: 8d2ce1449fc180de03414e7e569d1a21ba1e9f6564e13d3faf3961f710adc725fa0d4ab49b89ebd2baa11ea36ac5018377f693a84037d386a8b8697c9d6db3e9
f7683cba7b Track negated arguments in the argument paser. (Evan Klitzke)
4f872b2450 Add additional tests for GetBoolArg() (Evan Klitzke)
Pull request description:
This change explicitly enable tracking negated options in the option parser. A negated option is one passed with a `-no` prefix. For example, `-nofoo` is the negated form of `-foo`. Negated options were originally added in the 0.6 release.
The change here allows code to explicitly distinguish between cases like `-nofoo` and `-foo=0`, which was not possible previously. The option parser does not have any changed semantics as a result of this change, and existing code will parse options just as it did before.
The motivation for this change is to provide a way to disable options that are otherwise not boolean options. For example, the `-debuglogfile` option is normally interpreted as a string, where the value is the log file name. With this change a user can pass in `-nodebuglogfile` and the code can see that it was explicitly negated, and use that to disable the log file.
This change originally split out from #12689.
Tree-SHA512: cd5a7354eb03d2d402863c7b69e512cad382781d9b8f18c1ab104fc46d45a712530818d665203082da39572c8a42313c5be09306dc2a7227cdedb20ef7314823
5460460 Add AbsPathForConfigVal to consolidate datadir prefixing for path args (James O'Beirne)
a1e1305 Clarify help messages for path args to mention datadir prefix (James O'Beirne)
Pull request description:
Change `-conf`'s help message to indicate that relative path values will be prefixed by the datadir path. This behavior probably merits clarification; it's kind of confusing when attempting to specify a configuration file in the current directory with `-conf=bitcoin.conf`, but instead loading the `bitcoin.conf` file in ~/.bitcoin datadir.
### Edit
This PR has been modified to document all cases where relative path configurations are modified to be under datadir. A small refactoring has also been added which consolidates this normalization.
Tree-SHA512: be4fc0595fbeba33d17af08f59898af45e76a44f00719ea0282403b155ac6755584604fab765250a3aa14ed6991882c4d1ccbe601184362c5ba97c886bdda344
Thanks to `TextHeuristicRole` set by default qt confuses `openConfEditorAction` with application settings and binds it as if we would set `PreferencesRole` to it. As a result it opens `dash.conf` when user clicks `Preferences...` and not application settings as one would expect. Explicitly setting `NoRole` fixes it.
Note: this issue only appears in some languages e.g. `de`.
* Implement GetDsqThreshold to unify dsq rejection threshold calculations
* Use much simpler/lighter criteria to check if a candidate mixing MN is going to be paid in next 8 blocks
Drop CMasternodePayments::IsScheduled()
* Fix decomposition of txes with 2 outputs
Recognise creation of denoms for txes with 1 denom + 1 change
Fixes an issue introduced in #3347
* Tweak few labels
s/anonymize/mix/
* Prefer larger denoms when starting new mixing queues
Fixes an issue introduced in #3346
* Add an explanation about GetDsqThreshold
* Move GetDsqThreshold comment a bit higher
* Remove obj_c for macOS Dock icon setting
Qt `setWindowIcon()` does this work.
* Use Qt signal for macOS Dock icon click event
This moves the Dock icon click reaction code to the common place and
allows some cleanup in obj_c code.
According to the Apple's docs `class_replaceMethod` behaves as
`class_addMethod`, if the method identified by name does not yet exist;
or as `method_setImplementation`, if it does exist.
* Remove obj_c for macOS Dock icon menu
Qt `setAsDockMenu()` does this work.
* qt: Add GUIUtil::bringToFront
* qt: Use GUIUtil::bringToFront where possible
* qt: All tray menu actions call showNormalIfMinimized
* qt: Replace objc_msgSend with native syntax
Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
Co-authored-by: João Barbosa <joao.paulo.barbosa@gmail.com>
* update windows build instructions
* move cross compilation section
* remove 32bit. The additional info about 32bit is described in footnotes
* update doc formating and order