Commit Graph

110 Commits

Author SHA1 Message Date
jl777
21de2ee1e4 test 2016-10-28 14:42:43 -03:00
jl777
30853e4ab9 Merge remote-tracking branch 'zcash/master' into dPoW 2016-10-28 13:50:21 -03:00
jl777
679496c346 test 2016-10-23 18:06:33 -03:00
jl777
d15f15ae5c test 2016-10-23 18:01:11 -03:00
jl777
8a1a972ad7 test 2016-10-23 18:00:04 -03:00
Daira Hopwood
cb1246194e Update the error message string for tx version too low. ref #1600
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-10-22 13:26:44 +01:00
Jack Grigg
80f4cdcf8f Reject block versions lower than 4
Closes #1556
2016-10-22 00:43:26 -05:00
Jack Grigg
7ac924cdb7 Disallow v0 transactions as a consensus rule
Closes #1557
2016-10-22 00:40:50 -05:00
Jack Grigg
3774c944f8 Refactor test code to better test JSDescription::Randomized() 2016-10-18 12:44:56 -05:00
Jack Grigg
0382417fee Implement MappedShuffle for tracking the permutation of an array 2016-10-18 00:20:47 -05:00
zkbot
3fceaca3a1 Auto merge of #1506 - bitcartel:master_1478_fix_testnet3_test_issue, r=bitcartel
Stop some wallet tests creating ~/.zcash/testnet3 folder by setting -datadir environment

Closes #1478
2016-10-14 17:03:11 -04:00
Simon
32bf097f90 Fixes #1478 by ensuring wallet tests have the -datadir environment set appropriately. 2016-10-10 20:23:24 -07: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
Jack Grigg
9cf182d451 Update address in Founders' Reward gtest 2016-10-04 11:55:40 -07:00
zkbot
d9da9d69ff Auto merge of #1398 - bitcartel:master_fr48, r=bitcartel
Add multiple founders' reward addresses

./zcash-gtest --gtest_filter="founders_reward_test.*"

Closes #1405.
2016-10-01 17:12:33 -04:00
Simon
6c54e9fc0b Update testnet founders reward addresses 2016-09-30 14:42:47 -07:00
Simon
88fd810150 Update founders reward test to output path of temporary wallet.dat file which contains keys which can be used for testing founders reward addresses. 2016-09-30 14:42:47 -07:00
Simon
1a21a25e62 Refactor to add test to verify number of rewards each mainnet address will receive 2016-09-30 14:42:47 -07:00
Simon
241867b115 Founders reward: Refactor test and formatting per review. 2016-09-30 14:42:47 -07:00
Simon
3b30d8361a Founders reward: changed index computation, added new test and some refactoring. 2016-09-30 14:42:47 -07:00
Simon
db0f931570 Add founders reward to ChainParams.
Fix bug where subsidy slow shift was ignored.
2016-09-30 14:42:47 -07:00
zkbot
d90ed0df93 Auto merge of #1433 - str4d:gtest-expected-failures, r=str4d
Add a make command for checking expected failures

With this merged, we can add gtests prefixed with `DISABLED_`, and then configure Buildbot to run those tests but not require they pass in order to merge.
2016-09-30 17:12:26 -04:00
Simon
73699ceaf6 Add support for spending keys to the encrypted wallet. 2016-09-29 20:17:30 -07:00
Jack Grigg
ad041fceec Cache note decryptors in encrypted keystore 2016-09-29 11:34:59 +13:00
Jack Grigg
3bbf2c1422 Test that invalid keys fail to unlock the keystore 2016-09-28 12:52:53 +13:00
Jack Grigg
e9006272c2 Add a make command for checking expected failures 2016-09-23 12:32:59 +12:00
Jack Grigg
6ae516f10b Check we haven't trashed the first key entry with the second 2016-09-13 14:21:49 +12:00
Jack Grigg
16d140f4a2 Add support for encrypting spending keys 2016-09-13 14:21:49 +12:00
zkbot
2271d3feda Auto merge of #1338 - str4d:147-tweak-difficulty-adjustment-algorithm, r=ebfull
Tweaks to difficulty adjustment algorithm

This PR changes the difficulty algorithm to adjust from the average difficulty over the
block window instead of from the last difficulty. It also removes the special rules for the
testnet, which are incompatible with difficulty averaging.

Closes #147 again.
2016-09-08 02:21:13 +00:00
Jack Grigg
622ced8a74 Adjust test to account for integer division precision loss 2016-09-08 12:46:00 +12:00
Jack Grigg
4b37cfd5b8 Remove unnecessary method 2016-09-08 12:22:08 +12:00
Jack Grigg
aea79ec053 Adjust test to avoid spurious failures
Previously, if the two random numbers happened to be equal, the block time
would not be updated, and subsequent checks would fail.
2016-09-08 11:34:50 +12:00
Simon
33264f5b46 Remove GetTxid() from CTransaction and update test_txid 2016-09-07 15:12:09 -07:00
Simon
6c79b9a12a Update txid gtest to verify #1144 has been removed: GetTxid() and
GetHash() return the same result.
2016-09-07 15:12:09 -07:00
zkbot
02932fc9cc Auto merge of #1341 - ebfull:fix-checktransaction-bug, r=ebfull
Fix CheckTransaction bugs.

Closes #1319.

Does not address the name of `vpub_old` or `vpub_new`.
2016-09-07 20:22:13 +00:00
Jack Grigg
5fbb839f53 Add test of difficulty averaging 2016-09-06 23:01:58 +12:00
Sean Bowe
d7eeb7455b Fix CheckTransaction bugs. 2016-09-05 12:18:43 -06:00
Sean Bowe
f6b6c9bed8 Update libsnark again. 2016-09-05 12:00:50 -06:00
Jack Grigg
333ea3c426 Remove testnet-only difficulty rules
The min-difficulty blocks are incompatible with difficulty averaging.

Network difficulty is also now defined as the difficulty the network is
currently working to solve, rather than the last non-min-difficulty block
difficulty.
2016-09-05 23:13:25 +12:00
zkbot
2640989d9a Auto merge of #1308 - str4d:1181-getmininginfo-testnet-difficulty-rules, r=ebfull
Separate concepts of block difficulty and network difficulty in RPC

"Block difficulty" is the difficulty listed in a block's header, which in the
testnet can sometimes be min-difficulty (if time-since-last-block is too large).

"Network difficulty" is the difficulty that the network was trying to satisfy
at a particular block height. In mainnet this is always equal to the difficulty
of the solved block for that height, but in testnet the network difficulty is
derived from the last non-min-difficulty block difficulty.

This commit fixes the RPC APIs that are intended to show network difficulty, so
that on testnet they don't sometimes drop to 1.0, confusing users.

Closes #1181
2016-09-01 18:12:46 +00:00
zkbot
a723794f81 Auto merge of #1233 - str4d:1199-note-tracking, r=str4d
Add Note tracking

This PR extends the existing transaction tracking in the wallet to track spendable Notes.

Closes #1199
2016-09-01 08:17:07 +00:00
Jack Grigg
00939d09ba Add test comparing GetDifficulty() with GetNetworkDifficulty() 2016-09-01 16:36:18 +12:00
Jack Grigg
73db0c12b9 Increase coverage of GetNoteDecryptor() 2016-09-01 14:44:01 +12:00
Jack Grigg
be86b6c332 Add test for GetNoteDecryptor() 2016-08-31 18:57:32 +12:00
zkbot
835588a629 Auto merge of #1314 - str4d:fix-getblock-solution-output, r=ebfull
Output Equihash solution in RPC results as a hex string

When the Equihash solution was changed to a compact form in #1175, the block header changed from storing a vector of indices to a vector of chars. `blockToJSON()` was not updated, which meant that RPC calls like `getblock` returned the solution as a list of 1344 integers.

This PR changes `blockToJSON()` to output the Equihash solution as a hex string, identical to how it appears in the block header.
2016-08-30 18:40:19 +00:00
Jack Grigg
3e3da44c71 Test solution output of blockToJSON() 2016-08-30 14:42:49 +12:00
Simon
df3af446e7 Fixes #1122 where json_spirit could stack overflow because there
was no maximum limit set on the number of nested compound elements.
2016-08-26 23:35:45 -07:00
Simon
4b2e557181 Fix comments. 2016-08-24 11:19:34 -07:00
Simon
4cea36bef3 Add gtest to cover new methods in:
CWallet
- GenerateNewZKey()
- AddZKey()
- LoadZKey()
- LoadZKeyMetadata()
CWalletDB
- WriteZKey()
2016-08-24 11:19:33 -07:00
Daira Hopwood
c6a7e897bc Add mostly-static checks on consistency of Equihash parameters, MAX_HEADERS_RESULTS, and MAX_PROTOCOL_MESSAGE_LENGTH.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-08-24 06:13:06 +01:00