8515 Commits

Author SHA1 Message Date
Wladimir J. van der Laan
c09dfd06fc Revert "Disable partition check for now, it triggers too often (issue #6251)"
Re-enable partition check, it should be safe again after #6256.

This reverts commit 3eada74d6f4720e650c67461c04c3aafdeaff21e.
2015-07-29 18:29:30 +01:00
Ross Nicoll
a06da268ff Merge pull request #1212 from langerhans/1.10-dev-travis-caching
Update .travis.yml to make use of the new container based infrastructure
2015-07-29 18:21:48 +01:00
Max K.
ac34ac987a Merge pull request #1210 from rnicoll/1.10-auxpow-fixes
Minor AuxPoW fixes
2015-07-29 19:19:27 +02:00
Ross Nicoll
20278f5f5f Minor AuxPoW fixes
Replaced references to Namecoin with Dogecoin
Set chain ID when constructing a new block to be mined
Added assignment overload so that assigning one BlockVersion to another does a full copy.
2015-07-28 18:24:27 +00:00
Max K.
3ba610bc41 Merge pull request #1205 from rnicoll/1.10-genesis-checks
Use block height 0 when checking for genesis block
2015-07-28 00:30:28 +02:00
Ross Nicoll
d97a37f4a9 Use block height 0 when checking for genesis block
There is no previous block when validating the genesis block as part of contextual checks,
so block height cannot be used. Consensus parameters are now taken from height 0 for
the genesis check, and from block height only if the it's not the genesis block.
2015-07-26 12:25:03 +00:00
langerhans
1ea402fa14 Update .travis.yml to make use of the new container based infrastructure. 2015-07-25 18:58:25 +02:00
Patrick Lodder
8cd835cddb Merge pull request #1201 from rnicoll/1.10-sync
Consensus fixes
2015-07-20 15:03:02 +02:00
Ross Nicoll
77ec26804d Update Python test address and key values to match Dogecoin format. 2015-07-19 16:42:23 +00:00
Ross Nicoll
f94966f41a Disable payment protocol very large value test, as it's impossible to exceed maximum Dogecoin in a payment request. 2015-07-19 16:42:23 +00:00
coblee
106ecab0e0 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. 2015-07-19 16:42:23 +00:00
Ross Nicoll
8d52844229 Minor Dogecoin consensus fixes
Updated maximum coins to match Dogecoin.
Updated protocol version to disable connections to pre-AuxPoW clients.
Disable version 2 block requirement
Update coinbase maturity to match Dogecoin
2015-07-19 16:42:23 +00:00
Ross Nicoll
949b1ccd88 Modify chain consensus parameters to be height aware 2015-07-19 16:42:22 +00:00
Patrick Lodder
b66e509800 Merge pull request #1200 from rnicoll/1.10-auxpow-clean
Add AuxPoW support
2015-07-11 14:41:33 +02:00
Ross Nicoll
c453bcc9e5 Adapt AuxPoW to Dogecoin
Changed AuxPoW parent block hashing to use Scrypt rather than SHA256 hash.
Update chain parameters to match Dogecoin
Move CheckProofOfWork into dogecoin.cpp and rename it to CheckAuxPowProofOfWork.
Add operator overrides to CBlockVersion so that naive usage operates on the underlying version without chain ID or flags.
Modify RPC mining to more closely match existing submitblock() structure
2015-07-10 20:23:14 +01:00
Daniel Kraft
eabf633f13 Merge AuxPoW support from Namecore
Includes the following commits:

commit 2ea1b5cd8cf2bdd08e43ae39fb76352eebe14895
commit f2a8220c34275f022f02d81e9e84d4cec33bd51c
commit 84b8b56113e6057b0253475b83e797dc1fed2eed
commit 8471d5db221f145f5a40022ed1897c1b996b628e
commit 2f125ad0a67e1b8f71b18a14a3b41d7e577391d1
commit e01dbc3608703b4cb4e9882738125f2b7816cdb8
commit f0421312631cd44669f9f84d339a0c470b4423b9
commit 1fd522db5dfddfd0e1b0c794b82fae2cc7bdb099
commit 71f63ad99f70ff6461c795fd728aea16aa1008f8
commit a7c44d98a8ded4df0e8455c4c5629b1a5b303bbf
commit e1d7b4fc15addf3dfeb3853fa66230a8bdacd75f
commit d016f2fa02572fd340129176b942b3f19bd5260b
commit f4716e5a168a697afce854a37350fdae0988bdd8
commit 03a575e3b13bf06cbb0a007d6672b05d2085c26e
commit d7ea37444bd9e9ac461a3dda0b16afefd160b062
commit db22affa01e050ff847a12e20c83b88952d80b59
commit 9b7e14986655f914b2d0903ca1d79367c92c6c7e
commit e21034f9c124893d5b9631e9ca231b0b9ede3d52

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.
2015-07-05 18:45:24 +01:00
Ross Nicoll
548aaaf39f Merge pull request #1199 from patricklodder/1.10-partition-alert
[tests] fix partition alerts for Dogecoin
2015-07-05 16:56:59 +01:00
Patrick Lodder
8733540186 [tests] fix partition alerts for Dogecoin
Partitioning is tested over 4h and 100 blocks are insufficient
to test this for Dogecoin. We need 640 blocks in 4h for the
"abnormally high" alert test, I've found a set of 800 blocks to
test over providing sufficient margin.
2015-07-05 16:37:11 +02:00
Patrick Lodder
60e0da333c Merge pull request #1198 from rnicoll/1.10-rpc-tests
Further unit test corrections
2015-07-05 12:46:24 +02:00
Ross Nicoll
3de28f1f9d
Further unit test corrections
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.

Correct BIP32 key headers for Dogecoin, also by repacking the data.

Disabled Bitcoin PoW tests, but left code in place to simplify later merges. These are
replaced by the Dogecoin PoW tests.
2015-07-05 09:06:51 +01:00
Ross Nicoll
a6ef16e66c Merge pull request #1194 from patricklodder/1.10-unit-tests
[tests] use dogecoin fixtures, pt1
2015-07-04 00:02:58 +01:00
Patrick Lodder
dcea4af668 [tests] use dogecoin fixtures pt1
uses our test fixtures for:
- alerts
- base58
- keys
- main
- miner
2015-07-03 23:17:31 +02:00
Patrick Lodder
5dc7a35f8d Merge pull request #1189 from rnicoll/1.10-digishield
Added Digishield support and unit tests
2015-06-29 11:02:24 +02:00
Ross Nicoll
8da45ed40b
Added Digishield support and unit tests 2015-06-28 22:10:58 +01:00
Max K.
e0ca377684 Merge pull request #1188 from rnicoll/1.10-reward
Add Dogecoin block subsidy calculations
2015-06-28 20:42:03 +02:00
Ross Nicoll
2468489d4e Add Dogecoin block subsidy calculations. 2015-06-28 18:04:45 +01:00
Patrick Lodder
a87d6f1004 Merge pull request #1187 from rnicoll/1.10-scrypt
Scrypt PoW
2015-06-28 18:59:58 +02:00
Ross Nicoll
a99e717ed6 Added Scrypt mining support based on Dogecoin 1.9 work. 2015-06-28 16:21:09 +00:00
Warren Togami
8a7d5338c2 Litecoin: Scrypt n=1024 Pow hash based upon Colin Percival's Tarnsnap (2009)
Modified by Artforz, coblee, pooler, wtogami, Nikolay Belikov, Adrian Gallagher

miner.cpp changes stripped during merge to Dogecoin
2015-06-28 16:21:02 +00:00
Ross Nicoll
9b70a1f0b3 Merge pull request #1184 from patricklodder/1.10-chainparams
Port Dogecoin base chainparams. Merging with less testing than normal, as this is a pre-requisite for most other tests
2015-06-28 12:37:31 +01:00
Patrick Lodder
1aaa174eb1 Merge pull request #1182 from langerhans/1.10-dev-depends
Update dependencies and BDB
2015-06-28 12:10:03 +02:00
Patrick Lodder
5f769e00cf port dogecoin base chainparams 2015-06-27 22:18:25 +02:00
langerhans
963e237e0e Upgrade bdb to 5.1 2015-06-25 22:59:34 +02:00
langerhans
32c0e0e91b Update dependency builder and its packages to be ready for Dogecoin specifics 2015-06-25 22:58:40 +02:00
Max K.
dde99d1dd9 Merge pull request #1181 from patricklodder/1.10-readme-sync
Sync readme from 1.9-dev
2015-06-24 23:07:47 +02:00
Patrick Lodder
64747a73f2 Sync readme from 1.9-dev 2015-06-24 22:36:58 +02:00
Wladimir J. van der Laan
5f032c75ee
doc: Update release notes for rc2 2015-06-17 09:18:33 +02:00
Jacob Welsh
25c2216168
depends: fix Boost 1.55 build on GCC 5
Boost assumes variadic templates are always available in GCC 4.4+, but
they aren't since we don't build with -std=c++11.

This applies the patch that fixed the issue in boost 1.57:
eec8085549

See also: https://svn.boost.org/trac/boost/ticket/10500

Github-Pull: #6280
Rebased-From: b19a88b2a0e7bd9ef603055bc8e1ef058673025d
2015-06-17 09:10:01 +02:00
rion
3902c15a03
remove berkeley-db4 workaround
"brew install berkeley-db4" appears to be working again.  simplified instructions by removing the berkeley-db4 workaround.

Github-Pull: #6286
Rebased-From: a3a80c253cdd0299f92b9e1ba9888f0f9421f245
2015-06-17 08:58:35 +02:00
Cory Fields
ef1d506054
Fix scheduler build with some boost versions.
Some boost versions have a conflicting overload of wait_until that returns void.
Explicitly use a template here to avoid hitting that overload.

Github-Pull: #6285
Rebased-From: 72bf90d770ce5b2653fd482928646cd6a9f5f6d7
2015-06-16 13:57:21 +02:00
Wladimir J. van der Laan
2617b75e15
translation update pre-rc2 2015-06-15 18:02:26 +02:00
Gavin Andresen
fce474c9df
Use best header chain timestamps to detect partitioning
The partition checking code was using chainActive timestamps
to detect partitioning; with headers-first syncing, it should use
(and with this pull request, does use) pIndexBestHeader timestamps.

Fixes issue #6251

Github-Pull: #6256
Rebased-From: 65b94545036ae6e38e79e9c7166a3ba1ddb83f66
2015-06-15 10:34:07 +02:00
Wladimir J. van der Laan
4d9c7fe61d
Add option -alerts to opt out of alert system
Make it possible to opt-out of the centralized alert system by providing
an option `-noalerts` or `-alerts=0`. The default remains unchanged.

This is a gentler form of #6260, in which I went a bit overboard by
removing the alert system completely.

I intend to add this to the GUI options in another pull after this.

Github-Pull: #6274
Rebased-From: 02a6702a82a5b00e0e0351041dd3267308b7f319
2015-06-15 09:58:05 +02:00
Cory Fields
95aca44095
gitian: Use the new bitcoin-detached-sigs git repo for OSX signatures
Rather than fetching a signature.tar.gz from somewhere on the net, instruct
Gitian to use a signature from a tag in the bitcoin-detached-sigs repository
which corresponds to the tag of the release being built.

This changes detached-sig-apply.sh to take a dirname rather than a tarball as
an argument, though detached-sig-create.sh still outputs a tarball for
convenience.

Github-Pull: #6269
Rebased-From: c110575a92ebe2e9a58b53d56aafa1f1ae37dbb2
2015-06-15 09:54:14 +02:00
Tom Harding
c9fd9078ce
Fix getbalance *
Chance "getbalance *" not to use IsTrusted.  The method and result
now match the "getbalance <specific-account>" behavior. In
particular, "getbalance * 0" now works.

Also fixed a comment -- GetGalance has required 1 confirmation
for many years, and the default "getbalance *" behavior matches
that.

Github-Pull: #6276
Rebased-From: 7d6a85ab5b1dc96e0f3f6f835f27bb81ba2af919
2015-06-15 09:03:25 +02:00
Wladimir J. van der Laan
94cd7051a3
Remove translation for -help-debug options
Github-Pull: #6264
Rebased-From: 9b5659d1c4c62bc6b80e35ff7573c781835e4187
2015-06-12 15:12:14 +02:00
Adam Weiss
6cb70ca4ee
Prune: Support noncontiguous block files
In some corner cases, it may be possible for recent blocks to end up in
the same block file as much older blocks.  Previously, the pruning code
would stop looking for files to remove upon first encountering a file
containing a block that cannot be pruned, now it will keep looking for
candidate files until the target is met and all other criteria are
satisfied.

This can result in a noncontiguous set of block files (by number) on
disk, which is fine except for during some reindex corner cases, so
make reindex preparation smarter such that we keep the data we can
actually use and throw away the rest.  This allows pruning to work
correctly while downloading any blocks needed during the reindex.

Rebased-From: c257a8c9a6397eee40734b235a4fdcb8045aec91
Github-Pull: #6221
2015-06-11 18:25:45 +02:00
Alex Morcos
37b4e425af
Fix removing of orphan transactions
We don't want to erase orphans that still have missing inputs, they should still be tracked as orphans.  Also, the transaction thats being accepted can't be an orphan otherwise it would have previously been accepted, so doesn't need to be added to the erase queue.

Github-Pull: #5985
Rebased-From: 14d4eef79931318cb5968f9154cf458d9f8d27fa
2015-06-10 12:16:11 +02:00
Luke Dashjr
0401aa2e8f
configure: Detect (and reject) LibreSSL
Rebased-From: a5a81f7354b3aa3e797d973a7e6840f0e50e6533
Github-Pull: #6244
2015-06-10 08:09:28 +02:00
Wladimir J. van der Laan
3eada74d6f
Disable partition check for now, it triggers too often (issue #6251) 2015-06-08 10:14:44 +02:00