Commit graph

8653 commits

Author SHA1 Message Date
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: b19a88b2a0
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: a3a80c253c
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: 72bf90d770
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: 65b9454503
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: 02a6702a82
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: c110575a92
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: 7d6a85ab5b
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: 9b5659d1c4
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: c257a8c9a6
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: 14d4eef799
2015-06-10 12:16:11 +02:00
Luke Dashjr 0401aa2e8f
configure: Detect (and reject) LibreSSL
Rebased-From: a5a81f7354
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
Wladimir J. van der Laan 053110ddcb
Merge pull request #6238
cfc600d Bugfix: Correct links for Xcode download (Luke Dashjr)
2015-06-05 08:39:53 +02:00
Luke Dashjr cfc600d833 Bugfix: Correct links for Xcode download 2015-06-05 02:29:41 +00:00
Wladimir J. van der Laan 32b011781d
doc: update release notes 2015-06-03 17:01:25 +02:00
Suhas Daftuar 2edec4fe68
P2P regression test for new AcceptBlock behavior
Github-Pull: #5875
Rebased-From: aa8c827968
2015-06-03 16:24:14 +02:00
Suhas Daftuar 304892fc03
Be stricter in processing unrequested blocks
AcceptBlock will no longer process an unrequested block, unless it has not
been previously processed and has more work than chainActive.Tip()

Github-Pull: #5875
Rebased-From: 9be0e6837b
2015-06-03 16:23:46 +02:00
Wladimir J. van der Laan 666e973b2f
Merge pull request #6219
7d4b5cb gitian: Bump cache dir for 0.11 (Cory Fields)
2015-06-03 15:25:44 +02:00
Cory Fields 7a4304ecc7
gitian: bump faketime to something more recent
This helps in file views where binaries are sorted by time

Github-Pull: #6218
Rebased-From: be656283f9
2015-06-03 15:24:02 +02:00
Cory Fields ecdcf13ede
osx: set min version to 10.7 for 0.11+
Github-Pull: #6218
Rebased-From: c3cdd7b312
2015-06-03 15:23:32 +02:00
Wladimir J. van der Laan 5901596548
json: fail read_string if string contains trailing garbage
Change `read_string` to fail when not the entire input has been
consumed. This avoids unexpected, even dangerous behavior (fixes #6223).

The new JSON parser adapted in #6121 also solves this problem so in
master this is a temporary fix, but should be backported to older releases.

Also adds tests for the new behavior.

Github-Pull: #6226
Rebased-From: 4e157fc60d
2015-06-03 15:16:37 +02:00
Jonas Schnelli 6145fdf47e
OSX: use "Bitcoin Core" as Bundle Display Name
Github-Pull: #6214
Rebased-From: 0a32a9347e
2015-06-03 15:10:36 +02:00
Jonas Schnelli 4d435d1c9a
[OSX] revert renaming of Bitcoin-Qt.app
Github-Pull: #6214
Rebased-From: a2241eabfd
2015-06-03 15:10:00 +02:00
Cory Fields 7d4b5cbee3 gitian: Bump cache dir for 0.11 2015-06-02 10:47:07 -04:00