Commit Graph

47 Commits

Author SHA1 Message Date
blackjok3r
2c3247e8f1 Enable -ac_algo=verushash11 2019-01-22 00:12:05 +08:00
jl777
0ea9ae3c05 Update copyright to 2019 2018-12-31 21:41:05 -11:00
jl777
9412ec11a9 Add back Lwma guards for performance 2018-11-24 09:31:06 -11:00
jl777
89296c979c Fix lwmapos crash 2018-11-24 09:17:34 -11:00
jl777
bff0c90b85 Revert test 2018-11-22 05:52:50 -11:00
jl777
ff6593fc5c Test lwma 2018-11-22 05:48:04 -11:00
jl777
a93fd301ba IsPOSNonce() guard 2018-11-22 02:33:37 -11:00
miketout
ca4a5f2692 Change name to Stake Guard 2018-10-07 19:56:02 -07:00
miketout
4b729ec577 Changes for most chain power rule 2018-09-28 01:38:14 -07:00
miketout
9feb4b9e08 Major updates integration from all upstreams 2018-09-18 14:33:53 -07:00
Michael Toutonghi
5034d1c134 Sync with latest Komodo changes 2018-08-06 12:52:22 -07:00
Michael Toutonghi
17d0160a17 Cleanup nonce changes 2018-07-20 19:57:46 -07:00
Michael Toutonghi
503bd93fa8 Differentiate raw POSHash from full one adjusted by vout value 2018-07-19 01:02:54 -07:00
Michael Toutonghi
c5325a3256 PoS improvements 2018-07-18 17:42:15 -07:00
Michael Toutonghi
4dcb64c081 Radical hash rate optimization 2018-06-26 07:39:50 -07:00
Michael Toutonghi
5296a85018 Portable VerusHash and CPU check 2018-06-16 14:51:13 -07:00
Michael Toutonghi
20ab1c9174 mining performance boost 2018-06-10 00:12:28 -07:00
Scott Sadler
c7bcf05da4 fix MoM hash calculation 2018-05-30 18:12:05 -03:00
Michael Toutonghi
cf1e5967ee fix getinfo, cleanup hash 2018-05-18 02:46:21 -07:00
Michael Toutonghi
f6608b5a0d cleanup 2018-05-17 22:58:30 -07:00
Michael Toutonghi
c2923066b2 new CNetworkBlockHeader for robust compat 2018-05-17 00:04:10 -07:00
Michael Toutonghi
004e332290 Additional tests 2018-05-16 01:59:23 -07:00
Michael Toutonghi
3da69a3138 Trying to fix the forking issue, which is now clearly a bug in sending and receiving headers. This checkin will enable debugging and may be a fix. 2018-05-15 22:19:07 -07:00
Michael Toutonghi
1fae37f6bf Working proof of stake with new algorithm 2018-05-15 00:54:18 -07:00
Michael Toutonghi
1f722359c1 Verus Proof of Stake Compete with Additional ant-fork protection on block 1 2018-05-13 18:59:06 -07:00
Scott Sadler
20c3ac51c2 wip 2018-05-09 16:17:28 -03:00
Sean Bowe
f2c6d214e5 Rename hashSaplingAnchorEnd to hashFinalSaplingRoot to match spec. 2018-05-07 14:37:46 -06:00
Sean Bowe
691a3fa2e9 Rename hashReserved to hashSaplingAnchorEnd. 2018-05-07 13:46:06 -06:00
miketout
42181656c2 Implementation of VerusHash CPU-friendly hash algorithm, parameters to enable it, miner, and all changes required to support it on new asset chains 2018-04-27 00:34:50 -07:00
Jack Grigg
22ffe8ce44 Remove now-unshadowed serialization lines that do nothing
Previously we had both nVersion as a class parameter *and* a serialization
argument, and in several inherited serializers the latter was set to the former,
in order to pass the serialized object's version into underlying parsers. #3180
pulled in the upstream changes to clean this up, and in doing so these lines
became no-ops - setting the class parameter to itself. Clang throws warnings on
this, which turn into errors on the MacOS builder.

We can just remove these, because upstream already had done so in earlier PRs,
indicating that they were not being relied on by underlying parsers.
2018-04-20 09:48:33 +01:00
Jack Grigg
68a1a592ca Remove nType and nVersion from Zcash-specific code 2018-04-17 13:09:47 +01:00
Pieter Wuille
242f1421db Get rid of nType and nVersion
Remove the nType and nVersion as parameters to all serialization methods
and functions. There is only one place where it's read and has an impact
(in CAddress), and even there it does not impact any of the recursively
invoked serializers.

Instead, the few places that need nType or nVersion are changed to read
it directly from the stream object, through GetType() and GetVersion()
methods which are added to all stream classes.
2018-04-17 13:09:28 +01:00
Jack Grigg
03f83b9b0d Write witness caches when writing the best block
For steady-state operation, this reduces the average time between wallet disk
writes from once per block to once per hour.

On -rescan, witness caches are only written out at the end along with the best
block, increasing speed while ensuring that on-disk state is kept consistent.

Witness caches are now never recreated during a -reindex, on the assumption that
the blocks themselves are not changing (the chain is just being reconstructed),
and so the witnesses will remain valid.

Part of #1749.
2016-11-30 14:04:37 +13: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
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
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
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
Peter Todd
5e82e1c8f5 Add CHECKLOCKTIMEVERIFY (BIP65) soft-fork logic
Based on the earlier BIP66 soft-fork logic implemented by Pieter
Wuille's 5a47811da5

Rebased-From: 287f54fc90c29301faede8d4ac2ea24a91441917
2015-10-08 17:48:51 +02:00
jtimon
691161d419 Consensus: Create consensus/consensus.h with some constants 2015-04-20 21:27:51 +02:00
Pieter Wuille
5a47811da5 BIP66 changeover logic 2015-02-01 17:51:24 -04:00
Wladimir J. van der Laan
3b95808428 Merge pull request #5520
bdb6a71 IsNull doesn't change CBlockLocator, add const hint (Pavel Janík)
1b37333 Remove no longer needed declaration of CBlockLocator (Pavel Janík)
2015-01-06 20:01:00 +01:00
Wladimir J. van der Laan
4f1524966a Replace direct use of 0 with SetNull and IsNull
Replace x=0 with .SetNull(),
x==0 with IsNull(), x!=0 with !IsNull().
Replace uses of uint256(0) with uint256().
2015-01-05 15:45:34 +01:00
Pavel Janík
bdb6a71d3d IsNull doesn't change CBlockLocator, add const hint 2014-12-20 16:58:40 +01:00
sandakersmann
f914f1a746 Added "Core" to copyright headers
Github-Pull: #5494
Rebased-From: 15de949bb9277e442302bdd8dee299a8d6deee60
2014-12-19 19:55:32 +01:00
Michael Ford
78253fcbad Remove references to X11 licence 2014-12-16 15:56:50 +08:00
Matt Corallo
afd4b94b6d Move CMerkleBlock and CPartialMerkleTree to their own file 2014-12-05 01:57:40 -08:00
Luke Dashjr
d227011184 MOVEONLY: core/ -> primitives/ 2014-12-03 10:52:58 +00:00