aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
AgeCommit message (Collapse)Author
2016-07-18Merge #8305: Improve handling of unconnecting headersWladimir J. van der Laan
e91cf4b Add test for handling of unconnecting headers (Suhas Daftuar) 96fa953 Improve handling of unconnecting headers (Suhas Daftuar)
2016-07-14Merge #8312: Fix mempool DoS vulnerability from malleated transactionsWladimir J. van der Laan
46c9620 Test that unnecessary witnesses can't be used for mempool DoS (Suhas Daftuar) bb66a11 Fix DoS vulnerability in mempool acceptance (Suhas Daftuar)
2016-07-14Merge #8271: [bugfix] Do not send witnesses in cmpctblockWladimir J. van der Laan
252675e Do not send witnesses in cmpctblock (Pieter Wuille)
2016-07-12Improve handling of unconnecting headersSuhas Daftuar
When processing a headers message that looks like a block announcement, send peer a getheaders if the headers message won't connect. Apply DoS points after too many consecutive unconnecting headers messages.
2016-07-07Fix DoS vulnerability in mempool acceptanceSuhas Daftuar
Moves the IsStandard check to happen after the premature-witness check, so that adding a witness to a transaction can't prevent mempool acceptance. Note that this doesn't address the broader category of potential mempool DoS issues that affect transactions after segwit activation.
2016-07-06Merge #8275: Remove bad chain alert partition checkWladimir J. van der Laan
ab8be98 Remove bad chain alert partition check (BtcDrak)
2016-07-05Revert "net: Avoid duplicate getheaders requests." PR #8054Gregory Maxwell
This reverts commit f93c2a1b7ee912f0651ebb4c8a5eca220e434f4a. This can cause synchronization to get stuck.
2016-06-26Do not send witnesses in cmpctblockPieter Wuille
2016-06-22[qa] Add rpc test for segwitAlex Morcos
Amended by Pieter Wuille to use multisig 1-of-1 for P2WSH tests, and BIP9 based switchover logic. Fixes and py3 conversion by Marco Falke.
2016-06-22Do not use compact blocks when segwit is enabledPieter Wuille
2016-06-22Add rewind logic to deal with post-fork software updatesPieter Wuille
Includes logic for dealing with pruning by Suhas Daftuar.
2016-06-22BIP141: Other consensus critical limits, and BIP145Pieter Wuille
Includes changes by Suhas Daftuar, Luke-jr, and mruddy.
2016-06-22Refactor script validation to observe amountsPieter Wuille
This is a preparation for BIP143 support.
2016-06-22BIP144: Handshake and relay (receiver side)Pieter Wuille
Service bit logic by Nicolas Dorier. Only download blocks from witness peers after fork.
2016-06-22BIP141: Commitment structure and deploymentPieter Wuille
Includes a fix by Suhas Daftuar and LongShao007
2016-06-22BIP141: Witness programPieter Wuille
2016-06-22BIP144: Serialization, hashes, relay (sender side)Pieter Wuille
Contains refactorings by Eric Lombrozo. Contains fixup by Nicolas Dorier. Contains cleanup of CInv::GetCommand by Alex Morcos
2016-06-22Merge #8068: Compact BlocksWladimir J. van der Laan
48efec8 Fix some minor compact block issues that came up in review (Matt Corallo) ccd06b9 Elaborate bucket size math (Pieter Wuille) 0d4cb48 Use vTxHashes to optimize InitData significantly (Matt Corallo) 8119026 Provide a flat list of txid/terators to txn in CTxMemPool (Matt Corallo) 678ee97 Add BIP 152 to implemented BIPs list (Matt Corallo) 56ba516 Add reconstruction debug logging (Matt Corallo) 2f34a2e Get our "best three" peers to announce blocks using cmpctblocks (Matt Corallo) 927f8ee Add ability to fetch CNode by NodeId (Matt Corallo) d25cd3e Add receiver-side protocol implementation for CMPCTBLOCK stuff (Matt Corallo) 9c837d5 Add sender-side protocol implementation for CMPCTBLOCK stuff (Matt Corallo) 00c4078 Add protocol messages for short-ids blocks (Matt Corallo) e3b2222 Add some blockencodings tests (Matt Corallo) f4f8f14 Add TestMemPoolEntryHelper::FromTx version for CTransaction (Matt Corallo) 85ad31e Add partial-block block encodings API (Matt Corallo) 5249dac Add COMPACTSIZE wrapper similar to VARINT for serialization (Matt Corallo) cbda71c Move context-required checks from CheckBlockHeader to Contextual... (Matt Corallo) 7c29ec9 If AcceptBlockHeader returns true, pindex will be set. (Matt Corallo) 96806c3 Stop trimming when mapTx is empty (Pieter Wuille)
2016-06-21Fix some minor compact block issues that came up in reviewMatt Corallo
2016-06-20Merge #8179: Evict orphans which are included or precluded by accepted blocks.Wladimir J. van der Laan
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)
2016-06-19Get our "best three" peers to announce blocks using cmpctblocksMatt Corallo
2016-06-19Add receiver-side protocol implementation for CMPCTBLOCK stuffMatt Corallo
2016-06-19Add sender-side protocol implementation for CMPCTBLOCK stuffMatt Corallo
2016-06-19Move context-required checks from CheckBlockHeader to Contextual...Matt Corallo
2016-06-19If AcceptBlockHeader returns true, pindex will be set.Matt Corallo
Assert this instead of checking (and then dref'ing later anyway) to make sure no one thinks they can change that postcondition of AcceptBlockHeader..
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-15Increase maximum orphan size to 100,000 bytes.Gregory Maxwell
Although this increases node memory usage in the worst case by perhaps 30MB, the current behavior causes severe issues with dependent tx relay.
2016-06-15Treat orphans as implicit inv for parents, discard when parents rejected.Gregory Maxwell
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.
2016-06-15Adds an expiration time for orphan tx.Gregory Maxwell
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.
2016-06-14Remove bad chain alert partition checkBtcDrak
As per meeting 2016-03-31 https://bitcoincore.org/en/meetings/2016/03/31/#bad-chain-alerts The partition checker was producing huge number of false-positives and was disabled in 0.12.1 on the understanding it would either be fixed in 0.13 or removed entirely from master if not.
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-10This eliminates the primary leak that causes the orphan map toGregory Maxwell
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.
2016-06-10Track orphan by prev COutPoint rather than prev hashPieter Wuille
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