Commit Graph

70 Commits

Author SHA1 Message Date
jl777
a5f315c78c test 2016-10-21 09:04:45 -03:00
jl777
dae9e3bbf1 test 2016-10-21 08:57:30 -03:00
jl777
70ce79b02b test 2016-10-21 07:37:06 -03:00
jl777
b3101d06a3 test 2016-10-21 06:21:23 -03:00
jl777
f9e18307c4 test 2016-10-20 17:33:44 -03:00
jl777
b93286c28e test 2016-10-20 16:21:41 -03:00
jl777
a75fbeae8e test 2016-10-20 13:04:55 -03:00
jl777
f68be92251 test 2016-10-20 13:03:16 -03:00
jl777
493a9ec751 test 2016-10-20 12:37:17 -03:00
jl777
a89ac4dc84 test 2016-10-20 12:29:31 -03:00
jl777
7f18fdc406 test 2016-10-20 12:20:58 -03:00
jl777
a0a86d8627 test 2016-10-20 11:55:51 -03:00
jl777
e7ae7221e2 test 2016-10-20 11:36:21 -03:00
jl777
d28fd4bc8c test 2016-10-20 11:33:33 -03:00
jl777
681589a5b1 test 2016-10-20 11:20:03 -03:00
jl777
e583c8f8ba test 2016-10-20 08:28:46 -03:00
jl777
c322824d31 test 2016-10-20 07:35:11 -03:00
jl777
9ebb63d751 test 2016-10-20 07:33:44 -03:00
jl777
9997caa0a4 test 2016-10-20 06:49:35 -03:00
jl777
f2dd868d93 test 2016-10-20 06:32:43 -03:00
jl777
d3529dd1bc test 2016-10-18 12:08:10 -03:00
jl777
0570045c87 test 2016-10-18 11:08:37 -03:00
jl777
1602791a5b test 2016-10-03 11:43:17 -03:00
jl777
9668fb9212 test 2016-10-03 11:41:55 -03:00
jl777
3d35aa5b13 test 2016-10-03 11:32:30 -03:00
jl777
76c0be99bc test 2016-10-03 10:27:44 -03:00
jl777
7bfc207ada test 2016-10-03 10:20:27 -03:00
jl777
de141d9133 void * 2016-09-23 10:40:40 -03:00
jl777
8c3623fe10 syntax fixes 2016-09-23 10:36:28 -03:00
jl777
50027f0631 mindiff exception for notaries 2016-09-23 10:30:15 -03:00
Jack Grigg
4b37cfd5b8 Remove unnecessary method 2016-09-08 12:22:08 +12:00
Jack Grigg
7b173bd80f Simplify difficulty averaging code 2016-09-06 23:03:36 +12: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
Jack Grigg
29842505cc Adjust from average difficulty instead of previous difficulty 2016-09-05 22:25:11 +12:00
Jack Grigg
488e61e852 Undo debugging change from 5be6abbf84
This was unintentionally committed, and caused Equihash verification of blocks
without parents to be skipped. This only affects the genesis block on the test
network, but also causes the "time verifyequihash" benchmark to incorrectly
appear instantaneous.
2016-08-26 14:09:25 +12: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
Jack Grigg
9e0713f47f Remove hardfork from special testnet difficulty rules
Closes #1131
2016-07-29 21:46:27 +12:00
Jack Grigg
9e6adb124f Hardfork to the previous testnet difficulty adjustment behaviour at block 43400
This hardfork will be removed the next time the testnet blockchain is reset.
2016-07-22 14:17:46 +12:00
Jack Grigg
e99731b4a4 Reinstate previous testnet adjustment behaviour
When the difficulty adjustment algorithm was altered, the special testnet
min-difficulty case was maintained, but the difficulty adjustment for the
following block then adjusted from min-difficulty instead of from the last
non-min-difficulty block. This caused the difficulty on the testnet to sawtooth
instead of stabilising. The intended behaviour is restored here.
2016-07-21 20:50:05 +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
e95747288a Use template parameters to statically initialise Equihash 2016-05-24 23:16:50 +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
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
Pieter Wuille
f7303f9793 Use equivalent PoW for non-main-chain requests 2015-04-22 03:53:25 -07:00
Cory Fields
fd311996e8 consensus: don't use arith_uint256 in consensus.h
Requiring arith_uint256 at such a base level is not good for modularity.
2015-04-10 15:33:37 -04:00
Pieter Wuille
1cc0e96e9c Trivial optimization: use GetAncestor to compute new target 2015-03-26 11:06:27 -07:00
Jorge Timón
d698ef690f Consensus: Refactor: Decouple pow.o from chainparams.o 2015-03-26 00:47:51 +01:00
Wladimir J. van der Laan
3aa0130b96 test: remove fSkipProofOfWork
Not used, and REGTEST already allows creating blocks at
the lowerst possible difficulty.
2015-03-09 16:09:54 +01:00
Ross Nicoll
34e5015cd2 Add unit tests for next difficulty calculations
Split GetNextWorkRequired() into two functions to allow the difficulty calculations to
be tested without requiring a full blockchain.
Add unit tests to cover basic difficulty calculation, plus each of the min/max actual
time, and maximum difficulty target conditions.
2015-02-21 13:14:19 +00:00
Shaul Kfir
e5ece053da Rename Interval() to DifficultyAdjustmentInterval() 2015-02-17 08:46:51 -05:00