Commit graph

9258 commits

Author SHA1 Message Date
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
Patrick Lodder 84157f3df2
policy: Split up dust limit into hard and soft
Creates a new parameter, -harddustlimit, that is used for testing
standard transactions. The default is set at 1/10th of the (soft)
dust limit, to be the same as the default minimum relay fee and
leave space for future improvements.

The existing dust limit (-dustlimit) is now enforcing the economic
disincentive under which each output under the limit must add
additional fee to be accepted to the mempool. Before this commit,
-dustlimit enforced both the hard and the soft limits, which
effectively removed the soft limit altogether.
2021-10-10 20:35:55 +02:00
Patrick Lodder e83ddb7e8f
fees: Allow dust comparison against a given dust limit
Prepares for having more than one dust limit configured, yet
allowing the same function to return whether or not an output is
dust.

Implements the check with nDustLimit (-dustlimit) for relay related
queries, and - for lack of alternatives - uses the same parameter
for CWallet::GetRequiredFee until a wallet-specific dust limit is
introduced
2021-10-10 20:35:54 +02:00
Patrick Lodder 56bc526b59
qa: facilitate MIN_CHANGE higher than COIN in tests
Some tests expect MIN_CHANGE to be less than COIN, which will not
be the case as long as the network enforces a 1 DOGE hard dust
limit.

wallet_tests.cpp: Multiply all inputs by 10 for tests that aren't
                  relative to MIN_CHANGE.

fundrawtransaction.py: make sure there are no outputs smaller than
                       1 DOGE.

importprunedfunds.py: Multiply all outputs by 100
2021-10-09 21:06:25 +02:00
Patrick Lodder d8809182e6
Change in6addr_any to IN6ADDR_ANY_INIT
This prevents glibc export of in6addr_any.

Inspired by: fc6a9f2
Original Author: Cory Fields <cory-nospam-@coryfields.com>
2021-09-29 20:50:10 +02:00
Chun Kuan Lee 4598ec33fc
GCC-7 and glibc-2.27 compat code
Cherry-picked from: 908c1d7

Note: fixes __divmoddi4 and log2f when compiling with gcc-7
2021-09-29 20:50:09 +02:00
Patrick Lodder 16764d6e80
fees: Update MIN_CHANGE and document why
Updates MIN_CHANGE to always allow for a subsequent bump from the
change output using RBF or CPFP of at least 2x the recommended
minumum fee, on top of the dust limit, because the previous value
did not allow enough change for performing a CPFP bump, and only
allowed for a single bumfee call, which would spend the entire
change output rather than allowing for optimization.
2021-09-27 21:07:37 +02:00
Patrick Lodder 0d0c5e5a7f
Merge pull request #2589 from rnicoll/1.14.5-dev-strings-all
Refresh translation files
2021-09-27 18:04:00 +02:00
Ross Nicoll 5dee6f61b1
Merge pull request #2590 from patricklodder/1.14.5-incremental-fee
fees: Tune incremental fee defaults
2021-09-26 10:03:14 +01:00
Patrick Lodder 52f2f3c72b
Merge pull request #2586 from rnicoll/1.14.5-checkpoints
Add updated 1.14.5 checkpoints
2021-09-26 05:33:17 +02:00
dogespacewizard fccd2b46b6 Update bitcoin_ko_KR.ts
some korean translation, not all need help for the rest
2021-09-25 21:31:28 +01:00
Patrick Lodder c31ff0f095
wallet: change incremental fee for RBF
Sets WALLET_INCREMENTAL_RELAY_FEE to 1/10th of the default
recommended minimum fee, to encourage using RBF over CPFP and
saving the additional blockspace required for child transactions
spending parent transactions.

The previous value was based off a 1 DOGE recommended fee and did
not make sense with the current minimum fee recommendation.
2021-09-25 21:52:21 +02:00
Patrick Lodder bde7442526
mempool: tune incremental fee to make more sense for Dogecoin
The value of DEFAULT_INCREMENTAL_RELAY_FEE has never been tuned for
Dogecoin since porting from Bitcoin Core 0.14. Even though the dual
meaning of this parameter is suboptimal, it can still be tuned.

This commit sets the value to 1/10th of DEFAULT_MIN_RELAY_TX_FEE
from validation.h, which causes:

1. Mempool limiting to be performed in steps of 0.0001 DOGE/kb
   instead of 0.00001 DOGE/kb
2. RBF to be accepted by the mempool if the new fee is at least
   0.0001 DOGE/kb higher than the previous fee known to the
   mempool
3. RBF to be cheaper than CPFP by a factor 10 (as the latter would
   require a fee of more than 0.001 DOGE/kb on a subsequent bumping
   transaction), to encourage mempool replacement over prioritizing
   through additional transactions that need to be mined.
4. Mempool limiting to be 10x faster to reset to zero than before,
   because for bitcoin, fee increments equaled their minimum fee,
   but for us this was 1/100th.

mempool_tests.cpp has been reworked a bit to reflect the reality
of having a lower increment than the minimum fee, as even though
this already was the case, this was not tested correctly due to the
static values in the unit test.
2021-09-25 21:51:36 +02:00
Ross Nicoll 19c4ff8cb9
Merge pull request #2587 from patricklodder/1.14.5-clarify-fee
fees: clarify what the actual recommended fee is
2021-09-25 09:57:34 +01:00
Ross Nicoll 065574d672
Merge pull request #2500 from patricklodder/1.14-fix-self-assign
Fix self-assigned nVersion in CAlert serialization
2021-09-25 08:38:52 +01:00
Ross Nicoll 08e7d784da
Refresh translation files
Refresh the most active translation files. As we're not set up with the same tooling as Bitcoin, we get slightly different results compared to the files they generate, so I've picked only specific files to update to reduce churn. If we have translation volunteers for other languages we can update those languages at the time.

* Chinese
* French
* German
* Indonesian
* Italian
* Japanese
* Korean
* Netherlands
* Spanish
* Russian
* Turkish
2021-09-25 08:30:12 +01:00
Ross Nicoll 029c83da14 Refresh English locale files 2021-09-25 00:00:21 +01:00
Ross Nicoll c2c71b2f21
Correct application names in locale files
Correct application names in locale files so Qt correctly recognises that the translations are valid.
2021-09-24 23:59:49 +01:00
Ross Nicoll 14a7cd1ba1
Add updated 1.14.5 checkpoints 2021-09-24 22:50:17 +01:00
Patrick Lodder 8caee7ecee
fees: clarify what the actual recommended fee is
Introduces RECOMMENDED_MIN_TX_FEE as a constant that explicitly
sets a single value and then implements this value for each fee
related constant throughout the code, instead of using values
relative to COIN. This helps because it makes the relation of
other defaults to the fee recommendation clear and makes
choices made by developers in wallet configuration easier to
read and understand.

This commit only changes existing values to be expressed relative
to the recommended fee and does not change actual values.
2021-09-24 19:21:37 +02:00
Ross Nicoll 7b27476601
Merge pull request #2572 from slightlyskepticalpotat/rename-files
Finish Renaming Icons
2021-09-24 10:07:16 +01:00
Ross Nicoll 36e39a395d
Revise fee UI
* Change from a block target number to using speed labels which pick predefined fee values.
* Remove smart fee labels from send coins control dialog.
* Rename slider position configuration for Qt, as smart fee slider settings are not compatible with preset fee settings.
2021-09-21 23:17:56 +01:00
cg dd18d5c962 rename other icons 2021-09-14 21:18:15 -04:00
Ross Nicoll b0d9b4627a
Refresh English translation files
This is the result of running `make translate` under `src/`.
2021-09-13 20:48:32 +01:00