Commit Graph

300 Commits

Author SHA1 Message Date
Wladimir J. van der Laan 3782c4d6ab
wallet_ismine.h → script/ismine.h
Removes conditional dependency of `src/test` on wallet.

Makes multisig and P2SH tests complete without wallet built-in.
2019-12-18 16:50:29 -06:00
Luke Dashjr 4884e75c8c
Policy: MOVEONLY: 3 functions to policy.o:
- [script/standard.o] IsStandard
- [main.o] IsStandardTx
- [main.o] AreInputsStandard

Also, don't use namespace std in policy.cpp
2019-12-04 20:34:14 +00:00
Jorge Timón dd0c036538
Policy: MOVEONLY: Create policy/policy.h with some constants
Zcash: Adjusted to be move-only after our changes to the constants.
2019-12-04 20:34:11 +00:00
Homu 5ec69e8c2c Auto merge of #4171 - defuse:fuzzer-packaging, r=str4d
Add AFL in zcutil (with all-in-one script)

Supersedes #4156 and #4167.

Fuzzing targets and input sets are defined by the contents of directories in `./src/fuzzing/`. Inside the directory, there's a `fuzz.cpp` and `fuzz.h` with a `main()` function that will replace `zcashd`'s actual `main()` as well as an `input` subdirectory containing the inputs, one per file. To just run a fuzzer, you can, for example...

```
make clean # if you've previously build zcashd without AFL instrumentation
./zcutil/afl/afl-getbuildrun.sh DecodeHexTx
```

Alternatively you can...

```
./zcutil/afl/afl-get.sh /tmp/afl   # (or wherever you want to build AFL)
./zcutil/afl/afl-build.sh /tmp/afl DecodeHexTx -j$(nproc)
./zcutil/afl/afl-run.sh /tmp/afl DecodeHexTx
```

Run `make clean` whenever you switch between a normal build and an AFL-instrumented build.
2019-11-06 03:33:05 -08:00
Taylor Hornby bfa8da3852 Have make clean delete fuzz.cpp 2019-10-28 11:54:19 -06:00
Eirik Ogilvie-Wigley c4931a9a44 Rename files 2019-10-09 15:22:49 -06:00
Eirik Ogilvie-Wigley ae9ecf09e8 DoS protection: Weighted random drop of txs if mempool full 2019-10-07 14:23:41 -06:00
Jack Grigg 6a4b8b7751
Remove libsnark from build system 2019-08-22 15:42:51 +01:00
Jack Grigg 7bd700b100
Revert "Check if OpenMP is available before using it"
This reverts commit daad2c2736.
2019-08-22 15:42:50 +01:00
Jack Grigg 9a0e257526
Revert "configure: Guess -march for libsnark OPTFLAGS instead of hard-coding"
This reverts commit 98cfe4228c.
2019-08-22 15:42:49 +01:00
Jack Grigg 8a638d5fd8
Remove pre-Sapling Sprout circuit 2019-08-22 15:42:48 +01:00
Homu 2528af69ff Auto merge of #4025 - bitcartel:shorter_block_target_interval_zip208, r=daira
Implement ZIP 208: Shorter Block Target Spacing

Closes #3690.
2019-08-09 02:35:30 -07:00
Homu 2300b911f8 Auto merge of #4035 - Eirik0:use-committransaction, r=str4d
Use CommitTransaction

This enables `-walletbroadcast` to correctly control transactions created with `z_*` APIs. It also addresses some TODOs in the code and consolidates some repeated logic.

Closes #4077 (because `CommitTransaction` calls `KeepKey` on the transparent change address).
2019-08-01 03:04:06 -07:00
Eirik Ogilvie-Wigley 2c6c55261d Make NetworkUpgradeAvailable a method of Params 2019-07-29 14:47:06 -06:00
Daira Hopwood bc909a7a7f Replace http with https: in links to the MIT license.
Also change MIT/X11 to just MIT, since no distinction was intended.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2019-07-18 15:26:01 +01:00
Daira Hopwood 6db54c9861 Add MIT license to Makefiles
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2019-07-18 13:59:30 +01:00
Eirik0 a7a52d2424 Move reused async rpc send logic to separate file 2019-05-10 12:20:52 -06:00
Homu 20821614a8 Auto merge of #3888 - Eirik0:3873-sapling-migration, r=Eirik0
Sapling migration RPC

Closes #3873
2019-04-27 12:29:29 -07:00
Larry Ruane 7fb8088288 add -timestampindex for bitcore insight block explorer 2019-04-26 08:44:56 -06:00
Homu 1b24243392 Auto merge of #3849 - LarryRuane:3708-spentindex, r=daira
add SpentIndex changes needed for bitcore block explorer

Addresses #3708, follow-on to #3837, note there are no tests yet (will come later with RPC interfaces).
2019-04-25 16:32:22 -07:00
Eirik0 81a45d6984 Add rpc to enable and disable Sprout to Sapling migration 2019-04-24 11:31:14 -06:00
Larry Ruane 3d018ab556 add -spentindex changes for bitcore insight block explorer 2019-04-23 11:06:23 -06:00
Homu ab856294d9 Auto merge of #3505 - str4d:rust-targets, r=str4d
depends: Support additional cross-compilation targets in Rust

This will make it easier for third parties to cross-compile `zcashd` for other platforms. The third commit in this PR shows how to add a new target to the Rust dependency builder.

The default Rust target during cross-compilation is the canonical host, which is derived from `HOST` using `depends/config.sub`. If the canonical host differs from the required Rust target, add the necessary mapping in addition to the target itself.

Also includes fixes for cross-compiling aarch64 targets.
2019-04-23 08:33:40 -07:00
Gareth Davies 82848efb0e Adding addressindex.h to Makefile.am
Co-authored by: Daira Hopwood <daira@jacaranda.org>
2019-04-21 07:44:18 -07:00
Jack Grigg 98cfe4228c
configure: Guess -march for libsnark OPTFLAGS instead of hard-coding
When cross-compiling, this will remove the -march flag entirely unless
the user specifies CONFIGURE_FLAGS="--with-gcc-arch=<arch>".
2019-03-13 07:37:56 +00:00
Jack Grigg 1fee15028f
Move payment disclosure code and tests into wallet
The code was already compiled as part of the wallet, but the tests were
not, meaning that the tests would fail to compile when the wallet was
disabled.
2019-03-06 10:04:23 +13:00
Jack Grigg c7fc78987a
Move utiltest.cpp from wallet to common
This ensures it is accessible by the test suite when the wallet is
disabled.
2019-03-06 09:41:39 +13:00
Jack Grigg 7614198f9d
ZIP 32 Sapling structs 2018-09-03 10:27:52 +01:00
Jack Grigg 1dae6e9336
Pass correct compiler, linker, and flags into libsnark 2018-08-17 16:45:55 +01:00
Jack Grigg d10a762fb8
Clean up libzcash CPPFLAGS, CXXFLAGS, and LDFLAGS
By using the flags defined through ./configure instead, libzcash will react to
configuration and build system changes (such as PIC_FLAGS being empty for
Windows builds).
2018-08-17 16:44:05 +01:00
Jack Grigg d0372cff5e
Adjust Makefile so that common can be used by the wallet 2018-08-05 10:41:06 +01:00
Cory Fields 6a753e4f9c
crypter: shuffle Makefile so that crypto can be used by the wallet
Wallet must come before crypto, otherwise linking fails on some platforms.

Includes a tangentially-related general cleanup rather than making the Makefile
sloppier.
2018-08-05 10:41:07 +01:00
Jack Grigg e691e21f40
TransactionBuilder with support for creating Sapling-only transactions 2018-07-25 11:35:10 +02:00
Wladimir J. van der Laan a9496b08b6
rpc: Register calls where they are defined
Split out methods to every module, apart from 'help' and 'stop' which
are implemented in rpcserver.cpp itself.

- This makes it easier to add or remove RPC commands - no longer everything that includes
    rpcserver.h has to be rebuilt when there's a change there.
- Cleans up `rpc/server.h` by getting rid of the huge cluttered list of function definitions.
- Removes most of the bitcoin-specific code from rpcserver.cpp and .h.

Continues #7307 for the non-wallet.
2018-07-18 11:07:18 -06:00
Daniel Cousens 4519a766b6
move rpc* to rpc/ 2018-07-18 11:07:16 -06:00
Jonas Schnelli 34aca1b03c
[RPC, Wallet] Move RPC dispatch table registration to wallet/ code
Allow extending the rpc dispatch table by appending commands when server is not running.
2018-07-18 11:07:15 -06:00
Homu 1942f7a42b Auto merge of #3242 - str4d:3058-key-encoding-refactor, r=str4d
Key encoding refactor

Includes code cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#11372
  - Only the first three commits (the fourth commit depends on #2390)

Part of #3058.
2018-05-11 12:21:29 -07:00
Homu 08f74ed026 Auto merge of #3240 - str4d:remove-obsolete-binaries, r=str4d
Remove obsolete CreateJoinSplit and GenerateParams binaries
2018-05-09 13:50:25 -07:00
Pieter Wuille 3d31e09cbb
Split key_io (address/key encodings) off from base58 2018-05-08 21:39:56 +01:00
Pieter Wuille 10e5357e8b
Import Bech32 C++ reference code & tests
This includes a reformatted version of the Bech32 reference code
(see https://github.com/sipa/bech32/tree/master/ref/c%2B%2B), with
extra documentation.
2018-05-04 10:27:11 +01:00
Jack Grigg 11aa594440
Remove obsolete CreateJoinSplit and GenerateParams binaries 2018-05-03 13:18:03 +01:00
Homu 0753a0e8a9 Auto merge of #3180 - str4d:transaction-serialization, r=ebfull
Upstream serialization improvements

Cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#5264
- bitcoin/bitcoin#6914
- bitcoin/bitcoin#6215
- bitcoin/bitcoin#8068
  - Only the `COMPACTSIZE` wrapper commit
- bitcoin/bitcoin#8658
- bitcoin/bitcoin#8708
  - Only the serializer variadics commit
- bitcoin/bitcoin#9039
- bitcoin/bitcoin#9125
  - Only the first two commits (the last two block on other upstream PRs)

Part of #2074.
2018-04-18 19:08:34 -07:00
Cory Fields da96e3b71a
build: univalue subdir build fixups
- Force a rebuild if the headers change
- Only build the lib target
- Clean univalue on 'make clean'
2018-04-18 00:36:49 +01:00
Pieter Wuille 29a8ade782
Prevector type 2018-04-16 07:38:36 -06:00
Homu 77669b952b Auto merge of #2598 - str4d:2074-dbwrapper, r=str4d
Bitcoin 0.12+ dbwrapper improvements

Cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#6650
  - Only refactor - excludes obfuscation
- bitcoin/bitcoin#6777
  - Excluding obfuscation-related changes
- bitcoin/bitcoin#6865
- bitcoin/bitcoin#6823
- bitcoin/bitcoin#6873
- bitcoin/bitcoin#7927
  - Excluding first commit (already included) and second commit (obfuscation-related)
- bitcoin/bitcoin#8467

Part of #2074.
2018-04-03 14:11:29 -07:00
Jeff Garzik e3da7a572d
leveldbwrapper file rename to dbwrapper.* 2018-04-03 20:40:54 +01:00
Jack Grigg 792c05d8a9
Set PLATFORM flag when compiling libsnark 2018-03-28 18:29:19 +02:00
Jack Grigg 7346f09026
Only set multicore flags if OpenMP is available 2018-03-19 17:32:21 +01:00
Jack Grigg c4379e3a22
Add configure flags for enabling ASan/UBSan and TSan
Co-authored-by: Robert Seacord <rcseacord@gmail.com>
2018-03-01 16:04:42 +00:00
Jack Grigg 6e9c7629af
Implement z_mergetoaddress for combining UTXOs and notes
Closes #2493.
2018-02-22 13:23:18 +00:00