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.
- 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>
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.
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."
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.
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.
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
Changes client parametrization and mining frequency inside
importprunedfunds.py to make sure that when wallet configuration
changes, the test still can succeed, by not allowing it to respend
unconfirmed outputs that could otherwise be reused in this test.
The alternative would be to have to change this test every time the
wallet defaults change, which is not the subject of this test.
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.
Adds a test to bumpfee.py that tests the policy of MIN_CHANGE and
MIN_FINAL_CHANGE parameters when using RBF, making sure that with
the wallet default configuration, RBF can be performed. This test
fails on this commit.
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.
* Reduce DEFAULT_FALLBACK_FEE to 1,000,000 Koinu. Note this by itself has no effect as the required fee is higher.
* Reduce wallet minimum fees to 0.01 DOGE
* Update DEFAULT_DUST_LIMIT
* Revise derived values after updating recommended fees
* Remove fee rounding from RPC tests
* Revert tests back to Bitcoin originals where possible
without partially backporting a new testframework.
- Adds a condition to NodeConn that when asyncore calls handle_read
without any data, this must be a disconnect and closes the socket
- Adds a little loop in the p2p-acceptblock client that waits for
the socket to be in a closed state
- Makes expected disconnects non-optional in p2p-acceptblock
- Syncs the test descriptions and outputs with reality
Test that the interaction between the wallet parameters
-paytxfee and -mintxfee function as intended. This has to
be done using rpc tests rather than unit tests because it
tests the actual parameters passed to the executables.
This test failed because the sheer number of blocks required to
trigger the max length of a fork we'd keep, exceed the v4 fork
height on regtest.
- Adapted the blocktools.py miner to mine 0x00620004 blocks as done
elsewhere too (be it suboptimal, but at least consistent)
- Adapted the test to work with 1440 blocks (Dogecoin limit)
instead of 288 (Bitcoin limit)
- Made p2p-acceptblock a standard test instead of an extended test
Block download timeouts are expressed as a fraction of block interval time, so Dogecoin values have been too aggressive.
Matching Bitcoin values as a starting point.
Fix pruneheight help text.
Move fPruneMode block to match output ordering with help text.
Add functional tests for new fields in getblockchaininfo.
Rebase-from: bitcoin#b7dfc6c4