aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
AgeCommit message (Collapse)Author
2016-05-16Remove unneeded feerate param from RelayTransaction/AcceptToMemoryPool.Gregory Maxwell
2016-05-10Merge #8019: Remove state arg from ReconsiderBlock, rename to ↵Wladimir J. van der Laan
ResetBlockFailureFlags 657e07e Rename ReconsiderBlock func to reflect real behavior (instagibbs) addb9d2 Remove state arg from ReconsiderBlock (instagibbs)
2016-05-09Rename ReconsiderBlock func to reflect real behaviorinstagibbs
2016-05-09Merge #7958: Remove useless argument to AlertNotify.Wladimir J. van der Laan
b02119e Remove useless argument to AlertNotify. (Pavel Janík)
2016-05-09Merge #7976: Remove obsolete reference to CValidationState from UpdateCoins.Wladimir J. van der Laan
c8b9248 Remove obsolete reference to CValidationState from UpdateCoins. (21E14)
2016-05-06Remove state arg from ReconsiderBlockinstagibbs
2016-05-06Merge #7815: Break circular dependency main ↔ txdbWladimir J. van der Laan
99e7075 Break circular dependency main ↔ txdb (Wladimir J. van der Laan)
2016-05-05Merge #7840: Several performance and privacy improvements to inv/mempool ↵Wladimir J. van der Laan
handling b559914 Move bloom and feerate filtering to just prior to tx sending. (Gregory Maxwell) 4578215 Return mempool queries in dependency order (Pieter Wuille) ed70683 Handle mempool requests in send loop, subject to trickle (Pieter Wuille) dc13dcd Split up and optimize transaction and block inv queues (Pieter Wuille) f2d3ba7 Eliminate TX trickle bypass, sort TX invs for privacy and priority. (Gregory Maxwell)
2016-04-30Remove obsolete reference to CValidationState from UpdateCoins.21E14
2016-04-30[trivial] Add missing const qualifiers.Daniel Kraft
Add some const qualifiers to references that are not modified and should be marked as const.
2016-04-28Merge #7952: Log invalid block hash to make debugging easier.Wladimir J. van der Laan
61c0170 Log invalid block hash to make debugging easier. (Pavel Janík)
2016-04-28Merge #7514: Fix IsInitialBlockDownload for testnetWladimir J. van der Laan
8aa7226 Fix IsInitialBlockDownload to play nice with testnet (jmacwhyte)
2016-04-27Remove useless argument to AlertNotify.Pavel Janík
It is always 'true', so useless.
2016-04-26Log invalid block hash to make debugging easier.Pavel Janík
2016-04-22Merge #7919: Fix headers announcements edge caseWladimir J. van der Laan
3a99fb2 Fix headers announcements edge case (Suhas Daftuar)
2016-04-21Move bloom and feerate filtering to just prior to tx sending.Gregory Maxwell
This will avoid sending more pointless INVs around updates, and prevents using filter updates to timetag transactions. Also adds locking for fRelayTxes.
2016-04-21Handle mempool requests in send loop, subject to tricklePieter Wuille
By eliminating queued entries from the mempool response and responding only at trickle time, this makes the mempool no longer leak transaction arrival order information (as the mempool itself is also sorted)-- at least no more than relay itself leaks it.
2016-04-21Split up and optimize transaction and block inv queuesPieter Wuille
2016-04-20Fix headers announcements edge caseSuhas Daftuar
Previously we would assert that if every block in vBlockHashesToAnnounce is in chainActive, then the blocks to be announced must connect. However, there are edge cases where this assumption could be violated (eg using invalidateblock / reconsiderblock), so just check for this case and revert to inv-announcement instead.
2016-04-20Explicitly pass CChainParams to ConnectBlockface
2016-04-20Eliminate TX trickle bypass, sort TX invs for privacy and priority.Gregory Maxwell
Previously Bitcoin would send 1/4 of transactions out to all peers instantly. This causes high overhead because it makes >80% of INVs size 1. Doing so harms privacy, because it limits the amount of source obscurity a transaction can receive. These randomized broadcasts also disobeyed transaction dependencies and required use of the orphan pool. Because the orphan pool is so small this leads to poor propagation for dependent transactions. When the bypass wasn't in effect, transactions were sent in the order they were received. This avoided creating orphans but undermines privacy fairly significantly. This commit: Eliminates the bypass. The bypass is replaced by halving the average delay for outbound peers. Sorts candidate transactions for INV by their topological depth then by their feerate (then hash); removing the information leakage and providing priority service to higher fee transactions. Limits the amount of transactions sent in a single INV to 7tx/sec (and twice that for outbound); this limits the harm of low fee transaction floods, gives faster relay service to higher fee transactions. The 7 sounds lower than it really is because received advertisements need not be sent, and because the aggregate rate is multipled by the number of peers.
2016-04-19Pass CChainParams to DisconnectTip()face
2016-04-19Globals: Explicitly pass const CChainParams& to UpdateTip()Jorge Timón
2016-04-15Break circular dependency main ↔ txdbWladimir J. van der Laan
Break the circular dependency between main and txdb by: - Moving `CBlockFileInfo` from `main.h` to `chain.h`. I think this makes sense, as the other block-file stuff is there too. - Moving `CDiskTxPos` from `main.h` to `txdb.h`. This type seems specific to txdb. - Pass a functor `insertBlockIndex` to `LoadBlockIndexGuts`. This leaves it up to the caller how to insert block indices.
2016-04-15Merge #7856: Only send one GetAddr response per connection.Wladimir J. van der Laan
66b0724 Only send one GetAddr response per connection. (Gregory Maxwell)
2016-04-15Merge #7877: Change mapRelay to store CTransactionsWladimir J. van der Laan
38c3102 Change mapRelay to store CTransactions (Pieter Wuille)
2016-04-14Merge #7874: Improve AlreadyHaveWladimir J. van der Laan
c6cb6f7 Avoid unnecessary database access for unknown transactions (Alex Morcos)
2016-04-14Change mapRelay to store CTransactionsPieter Wuille
2016-04-14Merge #7862: Use txid as key in mapAlreadyAskedForWladimir J. van der Laan
7e91f63 Use txid as key in mapAlreadyAskedFor (Suhas Daftuar)
2016-04-13Avoid unnecessary database access for unknown transactionsAlex Morcos
2016-04-12Merge #7828: Trivial: Globals: Explicitly pass const CChainParams& to ↵Pieter Wuille
ProcessMessage() bf477bc Trivial: Globals: Explicitly pass const CChainParams& to ProcessMessage() (Jorge Timón)
2016-04-11Use txid as key in mapAlreadyAskedForSuhas Daftuar
Previously we used the CInv that would be sent to the peer announcing the transaction as the key, but using the txid instead allows us to decouple the p2p layer from the application logic (which relies on this map to avoid duplicate tx requests).
2016-04-11Only send one GetAddr response per connection.Gregory Maxwell
This conserves resources from abusive peers that just send getaddr in a loop. Also makes correlating addr messages against INVs less effective.
2016-04-07Version 2 transactions remain non-standard until CSV activatesSuhas Daftuar
Before activation, such transactions might not be mined, so don't allow into the mempool.
2016-04-07Merge #7804: Track block download times per individual blockWladimir J. van der Laan
0e24bbf Self check after the last peer is removed (Pieter Wuille) 2d1d658 Track block download times per individual block (Pieter Wuille)
2016-04-07Self check after the last peer is removedPieter Wuille
2016-04-07Track block download times per individual blockPieter Wuille
Currently, we're keeping a timeout for each requested block, starting from when it is requested, with a correction factor for the number of blocks in the queue. That's unnecessarily complicated and inaccurate. As peers process block requests in order, we can make the timeout for each block start counting only when all previous ones have been received, and have a correction based on the number of peers, rather than the total number of blocks.
2016-04-06Trivial: Globals: Explicitly pass const CChainParams& to ProcessMessage()Jorge Timón
2016-04-06init: allow shutdown during 'Activating best chain...'Wladimir J. van der Laan
Two-line patch to make it possible to shut down bitcoind cleanly during the initial ActivateBestChain. Fixes #6459 (among other complaints). To reproduce: - shutdown bitcoind - copy chainstate - start bitcoind - let the chain sync a bit - shutdown bitcoind - copy back old chainstate - start bitcoind - bitcoind will catch up with all blocks during Init() (the `boost::this_thread::interruption_point` / `ShutdownRequested()` dance is ugly, this should be refactored all over bitcoind at some point when moving from boost::threads to c++11 threads, but it works...)
2016-04-03[doc] Fix doxygen comments for membersMarcoFalke
2016-03-31Merge #7763: Put hex-encoded version in UpdateTipWladimir J. van der Laan
eff736e Reformat version in UpdateTip and other messages (Pieter Wuille)
2016-03-31Reformat version in UpdateTip and other messagesPieter Wuille
Also remove the hardly-readable nBits from UpdateTip's log message.
2016-03-30Merge #7648: BIP9 versionbits softfork for BIP68, BIP112 and BIP113Wladimir J. van der Laan
71527a0 Test of BIP9 fork activation of mtp, csv, sequence_lock (NicolasDorier) 19d73d5 Add RPC test for BIP 68/112/113 soft fork. (Alex Morcos) 12c89c9 Policy: allow transaction version 2 relay policy. (BtcDrak) 02c2435 Soft fork logic for BIP68 (BtcDrak) 478fba6 Soft fork logic for BIP113 (BtcDrak) 65751a3 Add CHECKSEQUENCEVERIFY softfork through BIP9 (Pieter Wuille)
2016-03-21Implement "feefilter" P2P message.Alex Morcos
The "feefilter" p2p message is used to inform other nodes of your mempool min fee which is the feerate that any new transaction must meet to be accepted to your mempool. This will allow them to filter invs to you according to this feerate.
2016-03-21Merge #7692: Remove p2p alert systemWladimir J. van der Laan
cfd519e Add release note documentation (BtcDrak) 6601ce5 protocol.h/cpp: Removes NetMsgType::ALERT (Thomas Kerin) ad72104 Formatting (BtcDrak) 1b77471 Remove alert keys (BtcDrak) 01fdfef Remove `-alerts` option (BtcDrak) 9206634 Update alert notification and GUI (BtcDrak) bbb9d1d Remove p2p alert handling (BtcDrak)
2016-03-21Merge #7708: De-neuter NODE_BLOOMWladimir J. van der Laan
c90036f Always disconnect old nodes which request filtered connections. (Patrick Strateman)
2016-03-18Always disconnect old nodes which request filtered connections.Patrick Strateman
2016-03-18Remove `-alerts` optionBtcDrak
2016-03-18Update alert notification and GUIBtcDrak
2016-03-18Remove p2p alert handlingBtcDrak