aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Get our "best three" peers to announce blocks using cmpctblocksMatt Corallo2016-06-191-0/+29
| | |
| * | Add receiver-side protocol implementation for CMPCTBLOCK stuffMatt Corallo2016-06-191-8/+207
| | |
| * | Add sender-side protocol implementation for CMPCTBLOCK stuffMatt Corallo2016-06-191-15/+95
| | |
| * | Move context-required checks from CheckBlockHeader to Contextual...Matt Corallo2016-06-191-14/+14
| | |
| * | If AcceptBlockHeader returns true, pindex will be set.Matt Corallo2016-06-191-3/+3
| | | | | | | | | | | | | | | | | | Assert this instead of checking (and then dref'ing later anyway) to make sure no one thinks they can change that postcondition of AcceptBlockHeader..
* | | Merge #8179: Evict orphans which are included or precluded by accepted blocks.Wladimir J. van der Laan2016-06-201-31/+103
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | 54326a6 Increase maximum orphan size to 100,000 bytes. (Gregory Maxwell) 8c99d1b Treat orphans as implicit inv for parents, discard when parents rejected. (Gregory Maxwell) 11cc143 Adds an expiration time for orphan tx. (Gregory Maxwell) db0ffe8 This eliminates the primary leak that causes the orphan map to always grow to its maximum size. (Gregory Maxwell) 1b0bcc5 Track orphan by prev COutPoint rather than prev hash (Pieter Wuille)
| * | Increase maximum orphan size to 100,000 bytes.Gregory Maxwell2016-06-151-3/+3
| | | | | | | | | | | | | | | Although this increases node memory usage in the worst case by perhaps 30MB, the current behavior causes severe issues with dependent tx relay.
| * | Treat orphans as implicit inv for parents, discard when parents rejected.Gregory Maxwell2016-06-151-6/+22
| | | | | | | | | | | | | | | | | | | | | | | | An orphan whos parents were rejected is never going to connect, so there is little utility in keeping it. Orphans also helpfully tell us what we're missing, so go ahead and treat it as INVed.
| * | Adds an expiration time for orphan tx.Gregory Maxwell2016-06-151-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | This prevents higher order orphans and other junk from holding positions in the orphan map. Parents delayed twenty minutes are more are unlikely to ever arrive. The freed space will improve the orphan matching success rate for other transactions.
| * | This eliminates the primary leak that causes the orphan map toGregory Maxwell2016-06-101-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | always grow to its maximum size. This does not go so far as to attempt to connect orphans made connectable by a new block. Keeping the orphan map less full helps improve the reliability of relaying chains of transactions.
| * | Track orphan by prev COutPoint rather than prev hashPieter Wuille2016-06-101-22/+36
| | |
* | | Merge #8084: Add recently accepted blocks and txn to AttemptToEvictConnection.Wladimir J. van der Laan2016-06-161-5/+11
|\ \ \ | |_|/ |/| | | | | | | | 6ee7f05 Allow disconnecting a netgroup with only one member in eviction. (Gregory Maxwell) 5d0ca81 Add recently accepted blocks and txn to AttemptToEvictConnection. (Gregory Maxwell)
| * | Add recently accepted blocks and txn to AttemptToEvictConnection.Gregory Maxwell2016-06-151-5/+11
| |/ | | | | | | | | | | 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.
* | Introduce REQUIRED_SERVICES constantPieter Wuille2016-06-131-1/+1
| |
* | Introduce enum ServiceFlags for service flagsPieter Wuille2016-06-131-1/+3
| |
* | Only store and connect to NODE_NETWORK nodesPieter Wuille2016-06-131-0/+3
| |
* | Verify that outbound connections have expected servicesPieter Wuille2016-06-131-0/+9
| |
* | Keep addrman's nService bits consistent with outbound observationsPieter Wuille2016-06-131-0/+4
| |
* | Merge #8141: Continuing port of java comparison toolWladimir J. van der Laan2016-06-131-0/+5
|\ \ | |/ |/| | | | | | | | | 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)
| * Catch exceptions from non-canonical encoding and print only to logmrbandrews2016-06-021-0/+5
| |
* | Merge #8154: drop vAddrToSend after sending big addr messageWladimir J. van der Laan2016-06-091-0/+3
|\ \ | | | | | | | | | d3d02d5 drop vAddrToSend after sending big addr message (Kaz Wesley)
| * | drop vAddrToSend after sending big addr messageKaz Wesley2016-06-061-0/+3
| | | | | | | | | | | | | | | | | | 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.
* | | Merge #8173: Use SipHash for node eviction (cont'd)Pieter Wuille2016-06-081-5/+2
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
| * | | Use C++11 thread-safe static initializersPieter Wuille2016-06-071-5/+2
| | | |
* | | | Merge #7935: Versionbits: GBT supportPieter Wuille2016-06-081-1/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
| * | | | Implement BIP 9 GBT changesLuke Dashjr2016-06-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* | | | | Merge #8126: std::shared_ptr based CTransaction storage in mempoolWladimir J. van der Laan2016-06-081-40/+31
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
| * | | | | Get rid of CTxMempool::lookup() entirelyPieter Wuille2016-06-071-1/+3
| | | | | |
| * | | | | Optimization: use usec in expiration and reuse nNowPieter Wuille2016-06-061-2/+2
| | | | | |
| * | | | | Optimization: don't check the mempool at all if no mempool req everPieter Wuille2016-06-061-1/+1
| | | | | |
| * | | | | Optimize the relay map to use shared_ptr'sPieter Wuille2016-06-061-21/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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).
| * | | | | Switch CTransaction storage in mempool to std::shared_ptrPieter Wuille2016-06-051-19/+13
| | | | | |
* | | | | | Merge #8078: Disable the mempool P2P command when bloom filters disabledWladimir J. van der Laan2016-06-081-0/+7
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | | | | | | | | | | | | | 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)
| * | | | | Disable the mempool P2P command when bloom filters disabledPeter Todd2016-05-201-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only useful to SPV peers, and attackers... like bloom is a DoS vector as far more data is sent than received.
* | | | | | Merge #8136: Log/report in 10% steps during VerifyDBWladimir J. van der Laan2016-06-071-1/+10
|\ \ \ \ \ \ | |_|_|_|/ / |/| | | | | | | | | | | 8b78486 Log/report in 10% steps during VerifyDB (Jonas Schnelli)
| * | | | | Log/report in 10% steps during VerifyDBJonas Schnelli2016-06-071-1/+10
| | | | | |
* | | | | | Merge #8007: Minor locking improvementsWladimir J. van der Laan2016-06-061-4/+11
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | | | | | | | f0fdda0 IsInitialBlockDownload: usually avoid locking (Kaz Wesley)
| * | | | | IsInitialBlockDownload: usually avoid lockingKaz Wesley2016-06-041-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | | comment nit: miners don't voteinstagibbs2016-06-031-2/+2
| | | | | |
* | | | | | Merge #7942: locking for Misbehave() and other cs_main locking fixesWladimir J. van der Laan2016-06-031-3/+22
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 719de56 lock cs_main for chainActive (Kaz Wesley) efb54ba lock cs_main for State/Misbehaving (Kaz Wesley)
| * | | | | | lock cs_main for chainActiveKaz Wesley2016-04-251-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ActivateBestChain uses chainActive after releasing the lock; reorder operations to move all access to synchronized object into existing LOCK(cs_main) block.
| * | | | | | lock cs_main for State/MisbehavingKaz Wesley2016-04-251-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ProcessMessage calls State(...) and Misbehaving(...) without holding the required lock; add LOCK(cs_main) blocks.
* | | | | | | Merge #7997: replace mapNextTx with slimmer setSpendsPieter Wuille2016-06-031-2/+3
|\ \ \ \ \ \ \ | |_|_|/ / / / |/| | | | | | | | | | | | | 9805f4a mapNextTx: use pointer as key, simplify value (Kaz Wesley)
| * | | | | | mapNextTx: use pointer as key, simplify valueKaz Wesley2016-06-021-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | | | Merge #8077: Consensus: Decouple from chainparams.o and timedata.oPieter Wuille2016-06-011-14/+13
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | ee9f4a5 Consensus: Decouple from chainparams.o and timedata.o (Jorge Timón)
| * | | | | | | Consensus: Decouple from chainparams.o and timedata.oJorge Timón2016-05-201-14/+13
| | |_|_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do it for the consensus-critical functions: - CheckBlockHeader - CheckBlock - ContextualCheckBlockHeader
* | | | | | | Merge #7960: Only use AddInventoryKnown for transactionsPieter Wuille2016-06-011-9/+4
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 383fc10 Only use AddInventoryKnown for transactions (Suhas Daftuar)
| * | | | | | | Only use AddInventoryKnown for transactionsSuhas Daftuar2016-04-271-9/+4
| | |_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | filterInventoryKnown is only used when relaying transactions, so stop adding block hashes to the filter.
* | | | | | | Defer inserting into maprelay until just before relaying.Gregory Maxwell2016-05-311-13/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | | | Merge #8080: Do not use mempool for GETDATA for tx accepted after the last ↵Wladimir J. van der Laan2016-05-311-1/+5
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mempool req. 7e908c7 Do not use mempool for GETDATA for tx accepted after the last mempool req. (Gregory Maxwell)