Commit Graph

9285 Commits

Author SHA1 Message Date
Ross Nicoll 31afd13311
Merge pull request #2670 from patricklodder/1.14.5-fixate
fixate 1.14.5
2021-11-07 17:08:22 +00:00
Vasil Dimov 09f86e7494
lockedpool: avoid sensitive data in core files (FreeBSD)
This is a followup to
23991ee53 / https://github.com/bitcoin/bitcoin/pull/15600
to also use madvise(2) on FreeBSD to avoid sensitive data allocated
with secure_allocator ending up in core files in addition to preventing
it from going to the swap.
2021-11-05 08:26:11 -04:00
Luke Dashjr b4b98d7ad0
lockedpool: When possible, use madvise to avoid including sensitive information in core dumps 2021-11-05 08:26:04 -04:00
Patrick Lodder e92aba9190
fixate 1.14.5 2021-11-04 16:54:55 -04:00
Patrick Lodder 0f7c23e1e5
Update mainnet seeds for 1.14.5 2021-11-04 16:35:11 -04:00
Ross Nicoll b5d69ab693
Merge pull request #2659 from patricklodder/1.14.5-fix-overviewpage-warn
trivial: remove empty pixmap tag in overviewpage.ui
2021-11-03 22:58:49 +00:00
Ross Nicoll 0e917fcf1b
Merge pull request #2666 from patricklodder/1.14.5-qt-discard-args
Give QApplication dummy arguments
2021-11-03 22:55:54 +00:00
Patrick Lodder a92f2dcde4
Merge pull request #2662 from rnicoll/1.14.5-checkpoints
Refresh checkpoints for 1.14.5
2021-11-03 18:08:09 -04:00
Patrick Lodder d2b1a61753
Give QApplication dummy arguments
Discards any Qt built-in command line arguments and replaces them
with dummy argv that only contains the binary name. Solves CVE-2021-3401.

Manually ported from bitcoin/bitcoin@a2714a5c
2021-11-03 12:05:46 -04:00
Ross Nicoll 5280e456f5
Refresh checkpoints for 1.14.5 2021-11-02 20:36:47 +00:00
Patrick Lodder 60618c5099
trivial: remove empty pixmap tag in overviewpage.ui
QT complains about this, removing the tag removes the warning.
2021-11-01 19:45:06 -04:00
Ross Nicoll 5bb3112c68
Refresh translation files
Also fixes an issue with `make qt/bitcoinstrings.cpp` not working correctly, due to incorrect variable names
2021-11-01 23:21:59 +00:00
Patrick Lodder 8e4ea27962
Merge pull request #2491 from edtubbs/master
[feat] Added AVX2 SHA support
2021-11-01 18:47:05 -04:00
Ross Nicoll 2076361f88
Merge pull request #2654 from patricklodder/1.14.5-namecoin-aux-api
[rpc] configure auxpow rpc methods to use Namecoin-compatible API
2021-11-01 22:15:46 +00:00
Patrick Lodder d3d688deae
rpc: configure auxpow rpc methods to use Namecoin-compatible API
Allows easy integration with mining software that expects either
a "_target" (Namecoin) or a "target" (Dogecoin) field when
creating auxpow blocks using the -rpcnamecoinapi startup arg.

This saves pools effort in integrating the API they need whenever
a new Dogecoin Core release comes out.
2021-11-01 15:59:23 -04:00
Dakoda Greaves 27ac4a1e79
rpc: improve error message in submitblock
split previous conditional statement into 2
check that block both starts with and contains a coinbase transaction
2021-10-31 17:44:25 -07:00
Ross Nicoll 097d87df2f
Merge pull request #2286 from rnicoll/1.14.4-improve-checkblock-failure
Shut down if trying to connect a corrupted block
2021-10-31 23:55:38 +00:00
Patrick 2291b6a7cc
rpc: cache aux block per scriptPubKey in createauxblock
- RPC caching source cherry-picked from: btccom@f4b613b2
- Adds addl test scenarios to createauxblock.py tests

Allows pool operators to run multiple sub-pools with different
target addresses from a single dogecoind instance. Without this
enhancement, subsequent calls to createauxblock with differing
addresses ignore the address given and instead just return the
block containing the address that initially triggered generation
of the cached block. This can quickly lead to unpredictable
results as race scenarios between sub-pools come into play.

Note that, like with getauxblock, the cache only resets on aux
block creation, not submission, so submitauxblock will accept
multiple submissions at the same height until createauxblock is
called, resulting in chaintip forks.

Co-Authored-By: leezhen <jasper.li@bitmain.com>
2021-10-30 15:59:46 -04:00
Patrick 8efd7e62bd
trivial: fix indentation/spacing in rpc/mining.cpp
Fixes some indentation issues to make the mining rpc code easier
to read and clean up some odd lines
2021-10-30 15:59:39 -04:00
Michi Lumin c2532d3f6a
rpc: Add createauxblock and submitauxblock methods back
Adds back Namecoin's createauxblock and submitauxblock rpc methods
to allow easier integration for mining pools that wish to reuse
existing implementations of Namecoin/Bitcoin merge mining.

Cherry-picked from: michilumin@1c5b9b33

Changes post-pick:
- Fixed issue with erroneously moved LOCK in getauxblock
- Disabled mining of witness tx as done for getauxblock
- Fixed indentation, increasing readability and fixing warnings
- Follow Dogecoin API for "target" instead of "_target"
- Remove personal comments
2021-10-30 15:52:50 -04:00
Ross Nicoll e254dd665b
Merge pull request #2645 from patricklodder/1.14.5-dustlimitinfo
[rpc] Add dustlimit info to getnetworkinfo
2021-10-30 19:38:12 +01:00
KabDeveloper 4c94a061c0 Remove GetBlockSubsidy (Not Used - replaced) 2021-10-28 23:36:48 +01:00
Patrick c3cead8737
[rpc] Add dustlimit info to getnetworkinfo 2021-10-28 16:24:33 -04:00
Dakoda Greaves 1ec3f19fc0
net: Enforce minimum block download window multiplier
The timeout window for block downloads scales proportionally to the target
spacing for the chain, as set in chainparams.cpp. This causes issues on regtest
because the spacing is set to 1 second, allowing insufficient time for very
large blocks to sync when requested in batch, preventing success of the pruning
qa test.

We fix this by introducing a minimum multiplier (in seconds) that will be used
instead of the target block spacing whenever the latter is lower. With a value
of 10 seconds, pruning tests pass.
2021-10-19 17:10:43 -07:00
Ross Nicoll 9e6a8bc5c4
Merge pull request #2628 from patricklodder/1.14.5-univalue-update
univalue: update to latest version
2021-10-19 20:48:07 +01:00
Michi Lumin 2e082af18e Revert "First run at adding back createauxblock and submitauxblock back to methods"
This reverts commit 791be7b57d.
2021-10-18 20:58:23 -06:00
Michi Lumin 71edb4cc79 Revert "Revert "Merge branch '1.14.5-dev' of http://github.com/dogecoin/dogecoin into 1.14.5-dev""
This reverts commit ca6297be97.
2021-10-18 20:57:22 -06:00
Michi Lumin ca6297be97 Revert "Merge branch '1.14.5-dev' of http://github.com/dogecoin/dogecoin into 1.14.5-dev"
This reverts commit 16761956ce, reversing
changes made to 1eede33ce8.
2021-10-18 20:46:59 -06:00
Michi Lumin 16761956ce Merge branch '1.14.5-dev' of http://github.com/dogecoin/dogecoin into 1.14.5-dev 2021-10-18 20:21:26 -06:00
Michi Lumin 791be7b57d First run at adding back createauxblock and submitauxblock back to methods 2021-10-18 20:19:57 -06:00
Ross Nicoll 79f5d63fa6
Merge pull request #2632 from patricklodder/1.14.5-fee-cleanup
cleanup: remove dead code related to fee and dust changes
2021-10-19 00:10:39 +01:00
Patrick Lodder 976474f28b
scripted-diff: remove trailing spaces after commas from fixtures
-BEGIN VERIFY SCRIPT-
find src/test/data -name "*json" | xargs sed -i "s/, $/,/g"
-END VERIFY SCRIPT-

Needed for univalue pull
2021-10-18 03:50:56 +02:00
Patrick Lodder edd0da7968
scripted-diff: Use UniValue.pushKV instead of push_back(Pair())
-BEGIN VERIFY SCRIPT-
git grep -l "push_back(Pair" | xargs sed -i "s/push_back(Pair(\(.*\)));/pushKV(\1);/g"
-END VERIFY SCRIPT-

Copied from: bitcoin/bitcoin#91986ed2
2021-10-18 03:50:47 +02:00
Patrick Lodder d81d2329f2
Update univalue from bitcoin-core/univalue-subtree:bitcoin-fork
Merge commit 'd29583af8fa9536da33df679bd03f63d76c5d334' into 1.14.5-dev
2021-10-17 22:05:37 +02:00
Patrick Lodder 35754ca98f
cleanup: remove unused GetDogecoinWalletFee(Rate) 2021-10-17 21:28:58 +02:00
Patrick Lodder 38aba25232
cleanup: remove unused CTransaction methods 2021-10-17 20:35:51 +02:00
chromatic 3e2ce7b7aa [zmq] Call va_end() on va_start()ed args
This is a backport of Bitcoin commit 5ba61f0034.
2021-10-17 10:23:34 -07:00
Patrick Lodder 32c55e2ac8
qt: display full version on overview screen
Removes "1.14" that was embedded in the logo image on the overview
screen and replaces it with a dynamically generated version in the
lower left corner.
2021-10-17 03:07:39 +02:00
Ross Nicoll 4bcd9daf5d
Merge pull request #2617 from patricklodder/1.14.5-dust-fix-param-interaction
fix: always check nDustLimit to be >= nHardDustLimit
2021-10-13 20:34:55 +01:00
Ross Nicoll 2c71909290
Merge pull request #2612 from patricklodder/1.14.5-fix-dust-penalty
fees: Require dust limit as dust penalty
2021-10-13 19:58:46 +01:00
Patrick Lodder e481bf28bb
fix: always check nDustLimit to be >= nHardDustLimit
Moves the check for parameter interaction between both dust limits
to be done regardless of setting a custom soft dust limit.
2021-10-12 19:58:30 +02:00
Patrick Lodder 7739221064
fees: Require dust limit as dust penalty
Changes the dust policy to require transactions to add the dust
limit itself rather than the relay or wallet fee to the fees paid
when creating dust outputs.

This both disincentivizes dust outputs the same as before when dust
and minumum fee were equal and greatly simplifies the rule, as it
no longer requires 2 variables to calculate dust, but just one:

"If an output is under x, add x to the fee."
2021-10-12 02:47:23 +02:00
Patrick Lodder b5b1e0426a
wallet: derive MIN_CHANGE from configurable parameters
MIN_CHANGE influences the minimum change output size but was only
hardcoded and wallet users were not able to override this in any
way. This change retains the logic for the calculation as a
hardcoded constant but instead uses the user-configurable params
-discardthreshold and -mintxfee as a basis. The rationale for
having the minimum change equal to the discard threshold plus 2x
the minimum fee has not changed.
2021-10-12 01:28:10 +02:00
Patrick Lodder 2cdacb07ab
wallet: replace MIN_FINAL_CHANGE with the discard threshold
MIN_FINAL_CHANGE was a hardcoded limit that was impossible to be
changed by users. This causes problems when the dust limit is
changing because then a user would need a new release to be able
to have lower change outputs.

This commit replaces the entire notion of MIN_FINAL_CHANGE to just
follow the discard threshold, which can be set by the user using
-discardthreshold.
2021-10-12 01:28:09 +02:00
Ross Nicoll c338c5e6c4
Merge pull request #2606 from patricklodder/1.14.5-split-dust-parametrization
Split the dust definition 3-way to enable lower limits
2021-10-12 00:12:53 +01:00
Ross Nicoll a72aba3bea
Merge pull request #2609 from patricklodder/1.14.5-raise-high-fee-rate
fees: raise the high tx fee rate
2021-10-11 09:19:44 +01:00
Patrick Lodder 0ff5375296
fees: Adjust HIGH_TX_FEE_PER_KB
Sets the high tx fee to be higher than the default values
implemented by the wallet. The highest value from the QT coin
control slider is 5.21 DOGE.

Therefore, a 10 DOGE/kB high tx fee should suffice for now.
2021-10-10 23:33:25 +02:00
Patrick Lodder a4d965547e
fees: set the wallet default discard threshold to 1 DOGE
As of writing, 97% of the relay network (for me: 2251 of 2328
peers) enforces a 1 DOGE hard dust limit making attempts to send
smaller outputs extremely unlikely to make it through to miners.

This setting is a temporary measure until a significant portion of
the network accepts lower dust thresholds. The threshold can be
changed by wallet users using the -discardthreshold parameter.
2021-10-10 22:07:12 +02:00
Patrick Lodder 6173ca37cd
Remove dustRelayFee as it is no longer used
DustRelayFee (-dustrelayfee) was used sporadically throughout the
code, even though it had been disabled for dust determination, but
has now completely been removed from all dust and fee related
queries. Therefore, it can be removed from the code.

Moves the warning from DUST_RELAY_TX_FEE to DEFAULT_HARD_DUST_LIMIT
as it is very relevant for the latter, but never was relevant for
the former as it was disabled for us.
2021-10-10 22:07:12 +02:00
Patrick Lodder fd6da81954
wallet: introduce -discardthreshold
Creates a wallet-specific, configurable dust limit that enables
gradual implementation of the dust limit. Each transaction created
with the wallet will adhere to this threshold rather than the dust
limits used for relay, so that the wallet stays usable while the
network changes (lowers) its dust limits.

This change only implements the parameter but does not change its
default value.
2021-10-10 22:07:00 +02:00