Greg Pfeil
1aac7c0c32
Split C++ generated from Rust into own lib
...
This allows us to compile it with different flags. In particular, there are
warnings we can’t easily fix in the generated code.
2023-04-03 18:09:30 -06:00
Daira Hopwood
16099d66b6
Refactoring to split the weighted tx tree out of mempool_limit.{cpp,h}
...
and make it more reusable.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2023-03-08 16:03:34 +00:00
Alex Wied
f5c93e7d1d
build: Reorder link targets to properly build on Nix
2022-07-29 15:30:58 -04:00
Pieter Wuille
ae3dc3f134
8-way AVX2 implementation for double SHA256 on 64-byte inputs
...
(cherry picked from commit bitcoin/bitcoin@4437d6e1f3 )
2022-07-16 10:13:26 +00:00
Pieter Wuille
25dc154eef
4-way SSE4.1 implementation for double SHA256 on 64-byte inputs
...
(cherry picked from commit bitcoin/bitcoin@230294bf5f )
2022-07-16 10:13:26 +00:00
Taylor Hornby
f81054e86e
Merge pull request #5664 from superbaud/btests-to-gtests
...
Port all multithreaded tests from btest to gtest
2022-04-27 13:23:05 -06:00
sasha
313dec27dd
Create a new gtest suite CoinsTests
2022-04-26 15:25:58 -07:00
sasha
996e6dde9e
Create a new gtest group WalletRPCTests
2022-04-26 15:24:20 -07:00
sasha
075d85a2de
Closing #1539 simplifies gtest Makefile.
2022-04-20 19:49:13 -07:00
sasha
35ed2ba344
add tx-orchard-duplicate-nullifiers.h to Makefile.gtest.include
2022-04-14 09:01:23 -07:00
Jack Grigg
9e9f58b26f
Merge branch 'master' into unify-nu5-consensus-changes
2022-03-23 02:57:16 +00:00
sasha
5cfaea5dd4
Add missing gtest/test_transaction_builder.h to Makefile.gtest.include
...
Like 562f5add87
, the missing header ref
means that the make dist step of gitian builds don't include it in the
tarball, causing an error upon build.
2022-03-22 17:38:32 -07:00
Jack Grigg
63437e4c18
Add unit tests for `SpendableInputs::LimitToAmount`
2022-03-15 16:41:09 +00:00
Kris Nuttycombe
dcf7f46260
Add test for Orchard wallet note detection.
...
This tests the following operations:
* add a spending key to the wallet
* add notes from the Orchard bundle component of a transaction to the
wallet
* detect notes in the wallet that correspond to the spending key
* verify that notes that are not ours are not mistakenly labeled
as ours
2022-02-17 17:50:17 -07:00
Jack Grigg
c0736d3ef6
Enforce ZIP 244 consensus rules on sighash type
...
We implement this by throwing an exception in SignatureHash on violation
of the rules. For CHECKMULTISIG and CHECKSIG this results in `false`
being pushed onto the stack, while for CHECKMULTISIGVERIFY and
CHECKSIGVERIFY this results in an error.
2022-02-16 03:30:10 +00:00
Kris Nuttycombe
59a4c84112
Adds Orchard Address, IncomingViewingKey, FullViewingKey, and SpendingKey types.
2021-11-24 19:08:17 -07:00
Jack Grigg
416a4d453f
build: Add missing source file to zcash_gtest_SOURCES
2021-09-20 20:15:38 +01:00
Kris Nuttycombe
c759e6a9f3
Add feature flagging tests.
2021-03-23 19:38:30 -06:00
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
Homu
7d94064616
Auto merge of #4643 - str4d:locked-memory-manager, r=str4d
...
Locked memory manager
Add a pool for locked memory chunks, replacing `LockedPageManager`.
Cherry-picked from the following upstream PRs:
- bitcoin/bitcoin#8321
- bitcoin/bitcoin#8753
- bitcoin/bitcoin#9063
- bitcoin/bitcoin#9070
- bitcoin/bitcoin#11385
- bitcoin/bitcoin#12048
- Excludes change to benchmark.
- bitcoin/bitcoin#15117
- bitcoin/bitcoin#16161
- Excludes Travis CI changes.
- Includes change from bitcoin/bitcoin#13163
- bitcoin/bitcoin#15600
- bitcoin/bitcoin#18443
- Assorted small changes from:
- bitcoin/bitcoin#9233
- bitcoin/bitcoin#10483
- bitcoin/bitcoin#10645
- bitcoin/bitcoin#10969
- bitcoin/bitcoin#11351
- bitcoin/bitcoin#19111
- Excludes change to `src/rpc/server.cpp`
- bitcoin/bitcoin#9804
- Only the commit for `src/key.cpp`
- bitcoin/bitcoin#9598
2020-09-29 22:18:48 +00:00
Jack Grigg
66ac442da8
LockedPool: Make Arena::free and LockedPool::free noexcept
...
Attempting to free a detectably invalid pointer should terminate, as
this would be a programming error.
2020-09-28 16:20:06 +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
Jack Grigg
29594f5a91
build: shuffle gtest 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.
2020-07-17 20:14:39 +12:00
NikVolf
cf247bc655
push/pop history with tests
...
Co-authored-by: Jack Grigg <jack@z.cash>
2020-04-08 08:49:01 +12: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
dcd3614de4
Auto merge of #4359 - str4d:2872-upgrade-libsodium, r=str4d
...
Upgrade libsodium to 1.0.18
Includes patches that maintain consensus compatibility with libsodium 1.0.15 for Ed25519 pubkey and signature validation.
Replaces #4239 . Closes #2872 .
2020-03-10 03:10:01 +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
Daira Hopwood
ee4d73b841
Sort entries in zcash_gtest_SOURCES (other than test_tautology which is deliberately first).
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-02-25 17:00:10 +00: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
Jack Grigg
7893f7b752
Add test vectors for small-order Ed25519 pubkeys
...
I'm not adding test vectors for non-canonical pubkeys, as that would
require grinding to find a private key corresponding to one of the 19
pubkeys that can be non-canonical.
2020-02-18 01:18:37 +00:00
Dimitris Apostolou
439c3dd6d2
Remove libsnark preprocessor flags
2020-02-11 16:28:18 +02:00
Eirik Ogilvie-Wigley
88dff18a09
Include shielded transaction data when calculating RecursiveDynamicUsage of transactions
2019-11-11 16:02:00 -07: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
5f84491d82
Remove libsnark code for pre-Sapling Sprout proofs
2019-08-22 15:42:47 +01: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
7614198f9d
ZIP 32 Sapling structs
2018-09-03 10:27:52 +01:00
Jack Grigg
e7ca4eb3c3
test: gtest for Sapling encoding and decoding
2018-08-13 13:20:07 +01:00
Jack Grigg
e691e21f40
TransactionBuilder with support for creating Sapling-only transactions
2018-07-25 11:35:10 +02:00
Simon
36e2e7cc32
Add SaplingNote class and test_sapling_note unit test.
2018-06-12 14:37:05 -07:00
Sean Bowe
395bcd3647
Invoke the merkle_hash API in librustzcash via test suite.
2018-04-13 22:26:22 -06:00
Jack Grigg
7346f09026
Only set multicore flags if OpenMP is available
2018-03-19 17:32:21 +01:00
Jack Grigg
f52da91139
Test network upgrade logic
...
Also demonstrates how to specify a network upgrade.
2018-02-04 22:58:39 +00:00
Per Grön
5c4a47cbf8
Add actual header file for utilities in gtest/utils.cpp
...
It's not best practice to not use headers.
2018-01-23 07:43:51 +01:00
Jack Grigg
ad96d74afe
build: Split hardening/fPIE options out in Zcash-specific binaries
2017-12-01 14:10:11 +00:00