Commit Graph
55 Commits
Author SHA1 Message Date
Jack Grigg 3985a40d1f Change default ports 2016-06-17 00:21:58 +12:00
Jack Grigg cdec0b923e Fix bug in network hashrate lookup window configuration 2016-06-16 21:26:49 +12:00
Jack Grigg 71671484fd Handle full Zcash version string in AC_INIT 2016-06-16 13:48:42 +12:00
Jack Grigg 5e207f4ea5 Improve comments per review 2016-06-16 10:45:19 +12:00
Jack Grigg 284e125957 Update tests for new difficulty algorithm 2016-06-15 13:44:27 +12:00
Jack Grigg f2c48e15e5 Implement new difficulty algorithm (#931)
The algorithm is based on DigiShield v3/v4.
2016-06-15 09:48:42 +12:00
Jack Grigg 09e9a329b7 Tweaks after review 2016-06-14 09:41:03 +12:00
Jack Grigg f3aee6b109 Update miner tests for platform-independent Equihash 2016-06-12 00:00:26 +12:00
Jack Grigg 6f14382a02 Regenerate genesis blocks 2016-06-11 16:52:02 +12:00
Jack Grigg 933cb4cd9f Use htole32 and htobe32 for endian conversions 2016-06-11 16:52:02 +12:00
Jack Grigg a6dcf2ee6f Use little-endian for hash personalisation and hashing indices
The test vectors have been regenerated using the basic solver.
2016-06-11 16:28:57 +12:00
Jack Grigg d07cf62991 Speed up FullStepRow index comparison by leveraging big-endian byte layout 2016-06-11 16:28:57 +12:00
Jack Grigg 1dd8ce9ba5 Update tests to account for new Equihash parameters 2016-06-11 15:45:55 +12:00
Jack Grigg ae37d2a4cd Increase Equihash parameters to n = 96, k = 3 (about 430 MiB)
Includes a tweak to set the fixed-width of the rows based on whether the first
or last round is widest. This is necessary for some parameters, these ones
included.
2016-06-11 12:15:25 +12:00
Jack Grigg 3fe29eab90 Fix failing tests 2016-06-10 16:16:33 +12:00
Jack Grigg d4388ed52b Updated a hard-coded number of blocks to account for decreased block interval 2016-06-10 12:02:49 +12:00
Jack Grigg 196cf25d5b Update RPC tests to account for decreased block interval 2016-06-10 12:02:49 +12:00
Jack Grigg a59c352cfd Update tests to account for decreased block interval 2016-06-10 12:02:47 +12:00
Jack Grigg 45e3deea8a Decrease block interval to 2.5 minutes 2016-06-10 11:45:04 +12:00
Jack Grigg 9378a04f1b Update RPC tests to account for reserved field 2016-06-07 22:45:41 +12:00
Jack Grigg 50121909aa Update tests to account for reserved field 2016-06-07 22:45:41 +12:00
Jack Grigg 2ce992956b Regenerate genesis blocks 2016-06-07 21:54:13 +12:00
Jack Grigg a5150a156e Set -relaypriority default to false
This enables spending of individual coins during mining slow start.

Closes #904.
2016-06-07 21:11:57 +12:00
Jack Grigg a8d384aeda Add a 256-bit reserved field to the block header
This field has no defined semantics. While it was added as a result of
discussions about merged mining in #724, this field will not necessarily ever be
used for that purpose.
2016-06-07 16:06:25 +12:00
Jack Grigg 0a66f01304 Use depth-first scan for eliminating partial solutions instead of breadth-first
This reduces the peak number of lists in-memory from 2^k to k, and enables the
solver to eliminate most duplicates before it has instantiated the full set of
leaves.
2016-06-03 17:00:03 +12:00
Jack Grigg 447444ae7a Fix nits after review 2016-06-01 23:15:04 +12:00
Jack Grigg 068e2f1a09 Fix comment 2016-05-27 11:29:08 +12: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 d4d76536a5 Use fixed-width array for storing hash and indices 2016-05-24 23:16:53 +12:00
Jack Grigg 29d9986c83 Store full indices in the same char* as the hash 2016-05-24 23:16:52 +12:00
Jack Grigg 639c40047f Use comparator object for sorting StepRows 2016-05-24 23:16:52 +12:00
Jack Grigg a683cc85d9 Merge *StepRow XOR and trimming operations 2016-05-24 23:16:52 +12:00
Jack Grigg e95747288a Use template parameters to statically initialise Equihash 2016-05-24 23:16:50 +12:00
Jack Grigg 39f5cb35f9 Store truncated indices in the same char* as the hash (H/T tromp for the idea!) 2016-05-24 12:02:46 +12:00
Jack Grigg c92c1f6050 Implement index-truncation Equihash optimisation 2016-05-24 12:02:46 +12:00
Jack Grigg 6afef0dd6d Cleanups 2016-05-24 12:02:46 +12:00
Jack Grigg a3361e778b Refactor StepRow to make optimisation easier 2016-05-24 12:02:08 +12:00
Jack Grigg b3e712a4d2 Minor error message tweak 2016-05-21 11:48:52 +12:00
Jack Grigg c5d080bb83 Add Zcash Developers to CLI copyright notice 2016-05-20 11:56:19 +12:00
Jack Grigg a1de76c7a0 Bitcoin -> Zcash in version and help text 2016-05-20 11:56:11 +12:00
Jack Grigg fe0cacd2d8 Add Zcash revision to version strings 2016-05-18 16:50:28 +12:00
Jack Grigg 442eff615b Fix failing miner test 2016-05-12 00:01:24 +12:00
Jack Grigg 7a1f55183d Disable mining slow start in regtest mode 2016-05-10 23:11:32 +12:00
Jack Grigg 4f4a8c3c88 Update miner tests to account for mining slow start 2016-05-10 23:03:23 +12:00
Jack Grigg 91818cf28c Update subsidy tests to account for mining slow start 2016-05-10 23:03:23 +12:00
Jack Grigg bcb34c0802 Implement mining slow start with a linear ramp 2016-05-10 23:03:18 +12:00
Jack Grigg 7213c0b158 Fix Equihash state initialisation in miner
After a new block is found or after a few nonces have been tried (currently
after every nonce), the miner checks for global changes. If any of these are
triggered, a new block is built from scratch, which re-initialises the Equihash
input. But if none of the checks are triggered, the miner just updates nTime and
continues mining - without updating the Equihash input to account for the new
block header. This bugfix corrects the behaviour by regenerating the Equihash
input in both situations.
2016-04-12 15:23:44 +12:00
Jack Grigg aa86873afd Fix pow_tests to work with Equihash
Changing the order of difficulty calculation operations to divide first doesn't
affect the result significantly, but ensures we never overflow the arith_uint256
during multiplication and get an artificial jump in difficulty.
2016-04-08 23:19:03 +12:00
Jack Grigg cf00c47d5b Fix tests that depend on old block header format
Changes to bloom tests were done by running the following commands:

sed -i 's/\(CDataStream stream(ParseHex(".\{152\}\)\(.\{8\}\)/\100000000000000000000000000000000000000000000000000000000\200/' src/test/bloom_tests.cpp
sed -i 's/\(vector<unsigned char> vch = ParseHex(".\{152\}\)\(.\{8\}\)/\100000000000000000000000000000000000000000000000000000000\200/' src/test/bloom_tests.cpp

and then reverting the single change to the transaction line.
2016-04-08 14:50:56 +12:00
Jack Grigg b82dccaa0d Adjust genesis blocks to have valid solutions and hashes
The mainnet genesis block is artifically easy; we will revert this when we
actually start using mainnet.
2016-04-08 13:56:00 +12:00
Jack Grigg fdda3c5085 Use Equihash for Proof-of-Work
The main and test networks are configured to use parameters that are currently
low-memory but usable with the basic solver; they will be increased once the
solver is optimised. The regtest network is configured to have extremely low
memory usage for speed.

Note that Bitcoin's double-hasher is used for the difficulty check. This does
not match the paper, but is simpler than changing the block header
serialization. Single hashing is kept for the EquiHash solver because there is
no requirement on execution time there, only on memory usage.
2016-04-08 13:56:00 +12:00
Jack Grigg 020bed6021 Add test vectors for Equihash 2016-04-08 13:56:00 +12:00
Jack Grigg 6d25662f25 Implement validator and basic solver for Equihash 2016-04-08 13:56:00 +12:00
Jack Grigg f53f490b91 Disable comparison utility
Closes #592
2016-03-25 16:44:33 +13:00
Jack Grigg 4bc2a390c6 Require java for --with-comparison-tool 2016-03-25 16:43:28 +13:00