Commit Graph

94 Commits

Author SHA1 Message Date
Michael Toutonghi
1f722359c1 Verus Proof of Stake Compete with Additional ant-fork protection on block 1 2018-05-13 18:59:06 -07:00
jl777
103fde3508 Test 2018-04-17 14:48:12 +03:00
jl777
a30dd993bf Test 2018-04-16 20:16:28 +03:00
jl777
e284540042 Test 2018-04-16 20:01:00 +03:00
jl777
3ad8d2478f Test 2018-04-16 19:46:37 +03:00
Scott Grayson
0c4f43951e Merge branch 'dev' of https://github.com/jl777/komodo into trunk-merge
* 'dev' of https://github.com/jl777/komodo: (1062 commits)
  Delay PoW check until connect block
  Declare
  KOMODO_NEWBLOCKS
  Prevent autorewind if syncing. Not a critical update
  Change n0/n1 size to int32_t
  Syntax
  Fix n -> static n0/n1
  Test
  Test
  Test
  KOMODO_LONGESTCHAIN = height;
  Sync main.cpp to jl777
  -print
  -USD/EUR
  readme
  curl fix
  -print
  Fix buffer overflows and reduce KMD men usage
  -print
  Test
  ...
2018-04-15 21:59:37 -04:00
TheTrunk
8b78a8199e Bitcore port 2018-03-27 13:34:52 +02:00
jl777
9000990c30 Merge remote-tracking branch 'zcash/master' into rebase2
# Conflicts:
#	.travis.yml
#	Makefile.am
#	README.md
#	configure.ac
#	depends/Makefile
#	depends/builders/darwin.mk
#	depends/funcs.mk
#	depends/hosts/darwin.mk
#	depends/packages/googlemock.mk
#	depends/packages/googletest.mk
#	depends/packages/libsnark.mk
#	depends/packages/libsodium.mk
#	depends/packages/packages.mk
#	depends/packages/rust.mk
#	src/Makefile.am
#	src/Makefile.gtest.include
#	src/chainparams.cpp
#	src/chainparams.h
#	src/checkpoints.h
#	src/clientversion.h
#	src/coins.cpp
#	src/consensus/consensus.h
#	src/gtest/test_mempool.cpp
#	src/httprpc.cpp
#	src/init.cpp
#	src/komodo-tx.cpp
#	src/main.cpp
#	src/miner.cpp
#	src/policy/fees.cpp
#	src/policy/fees.h
#	src/rpcmining.cpp
#	src/rpcrawtransaction.cpp
#	src/rpcserver.cpp
#	src/test/policyestimator_tests.cpp
#	src/test/rpc_wallet_tests.cpp
#	src/test/transaction_tests.cpp
#	src/txdb.cpp
#	src/txmempool.cpp
#	src/wallet/asyncrpcoperation_sendmany.cpp
#	src/wallet/rpcwallet.cpp
#	src/wallet/wallet.cpp
#	src/wallet/wallet.h
#	src/zcash/CreateJoinSplit.cpp
#	zcutil/build.sh
2018-03-25 18:44:38 +03:00
Jack Grigg
704b76358d Use block hash comparison for consistency check when loading block index
The Equihash check caused block index loading to take around 38x longer.
However, we don't need to check it directly, as the only paths to writing a
block header to disk already go through a proof-of-work check (e.g. receiving a
block over the network). By forcing the block header inside the CBlockIndex to
be re-serialized, we retain the benefits of the consistency check without the
overhead at startup.

Co-authored-by: Brad Miller <brad@z.cash>
2018-02-27 00:47:56 +00:00
Homu
50400310af Auto merge of #2977 - str4d:loadblockindexguts-correctness, r=str4d
Check Equihash solution when loading block index

An additional consistency check, which also ensures that the in-memory representation
matches the stored index.
2018-02-21 19:05:23 -08:00
Jack Grigg
44488400c1 Check Equihash solution when loading block index 2018-02-21 22:37:19 +00:00
Homu
6264927fef Auto merge of #2931 - jc23424:hashreserved-diskindex, r=str4d
read hashReserved from disk

This fixes a bug where the hashReserved field of the block header is not properly read back into CBlockIndex when loaded from disk. This happens to cause no issues currently because hashReserved has always been its default value (== 0), but if a block were ever mined where this was not the case, headers read back from disk would appear to have an invalid solution
2018-02-21 14:35:58 -08:00
jl777
81c5ec4f3c Dukeleto's https://github.com/zcash/zcash/pull/2931 2018-02-18 12:45:22 +02:00
Jonathan "Duke" Leto
c989bc86e3 Read hashReserved from disk instead of assuming 0
Related to https://github.com/zcash/zcash/pull/2931
2018-02-17 20:45:00 -08:00
Jack Grigg
828940b163 Use a boost::optional for nCachedBranchId
This enables us to distinguish between it being unset vs. being set to zero.
2018-02-06 22:42:18 +00:00
jc
15fb13f629 read hashReserved from disk block index 2018-02-04 21:40:14 -05:00
Jack Grigg
9e851450ab Adjust rewind logic to use the network upgrade mechanism 2018-02-04 22:58:42 +00:00
Jack Grigg
ad6a36ad02 Track net value entering and exiting the Sprout circuit
Delta values will be stored for new blocks; old blocks can be filled in by
re-indexing. The net value currently in the Sprout circuit is only calculated
when delta values for all previous blocks are present.
2017-12-14 22:06:11 +00: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
jl777
945f015d80 Initial merge 2017-03-30 04:35:16 +03:00
Wladimir J. van der Laan
a0455eca11 rpc: make gettxoutsettinfo run lock-free
For leveldb "An iterator operates on a snapshot of the database taken
when the iterator is created". This means that it is unnecessary to
lock out other threads while computing statistics, and neither to hold
cs_main for the whole time. Let the thread run free.
2017-03-02 13:23:03 -08:00
jl777
5b2624bdbe test 2016-10-20 11:29:48 -03:00
jl777
e778963cb8 test 2016-10-20 10:41:15 -03:00
jl777
5b39c60ee5 test 2016-10-20 09:39:58 -03:00
jl777
ddcdf5676d test 2016-10-20 07:36:06 -03:00
jl777
9ebb63d751 test 2016-10-20 07:33:44 -03:00
jl777
f2dd868d93 test 2016-10-20 06:32:43 -03:00
jl777
fffef49eca test 2016-10-18 10:55:43 -03:00
jl777
3a672e7b11 Merge remote-tracking branch 'zcash/master' into dPoW 2016-10-17 15:28:00 -03:00
jl777
f2d60864a9 notarized checkpoint 2016-10-17 13:18:45 -03:00
Jack Grigg
b6961fc112 Increment witnesses for new transactions on rescan
Closes #1400
2016-10-17 09:55:02 -05:00
jl777
3d35aa5b13 test 2016-10-03 11:32:30 -03:00
jl777
e93ff3ca05 syntax fix 2016-09-23 10:45:17 -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
Sean Bowe
22de160219 Fixes for indentation and local variable names. 2016-07-18 10:07:29 -06:00
Sean Bowe
9e511dbbdd Rename CSerialsCacheEntry. 2016-07-18 10:06:18 -06:00
Sean Bowe
bb64be52fe Rename mapSerials to mapNullifiers. 2016-07-18 10:06:18 -06:00
Sean Bowe
d889a287ae Rename CSerialsMap to CNullifiersMap. 2016-07-18 10:06:18 -06:00
Sean Bowe
616f8d05af Rename GetSerial to GetNullifier. 2016-07-18 10:06:18 -06:00
Taylor Hornby
bf2e3122ac Remove the Merkle tree hash function's fixed point. 2016-05-16 20:20:36 -06:00
Sean Bowe
434f328446 Integrate new incremental merkle tree implementation into consensus. 2016-04-28 16:07:52 -06: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
Sean Bowe
d66877afb3 Added mapSerials consensus rules to prohibit double-spending. 2016-01-19 14:36:09 -07:00
Sean Bowe
45d6bee945 Add mapSerials infrastructure to CCoinsView.
This adds the TXDB/CCoinsViewCache primitives necessary for
writing consensus rules for mapSerials later.
2016-01-19 14:36:04 -07:00
Sean Bowe
9f25631d50 Add mapAnchors infrastructure to CCoinsView.
This adds the TXDB/CCoinsViewCache primitives necessary for
writing consensus rules for mapAnchors later.
2016-01-19 14:36:04 -07:00
Jorge Timón
d698ef690f Consensus: Refactor: Decouple pow.o from chainparams.o 2015-03-26 00:47:51 +01:00
Jorge Timón
8a893c949b Includes: Do not include main.h from any other header 2015-03-24 17:23:32 +01:00
Pavel Janík
5262fde0ec Remove whitespaces before double colon in errors and logs 2015-01-31 17:38:28 -05:00
Earlz
14d023f1ae change hardcoded character constants to a set of descriptive named constants for database keys 2015-01-25 10:56:30 -05:00