aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
AgeCommit message (Collapse)Author
2012-10-01fix -Wformat warnings all over the sourcePhilip Kaufmann
2012-09-18When rejected TX relay due to lack of fees, log full txidJeff Garzik
2012-09-18Merge pull request #1812 from jgarzik/misc-07Jeff Garzik
Two minor generic cleanups done during OP_DROP hacking
2012-09-09Apply 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-09-09Improve debug logging, for mempool TXs that do not include sufficient feesJeff Garzik
2012-09-09Cosmetic: move CTransaction::GetMinFee out of header fileJeff Garzik
2012-09-05Merge branch 'testnet_alert' of git://github.com/gavinandresen/bitcoin-gitGavin Andresen
2012-09-05fix signed/unsigned usage in BlockFilePath()Philip Kaufmann
2012-09-04Add block file naming helper, BlockFilePath()Jeff Garzik
2012-09-04Merge pull request #1779 from xanatos/patch-15Jeff Garzik
Useless vector declaration
2012-09-03Useless vector declarationxanatos
The vector isn't referenced in the small code block it's declared. I don't see any "useful" side effect in its declaration.
2012-08-29Rename CreateThread to NewThreadWladimir J. van der Laan
Prevent clash with win32 API symbol
2012-08-28Refactor: move alert code from main to alert.cpp/hGavin Andresen
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-26Alert 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-24Make 0-value outputs non-standardPieter Wuille
2012-08-24Avoid leaving return types or function attributes on their own lines.Gregory Maxwell
2012-08-21Do not accept orphan blocks in -loadblock modePieter Wuille
2012-08-20Reject 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-20Block 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-20Merge pull request #1641 from jgarzik/mempoolJeff Garzik
Add 'mempool' P2P command, and extend 'getdata' behavior
2012-08-17Merge pull request #1678 from Diapolo/LoadExternalBlockFile_add_timerJeff Garzik
log how long LoadExternalBlockFile() takes in ms (Benchmark)
2012-08-17fix a compiler sign warning in OpenBlockFile()Philip Kaufmann
2012-08-17log how long LoadExternalBlockFile() takes in ms (Benchmark)Philip Kaufmann
2012-08-01Merge pull request #1612 from luke-jr/opti_getblkhashGregory Maxwell
Optimize JSON-RPC getblockhash
2012-08-01Optimize JSON-RPC getblockhashLuke Dashjr
- If the height is in the first half, start at the genesis block and go up, rather than at the top - Cache the last lookup and use it as a reference point if it's close to the next request, to make linear lookups always fast
2012-08-01Merge pull request #1632 from luke-jr/spellingJeff Garzik
Fix spelling and grammar errors
2012-08-01Bugfix: Correct English grammar regarding "'s"Luke Dashjr
2012-08-01Bugfix: Fix a variety of misspellingsLuke Dashjr
2012-08-01Update Warning-strings to use a standard-formatPhilip Kaufmann
- ensure warnings always start with "Warning:" and that the first character after ":" is written uppercase - ensure the first sentence in warnings ends with an "!" - remove unneeded spaces from Warning-strings - add missing Warning-string translation - remove a "\n" and replace with untranslatable "<br><br>"
2012-07-31Add 'mempool' P2P command, and extend 'getdata' behaviorJeff Garzik
to permit downloading of mempool transactions from the remote peer.
2012-07-26Switch testnet3's message bytes to avoid connecting to old nodes.Gregory Maxwell
The new bytes are based on "11" to appeal to Gavin's 11 fetish. This breaks existing testnet3 nodes as the blockchain files are also versioned. To upgrade a node delete everything except wallet.dat from your .bitcoin/testnet3 folder.
2012-07-26Handle should-never-happen case of orphan in mempoolGavin Andresen
2012-07-26When creating new blocks, sort 'paid' area by fee-per-kbGavin Andresen
Modify CreateNewBlock so that instead of processing all transactions in priority order, process the first 27K of transactions in priority order and then process the rest in fee-per-kilobyte order. This is the first, minimal step towards better a better fee-handling system for both miners and end-users; this patch should be easy to backport to the old versions of Bitcoin, and accomplishes the most important goal-- allow users to "buy their way in" to blocks using transaction fees.
2012-07-26Merge branch 'checknewblock' of git://github.com/luke-jr/bitcoinGavin Andresen
2012-07-18Let the comment in GetBlockValue() reflect the uncertainty about the time ↵Rune K. Svendsen
interval between subsidy reductions
2012-07-17Fix thread names after reviewGiel van Schijndel
* Fix wrong thread name for wallet *relocking* thread - Was named the unlocking thread * Use consistent naming Signed-off-by: Giel van Schijndel <me@mortis.eu>
2012-07-17Give threads a recognisable name to aid in debuggingGiel van Schijndel
NOTE: These thread names are visible in gdb when using 'info threads'. Additionally both 'top' and 'ps' show these names *unless* told to display the command-line instead of task name. Signed-off-by: Giel van Schijndel <me@mortis.eu>
2012-07-12Tests for CreateNewBlockLuke Dashjr
2012-07-11Merge branch 'checknewblock_0.6.0' into checknewblockLuke Dashjr
Conflicts: src/main.cpp
2012-07-06Warn if blockchain majority doesn't match CBlock::CURRENT_VERSIONGavin Andresen
This adds a warning "this version is obsolete, upgrade required" if more than 50 of the previous 100 blocks in the blockchain are a new version.
2012-07-06Treat non-version-1 transactions as non-standardGavin Andresen
Adds CBlock::CURRENT_VERSION and CTransaction::CURRENT_VERSION constants, and makes non-CURRENT_VERSION transactions nonstandard. This will help make future upgrades smoother.
2012-07-05Merge pull request #1304 from rebroad/ShowBlockTimestampJeff Garzik
Show block timestamp
2012-07-04CTxMemPool: eliminate redundant lock, GetHash() callJeff Garzik
::addUnchecked()'s only caller already takes the necessary lock, and has already calculated the TX's hash.
2012-07-04Remove duplicate GetHash() in ConnectBlockMatt Corallo
2012-06-27Merge pull request #1511 from jgarzik/quieten2Jeff Garzik
Quieten 'getdata' P2P message output
2012-06-27Merge pull request #1347 from rebroad/FixAlreadyAskedForPieter Wuille
mapAlreadyAskedFor gets additions when AlreadyHave()
2012-06-27Stop processing messages on full send buffer and dont disconnect.Matt Corallo
Also decrease default send/receive buffer sizes from 10 to 5 mb as this patch makes it easy for a node to fill both instead of only send.
2012-06-23Merge pull request #1174 from sipa/torhsGregory Maxwell
Tor hidden service support
2012-06-23Merge pull request #1503 from gmaxwell/testnet_tweaksGregory Maxwell
Remove some rule differences which aren't needed with testnet3.