Commit Graph

98 Commits

Author SHA1 Message Date
jl777
3070b90746 Merge branch 'FSM' into patch-osx-gcc8-static 2019-05-27 04:18:27 -11:00
DeckerSU
45aecd9c3c osx: switch to gcc-8 static build 2019-05-24 11:36:20 +03:00
blackjok3r
18854e2af7 ac_nk params 2019-04-17 13:42:02 +08:00
DeckerSU
a6e7da55e2 fix gcc-8 / g++-8 build 2019-01-26 03:09:54 +03:00
miketout
8a727a26a7 Beginning of N@S solution using CoinbaseGuard CC 2018-10-02 19:49:54 -07:00
miketout
9feb4b9e08 Major updates integration from all upstreams 2018-09-18 14:33:53 -07:00
miketout
ffda33998f Add fix to remove KMD coinbase check with pool fee workaround at block 227520 (~Oct 28th) 2018-08-30 19:40:07 -07:00
Michael Toutonghi
17d0160a17 Cleanup nonce changes 2018-07-20 19:57:46 -07:00
Michael Toutonghi
9ec211d18b use portable load_constants 2018-07-06 14:16:25 -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
c6e2184378 post launch release readiness 2018-05-27 19:59:23 -07:00
David Dawes
52cf66e138 Add conditional compiulation for Windows fix. 2018-05-24 20:28:26 -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
Homu
8ef1d333b5 Auto merge of #2894 - per-gron:dont-export-unless-needed, r=str4d
Make some globals static that can be

I wrote this patch as part of making a Bazel build system but it really is independent from that so I'm putting this as a separate PR.

External linkage does not help and just encourages sloppy dependencies (ie using symbols only declared in a cpp file in some other cpp file) and can lead to weird issues when there are name collisions.
2018-05-04 15:05:43 -07:00
miketout
a0dd01bc50 Bug fixes in hash algorithm, parameters, and time lock support 2018-04-28 15:05:20 -07: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
Pieter Wuille
0b6594f444 Avoid unaligned access in crypto i/o 2018-04-17 09:15:55 -07: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
Per Grön
39d2e9e0cb Make some globals static that can be
External linkage does not help and just encourages sloppy dependencies
and can lead to weird issues when there are name collisions.
2018-01-22 18:20:47 +01:00
Jack Grigg
c6b39fbbd6 Include endian-ness compatibility layer in Equihash implementation 2017-11-29 17:28:44 +00:00
ca333
a2d7c036e0 darwin 333 2017-10-22 04:08:53 +02:00
ca333
9d36579649 uni3 2017-10-09 11:45:49 +02:00
Jason Davies
b30900a54b Replace "bitcoin" with "Zcash". 2017-10-05 18:10:15 +01:00
jl777
945f015d80 Initial merge 2017-03-30 04:35:16 +03:00
Jack Grigg
2cc0a252ad Add compile flag to disable compilation of mining code 2017-01-30 21:14:46 +01:00
Joel Barker
cb42e55182 tweaks to allow compiling on linux 2016-12-30 19:42:46 +00:00
Joel Barker
e891d64b87 macifiy the build so that this compiles on a mac 2016-12-26 14:11:13 +08:00
4ZEC
cc6c9ec05e Correct line swap
Pretty clear the author wanted these two lines in other order.
2016-10-14 13:35:22 -04:00
Daira Hopwood
bcf79c78c5 Change some asserts in equihash.cpp to be static.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-08-24 06:13:13 +01: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
zkbot
cd9d373987 Auto merge of #1260 - str4d:1175-byte-array-manipulation, r=ebfull
Update Equihash implementation to match the Zcash spec

Closes #1175
2016-08-24 03:01:13 +00:00
Jack Grigg
e273f05d10 Remove unnecessary temporary array from Equihash hash generation 2016-08-21 06:05:48 +12:00
Taylor Hornby
2902ac7ce8 Use libsodium's s < L check, instead checking that libsodium checks that. 2016-08-18 16:38:20 -06: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
20abe2083c Extend byte array expansion and compression methods with optional padding 2016-08-16 11:02:04 +12:00
Jack Grigg
caa0348f04 Update Equihash hash generation to match the Zcash spec
Changes:

- floor(512/n)*n/8 bytes of BLAKE2b output is split between floor(512/n)
  adjacent indices, instead of using one hash call per index.

- Parameters with n/(k+1) mod 8 != 0 will expand the BLAKE2b output to byte
  boundaries for colliding, instead of using a longer output and clearing bits.

- The genesis blocks have been regenerated.

- The test vectors have been regenerated.

- The Equihash inputs for the cancellation tests were modified to ensure that
  valid solutions were available to exercise the full solver.
2016-08-16 11:02:04 +12:00
Jack Grigg
881ffbfc87 Add methods for byte array expansion and compression
These methods convert between:

- A byte array of length NL/8, and
- An array of N blocks of ceil(L/8) bytes.
2016-08-16 11:02:00 +12:00
Robert C. Seacord
1031047885 Update equihash.cpp
fix https://github.com/zcash/zcash/issues/1214
2016-08-10 15:40:32 -04:00
Jack Grigg
23acf86791 Ignore duplicate entries after partial recreation 2016-08-06 17:33:38 +12:00
Jack Grigg
30bd297920 Fix bug in IsProbablyDuplicate()
Closes #1179
2016-08-06 15:26:22 +12:00
Jack Grigg
fa19e1b357 Add test showing bug in IsProbablyDuplicate() 2016-08-06 15:23:47 +12:00
Jack Grigg
eeb4177843 Add Equihash support for n = 200, k = 9
Closes #1177
2016-08-06 10:33:14 +12:00
zkbot
e5b57a1432 Auto merge of #1173 - str4d:1165-equihash-fix-large-k-ballooning, r=bitcartel
Eliminate some of the duplicates caused by truncating indices

Closes #1165
2016-08-05 17:35:35 +00:00
Jack Grigg
036dcbd94a Remove the assumption that n/(k+1) is a multiple of 8.
This version works, but generates the initial rows in a way that is not what we
want to specify. See #1175 for resolving this.

Co-author: Daira Hopwood <daira@jacaranda.org>
2016-08-06 02:40:07 +12:00
Jack Grigg
3c3ef34505 Add missing assert 2016-08-05 22:24:04 +12:00
Jack Grigg
e999c1e339 Simplify IsProbablyDuplicate() 2016-08-05 22:17:40 +12:00
Jack Grigg
3c654f38eb Eliminate probably duplicates in final round
This is more likely to eliminate valid solutions than doing so in intermediate
rounds, but the probability is still very low.
2016-08-05 18:15:34 +12:00
Jack Grigg
6b4f4475a5 Use fixed-size array in IsProbablyDuplicate to avoid stack protector warning 2016-08-05 17:18:47 +12:00