aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
AgeCommit message (Collapse)Author
2012-03-22Merge branch 'addrman' of https://github.com/sipa/bitcoinGavin Andresen
2012-03-21Remove -bip16 and -paytoscripthashtime command-line argumentsGavin Andresen
2012-03-21Merge pull request #948 from sipa/unstuckGavin Andresen
Prevent stuck block download in large reorganisations
2012-03-21More debug output for failed reorganizationsPieter Wuille
2012-03-21Prevent 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-03-20Use last checkpoint instead of hard-coded 140,700. Fixes #913.Gavin Andresen
2012-03-20assertion in CBlock::SetBestChainInner was too strongPieter Wuille
2012-03-12Limit the impact of reorganisations on the databasePieter Wuille
Sometimes a new block arrives in a new chain that was already the best valid one, but wasn't marked that way. This happens for example when network rules change to recover after a fork. In this case, it is not necessary to do the entire reorganisation inside a single db commit. These can become huge, and exceed the objects/lockers limits in bdb. This patch limits the blocks the actual reorganisation is applied to, and adds the next blocks afterwards in separate db transactions.
2012-03-03Do not allow overwriting unspent transactions (BIP 30)Pieter Wuille
Introduce the following network rule: * a block is not valid if it contains a transaction whose hash already exists in the block chain, unless all that transaction's outputs were already spent before said block. Warning: this is effectively a network rule change, with potential risk for forking the block chain. Leaving this unfixed carries the same risk however, for attackers that can cause a reorganisation in part of the network. Thanks to Russell O'Connor and Ben Reeves.
2012-02-29DoS fix for mapOrphanTransactionsv0.6.0rc2Gavin Andresen
2012-02-28"February"Michael Ford
2012-02-27Merge branch 'nodosbip16' of https://github.com/sipa/bitcoinGavin Andresen
2012-02-26bitcoind changes to stop storing settings in wallet.dat.Gavin Andresen
2012-02-25Do not invoke anti-DoS system for invalid BIP16 transactionsPieter Wuille
Doing so would allow an attack on old nodes, which would relay a standard transaction spending a BIP16 output in an invalid way, until reaching a new node, which will disconnect their peer. Reported by makomk on IRC.
2012-02-24CAddrMan: stochastic address managerPieter Wuille
Design goals: * Only keep a limited number of addresses around, so that addr.dat does not grow without bound. * Keep the address tables in-memory, and occasionally write the table to addr.dat. * Make sure no (localized) attacker can fill the entire table with his nodes/addresses. See comments in addrman.h for more detailed information.
2012-02-22Merge branch 'fixnullpfrom' of https://github.com/sipa/bitcoinGavin Andresen
2012-02-22Merge branch 'postfeb20' of https://github.com/sipa/bitcoinGavin Andresen
2012-02-22Merge branch 'reorginfo' of https://github.com/sipa/bitcoinGavin Andresen
2012-02-22Bugfix: Instead of reporting "bitcoin-qt" for both bitcoind and Bitcoin-Qt, ↵Luke Dashjr
report "Satoshi" which is at least correct
2012-02-21Post-feb20 simplificationsPieter Wuille
Now the entire network upgraded to (initial) protocol version 209, crtainl simplifications in the source code are possible.
2012-02-20ProcessBlock is sometimes called with pfrom==NULLPieter Wuille
2012-02-19Report number of (dis)connected blocks in reorganizationPieter Wuille
Also report old and new best, and fork point.
2012-02-17Merge branch 'testnetmining' of github.com:gavinandresen/bitcoin-gitGavin Andresen
2012-02-16Fix issue #848 : broken mining on testnetGavin Andresen
2012-02-16Symbolic names for threadsPieter Wuille
Introduce an enum threadId, and use symbolic indices when accessing vnThreadsRunning.
2012-02-09Fix #794. Only remove transactions from memory pool when they're actually ↵Chris Moore
in the memory pool.
2012-02-07Update all copyrights to 2012Gavin Andresen
2012-02-07Merge branch 'standardScriptSigs' of github.com:gavinandresen/bitcoin-gitGavin Andresen
2012-02-06-bip16 option (default: 1) to support / not support BIP 16. And bumped ↵Gavin Andresen
default BIP16 switchover date from Feb 15 to Mar 1
2012-02-01Avoid advertising the node's address when it is not listening or ↵Gregory Maxwell
IsInitialBlockDownload(). This also avoids flushing setAddrKnown until 24 hours has passed, and avoids contacting the external IP services when not listening. Advertising non-listening nodes is just addr message spam. It doesn't help the network, in fact it hurts the network, and it also hurts user's privacy. Advertising far out of sync nodes doesn't help the network— they can't even forward (most) transactions and wastes nodes outbound slots.
2012-01-31Testnet difficulty calculation changes, to take effect Feb 15 2012Gavin Andresen
Allow mining of min-difficulty blocks if 20 minutes have gone by without mining a regular-difficulty block. Normal rules apply every 2016 blocks, though, so there may be a very-slow-to-confirm block at the difficulty-adjustment blocks.
2012-01-28CreateNewBlock was not adding in transaction fees.Gavin Andresen
2012-01-27Bitcoin-Qt signmessage GUI (pull request #582)Luke Dashjr
2012-01-25Merge pull request #773 from gavinandresen/p2shSigOpCountGavin Andresen
Simplify counting of P2SH sigops to match BIP 16
2012-01-23Merge branch 'bugfix_areinpstd' of https://github.com/luke-jr/bitcoinGavin Andresen
2012-01-23Only store transactions with missing inputs in the orphan pool.Gavin Andresen
All previous versions of bitcoin could store some types of invalid transactions in the orphan-transaction list.
2012-01-20Sanitize AreInputsStandard slightlyLuke Dashjr
Correct comment for why the check is unnecessary for coinbases Move testnet check out, to AcceptToMemoryPool where everything else checks it
2012-01-20Simplify counting of P2SH sigops to match BIP 16 (thanks to Matt Corallo for ↵Gavin Andresen
prompting this). This also removes an un-needed sigops-per-byte check when accepting transactions to the memory pool (un-needed assuming only standard transactions are being accepted). And it only counts P2SH sigops after the switchover date.
2012-01-19Make transactions with extra data in their scriptSig's non-standard.Gavin Andresen
2012-01-14Separated COINBASE_FLAGS out into main.h and made RPC getmemorypool return itForrest Voight
2012-01-13Refactor: needing to call ConnectInputs to process coinbase transactions was ↵Gavin Andresen
counter-intuitive
2012-01-13Refactored ConnectInputs, so valid-transaction-checks are done before ↵Gavin Andresen
ECDSA-verifying signatures.
2012-01-13Replace OP_EVAL (BIP 12) with Pay-to-script-hash (BIP 16).Gavin Andresen
2012-01-12collect more info on tx pooling and block finding for getmininginfoLuke Dashjr
2012-01-12Merge pull request #743 from gavinandresen/blocknotifyGavin Andresen
-blocknotify : run a command when best-block changes
2012-01-06Network stack refactorPieter Wuille
This introduces CNetAddr and CService, respectively wrapping an (IPv6) IP address and an IP+port combination. This functionality used to be part of CAddress, which also contains network flags and connection attempt information. These extra fields are however not always necessary. These classes, along with logic for creating connections and doing name lookups, are moved to netbase.{h,cpp}, which does not depend on headers.h. Furthermore, CNetAddr is mostly IPv6-ready, though IPv6 functionality is not yet enabled for the application itself.
2012-01-03-blocknotify=command argument, implemented using system() and boost::threadGavin Andresen
2011-12-25Check all prevout.n if one transaction provides multiple inputsGavin Andresen
2011-12-25assert condition in previous commit was backwardsGavin Andresen
2011-12-25Check for valid prevout.n in FetchInputs.Gavin Andresen
IsStandardInputs could crash if given invalid input index.