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.
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.
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.
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
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."
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.
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.
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.
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.
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.
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.
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.