8846 Commits

Author SHA1 Message Date
Ross Nicoll
0258aa797e
Check only the base block version (#1411)
Check only the base block version when looking for unexpected version numbers
2018-01-08 19:32:01 +00:00
Ross Nicoll
0c4d842198
Add Dogecoin current fee calculation logic (#1413)
Introduces 1 COIN/kb fees, rounded up to the next 1 COIN.
2018-01-07 22:56:53 +00:00
Lola Dam
e3c1bafdc4 Verify when doing 'backupwallet' that destination is not the same path of the original wallet.dat file. (#1406) 2018-01-04 22:07:08 +00:00
Ross Nicoll
4d5165d104 Update dogecoin-tx tests (#1409)
Update Python test address and key values to match Dogecoin format
2018-01-01 17:29:58 +01:00
Ross Nicoll
e9db975d2f
Change count type used by gettxoutsetinfo (#1415)
changing CAmount (is a int64_t) to arith_uint256 for nTotalAmount in CCoinsStats to prevent overflow
2018-01-01 16:24:14 +00:00
Ross Nicoll
bc74b3a2c8 Update checkpoints and chain work (#1410)
* Update checkpoints and chain work

* Correct checkpoint syntax

* Correct timestamp of last checkpoint block
2017-12-30 18:38:54 +01:00
Max K
632ce09def
Fix 1.14 unit tests (#1408)
* Fix BlockEncodings test by setting a legacy block version

* Fix RPC test by adding missing RPC call

* Add missing regtest genesis hashes
2017-12-28 22:41:29 +01:00
Ross Nicoll
e883283531
Modify chain consensus parameters to be height aware (#1396)
* Modify chain consensus parameters to be height aware
* Correct implementation of simplified rewards in parameters
* Correct max money
* Use base block version in IsSuperMajority() instead of full version
* Correct mining of blocks in AuxPoW tests
* Add in missing pre-AuxPoW consensus checks
2017-12-28 15:04:08 +00:00
Ross Nicoll
f71bd2c2d8 Change BIP65/66 enforcement to match Dogecoin (#1403)
* Introduce first estimates at BIP lock-in blocks

* Introduce Dogecoin BIP parameters

* Re-introduce supermajority rules for BIP65

* Add BIP65 supermajority rules

* Tighten v3 block constraints

* Don't enforce coinbase in v2 blocks

* Correct testnet majority params

* Change to using base version when checking supermajority
2017-12-27 22:11:14 +01:00
Max K
e46f0dae4e
Merge pull request #1404 from rnicoll/1.14-version-message
Stop sending a Bitcoin alert to Dogecoin clients
2017-12-27 21:00:18 +01:00
Ross Nicoll
36e39c1098
Set SegWit timeout to zero to disable it (#1405) 2017-12-27 10:40:44 +00:00
Ross Nicoll
1a4ddbd6bd Stop sending a Bitcoin alert to Dogecoin clients 2017-12-26 00:26:57 +00:00
Ross Nicoll
f1e116f711 Handle legacy v2 block at #66064 2017-11-19 22:12:19 +00:00
Ross Nicoll
493709b829 Correct PoW calculation logic to use locally calcualted difficulty 2017-11-19 22:10:53 +00:00
Ross Nicoll
62cbf04327 Sync changes from Dogecoin 1.10 2017-11-19 22:10:53 +00:00
Ross Nicoll
29ce7b5a18
Sync mining code from Namecore to resolve unit test failures (#1385) 2017-11-19 22:09:03 +00:00
Ross Nicoll
1f3278ecab Merge AuxPoW support from Namecore
Changes are as below:

Wrap CBlockHeader::nVersion into a new class (CBlockVersion).  This allows to take care of interpreting the field into a base version, auxpow flag and the chain ID.

Update getauxblock.py for new 'generate' RPC call.

Add 'auxpow' to block JSON.

Accept auxpow as PoW verification.

Add unit tests for auxpow verification.

Add check for memory-layout of CBlockVersion.

Weaken auxpow chain ID checks for the testnet.

Allow Params() to overrule when to check the auxpow chain ID and for legacy blocks.  Use this to disable the checks on testnet.

Introduce CPureBlockHeader.

Split the block header part that is used by auxpow and the "real" block header (that uses auxpow) to resolve the cyclic dependency between the two.

Differentiate between uint256 and arith_uint256.

This change was done upstream, modify the auxpow code.

Add missing lock in auxpow_tests.

Fix REST header check for auxpow headers.

Those can be longer, thus take that into account.  Also perform the check actually on an auxpow header.

Correctly set the coinbase for getauxblock results.

Call IncrementExtraNonce in getauxblock so that the coinbase is actually initialised with the stuff it should be.  (BIP30 block height and COINBASE_FLAGS.)

Implement getauxblock plus regression test.

Turn auxpow test into FIXTURE test.

This allows using of the Params() calls.

Move CMerkleTx code to auxpow.cpp.

Otherwise we get linker errors when building without wallet.

Fix rebase with BIP66.

Update the code to handle BIP66's nVersion=3.

Enforce that auxpow parent blocks have no auxpow block version.

This is for compatibility with namecoind.  See also https://github.com/namecoin/namecoin/pull/199.

Move auxpow-related parameters to Consensus::Params.
2017-08-13 21:30:59 +01:00
Ross Nicoll
03b5a01054 Annotate work to be done to Dogecoin-ify 2017-05-07 20:48:03 +01:00
Ross Nicoll
9426f29378 Add Dogecoin difficulty calculations 2017-05-07 20:48:03 +01:00
coblee
909be42689 Litecoin: Fix zeitgeist2 attack thanks to Lolcust and ArtForz. This fixes an issue where a 51% attack can change difficulty at will. Go back the full period unless it's the first retarget after genesis. 2017-05-07 20:48:03 +01:00
Warren Togami
a248acba44 Litecoin: Scrypt n=1024 Pow hash based upon Colin Percival's Tarnsnap (2009) Modified by Artforz, coblee, pooler, wtogami, Nikolay Belikov, Adrian Gallagher 2017-05-07 20:48:03 +01:00
Ross Nicoll
9ade8e5925 Replace test data with Dogecoin values
Replace test data with Dogecoin equivalents in the folowing tests:

* base58
* bip32
* keys
* miner
* pow

Replace RPC and deterministic signatures in unit tests with Dogecoin values. While
conventionally I'd use an alternative implementation for these, as RFC 6979
compliant signature generation isn't terribly common, and there's no reason
to suspect we've modified this code, I'm going to assert that it's good enough
to test that the code doesn't provide different values.

Disabled Bitcoin PoW tests, but left code in place to simplify later merges. These are
replaced by the Dogecoin PoW tests.
2017-05-07 20:48:03 +01:00
Ross Nicoll
1186f82d21 Add Dogecoin block subsidy calculations. 2017-05-07 20:48:03 +01:00
Ross Nicoll
8f8981d01b Replace consensus values with Dogecoin equivalents
* Replace chain parameters with Dogecoin values
* Update maximum coins to match Dogecoin
* Disable version 2 block requirement
* Update coinbase maturity to match Dogecoin
2017-05-07 20:48:03 +01:00
Russell Yanofsky
ad24256a65
Fix importmulti returning rescan errors for wrong keys
Bug was a missing ++i line in a new range for loop added in commit e2e2f4c
"Return errors from importmulti if complete rescans are not successful"

Github-Pull: #9829
Rebased-From: 306bd72157f089b962b9c537bbacf710a4158647
2017-02-28 13:53:28 +01:00
Wladimir J. van der Laan
8d2d08efaa
qt: pre-rc3 translations update 2017-02-28 12:49:29 +01:00
Pieter Wuille
1825a03f81
Avoid VLA in hash.h
Github-Pull: #9791
Rebased-From: 5c8fd508112016c3821b71112270afe83e6949ac
2017-02-28 12:48:19 +01:00
Marijn Stollenga
289204fbe0
Change bitcoin address in RPC helpaddress to an invalid address, so people don't accidentally send coins there (like I did).
Github-Pull: #9865
Rebased-From: 83ac719d34f98cc1d3efa6ece2b95145bcde8775
2017-02-28 12:01:06 +01:00
Russell Yanofsky
08e0690f3f
Update sendfrom RPC help to correct coin selection misconception
Github-Pull: #9840
Rebased-From: f81f0d003079b96b8c33d3dfe76f90e50344bcd8
2017-02-28 11:41:58 +01:00
Cory Fields
775cf54d0e
prevector: assert successful allocation
Github-Pull: #9856
Rebased-From: d4ee7baef729da5e18b5e5c3d6ddb5b97df8d4e4
2017-02-28 11:40:50 +01:00
Cory Fields
69832aaad5
don't throw std::bad_alloc when out of memory. Instead, terminate immediately
Github-Pull: #9856
Rebased-From: c5f008a4166bae4350881a74fc04a87d7a5c4ed5
2017-02-28 11:40:50 +01:00
Wladimir J. van der Laan
50953c2aad
tests: Fix dangling pwalletMain pointer in wallet tests
Github-Pull: #9875
Rebased-From: 75a109338fbbe9a30c54d76010b538c8ac1080ac
2017-02-28 11:40:50 +01:00
Wladimir J. van der Laan
847e3753a6
qt: pre-rc2 translations update 2017-02-23 20:31:57 +01:00
Cory Fields
05e906dbc6
build: add --enable-werror option
This turns some compiler warnings into errors. Useful for c-i.

Github-Pull: #9789
Rebased-From: 205830a37b7ffa4f8fa306e5c9eafcee3777fa68
2017-02-23 10:49:07 +01:00
John Newbery
9d3f9d2a59
[Trivial] Remove incorrect help message from gettxoutproof()
Github-Pull: #9711
Rebased-From: 9949ebfa6a548260858df429f4d0e716e0a26065
2017-02-22 13:03:55 +01:00
Russell Yanofsky
9072395e5f
Return errors from importmulti if complete rescans are not successful
Github-Pull: #9773
Rebased-From: e2e2f4c856363bbb0e3b5ba4df225f3754c3db39
2017-02-22 12:45:43 +01:00
Jonas Schnelli
7d75a5a93c
Fix segfault crash when shutdown the GUI in disablewallet mode
Github-Pull: #9817
Rebased-From: 312c4f10574ccf6dfe0d4ecb3ce928733d3a1e52
2017-02-21 15:14:17 +01:00
kirit93
e22c0671c7
Fix for issue #9775. Added check for open() returning a NULL pointer.
Github-Pull: #9798
Rebased-From: 40f11f8872c3e9f380f8278f984dfdabffe77539
2017-02-21 14:33:34 +01:00
Pavel Janík
3972a8efb2
Read/write mempool.dat as a binary.
mempool.dat is a binary file and thus it should be read/written as such.

Fixes #9810.

Github-Pull: #9813
Rebased-From: 171fc91f061d4a980eedfa522e302b8598408cc5
2017-02-21 12:35:38 +01:00
Luke Dashjr
6552729f38
Bugfix: RPC/Mining: GBT should return 1 MB sizelimit before segwit activates
Github-Pull: #9619
Rebased-From: 9fc7f0bce94f1cea0239b1543227f22a3f3b9274
2017-02-20 17:32:59 +01:00
Russell Yanofsky
40c754cb38
[wallet] Remove importmulti always-true check
Remove "nLowestTimestamp <= chainActive.Tip()->GetBlockTimeMax()" check from
importmulti, which is always true because nLowestTimestamp is set to the
minimum of the most recent block time and all the imported key timestamps,
which is necessarily lower than the maximum block time.

Github-Pull: #9760
Rebased-From: ec1267f13b7d0b9b5058c6821cf8dbf74e02d17c
2017-02-20 17:30:26 +01:00
Cory Fields
2afefeade6
boost: remove iostreams includes
They're unused and produce nasty deprecation warnings

Github-Pull: #9786
Rebased-From: 3301587dc5c7937141282f3799592d1e398495fb
2017-02-17 21:50:30 +01:00
Pieter Wuille
973e345f7f
Move BIP70_MAX_PAYMENTREQUEST_SIZE to header
Github-Pull: #9785
Rebased-From: c801c82e253dc4956069b6110f65b43f538dd5a1
2017-02-17 21:50:22 +01:00
Pieter Wuille
f873564231
Make KEY_SIZE a compile-time constant
Github-Pull: #9785
Rebased-From: 914fad155d9fc76b42b3a0414dd14b5ebc36062f
2017-02-17 21:50:14 +01:00
Wladimir J. van der Laan
f68e4414d7
qt: pre-rc1 translations update 2017-02-17 17:43:06 +01:00
Wladimir J. van der Laan
bc69f34b35
build: bump version to 0.14.0 2017-02-17 17:24:00 +01:00
Wladimir J. van der Laan
9828f9a996
Merge #9761: Use 2 hour grace period for key timestamps in importmulti rescans
e662af3 Use 2 hour grace period for key timestamps in importmulti rescans (Russell Yanofsky)
38d3e9e [qa] Extend import-rescan.py to test imports on pruned nodes. (Russell Yanofsky)
c28583d [qa] Extend import-rescan.py to test specific key timestamps (Russell Yanofsky)
8be0866 [qa] Simplify import-rescan.py (Russell Yanofsky)
2017-02-17 12:53:41 +01:00
Wladimir J. van der Laan
ad168ef4e3
Merge #9778: Add two hour buffer to manual pruning
91fb506 Add two hour buffer to manual pruning (Alex Morcos)
2017-02-17 12:51:08 +01:00
Wladimir J. van der Laan
3c02b95740
Merge #9779: Update nMinimumChainWork and defaultAssumeValid.
3f78e46 Update nMinimumChainWork and defaultAssumeValid. (Gregory Maxwell)
2017-02-17 12:41:49 +01:00
Wladimir J. van der Laan
8dee822177
Merge #9777: Handle unusual maxsigcachesize gracefully
55c403b Ensure `-maxsigcachesize` is in valid range (John Newbery)
2017-02-17 09:05:48 +01:00