Commit graph

663 commits

Author SHA1 Message Date
Patrick Lodder aeb626aeeb extracted auxpow consts
set testnet start of auxpow to block 158100
2014-08-03 17:05:49 +02:00
Nell Hardcastle 8808f237aa Support auxillary proof of work.
Rebased from 1.7.1 into 1.7.2, moved AuxPoW checks from AcceptBlock()
into AcceptBlockHeader()
2014-08-01 16:42:50 +02:00
Pieter Wuille e52d5c58a0 Add missing LOCK(cs_main)
Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
Rebased-From: 305ccaa
2014-07-09 17:09:02 +02:00
Peter Todd 688b776c45 Increase IsStandard() scriptSig length
Removes the limits on number of pubkeys for P2SH CHECKMULTISIG outputs.
Previously with the 500 byte scriptSig limit there were odd restrictions
where even a 1-of-12 P2SH could be spent in a standard transaction(1),
yet multisig scriptPubKey's requiring more signatures quickly ran out of
scriptSig space.

From a "stuff-data-in-the-blockchain" point of view not much has changed
as with the prior commit now only allowing the dummy value to be null
the newly allowed scriptSig space can only be used for signatures. In
any case, just using more outputs is trivial and doesn't cost much.

1) See 779b519480d8c5346de6e635119c7ee772e97ec872240c45e558f582a37b4b73
   Mined by BTC Guild.
2014-06-29 15:38:38 +02:00
Peter Todd b6faba6035 Do not trigger a DoS ban if SCRIPT_VERIFY_NULLDUMMY fails 2014-06-29 15:38:38 +02:00
Wladimir J. van der Laan 72bd7b81f1 Add missing cs_main lock to VerifyDB
Fixes issue #4139.
2014-06-29 15:38:37 +02:00
Wladimir J. van der Laan 72a22c18ff Remove NumBlocksOfPeers
Generally useless information. Only updates on connect time, not after
that. Peers can easily lie and the median filter is not effective in
preventing that.

In the past it was used for progress display in the GUI but
`CheckPoints::guessVerificationProgress` provides a better way that is now used.
It was too easy to mislead it. Peers do lie about it in practice, see issue #4065.

From the RPC, `getpeerinfo` gives the peer raw values, which are more
useful.
2014-06-29 15:38:34 +02:00
Peter Todd 1479d05a79 Create (MANDATORY|STANDARD)_SCRIPT_VERIFY_FLAGS constants 2014-06-29 15:38:32 +02:00
Jannis Froese 145bc31b83 don't send feeless transactions
(cherry picked from commit 9a2f7a86fc)
2014-06-09 00:44:35 +02:00
leofidus 15dee2a91e Merge pull request #549 from leofidus/1.7-rpctests
Fix bash-based rpc tests
2014-06-07 16:27:59 +02:00
Jannis Froese 8826b6bdc4 Make rewards in regtest mode less random
This allows sane testing. Regtest mode is primarily intended for automated
testing, so this simplification makes sense
2014-06-02 21:51:04 +02:00
Philip Kaufmann c8ccf30103 use standard __func__ instead of __PRETTY_FUNCTION__ 2014-05-29 22:06:22 +02:00
R E Broadley 587c08f3d2 Correct indentation 2014-05-29 22:05:44 +02:00
Pieter Wuille a954ef8874 Split AcceptBlockHeader from AcceptBlock.
Also modify some connection logic to deal with non-full blocks in the index.
2014-05-29 20:20:13 +02:00
Pieter Wuille 4340df8960 Split up CheckBlock in a block and header version 2014-05-29 20:14:00 +02:00
Simon de la Rouviere 6cfb6d6033 Add MESSAGE_START_SIZE from chainparams when loading blocks from external files. 2014-05-29 20:07:53 +02:00
Wladimir J. van der Laan 5b910bbfe5 Add missing AssertLockHeld in ConnectBlock 2014-05-29 20:07:24 +02:00
Wladimir J. van der Laan 1d03869b42 chainActive locking issues resolved 2014-05-29 19:47:54 +02:00
Wladimir J. van der Laan 813a7c8d90 Add AssertLockHeld for cs_main to ChainActive-using functions
All functions that use ChainActive but do not aquire the cs_main
lock themselves, need to be called with the cs_main lock held.

This commit adds assertions to all externally callable functions
that use chainActive or chainMostWork.

This will flag usages when built with -DDEBUG_LOCKORDER.
2014-05-29 19:41:50 +02:00
Gregory Maxwell 5b0ac349e4 Move assert(pindexNew); to above where we dereference pindexNew. 2014-05-26 20:15:04 +02:00
Wladimir J. van der Laan a8f53a2a28 Fix printblocktree output (bitcoin/bitcoin@af4c2ac8ce) 2014-05-26 18:54:49 +02:00
Pieter Wuille 30f5429536 Per-peer block download tracking and stalled download detection.
Keep track of which block is being requested (and to be requested) from
each peer, and limit the number of blocks in-flight per peer. In addition,
detect stalled downloads, and disconnect if they persist for too long.

This means blocks are never requested twice, and should eliminate duplicate
downloads during synchronization.
2014-05-25 18:56:47 +02:00
Philip Kaufmann 3e0de4da6b minor style cleanups
Conflicts:

	src/main.cpp
2014-05-18 16:50:24 +01:00
langerhans aecf0170a9 Revert "don't send feeless transactions"
This reverts commit 9a2f7a86fc.
2014-05-04 17:02:08 +02:00
Jannis Froese 9a2f7a86fc don't send feeless transactions 2014-05-01 21:10:19 +02:00
Jannis Froese 5c8ab69b63 refactor GetMinFee to remove dead code 2014-05-01 21:08:26 +02:00
Patrick Lodder d0957dc745 DRY calculation for required maturity depth
Having this defined in multiple places is suboptimal and may lead
to porting issues, so I extracted it into it's own function and
let both implementations call that instead.
2014-04-20 17:47:11 +04:00
Ross Nicoll 85392ed8bb Added GetHeightInMainChain() method.
Corrected call to GetDepthInMainChain() with GetHeightInMainChain() when checking coin maturity.
2014-04-20 17:47:11 +04:00
Ross Nicoll e1ce43df71 Corrected block maturity test. 2014-04-20 16:33:36 +04:00
Patrick Lodder 3820347253 removed the "DIGISHIELD RETARGET" message that was spammed in console. 2014-04-14 19:50:52 +04:00
Alan Westbrook 30053cfaa3 Lets get at least dogecoind building
This is an Xcode project and a script to wrangle boost to work on the
mac.
2014-04-05 00:17:09 -07:00
Ross Nicoll db800dead2
Standardised capitalisation of Dogecoin. 2014-03-31 21:24:02 +01:00
Ross Nicoll 48c6ec9af0 Replaced occurrences of "bitcoin" with "dogecoin" or "Dogecoin" as appropriate
(specific, use of "Dogecoin" as a noun are now capitalised).
2014-03-28 23:40:56 +00:00
Ross Nicoll 3fd42567e8 Replaced references to Bitcoin with Dogecoin/Dogecoin Core as appropriate. 2014-03-28 23:13:24 +00:00
Jannis Froese 1943494138 additional Dogecoin 1.6 changes
(cherry picked from commit 6d46c53acf957e33e3940a8db009cc406a3f6b9c)
2014-03-24 03:28:06 +01:00
Jannis Froese 103a278443 Merge branch 'node-bloom-service-bit' of github.com:petertodd/bitcoin into bloom-todd 2014-03-23 21:25:51 +01:00
Jannis Froese a4b177d925 credit where credit is due
(cherry picked from commit 5cdcfa9a2b445dd8f8009f6ff3a8ded4ee6515e6)
2014-03-22 22:13:28 +01:00
Jannis Froese e68d56b2db additional Dogecoin 1.6 protocol change
(cherry picked from commit 650ec89e251e1201479d75f79ac520f278a50c40)
2014-03-22 22:13:28 +01:00
Jannis Froese c5eb32a85b updated to Dogecoin 1.6 protocol
(cherry picked from commit d6dbaf412e2331426d5012d1c10b7749b6821b82)
2014-03-22 22:13:27 +01:00
Jannis Froese 1bf59137be Protocol changes for Dogecoin 1.5
ported over from Dogecoin and Litecoin

(cherry picked from commit 8b09dad2d506fc5a6239863b1c0e33bf7e84da00)
2014-03-22 22:13:27 +01:00
Mike Hearn 1eedbbb3a6 Make mining fee policy match relay fee policy.
This resolves a case in which a mismatch could be used to bloat up the
mempool by sending transactions that pay enough fee to relay, but not
to be mined, with the default policies.

Rebased-From: 037b4f1
2014-03-11 16:45:54 +01:00
R E Broadley ff882789af Add progress to initial display of latest block downloaded.
Rebased-From: c4656e0
2014-03-11 09:24:12 +01:00
Gavin Andresen f60e49d49c Merge pull request #3694 from gavinandresen/vfspent
Remove CWalletTx::vfSpent
2014-02-28 15:16:25 -05:00
Gavin Andresen e3e65d29b7 Merge pull request #3735 from laanwj/2014_02_remove_PRIx64_completely
Remove PRIx64 usage completely
2014-02-26 12:16:03 -05:00
Gavin Andresen 93a18a3650 Remove CWalletTx::vfSpent
Use the spent outpoint multimap to figure out which wallet transaction
outputs are unspent, instead of a vfSpent array that is saved
to disk.
2014-02-26 11:53:51 -05:00
Jeff Garzik beabca2be0 Merge pull request #3305 from mikehearn/fee_drop
Drop fees by 10x due to the persistently higher exchange rate.
2014-02-24 14:05:54 -05:00
Wladimir J. van der Laan f48742c2bf Get rid of C99 PRI?64 usage in source files
Amend to d5f1e72. It turns out that BerkelyDB was including inttypes.h
indirectly, so we cannot fix this with just macros.

Trivial commit: apply the following script to all .cpp and .h files:

    # Middle
    sed -i 's/"PRIx64"/x/g' "$1"
    sed -i 's/"PRIu64"/u/g' "$1"
    sed -i 's/"PRId64"/d/g' "$1"
    # Initial
    sed -i 's/PRIx64"/"x/g' "$1"
    sed -i 's/PRIu64"/"u/g' "$1"
    sed -i 's/PRId64"/"d/g' "$1"
    # Trailing
    sed -i 's/"PRIx64/x"/g' "$1"
    sed -i 's/"PRIu64/u"/g' "$1"
    sed -i 's/"PRId64/d"/g' "$1"

After this commit, `git grep` for PRI.64 should turn up nothing except
the defines in util.h.
2014-02-24 09:08:56 +01:00
Wladimir J. van der Laan d5f1e727a8 Don't use PRIx64 formatting derives from inttypes.h
As the tinyformat-based formatting system (introduced in b77dfdc) is
type-safe, no special format characters are needed to specify sizes.

Tinyformat can support (ignore) the C99 prefixes such as "ll" but
chokes on MSVC's inttypes.h defines prefixes such as "I64X". So don't
include inttypes.h and define our own for compatibility.

(an alternative would be to sweep the entire codebase using sed -i to
get rid of the size specifiers but this has less diff impact)
2014-02-22 11:36:37 +01:00
Wladimir J. van der Laan 76a77059f3
Merge pull request #2910
d8b4b49 Don't store or send side-chain blocks lower than last checkpoint. (Ashley Holman)
2014-02-20 12:32:32 +01:00
Wladimir J. van der Laan 047ee427e7
Merge pull request #3666
bbfce8a fix non-standard reason string in main.cpp (Philip Kaufmann)
2014-02-17 13:59:50 +01:00