Commit Graph

60 Commits

Author SHA1 Message Date
jl777
94f9918f9d Default genproclimit to 0 2018-06-30 01:18:10 -11:00
Jack Grigg
4553901850 Use v3 transactions with caching for validatelargetx benchmark 2018-02-20 04:22:22 +00:00
Jack Grigg
818b94f94f Make number of inputs configurable in validatelargetx test 2018-02-20 04:22:22 +00:00
Jack Grigg
be12669982 Add consensus branch ID parameter to SignatureHash, remove SigVersion parameter
We do not need to be able to calculate multiple SignatureHash versions for a
single transaction format; instead, we use the transaction format to determine
the SigVersion.

The consensus branch ID *does* need to be passed in from the outside, as only
the caller knows the context in which the SignatureHash is being calculated
(ie. mempool acceptance vs. block validation).

JoinSplit signature verification has been moved into ContextualCheckTransaction,
where the consensus branch ID can be obtained.

The argument to the sign command for zcash-tx has been modified to take a height
in addition to the optional sigtype flags.
2018-02-20 04:22:20 +00:00
Pieter Wuille
157a5d0d9c BIP143: Signing logic 2018-02-20 04:22:19 +00:00
Pieter Wuille
2d42e1a993 Refactor script validation to observe amounts
This is a preparation for BIP143 support.

Edited for Zcash merge by Ariel Gabizon.
2018-02-20 04:22:19 +00:00
Sean Bowe
1a9543d064 Remove crusty old "loadVerifyingKey"/"loadProvingKey" APIs and associated invariants. 2017-10-21 15:42:41 +03:00
Jack Grigg
99dd50c30c Add benchmark for listunspent
Closes #2645.
2017-10-04 12:48:50 +01:00
Ariel Gabizon
2e8aefdce1 add load-wallet benchmark 2017-09-18 21:54:53 +02:00
Jack Grigg
a76174b76b Benchmark time to call sendtoaddress with many UTXOs 2017-08-31 02:15:06 +01:00
Jack Grigg
c66c731adf Add a benchmark for calling ConnectBlock on a block with many inputs
Requires placing block-107134.tar.gz (containing the block, and a fake CoinsDB
containing its inputs) into the base directory of the repository. This can be
generated using qa/zcash/create_benchmark_archive.py (see the script for usage
details).

To facilitate generation of the fake CoinsDB, an additional field 'valueZat' has
been added to 'getrawtransaction' containing the integer number of zatoshis
instead of a decimal number of ZEC.

Closes #2355.
2017-05-18 11:03:46 +12:00
Jack Grigg
2cc0a252ad Add compile flag to disable compilation of mining code 2017-01-30 21:14:46 +01:00
Jack Grigg
4082dcb10f Extend createjoinsplit to benchmark parallel JoinSplits
Closes #1940
2016-12-14 15:28:00 +13:00
zkbot
8a6c070bfa Auto merge of #1870 - str4d:1749-benchmark-rescanning, r=str4d
Add benchmarks for rescan components

Part of #1749.
2016-12-09 07:12:22 +00:00
Jack Grigg
9755eb8292 Add JS to second block to ensure witnesses are incremented 2016-12-09 16:59:40 +13:00
Jack Grigg
88b7f3c28b Generate JS for trydecryptnotes, make number of addresses a variable 2016-12-09 16:59:39 +13:00
Sean Bowe
bc59f53722 Isolate verification to a ProofVerifier context object that allows verification behavior to be tuned by the caller. 2016-12-05 12:40:06 -07:00
Jack Grigg
0bb3d40f90 Add benchmark for incrementing note witnesses 2016-11-17 22:26:46 +13:00
Jack Grigg
0fbab55b1b Add benchmark for attempting decryption of notes 2016-11-17 19:09:45 +13:00
Sean Bowe
27e3f362f0 Zcash zk-SNARK public parameters for 1.0 "Sprout". 2016-10-24 11:22:39 -06:00
Sean Bowe
74f15a73a1 Make 100KB transaction size limit a consensus rule, rather than a standard rule. 2016-10-08 00:00:23 -06:00
Sean Bowe
796c7ee52f Update to beta2 public parameters, remove regtest/testnet3 parameters
subdirectories.
2016-10-03 15:58:02 -06:00
Jack Grigg
9e52ca3205 Measure multithreaded solveequihash time per-thread 2016-09-13 16:12:07 +12:00
Simon
805344dcf4 Refactor: replace calls to GetTxid() with GetHash() 2016-09-07 15:12:09 -07:00
zkbot
cd9d373987 Auto merge of #1260 - str4d:1175-byte-array-manipulation, r=ebfull
Update Equihash implementation to match the Zcash spec

Closes #1175
2016-08-24 03:01:13 +00:00
Sean Bowe
393b2b7834 Update proving/verifying keys. 2016-08-22 15:48:43 -06:00
Jack Grigg
5be6abbf84 Store the Equihash solution in minimal representation in the block header
The genesis blocks and miner tests have been regenerated, because changing the
block header serialisation format changes the block hash, and thus validity.

The Equihash solutions have been removed from the bloom test inputs for
simplicity (block validity is not checked there; only a valid serialisation is
necessary).
2016-08-16 16:02:39 +12:00
Simon
75c2f26887 Update variable. 2016-08-08 00:51:27 -07:00
Simon
822b84b616 Fixes #1193 so that during verification benchmarking it does not
unncessarily create thousands of CTransaction objects.
2016-08-07 23:57:39 -07:00
zkbot
95277e0311 Auto merge of #1144 - bitcartel:zc.v0.11.2.z7_tx_malleability_gettxid, r=bitcartel
A fix for transaction malleability

This PR fixes transaction malleability by not including the sigscript of transaction inputs and joinsplit sigs when hashing the txid.

This PR supercedes PR #1101 which was a minimal solution based on a new serialization flag.

This PR introduces GetTxid() to distinguish between getting a transaction id and the double sha256 hash.

The key changes are:
- Adding GetTxid() method to CTransaction which makes a copy of the transaction, clearing out the sigscript and joinsplitsig fields, before hashing.
- Verifying that every call to GetHash() actually wants a txid, and replacing with GetTxid().
- Renaming GetHash() to GetSerializeHash()
  - Rationale: In future, upstream code we want to merge will use GetHash() but we don't know the intent.  We should check to see if the intent is to receive a txid (most likely) in which case we replace with GetTxid(), or if upstream actually wants a double hash of the transaction we can use GetSerializeHash().
- Updated genesis data in chainparams.cpp

Note that coinbase transactions are excluded as they need the sigscript hashed to help avoid duplicate txids per BIP34:
  - This modification is related to a question from @ebfull on PR #1101 - "Can we think of a way this change allows us to construct two transactions with the same txid which can simultaneously appear in the blockchain? My guess is it would be possible to construct a coinbase transaction of such a form... this surely breaks invariants."

This PR Passes all tests in test_bitcoin (test data was updated in bloom_tests, miner_tests and script_tests).
2016-08-05 19:31:52 +00:00
Jack Grigg
f7478de67f Add thread parameter to solveequihash benchmark
Closes #1147
2016-08-05 15:05:38 +12:00
Jack Grigg
51eb5273f5 Equihash: Pass each obtained solution to a callback for immediate checking
Closes #1143
2016-07-27 19:15:49 +12:00
Simon
10d2c57c0d Replace calls to GetHash() with GetTxid() for transaction objects.
Where the caller intends to receive a transaction id and not a double
SHA256 hash.
2016-07-26 17:13:03 -07:00
Jack Grigg
2dbabb1159 Make Equihash solvers cancellable
The miner only cancels the solver when chainActive.Tip() changes.

Closes #1055
2016-07-20 19:17:02 +12:00
Sean Bowe
1477fd3f40 Remove the constraint system from the alpha proving key. 2016-07-19 14:01:58 -06:00
Sean Bowe
22de160219 Fixes for indentation and local variable names. 2016-07-18 10:07:29 -06:00
Sean Bowe
b7e4abd6f7 Rename some usage of 'pour'. 2016-07-18 10:06:18 -06:00
Sean Bowe
a8c68ffe99 Rename CPourTx to JSDescription. 2016-07-18 10:06:18 -06:00
Sean Bowe
000383c193 Increase block size to 2MB and update performance test. 2016-07-07 16:53:16 -06:00
Sean Bowe
9c45b501ad Make validatelargetx test more accurate, reduce block size limit to 1MB for now. 2016-07-06 12:07:50 -06:00
Sean Bowe
2ba9641767 Fix performance test for block verification. 2016-07-05 07:55:35 -06:00
Jack Grigg
c2e092f29e Fix memory leak in large tx benchmark 2016-06-29 11:45:47 +12:00
Jack Grigg
cfd806e161 Clear mempool before using it for benchmark test, fix parameter name 2016-06-29 11:19:41 +12:00
Jack Grigg
f5edc37f3f Add performance tests for creating and validating a MAX_BLOCK_SIZE transaction 2016-06-21 13:48:04 +12:00
Sean Bowe
1744fec274 Update the zkSNARK parameters. 2016-06-03 21:04:07 -06:00
zkbot
55bf149df9 Auto merge of #921 - str4d:optimised-equihash, r=daira
Optimise memory usage of Equihash implementation

Part of #857.
2016-06-01 13:10:26 +00:00
Taylor Hornby
ed6c1b5d15 We don't want to benchmark signature creation / verification. 2016-05-30 11:05:43 -06:00
Sean Bowe
6b5d608899 Update proving key and tests that depend on transaction structure changes 2016-05-24 11:09:17 -06:00
Jack Grigg
b5c6a3af12 Use optimised Equihash solver for miner and benchmarks
The basic solver is still used for regtest-only purposes.
2016-05-24 23:16:53 +12:00
Jack Grigg
e95747288a Use template parameters to statically initialise Equihash 2016-05-24 23:16:50 +12:00