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.
To backup coins sended to the wallet of the getting-started guide:
public: DA2fBazU8Y4epNJ2fQRZCcWpxKZY9HrhLN
private: QR2KicE83yTVbJwSuKK2xVaHiQuKnRQEif3uaCZjfnZerE5WG3Hx
public: DNnGtXk9khadE7EKCmQzxjnehenX92PKAv
private: QUtGNKaL6DehpN8vmB25V4BS2LJ9XNnXmUVGUfP1fSV3dXue7szD
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
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>
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
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.