Commit Graph

114 Commits

Author SHA1 Message Date
Jack Grigg 90232f65ae Rename libzcashconsensus.la -> libzcash_script.la 2021-01-25 22:20:25 +00:00
fanquake 0ad49bca44 build: remove OpenSSL detection and libs 2020-09-30 00:40:12 +01:00
fanquake 8993f1f708 build: remove SSL lib detection 2020-09-30 00:40:12 +01:00
Wladimir J. van der Laan 7b3cb48232 Replace scriptnum_test's normative ScriptNum implementation
Compare against the scriptnum from Bitcoin Core 0.10 instead of OpenSSL.
Closes #7086.
2020-09-30 00:40:12 +01:00
Cory Fields f261701265 leveldb: enable runtime-detected crc32 instructions 2020-09-23 00:07:48 +01:00
Kris Nuttycombe 0cdce269b5 Merge remote-tracking branch 'upstream/master' into bazel-patches 2020-08-14 14:30:15 -06:00
Kris Nuttycombe 0391809da1 Remove amqp code and Proton library depenencies & flags. 2020-07-31 13:08:18 -06:00
Kris Nuttycombe b383d6cada Merge remote-tracking branch 'upstream/master' into bazel-patches 2020-07-31 12:49:40 -06:00
Cory Fields 1682a27c1d crypter: add tests for crypter
Verify that results correct (match known values), consistent (encrypt->decrypt
matches the original), and compatible with the previous openssl implementation.

Also check that failed encrypts/decrypts fail the exact same way as openssl.
2020-07-17 19:12:53 +12:00
Sean Bowe 08e6ed154c
Add test_random.h to distribution tarball. 2020-04-20 14:53:48 -06:00
Homu 4eb3dc7ec6 Auto merge of #4321 - str4d:internalise-rust, r=str4d
Bring the librustzcash crate into this repository

Rust dependencies are now canonically pinned within this repository by
`Cargo.lock`. We continue to use the depends system for vendoring the
dependencies, to ensure our Gitian builds continue to function (which have
no network access at build time, and fetch dependencies separately).

The `--enable-online-rust` configure flag replicates the behaviour of the
`LIBRUSTZCASH_OVERRIDE` environment variable (enabling the build system to
use https://crates.io instead of vendored dependencies).

This pulls in the exact version of `librustzcash` that we currently depend on
(corresponding to the `0.1.0` tag in https://github.com/zcash/librustzcash).
The changes to the crate since then will be pulled in as a separate PR.

Part of zcash/librustzcash#155.
Part of #4230.
2020-03-11 14:20:17 +00:00
Homu ca668cf666 Auto merge of #4374 - daira:rewrite-addtimedata, r=daira
Remove time adjustment; instead warn if peer clocks are too different

The policy is: warn if we have seen at least 8 (TIMEDATA_WARNING_SAMPLES) peer times, in the version messages of the first 20 (TIMEDATA_MAX_SAMPLES) unique (by IP address) peers that connect, that are more than 10 minutes (TIMEDATA_WARNING_THRESHOLD seconds) but less than 10 days (TIMEDATA_IGNORE_THRESHOLD seconds) away from local time.

fixes #4338
2020-03-09 21:15:34 +00:00
Jack Grigg 90f7234136 Replace librustzcash from depends system with src/rust
The --enable-online-rust configure flag replicates the behaviour of the
LIBRUSTZCASH_OVERRIDE environment variable (enabling the build system to
use crates.io instead of vendored dependencies).
2020-03-06 16:49:03 +13:00
Larry Ruane 75251cb2bc util: CBufferedFile fixes 2020-03-02 18:03:46 -07:00
Daira Hopwood d631187b39 Replace time adjustment with warning only.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-02-25 16:48:16 +00:00
Jim Posen bf2c8b3bc6
[script] Unit tests for script/standard functions
Zcash: Excluding unit tests for SegWit logic.
2019-12-18 18:59:15 -06:00
Wladimir J. van der Laan 91f0b506ca
test: Create test fixture for wallet
Removes all the `#ifdef ENABLE_WALLET` from `test_bitcoin` by
making the wallet tests use their own fixture.
2019-12-18 16:50:29 -06:00
Wladimir J. van der Laan 994a51d4d7
test: move accounting_tests and rpc_wallet_tests to wallet/test
Move the two other wallet tests to where they belong.
2019-12-18 16:50:29 -06:00
Gavin Andresen b346588c13
Unit test doublespends in new blocks
As suggested by Greg Maxwell-- unit test to make sure a block
with a double-spend in it doesn't pass validation if half of
the double-spend is already in the memory pool (so full-blown
transaction validation is skipped) when the block is received.
2019-12-04 17:13:57 +00:00
Larry Ruane a3eb2b8708 update unit tests to compute empty roots 2019-10-12 18:03:36 -06:00
Jack Grigg 6a4b8b7751
Remove libsnark from build system 2019-08-22 15:42:51 +01:00
Jack Grigg 5f84491d82
Remove libsnark code for pre-Sapling Sprout proofs 2019-08-22 15:42:47 +01: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
Braydon Fuller ec81c70964 tests: adds unit test for IsPayToPublicKeyHash method 2019-03-28 12:04:02 -06:00
Jonas Schnelli 4922d1c19a
Fix test_bitcoin circular dependency issue 2018-08-05 10:41:06 +01:00
Homu 2ebde5860e Auto merge of #3326 - str4d:3058-sapling-addresses, r=str4d
Sapling address encodings

This PR enables Sapling keys and addresses to be passed in anywhere Sprout keys
and addresses are used. Doing so will cause crashes until those places are updated
with Sapling support.

Includes code cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#11167
  - Only the `ConvertBits()` function.
- bitcoin/bitcoin#11630

Closes #3058.
2018-06-19 05:12:50 -07:00
Jay Graber 052d640cb0 Add json test vectors for Sapling key components. 2018-06-13 10:38:32 -07:00
Jack Grigg 6b759fb092
ConvertBits() - convert from one power-of-2 number base to another.
Function extracted from upstream:
  PR bitcoin/bitcoin#11167
  Commit c091b99379b97cb314c9fa123beabdbc324cf7a4
2018-06-07 16:42:01 +12:00
Homu b1d2a69908 Auto merge of #3202 - str4d:3058-sapling-bech32, r=str4d
Bech32 encoding support

Cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#8578
- bitcoin/bitcoin#11167
  - Only the second and third commits (first is in #3228, fourth depends on #2390, later ones are SegWit-specific).
- bitcoin/bitcoin#12757
  - Only the change to `src/bech32.h`

Part of #3058.
2018-05-08 09:08:37 -07:00
Sean Bowe 2f23a656fb Add regression tests and test vectors for Sapling merkle tree 2018-05-07 13:46:06 -06: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
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
James O'Beirne 0d81464be7
Refactor leveldbwrapper
Was "Add chainstate obfuscation to avoid spurious antivirus detection"

Zcash: Extracted the refactor, omitting the chainstate obfuscation.
2018-04-03 20:40:54 +01:00
Jack Grigg 7346f09026
Only set multicore flags if OpenMP is available 2018-03-19 17:32:21 +01:00
Per Grön 2d8ee6a68a Remove Checkpoints_tests.cpp
These have been removed "for now" for two years now. I care about this
because the way Bazel runs the tests (one executable per test .cpp file)
makes empty test suites like this fail.
2018-01-23 07:44:05 +01:00
Per Grön 0bab947bc5 Get rid of implicit hidden dependencies between test .cpp files 2018-01-23 07:43:51 +01:00
Cory Fields c459de2f03
build: Split hardening/fPIE options out
This allows for fPIE to be used selectively.
2017-11-30 15:17:37 +00:00
Sean Bowe 26a8f68ea8
Remove libsnark from depends system and integrate it into build system. 2017-08-02 15:49:30 +01:00
Daira Hopwood 506a21850a Remove UPnP support. fixes #2500
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-07-03 08:57:05 +01:00
zkbot f7f764e0b2 Auto merge of #2189 - bitcartel:1.0.7_with_apache_qpid, r=bitcartel
Add AMQP 1.0 support via Apache Qpid Proton C++ API 0.17.0

Closes #2188
2017-04-16 15:09:19 +00:00
Simon 99eb947a98 Add AMQP 1.0 support via Apache Qpid Proton C++ API 0.17.0 2017-03-25 08:51:40 -07:00
Jack Grigg 6dbd95afa1
torcontrol: Add unit tests for Tor reply parsers 2017-03-26 00:34:53 +13:00
Karl-Johan Alm ca50af75b1
Added EVENT_CFLAGS to test makefile to explicitly include libevent headers. 2017-03-24 09:03:59 +13:00
Karl-Johan Alm e8b6d84b9f
Added some simple tests for the RAII-style events. 2017-03-24 09:03:59 +13:00
Jonas Schnelli a10a6e2a0e
[Univalue] add univalue over subtree
similar to secp256k1 include and compile univalue over a subtree
2017-02-10 02:18:51 +00:00
Jeff Garzik f200002cf3
Add ZeroMQ support. Notify blocks and transactions via ZeroMQ
Continues Johnathan Corgan's work.
Publishing multipart messages

Bugfix: Add missing zmq header includes

Bugfix: Adjust build system to link ZeroMQ code for Qt binaries
2017-02-08 22:10:42 +00:00
Jack Grigg 8e0fc39097
Exclude test binaries from make install
Closes #1943.
2017-01-03 11:23:21 +01:00