678 Commits

Author SHA1 Message Date
langerhans
4642b01f90 Merge pull request #622 from rnicoll/1.8-dev-safemode
Disable safe mode around AuxPoW switchover
2014-08-24 16:58:48 +02:00
Patrick Lodder
b5dddf29cd Condense retarget debug output even more. 2014-08-24 13:51:25 +02:00
Ross Nicoll
72b3139bec
Disable safe mode around AuxPoW switchover. 2014-08-18 20:32:54 +01:00
langerhans
5a186d356e Merge pull request #616 from patricklodder/1.8-dev-auxpow-version
check block version for aux blocks properly for version warning
2014-08-18 21:15:52 +02:00
langerhans
ad579037c8 Merge pull request #613 from rnicoll/1.8-dev-coinbase
Correct format of AuxPoW coinbase script
2014-08-18 21:15:39 +02:00
Patrick Lodder
2d1ea2c307 check block version for aux blocks properly for version warning
UpdateTip() was checking block versions against one of two
possible AuxPoW versions. Added consts for version checks and
IsAuxPowVersion(int nVersion) for use with UpdateTip()'s
block version check.
2014-08-17 22:39:28 +02:00
Ross Nicoll
02ab973c22
Adjust trigger conditions for safe mode to suit Dogecoin block time.
Values for triggering safe mode are time sensitive, and have not been
modified to take into account the differing block times between Bitcoin and
Dogecoin. This patch changes the interval across which a fork must exist to
override any other fork to 6 hours, and increases the number of blocks an
invalid fork must have before it trips safe mode.

This should help mitigate disruption in the 1.7/1.8 hard fork, but miners will
still need to run with -disablesafemode for the preceeding and following 2-3
days to be sure.
2014-08-17 13:46:55 +01:00
Ross Nicoll
a8cdefe23f
Added further diagnostic detail in case of transaction ID clash. 2014-08-16 14:21:13 +01:00
Patrick Lodder
7d18abff71 Apply predetermined block for testnet fork
PR #589 caused a condition for testnet difficulty to not match at
a couple of cases pre block 145k leading to issues with -reindex.

This makes the testnet fork hard at block 157500, while retaining
every case before that block.
2014-08-05 02:27:28 +02:00
langerhans
7b70a67db0 Merge pull request #591 from patricklodder/1.8-version-check-fix
Check against the right aux block version number
2014-08-04 19:17:20 +02:00
langerhans
553a17edaa Merge pull request #589 from patricklodder/1.8-dev-testnet-retarget
Break testnet difficulty reset out of never matching condition.
2014-08-04 19:10:17 +02:00
Patrick Lodder
29bc6bb660 Check against the right aux block version number
Previous commit 9e9babb was based on a wrong assumption, actual
CBlockHeader->nVersion for auxpow blocks is
CBlockHeader::CURRENT_VERSION | (AUXPOW_CHAIN_ID
   * BLOCK_VERSION_CHAIN_START)

and not BLOCK_VERSION_AUXPOW
2014-08-04 18:18:24 +02:00
Patrick Lodder
766c9a0651 Break testnet difficulty reset out of never matching condition.
Testnet resets difficulty if after 2 minutes no block has been
found. However, this feature was implemented with the condition
to only trigger on blocks where no retargeting is done. Since
the introduction of DigiShield, we retarget at every block,
making this condition never to be matched. This commit removes
that condition.

WARNING: THIS COMMIT HARDFORKS THE DOGECOIN TESTNET!

The main network is not affected by this change.
2014-08-04 14:14:36 +02:00
Patrick Lodder
07f31a38f4 Tidy up retargeting code and debug.log output.
- remove unused int64_t retargetSpacing
- modulate timespan in an isolated int64_t nModulatedTimespan
- keep nActualTimespan intact, to retain the original value
- compress debug.log output from 5 into 3 lines while retaining
  all information.
2014-08-04 11:05:47 +02:00
Patrick Lodder
9e9babb761 Make version check in UpdateTip() consider auxpow block version 2014-08-03 17:05:59 +02:00
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 9a2f7a86fca6e243db7745cb1b15b35ce1b97b2e)
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 9a2f7a86fca6e243db7745cb1b15b35ce1b97b2e.
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