Add ability for node to reject tx from mempool by number of tx inputs
Implement short-term solution described in #2343 so that users can respond promptly to critical short-term problems caused by quadratic validation scaling, such as the getblocktemplate latency, block propagation latency, and mempool size inflation issues described in #2333.
Remove unneeded lax ECDSA signature verification
Fixes#2359. Removes code for lax ECDSA verification, and the SCRIPT_VERIFY_DERSIG flag that controlled it. The behaviour is as-if the flag is always set.
[mining] let "getblocktemplate" work when disable wallet
we already support GetBlockTemplate without build wallet, see:
https://github.com/zcash/zcash/blob/master/src/rpcmining.cpp
```
// Wallet or miner address is required because we support coinbasetxn
if (GetArg("-mineraddress", "").empty()) {
#ifdef ENABLE_WALLET
if (!pwalletMain) {
throw JSONRPCError(RPC_METHOD_NOT_FOUND, "Wallet disabled and -mineraddress not set");
}
#else
throw JSONRPCError(RPC_METHOD_NOT_FOUND, "zcashd compiled without wallet and -mineraddress not set");
#endif
}
```
so the macro should be removed from `src/rpcserver.cpp`, otherwise you can't call `getblocktemplate` when you disable wallet.
Switch to libsecp256k1-based validation for ECDSA
Cherry-picked from the following upstream PRs:
- bitcoin/bitcoin#6983
- bitcoin/bitcoin#6954
Part of #2333.
support per platform filename and hash setting for dependencies
added to support per-platform Rust packages, tested on macOS Sierra 10.12.5 and Ubuntu 16.04 LTS (issue #2431)
Use real number of cores, ignore virtual cores
Cherry-picked from the following upstream PRs:
- bitcoin/bitcoin#6361
- bitcoin/bitcoin#6370
Part of #2074.
[macOS] system linker does not support “--version” option but only “-v”
To build Zcash on macOS Sierra I use a self-built gcc-6.3/g++-6.3 but macOS linker (/usr/bin/ld). macOS linker does not support “--version” option but “-v”
On Ubuntu 16.04
```
$ ld --version
GNU ld (GNU Binutils for Ubuntu) 2.26.1
Copyright (C) 2015 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
$ ld -v
GNU ld (GNU Binutils for Ubuntu) 2.26.1
```
On macOS Sierra
```
$ ld --version
ld: unknown option: --version
$ ld -v
@(#)PROGRAM:ld PROJECT:ld64-278.4
configured to support archs: armv6 armv7 armv7s arm64 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em (tvOS)
LTO support using: LLVM version 8.1.0, (clang-802.0.42)
TAPI support using: Apple TAPI version 1.33.11
```