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