Commit Graph

13953 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
Dakoda Greaves 12202c61bb
qa: Updated pruning test to reflect changes in ca3a26df
The pruning test was outdated in that it was written to test BTC's 288
MIN_BLOCKS_TO_KEEP and 550 MiB MIN_DISK_SPACE_FOR_BLOCK_FILES.
To fix we recalculate arithmetic to accomodate our corresponding 1440
MIN_BLOCKS_TO_KEEP and 2200 MiB MIN_DISK_SPACE_FOR_BLOCK_FILES which
is representative as minimum val we can pass to configure a node to
automatically prune: -prune=2200.

Copied mine_large_blocks from 03d6d238 to speed up the test.

Separated the manual testing from the main test because the values
depend on Bitcoin configuration.
2021-10-19 17:10:42 -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 1eede33ce8
Merge pull request #2633 from patricklodder/1.14.5-update-build-guides
doc: update depends/README.md to reflect Bionic building
2021-10-19 00:11:43 +01: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 57446a21f6
doc: update depends README to reflect Bionic building 2021-10-18 20:41:30 +02:00
Patrick Lodder cc082a7678
tools: backport commit-script-check.sh
from: bitcoin/bitcoin 08f3dbb
original path: test/lint/commit-script-check.sh
2021-10-18 03:50:56 +02: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 d29583af8f Squashed 'src/univalue/' changes from 16a1f7f6e..a44caf65f
a44caf65f Merge bitcoin-core/univalue-subtree#28: Import fixes for sanitizer reported issues
135254331 Import fixes for sanitizer reported issues
d5fb86940 refactor: use c++11 range based for loop in checkObject
ff9c37930 refactor: Use nullptr (c++11) instead of NULL
08a99754d build: use ax_cxx_compile_stdcxx.m4 to check for C++11 support
66d3713ce Merge bitcoin-core/univalue#29: ci: travis -> cirrus
808d48729 ci: travis -> cirrus
c390ac375 Merge bitcoin-core/univalue#19: Split sources for easier buildsystem integration
4a5b0a1c6 build: Move source entries out to sources.mk
6c7d94b33 build: cleanup wonky gen usage
a222637c6 Merge #23: Merge changes from jgarzik/univalue@1ae6a23
98fadc090 Merge #24: Push bool into array correctly
5f03f1f39 Push bool into array correctly
f77d0f718 Merge commit '1ae6a231a0169938eb3972c1d48dd17cba5947e1' into HEAD
98261b1e7 Merge #22: Clamp JSON object depth to PHP limit
54c401541 Clamp JSON object depth to PHP limit
5a58a4667 Merge #21: Remove hand-coded UniValue destructor.
b4cdfc4f4 Remove hand-coded UniValue destructor.
1ae6a231a Merge pull request #57 from MarcoFalke/test_fix
92bdd11f0 univalue_write: remove unneeded sstream.h include
ffb621c13 Merge pull request #56 from drodil/remove_sstream_header
f33acf9fe Merge commit '7890db9~' into HEAD
7fba60b5a Merge #17: [docs] Update readme
4577454e7 Merge #13: Fix typo
66e0adec4 Remove unnecessary sstream header from univalue.h
ac7e73cda [docs] Update readme
7890db99d Merge #11: Remove deprecated std pair wrappers
88967f658 Version 1.0.4
40e34852a Merge #14: Cleaned up namespace imports to reduce symbol collisions
1dc113dbe Merge pull request #50 from luke-jr/pushKV_bool
72392fb22 [tests] test pushKV for boolean values
c23132bcf Pushing boolean value to univalue correctly
4a4964729 Fix typo
85052a481 Remove deprecated std::pair wrappers
81faab26a Merge pull request #48 from fwolfst/47-UPDATE_MIT_LINK_TO_HTTPS
b17634ef2 Update URLs to MIT license.
51d3ab34b Merge #10: Add pushKV(key, boolean) function (replaces #5)
129bad96d [tests] test pushKV for boolean values
b3c44c947 Pushing boolean value to univalue correctly
07947ff2d Merge #9: [tests] Fix BOOST_CHECK_THROW macro
ec849d9a2 [tests] Fix BOOST_CHECK_THROW macro
88ab64f6b Merge pull request #46 from jasonbcox/master
35ed96da3 Merge pull request #44 from MarcoFalke/Mf1709-univalue-cherrypick-explicit
420c22629 Merge pull request #45 from MarcoFalke/Mf1710-univalue-revert-test
d208f986d Cleaned up namespace imports to reduce symbol collisions
31bc9f5a4 Merge #8: Remove unused Homebrew workaround
fa042093d Remove HomeBrew workaround
a523e08ae Merge #7: Declare single-argument (non-converting) constructors "explicit"
a9e53b38b Merge #4: Pull upstream
fe805ea74 Declare single-argument (non-converting) constructors "explicit"
8a2d6f1e3 Merge pull request #41 from jgarzik/get-obj-map
ba341a20d Add getObjMap() helper method.  Also, constify checkObject().
ceb119413 Handle .pushKV() and .checkObject() edge cases.
107db9829 Add ::push_back(double) method for feature parity.
d41530031 Move one-line implementation of UniValue::read() to header.
52e85b35b Move exception-throwing get_* methods into separate implementation module.
dac529675 README.md: update code quotes
3e31dcffb README.md: close code quote
d09b8429d Update README.md
f1b86edb4 Convert README to markdown style.
1dfe464ef Import UniValue class unit tests from bitcoin project.
0d3e74dd1 operator[] takes size_t index parameter (versus unsigned int)
640158fa2 Private findKey() method becomes size_t clean, and returns bool on failure.
709913585 Merge pull request #36 from ryanofsky/pr/end-str
a31231b51 Version 1.0.3
4fd5444d1 Reject unterminated strings
81eba332b Merge pull request #26 from isle2983/pushBackHelpers
36405413e Merge PR #32 from branch 'nul-not-special' of git://github.com/ryanofsky/univalue into merge
89bb07322 Merge pull request #31 from ryanofsky/raw-literals
511008c36 Merge pull request #30 from ryanofsky/test-driver
77974f3a9 Merge pull request #34 from paveljanik/20161116_Wshadow_codepoint
a38fcd355 Do not shadow member variable codepoint.
fd32d1ab8 Don't require nul-terminated string inputs
0bb1439d0 Support parsing raw literals in UniValue
28876d045 Merge pull request #29 from btcdrak/exportspace
839ccd71f Add test driver for JSONTestSuite
26ef3fff1 Remove trailing whitespace from JSON export
cfa0384d6 Convenience wrappers for push_back-ing integer types

git-subtree-dir: src/univalue
git-subtree-split: a44caf65fe55b9dd8ddb08f04c0f70409efd53b3
2021-10-17 22:05:37 +02:00
Ross Nicoll 0d563c7dcd
Merge pull request #2627 from chromatic/call-va-end-on-va-started-args
Call va_end() on va_started() args
2021-10-17 20:29:09 +01: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
Ross Nicoll 1d231e1d9f
Merge pull request #2626 from patricklodder/1.14.5-qt-dynamic-version
qt: display full version on overview screen
2021-10-17 15:02:51 +01: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 a5fc0d8f56
Merge pull request #2613 from patricklodder/1.14.5-extra-ci-checks
qa: enhance CI to catch more release-time errors
2021-10-13 20:29:21 +01:00
Ross Nicoll fdd1211cdd
Merge pull request #2616 from patricklodder/1.14.5-dustlimit-test
qa: Rework dustlimit test
2021-10-13 20:27:17 +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
Ross Nicoll 6286491490
Merge pull request #2608 from patricklodder/1.14.5-dynamic-minchange
fees: Make wallet minimum change parameters dynamic
2021-10-12 22:12:52 +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 b945c0b208
qa: Rework dustlimit test
Test both hard and soft dust limits for a range of configurations,
making sure that the dust limit parameters work as expected.

Currently implements commonly seen client configurations:
- a 1.10.0-like node that has only a 1 DOGE soft dust limit
- a 1.14.2-like node that has only a 1 DOGE hard dust limit
- a 1.14.5-like node that has a 0.01 soft and 0.001 hard dust limit
- a node that accepts everything standard

Other changes:
- renamed the test to better reflect the test subject
- made sure that all nodes reject non-standard transactions
2021-10-12 17:42:49 +02:00
Patrick Lodder e6e2f460c3
cleanup: don't build CI macos tests if we dont run them 2021-10-12 02:57:12 +02:00
Patrick Lodder dbb81ea357
ci: add aarch64 2021-10-12 02:57:12 +02:00
Patrick Lodder 40d2a4ea42
ci: add check-security and check-symbols 2021-10-12 02:57:12 +02:00
Patrick Lodder 60f821fe73
ci: make --enable-reduce-exports standard for all hosts 2021-10-12 02:57:12 +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 7f33b17cd1
Merge pull request #2611 from patricklodder/1.14.5-determ-libfreetype
depends: make freetype independent from build system libs too
2021-10-11 23:16:45 +01:00
Cory Fields 6912d93940
depends: qt: avoid system harfbuzz and bz2
We may eventually want to break out harfbuzz and build it in depends, but
for now just ensure that runtime dependencies don't depend on whether or not
harfbuzz was present on the builder.
2021-10-11 16:12:33 +02: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 1806f0965e
Merge pull request #2607 from rnicoll/1.14.5-check-fundrawtransaction
Update fundrawtransaction.py to match Bitcoin originals
2021-10-11 00:37:18 +02: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
Ross Nicoll 2799811ab1
Update fundrawtransaction.py to match Bitcoin originals
This revises the logic in fundrawtransaction.py to use the 20 small outputs
generated, as inputs to the next transaction. This matches how the original
worked, see https://github.com/bitcoin/bitcoin/blob/v0.14.3/qa/rpc-tests/fundrawtransaction.py#L556
2021-10-10 20:51:47 +01: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 c05cd54411
qa: Test relay and mempool policies for fees and dust
Creates a new functional test that ensures relay logic regarding
fee and dust levels
2021-10-10 20:35:54 +02:00
Ross Nicoll 5f390bde2a
Merge pull request #2605 from patricklodder/1.14.5-dusty-tests
qa: facilitate MIN_CHANGE to be higher than COIN in tests
2021-10-10 19:33:21 +01:00