aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
AgeCommit message (Collapse)Author
2012-09-17Merge branch '0.5.x' into 0.6.0.xLuke Dashjr
2012-09-17Merge branch '0.4.x' into 0.5.xLuke Dashjr
2012-09-17Apply BIP30 checks to all blocks except the two historic violations.Gregory Maxwell
Matt pointed out some time ago that there existed a minor DOS attack where a node in its initial block download could be wedged by an overwrite attack in a fork created between checkpoints before a time where BIP30 was enforced. Now that the BIP30 timestamp is irreversibly past the check can be more aggressive and apply to all blocks except the two historic violations.
2012-08-27Merge branch '0.5.x' into 0.6.0.xLuke Dashjr
Conflicts: bitcoin-qt.pro doc/README doc/README_windows.txt share/setup.nsi src/serialize.h
2012-08-27Merge branch '0.4.x' into 0.5.xLuke Dashjr
Conflicts: contrib/Bitcoin.app/Contents/Info.plist doc/README doc/README_windows.txt share/setup.nsi src/serialize.h
2012-08-27Special-case the last alert for alert-key-compromised caseGavin Andresen
Hard-code a special nId=max int alert, to be broadcast if the alert key is ever compromised. It applies to all versions, never expires, cancels all previous alerts, and has a fixed message: URGENT: Alert key compromised, upgrade required Variations are not allowed (ignored), so an attacker with the private key cannot broadcast empty-message nId=max alerts.
2012-08-27Alert system DoS preventionGavin Andresen
This fixes two alert system vulnerabilities found by Sergio Lerner; you could send peers unlimited numbers of invalid alert message to try to either fill up their debug.log with messages and/or keep their CPU busy checking signatures. Fixed by disconnecting/banning peers if they send 10 or more bad (invalid/expired/cancelled) alerts.
2012-08-26Merge commit '689b878' into 0.6.0.xLuke Dashjr
2012-08-26Merge commit '9adab76' into 0.6.0.xLuke Dashjr
Conflicts: src/main.cpp
2012-08-26Merge commit 'd710ed5' into 0.6.0.xLuke Dashjr
2012-08-26Merge branch '0.4.x' into 0.5.xLuke Dashjr
Conflicts: src/main.cpp
2012-08-26Reject block.nVersion<=1 blocks if network has upgraded to version=2Gavin Andresen
If 950 of the last 1,000 blocks are nVersion=2, reject nVersion=1 (or zero, but no bitcoin release has created block.nVersion=0) blocks -- 75 of last 100 on testnet3. This rule is being put in place now so that we don't have to go through another "express support" process to get what we really want, which is for every single new block to include the block height in the coinbase.
2012-08-26Block height in coinbase as a new block ruleGavin Andresen
"Version 2" blocks are blocks that have nVersion=2 and have the block height as the first item in their coinbase. Block-height-in-the-coinbase is strictly enforced when version=2 blocks are a supermajority in the block chain (750 of the last 1,000 blocks on main net, 51 of 100 for testnet). This does not affect old clients/miners at all, which will continue producing nVersion=1 blocks, and which will continue to be valid.
2012-08-22fix a compiler sign warning in OpenBlockFile()Philip Kaufmann
2012-08-12Merge branch '0.5.x' into 0.6.0.xLuke Dashjr
Conflicts: doc/unit-tests.txt
2012-08-12Merge branch '0.4.x' into 0.5.xLuke Dashjr
2012-08-12Bugfix: Correct English grammar regarding "'s"Luke Dashjr
2012-08-12Bugfix: Fix a variety of misspellingsLuke Dashjr
2012-08-12Merge branch '0.5.x' into 0.6.0.xLuke Dashjr
Conflicts: src/key.h src/keystore.h src/net.h src/protocol.cpp src/qt/guiutil.h src/test/DoS_tests.cpp
2012-08-12Merge branch '0.4.x' into 0.5.xLuke Dashjr
Conflicts: src/net.cpp
2012-08-12Bugfix: Fix a variety of misspellingsLuke Dashjr
(PARTIAL: Left out anything changing debug.log)
2012-07-22Merge branch '0.5.x' into 0.6.0.xLuke Dashjr
2012-07-22Merge branch '0.4.x' into 0.5.xLuke Dashjr
2012-07-22Let the comment in GetBlockValue() reflect the uncertainty about the time ↵Rune K. Svendsen
interval between subsidy reductions
2012-06-21Merge branch '0.5.x' into 0.6.0.xLuke Dashjr
Conflicts: doc/unit-tests.txt src/serialize.h
2012-06-20Merge branch '0.4.x' into 0.5.xLuke Dashjr
Conflicts: src/main.cpp src/serialize.h
2012-06-20print large orphan warning BEFORE deleting pvMsgGavin Andresen
2012-06-20Remove invalid dependent orphans from memoryGavin Andresen
Remove orphan transactions from memory once all of their parent transactions are received and they're still not valid. Thanks to Sergio Demian Lerner for suggesting this fix.
2012-06-20Further DoS prevention: Verify signatures lastGavin Andresen
Loop over all inputs doing inexpensive validity checks first, and then loop over them a second time doing expensive signature checks. This helps prevent possible CPU exhaustion attacks where an attacker tries to make a victim waste time checking signatures for invalid transactions.
2012-06-20Optimize orphan transaction handlingGavin Andresen
Changes suggested by Sergio Demian Lerner to help prevent potential DoS attacks.
2012-06-14Use std::numeric_limits<> for typesafe INT_MAX/etcGavin Andresen
(this fixes a Mac OS X gitian build error for 0.5.x)
2012-06-14Use std::numeric_limits<> for typesafe INT_MAX/etcGavin Andresen
(this fixes a Mac OS X gitian build error for 0.5.x)
2012-06-14Merge branch '0.5.x' into 0.6.0.xLuke Dashjr
Conflicts: src/main.h src/net.cpp src/serialize.h
2012-06-14Bugfix: Fix various places where Bitcoin-Qt was being shutdown improperlyPhilip Kaufmann
(Partial/merge of upstream 9247134eaba9a1d0fa74f22de238af1476663005, 1a3f0da9229a8e524d1010cdc8bd3b9da71fe529, and 3e343522226e6c249f5cb05436eec347b87c6361)
2012-05-22Merge branch '0.5.x' into 0.6.0.xLuke Dashjr
Conflicts: src/main.cpp
2012-05-22Merge branch '0.4.x' into 0.5.xLuke Dashjr
Conflicts: src/ui.cpp src/ui.h src/uibase.cpp src/xpm/about.xpm
2012-05-22Correct debug.log output to show correct function the debug is coming from.R E Broadley
2012-05-20Update License in File HeadersFordy
I originally created a pull to replace the "COPYING" in crypter.cpp and crypter.h, but it turned out that COPYING was actually the correct file.
2012-05-20Update License in File HeadersFordy
I originally created a pull to replace the "COPYING" in crypter.cpp and crypter.h, but it turned out that COPYING was actually the correct file.
2012-05-20Update License in File HeadersFordy
I originally created a pull to replace the "COPYING" in crypter.cpp and crypter.h, but it turned out that COPYING was actually the correct file.
2012-05-20remove 2 ugly spaces from a message stringPhilip Kaufmann
(PARTIAL of 966ae00)
2012-05-18Always check return values of TxnBegin() and TxnCommit()Jeff Garzik
2012-05-18Always check return values of TxnBegin() and TxnCommit()Jeff Garzik
PARTIAL, since d68dcf7 isn't backported (yet)
2012-05-17Hopefully final fix for the stuck blockchain issuePieter Wuille
Immediately issue a "getblocks", instead of a "getdata" (which will trigger the relevant "inv" to be sent anyway), and only do so when the previous set of invs led us into a known and attached part of the block tree.
2012-05-07Prevent stuck download: correct solutionPieter Wuille
Pull request #948 introduced a fix for nodes stuck on a long side branch of the main chain. The fix was non-functional however, as the additional getdata request was created in a first step of processing, but dropped in a second step as it was considered redundant. This commits fixes it by sending the request directly.
2012-05-07Merge branch '0.4.x' into 0.5.xLuke Dashjr
2012-05-07Prevent stuck download: correct solutionPieter Wuille
Pull request #948 introduced a fix for nodes stuck on a long side branch of the main chain. The fix was non-functional however, as the additional getdata request was created in a first step of processing, but dropped in a second step as it was considered redundant. This commits fixes it by sending the request directly.
2012-05-07Prevent stuck block download in large reorganisationsPieter Wuille
In cases of very large reorganisations (hundreds of blocks), a situation may appear where an 'inv' is sent as response to a 'getblocks', but the last block mentioned in the inv is already known to the receiver node. However, the supplying node uses a request for this last block as a trigger to send the rest of the inv blocks. If it never comes, the block chain download is stuck. This commit makes the receiver node always request the last inv'ed block, even if it is already known, to prevent this problem.
2012-05-06Merge branch '0.5.x' into 0.6.0.xLuke Dashjr
2012-05-06Merge branch '0.4.x' into 0.5.xLuke Dashjr