aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
AgeCommit message (Collapse)Author
2016-06-16Merge #8084: Add recently accepted blocks and txn to AttemptToEvictConnection.Wladimir J. van der Laan
6ee7f05 Allow disconnecting a netgroup with only one member in eviction. (Gregory Maxwell) 5d0ca81 Add recently accepted blocks and txn to AttemptToEvictConnection. (Gregory Maxwell)
2016-06-15Add recently accepted blocks and txn to AttemptToEvictConnection.Gregory Maxwell
This protects any not-already-protected peers who were the most recent four to relay transactions and most recent four to send blocks to us.
2016-06-13Introduce REQUIRED_SERVICES constantPieter Wuille
2016-06-13Introduce enum ServiceFlags for service flagsPieter Wuille
2016-06-13Only store and connect to NODE_NETWORK nodesPieter Wuille
2016-06-13Verify that outbound connections have expected servicesPieter Wuille
2016-06-13Keep addrman's nService bits consistent with outbound observationsPieter Wuille
2016-06-13Merge #8141: Continuing port of java comparison toolWladimir J. van der Laan
ff2dcf2 Tests: Edit bloated varint test and add option for 'barely expensive' tests (mrbandrews) 12c5a16 Catch exceptions from non-canonical encoding and print only to log (mrbandrews) 291f8aa Continuing port of java comptool (mrbandrews) 8c9e681 Tests: Rework blockstore to avoid re-serialization. (mrbandrews)
2016-06-09Merge #8154: drop vAddrToSend after sending big addr messageWladimir J. van der Laan
d3d02d5 drop vAddrToSend after sending big addr message (Kaz Wesley)
2016-06-08Merge #8173: Use SipHash for node eviction (cont'd)Pieter Wuille
eebc232 test: Add more test vectors for siphash (Wladimir J. van der Laan) 8884830 Use C++11 thread-safe static initializers (Pieter Wuille) c31b24f Use 64-bit SipHash of netgroups in eviction (Pieter Wuille) 9bf156b Support SipHash with arbitrary byte writes (Pieter Wuille) 053930f Avoid recalculating vchKeyedNetGroup in eviction logic. (Patrick Strateman)
2016-06-08Merge #7935: Versionbits: GBT supportPieter Wuille
12c708a getblocktemplate: Use version/force mutation to support pre-BIP9 clients (Luke Dashjr) 9879060 getblocktemplate: Explicitly handle the distinction between GBT-affecting softforks vs not (Luke Dashjr) 72cd6b2 qa/rpc-tests: bip9-softforks: Add tests for getblocktemplate versionbits updates (Luke Dashjr) d3df40e Implement BIP 9 GBT changes (Luke Dashjr)
2016-06-08Merge #8126: std::shared_ptr based CTransaction storage in mempoolWladimir J. van der Laan
288d85d Get rid of CTxMempool::lookup() entirely (Pieter Wuille) c2a4724 Optimization: use usec in expiration and reuse nNow (Pieter Wuille) e9b4780 Optimization: don't check the mempool at all if no mempool req ever (Pieter Wuille) dbfb426 Optimize the relay map to use shared_ptr's (Pieter Wuille) 8d39d7a Switch CTransaction storage in mempool to std::shared_ptr (Pieter Wuille) 1b9e6d3 Add support for unique_ptr and shared_ptr to memusage (Pieter Wuille)
2016-06-08Merge #8078: Disable the mempool P2P command when bloom filters disabledWladimir J. van der Laan
3d3602f Add RPC test for the p2p mempool command in conjunction with disabled bloomfilters (Jonas Schnelli) beceac9 Disable the mempool P2P command when bloom filters disabled (Peter Todd)
2016-06-07Use C++11 thread-safe static initializersPieter Wuille
2016-06-07Merge #8136: Log/report in 10% steps during VerifyDBWladimir J. van der Laan
8b78486 Log/report in 10% steps during VerifyDB (Jonas Schnelli)
2016-06-07Get rid of CTxMempool::lookup() entirelyPieter Wuille
2016-06-07Log/report in 10% steps during VerifyDBJonas Schnelli
2016-06-06drop vAddrToSend after sending big addr messageKaz Wesley
We send a newly-accepted peer a 1000-entry addr message, and then only use vAddrToSend for small messages. Deallocate vAddrToSend after it's been used for the big message to save about 40 kB per connected inbound peer.
2016-06-06Implement BIP 9 GBT changesLuke Dashjr
- BIP9DeploymentInfo struct for static deployment info - VersionBitsDeploymentInfo: Avoid C++11ism by commenting parameter names - getblocktemplate: Make sure to set deployments in the version if it is LOCKED_IN - In this commit, all rules are considered required for clients to support
2016-06-06Merge #8007: Minor locking improvementsWladimir J. van der Laan
f0fdda0 IsInitialBlockDownload: usually avoid locking (Kaz Wesley)
2016-06-06Optimization: use usec in expiration and reuse nNowPieter Wuille
2016-06-06Optimization: don't check the mempool at all if no mempool req everPieter Wuille
2016-06-06Optimize the relay map to use shared_ptr'sPieter Wuille
* Switch mapRelay to use shared_ptr<CTransaction> * Switch the relay code to copy mempool shared_ptr's, rather than copying the transaction itself. * Change vRelayExpiration to store mapRelay iterators rather than hashes (smaller and faster).
2016-06-04IsInitialBlockDownload: usually avoid lockingKaz Wesley
Optimistically test the latch bool before taking the lock. For all IsInitialBlockDownload calls after the first to return false, this avoids the need to lock cs_main.
2016-06-05Switch CTransaction storage in mempool to std::shared_ptrPieter Wuille
2016-06-03comment nit: miners don't voteinstagibbs
2016-06-03Merge #7942: locking for Misbehave() and other cs_main locking fixesWladimir J. van der Laan
719de56 lock cs_main for chainActive (Kaz Wesley) efb54ba lock cs_main for State/Misbehaving (Kaz Wesley)
2016-06-03Merge #7997: replace mapNextTx with slimmer setSpendsPieter Wuille
9805f4a mapNextTx: use pointer as key, simplify value (Kaz Wesley)
2016-06-02mapNextTx: use pointer as key, simplify valueKaz Wesley
Saves about 10% of application memory usage once the mempool warms up. Since the mempool is DynamicUsage-regulated, this will translate to a larger mempool in the same amount of space. Map value type: eliminate the vin index; no users of the map need to know which input of the transaction is spending the prevout. Map key type: replace the COutPoint with a pointer to a COutPoint. A COutPoint is 36 bytes, but each COutPoint is accessible from the same map entry's value. A trivial DereferencingComparator functor allows indirect map keys, but the resulting syntax is misleading: `map.find(&outpoint)`. Implement an indirectmap that acts as a wrapper to a map that uses a DereferencingComparator, supporting a syntax that accurately reflect the container's semantics: inserts and iterators use pointers since they store pointers and need them to remain constant and dereferenceable, but lookup functions take const references.
2016-06-02Catch exceptions from non-canonical encoding and print only to logmrbandrews
2016-06-01Merge #8077: Consensus: Decouple from chainparams.o and timedata.oPieter Wuille
ee9f4a5 Consensus: Decouple from chainparams.o and timedata.o (Jorge Timón)
2016-06-01Merge #7960: Only use AddInventoryKnown for transactionsPieter Wuille
383fc10 Only use AddInventoryKnown for transactions (Suhas Daftuar)
2016-05-31Defer inserting into maprelay until just before relaying.Gregory Maxwell
This reduces the rate of not founds by better matching the far end expectations, it also improves privacy by removing the ability to use getdata to probe for a node having a txn before it has been relayed.
2016-05-31Merge #8080: Do not use mempool for GETDATA for tx accepted after the last ↵Wladimir J. van der Laan
mempool req. 7e908c7 Do not use mempool for GETDATA for tx accepted after the last mempool req. (Gregory Maxwell)
2016-05-29Always require OS randomness when generating secret keysPieter Wuille
2016-05-26Merge #8049: Expose information on whether transaction relay is enabled in ↵Pieter Wuille
`getnetwork` 1ab1dc3 rpc: Add `relaytxes` flag to `getnetworkinfo` (Wladimir J. van der Laan) 581ddff net: Add fRelayTxes flag (Wladimir J. van der Laan)
2016-05-25Do not use mempool for GETDATA for tx accepted after the last mempool req.Gregory Maxwell
The ability to GETDATA a transaction which has not (yet) been relayed is a privacy loss vector. The use of the mempool for this was added as part of the mempool p2p message and is only needed to fetch transactions returned by it.
2016-05-25Merge #7795: UpdateTip: log only one line at most per blockPieter Wuille
f20d42e UpdateTip: log only one line at most per block (Wladimir J. van der Laan)
2016-05-22VerifyDB: don't check blocks that have been prunedSuhas Daftuar
2016-05-20Disable the mempool P2P command when bloom filters disabledPeter Todd
Only useful to SPV peers, and attackers... like bloom is a DoS vector as far more data is sent than received.
2016-05-20Consensus: Decouple from chainparams.o and timedata.oJorge Timón
Do it for the consensus-critical functions: - CheckBlockHeader - CheckBlock - ContextualCheckBlockHeader
2016-05-18Merge #7917: Optimize reindexWladimir J. van der Laan
b4d24e1 Report reindexing progress in GUI (Pieter Wuille) d3d7547 Add -reindex-chainstate that does not rebuild block index (Pieter Wuille) fb8fad1 Optimize ActivateBestChain for long chains (Pieter Wuille) 316623f Switch reindexing to AcceptBlock in-loop and ActivateBestChain afterwards (Pieter Wuille) d253ec4 Make ProcessNewBlock dbp const and update comment (Pieter Wuille)
2016-05-18Merge #8054: net: Avoid duplicate getheaders requests.Wladimir J. van der Laan
f93c2a1 net: Avoid duplicate getheaders requests. (Daniel Kraft)
2016-05-17Use SipHash-2-4 for address relay selectionPieter Wuille
2016-05-17Report reindexing progress in GUIPieter Wuille
2016-05-17Optimize ActivateBestChain for long chainsPieter Wuille
2016-05-17Switch reindexing to AcceptBlock in-loop and ActivateBestChain afterwardsPieter Wuille
2016-05-17Make ProcessNewBlock dbp const and update commentPieter Wuille
2016-05-16Remove unneeded feerate param from RelayTransaction/AcceptToMemoryPool.Gregory Maxwell
2016-05-15net: Avoid duplicate getheaders requests.Daniel Kraft
The current logic for syncing headers may lead to lots of duplicate getheaders requests being sent: If a new block arrives while the node is in headers sync, it will send getheaders in response to the block announcement. When the headers arrive, the message will be of maximum size and so a follow-up request will be sent---all of that in addition to the existing headers syncing. This will create a second "chain" of getheaders requests. If more blocks arrive, this may even lead to arbitrarily many parallel chains of redundant requests. This patch changes the behaviour to only request more headers after a maximum-sized message when it contained at least one unknown header. This avoids sustaining parallel chains of redundant requests. Note that this patch avoids the issues raised in the discussion of https://github.com/bitcoin/bitcoin/pull/6821: There is no risk of the node being permanently blocked. At the latest when a new block arrives this will trigger a new getheaders request and restart syncing.