38 Commits

Author SHA1 Message Date
Just Wonder
a7dcf93506 Better IBD fix.
Fixed randomX computation.
2020-03-20 10:42:20 -07:00
Just Wonder
e55c1ef81e Fixed Initial Block Download issue with RandomKeva. 2020-03-20 01:24:08 -07:00
Just Wonder
85c262741b RX/0 now worked. 2020-02-29 20:06:56 -08:00
Just Wonder
c85ed93f3f Build OK with RandomX. 2020-02-28 21:08:27 -08:00
Just Wonder
ecbc9fec10 WIP: RandomX. 2020-02-28 17:04:37 -08:00
Just Wonder
bb09e64483 Adjusted mainnet genesis block difficulty.
Additional check for Cryptonote header consistency with block header.
2020-01-10 21:08:35 -08:00
Jianping Wu
68ffbfc104 Changed block hash calculation, used cryptonote header instead. 2019-03-21 23:10:45 -07:00
Jianping Wu
ddc43217ca Genesis block also used cn header. 2019-03-21 16:20:45 -07:00
Jianping Wu
d48d05a182 Supported Cryptonight Variant 4. 2019-03-20 12:26:47 -07:00
Jianping Wu
8766247be1 Fixed CN RPC call transfer. 2019-03-19 22:49:52 -07:00
Jianping Wu
3a657f0615 WIP: fixed PoW hash computation. 2019-03-08 11:55:31 -08:00
Jianping Wu
9e442eb109 WIP: fixed block serialization. 2019-03-08 11:19:10 -08:00
Jianping Wu
57ab5c7255 WIP: implemented submitblock. 2019-03-06 23:15:11 -08:00
Jianping Wu
bbb78c76a0 WIP: built with latest cn code. 2019-03-06 17:44:09 -08:00
Jianping Wu
baf31da4a7 WIP: integrated latest cn code. 2019-03-06 15:55:46 -08:00
Jianping Wu
80396a7a0f WIP: added cn header to block header. 2019-03-06 13:12:55 -08:00
Jianping Wu
348513dda6 Upgraded to Cryptonight V8. 2018-12-13 10:43:53 -08:00
Jianping Wu
7f27245431 Switched to cryptonight PoW. 2018-12-13 10:43:53 -08:00
Jianping Wu
fac4394247 Started working on Cryptonight. 2018-12-13 10:43:53 -08:00
shaolinfry
4b588c670c
Litecoin: Add scrypt N=1024 PoW 2018-02-26 18:57:17 -08:00
Akira Takizawa
595a7bab23 Increment MIT Licence copyright header year on files modified in 2017 2018-01-03 02:26:56 +09:00
MeshCollider
1a445343f6 scripted-diff: Replace #include "" with #include <> (ryanofsky)
-BEGIN VERIFY SCRIPT-
for f in \
  src/*.cpp \
  src/*.h \
  src/bench/*.cpp \
  src/bench/*.h \
  src/compat/*.cpp \
  src/compat/*.h \
  src/consensus/*.cpp \
  src/consensus/*.h \
  src/crypto/*.cpp \
  src/crypto/*.h \
  src/crypto/ctaes/*.h \
  src/policy/*.cpp \
  src/policy/*.h \
  src/primitives/*.cpp \
  src/primitives/*.h \
  src/qt/*.cpp \
  src/qt/*.h \
  src/qt/test/*.cpp \
  src/qt/test/*.h \
  src/rpc/*.cpp \
  src/rpc/*.h \
  src/script/*.cpp \
  src/script/*.h \
  src/support/*.cpp \
  src/support/*.h \
  src/support/allocators/*.h \
  src/test/*.cpp \
  src/test/*.h \
  src/wallet/*.cpp \
  src/wallet/*.h \
  src/wallet/test/*.cpp \
  src/wallet/test/*.h \
  src/zmq/*.cpp \
  src/zmq/*.h
do
  base=${f%/*}/ relbase=${base#src/} sed -i "s:#include \"\(.*\)\"\(.*\):if test -e \$base'\\1'; then echo \"#include <\"\$relbase\"\\1>\\2\"; else echo \"#include <\\1>\\2\"; fi:e" $f
done
-END VERIFY SCRIPT-
2017-11-16 08:23:01 +13:00
Dag Robole
72f00608d0 Replace traditional for with ranged for in primitives 2017-07-24 16:32:21 +02:00
Gregory Maxwell
3babbcb487 Remove confusing MAX_BLOCK_BASE_SIZE.
Some people keep thinking that MAX_BLOCK_BASE_SIZE is a separate
 size limit from the weight limit when it fact it is superfluous,
 and used in early tests before the witness data has been
 validated or just to compute worst case sizes.  The size checks
 that use it would not behave any differently consensus wise
 if they were eliminated completely.

Its correct value is not independently settable but is a function
 of the weight limit and weight formula.

This patch just eliminates it and uses the scale factor as
 required to compute the worse case constants.

It also moves the weight factor out of primitives into consensus,
 which is a more logical place for it.
2017-07-14 19:24:17 +00:00
isle2983
27765b6403 Increment MIT Licence copyright header year on files modified in 2016
Edited via:

$ contrib/devtools/copyright_header.py update .
2016-12-31 11:01:21 -07:00
Pieter Wuille
1662b437b3 Make CBlock::vtx a vector of shared_ptr<CTransaction> 2016-11-19 17:51:09 -08:00
Suhas Daftuar
2c06bae39e Rename "block cost" to "block weight" 2016-07-18 13:28:26 -04:00
Pieter Wuille
2b1f6f9ccf BIP141: Other consensus critical limits, and BIP145
Includes changes by Suhas Daftuar, Luke-jr, and mruddy.
2016-06-22 15:43:00 +02:00
Pieter Wuille
eff736e55e Reformat version in UpdateTip and other messages
Also remove the hardly-readable nBits from UpdateTip's log message.
2016-03-31 12:28:34 +02:00
MarcoFalke
fa24439ff3 Bump copyright headers to 2015 2015-12-13 18:08:39 +01:00
Pieter Wuille
eece63fa72 Switch blocks to a constant-space Merkle root/branch algorithm.
This switches the Merkle tree logic for blocks to one that runs in constant (small) space.
The old code is moved to tests, and a new test is added that for various combinations of
block sizes, transaction positions to compute a branch for, and mutations:
 * Verifies that the old code and new code agree for the Merkle root.
 * Verifies that the old code and new code agree for the Merkle branch.
 * Verifies that the computed Merkle branch is valid.
 * Verifies that mutations don't change the Merkle root.
 * Verifies that mutations are correctly detected.
2015-11-27 15:36:52 +01:00
Pieter Wuille
391dff16fe Do not store Merkle branches in the wallet.
Assume that when a wallet transaction has a valid block hash and transaction position
in it, the transaction is actually there. We're already trusting wallet data in a
much more fundamental way anyway.

To prevent backward compatibility issues, a new record is used for storing the
block locator in the wallet. Old wallets will see a wallet file synchronized up
to the genesis block, and rescan automatically.
2015-09-22 18:51:07 +02:00
Wladimir J. van der Laan
a0ae79d775 Replace CBlockHeader::GetHash with call to SerializeHash
Removes variability between LE and BE.
As suggested by @sipa.
2015-03-06 17:21:59 +01:00
Wladimir J. van der Laan
81aeb28436 src/primitives/block.cpp: endian compatibility in GetHash 2015-03-06 17:21:58 +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
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
Luke Dashjr
d227011184 MOVEONLY: core/ -> primitives/ 2014-12-03 10:52:58 +00:00