13049 Commits

Author SHA1 Message Date
Ross Nicoll
f2cbd73c7c
Always use parameters at block 0 to get genesis block hash (#1416)
This doesn't actually change behaviour, but stylistically is more correct.
2018-01-08 20:23:41 +00:00
Patrick Lodder
c4c08ffb12 [auxpow] Guarantee backward compatibility on getauxblock
Adds a wrapper around getauxblock to return boolean responses
for getauxblock rather than bip22 responses.
2018-01-08 20:23:28 +00:00
Ross Nicoll
7d3cb5e000 Change result from getauxblock to BIP22 validation state 2018-01-08 20:23:28 +00:00
Ross Nicoll
b1778e3c49
Move COINBASE_MATURITY to the consensus parameters (#1426) 2018-01-08 19:39:10 +00:00
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
Max K
9cc6d645aa
Merge pull request #1392 from rnicoll/1.14-digishield-retarget
Introduce Digishield retarget code to 1.14
2017-11-19 23:22:45 +01: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
10ad46f940 Update DB version to 5.1 2017-08-13 21:30:59 +01:00
Max K
df900393c7 Merge pull request #1369 from langerhans/1.14-dev-dep-builder
Update dependency builder packages
2017-06-26 00:59:36 +02:00
langerhans
3641ab938d Update dependency builder and its packages to be ready for Dogecoin specifics 2017-05-21 08:37:34 -07: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
Ross Nicoll
3a1a345285 Update DB version to 5.1 2017-05-07 20:48:03 +01:00
Matt Corallo
43a987c1cb
Fix regsig checking for subkey sigs in verify-commits
Rebased-From: bbd757940bcb0628df6f7a5bd1fb348cf2290502
2017-03-05 19:09:49 +01:00
Wladimir J. van der Laan
ccf5e43ce0
Merge #9920: [0.14] Allow any subkey in verify-commits (BlueMatt)
589cd63 Allow any subkey in verify-commits (Matt Corallo)

Tree-SHA512: e3175273c648ed2d990ac931efae5e4bf3bd5ddce7b591f5e64a6831f3c029b252bc5d241dd8d3874467747c3ded87aa1fa334ff53d940cde32c22e584a2c4d0
2017-03-05 14:33:59 +01:00
Matt Corallo
589cd63b30 Allow any subkey in verify-commits 2017-03-05 02:07:23 +01:00
Luke Dashjr
a80dc94554
Bugfix: Only install manpages for built programs
Github-Pull: #9892
Rebased-From: 8c156b7f70ecd46af2172e052c89510f032c5090
2017-03-01 12:34:08 +01:00
Cory Fields
eff783a0fe
depends: make osx output deterministic
ld64 is threaded, and uses a worker for each CPU to parse input files. But
there's a bug in the parser causing dependencies to be calculated differently
based on which files have already been parsed.

As a result, builders with more CPUs are more likely to see non-determinism.

This looks to have been fixed in a newer version of ld64, so just disable
threading for now. There's no noticible slowdown.

Github-Pull: #9891
Rebased-From: 9e4d842afc67c63448cbbe30e5cea906e9c87f7e
2017-03-01 10:42:03 +01:00
Matt Corallo
5e70912234
Add Pieter's old signed commits to revsig-commits
Github-Pull: #9884
Rebased-From: a4b02f4275c3f35492bbdde27e9295497b919a52
2017-02-28 16:45:01 +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
58800e3556
doc: pre-rc3 changelog update 2017-02-28 13:43:20 +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
Wladimir J. van der Laan
1f83663bc2
Merge #9866: Document increase in memory usage due to mempool/dbcache sharing
50ae5c7 Document increase in memory usage due to mempool/dbcache sharing (Matt Corallo)

Tree-SHA512: e52a310a5ac1f94b30f367a7bf514b2cf0724530102953eef7f7c7e00a067db568b5e1b51129dfdb1a237e016c7a8b01cc6da8c06a24ab5b970c43d045adb204
2017-02-28 11:47:25 +01:00
Suhas Daftuar
a48b998ff3
[doc] Update doc/bips.md for BIP90 implementation
Github-Pull: #9879
Rebased-From: fe71661ae16abe09dcf245ee2eb4c55c5655b219
2017-02-28 11:44:23 +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
Wladimir J. van der Laan
5aaac4d09e
Merge #9878: Mention bumpfee in 0.14 release notes.
29bae0c Mention bumpfee in 0.14 release notes. (Russell Yanofsky)

Tree-SHA512: f16cdac3effbc6c4d69da2205931c782c272937c93c97bf22b49193fc905dd55a24d5e42568c7c7d8108b0b23f81f415655f9ebdf1f6ba04ef0ab3b125e8dcce
2017-02-28 11:41:24 +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