aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
AgeCommit message (Collapse)Author
2016-02-10Update the wallet best block marker when pruningPieter Wuille
Github-Pull: #7502 Rebased-From: e4eebb604e19f67b0c7a483b1ded1229d75ecdd3
2016-02-09Update nQueuedValidatedHeaders after peer disconnectionSuhas Daftuar
Github-Pull: #7482 Rebased-From: 301bc7bc7e83f4c268c1722558b07dbb5b55fa92
2016-02-03Merge #7440: [0.12] Rename permitrbf to mempoolreplacement and provide ↵Wladimir J. van der Laan
minimal string-list forward compatibility af9f564 release-notes: Update for replacebyfee->mempoolreplacement rename (Luke Dashjr) 4ad418b Rename replacebyfee=opt-in to mempoolreplacement=fee (Luke Dashjr) b2287a7 release-notes: Update for permitrbf->replacebyfee rename (Luke Dashjr) 5f456a6 Simplify check for replacebyfee=opt-in (Luke Dashjr) e8d19ab Accept replacebyfee=opt-in for turning on opt-in RBF (Luke Dashjr) 1205f87 Rename permitrbf to replacebyfee (Luke Dashjr)
2016-02-01Add whitelistforcerelay to control forced relaying. [#7099 redux]Gregory Maxwell
- Add whitelistforcerelay to control forced relaying. Also renames whitelistalwaysrelay. Nodes relay all transactions from whitelisted peers, this gets in the way of some useful reasons for whitelisting peers-- for example, bypassing bandwidth limitations. The purpose of this forced relaying is for specialized gateway applications where a node is being used as a P2P connection filter and multiplexer, but where you don't want it getting in the way of (re-)broadcast. This change makes it configurable with whitelistforcerelay. - Blacklist -whitelistalwaysrelay; replaced by -whitelistrelay. Github-Pull: #7439 Rebased-From: 325c725fb6205e38142914acb9ed1733d8482d46 89d113e02a83617b4e971c160d47551476dacc71
2016-01-29Rename permitrbf to replacebyfeeLuke Dashjr
"permit" is currently used to configure transaction filtering, whereas replacement is more to do with the memory pool state than the transaction itself.
2016-01-21Add option `-permitrbf` to set transaction replacement policyWladimir J. van der Laan
Add a configuration option `-permitrbf` to set transaction replacement policy for the mempool. Enabling it will enable (opt-in) RBF, disabling it will refuse all conflicting transactions. Conflicts: src/init.cpp src/main.cpp src/main.h Github-Pull: #7386 Rebased-From: b768108d9c0b83330572711aef1e569543130d5e
2016-01-09Merge branch bytespersigopLuke Dashjr
2016-01-05Bump copyright headers to 2015MarcoFalke
- Bump copyright headers to 2015 - [devtools] Rewrite fix-copyright-headers.py - [devtools] Use git pretty-format for year parsing Github-Pull: #7205 Rebased-From: fa6ad855e9159b2247da4fa0054f32fa181499ab fa24439ff3d8ab5b9efaf66ef4dae6713b88cb35 fa71669452e57039e4270fd2b33a0e0e1635b813
2016-01-05Mark blocks with too many sigops as failedSuhas Daftuar
Github-Pull: #7217 Rebased-From: 5246180f168c9b761b6158b0725f5718239ba66c
2016-01-04Report non-mandatory script failures correctlyPieter Wuille
Github-Pull: #7276 Rebased-From: 7ef8f3c072a8750c72a3a1cdc727b5c1d173bac8
2015-12-21[Mempool] Fix mempool limiting and replace-by-fee for PrioritiseTransactionSuhas Daftuar
1) Fix mempool limiting for PrioritiseTransaction Redo the feerate index to be based on mining score, rather than fee. Update mempool_packages.py to test prioritisetransaction's effect on package scores. 2) Update replace-by-fee logic to use fee deltas 3) Use fee deltas for determining mempool acceptance 4) Remove GetMinRelayFee One test in AcceptToMemoryPool was to compare a transaction's fee agains the value returned by GetMinRelayFee. This value was zero for all small transactions. For larger transactions (between DEFAULT_BLOCK_PRIORITY_SIZE and MAX_STANDARD_TX_SIZE), this function was preventing low fee transactions from ever being accepted. With this function removed, we will now allow transactions in that range with fees (including modifications via PrioritiseTransaction) below the minRelayTxFee, provided that they have sufficient priority. Github-Pull: #7062 Rebased-From: eb306664e786ae43d539fde66f0fbe2a3e89d910 9ef2a25603c9ec4e44c4f45c6a5d4e4386ec86d3 27fae3484cdb21b0d24face833b966fce5926be5 901b01d674031f9aca717deeb372bafa160a24af
2015-12-14Replace trickle nodes with per-node/message Poisson delaysPieter Wuille
We used to have a trickle node, a node which was chosen in each iteration of the send loop that was privileged and allowed to send out queued up non-time critical messages. Since the removal of the fixed sleeps in the network code, this resulted in fast and attackable treatment of such broadcasts. This pull request changes the 3 remaining trickle use cases by random delays: * Local address broadcast (while also removing the the wiping of the seen filter) * Address relay * Inv relay (for transactions; blocks are always relayed immediately) The code is based on older commits by Patrick Strateman. Github-Pull: #7125 Rebased-From: 5400ef6bcb9d243b2b21697775aa6491115420f3
2015-12-11net: Add and document network messages in protocol.hWladimir J. van der Laan
- Avoids string typos (by making the compiler check) - Makes it easier to grep for handling/generation of a certain message type - Refer directly to documentation by following the symbol in IDE - Move list of valid message types to protocol.cpp: protocol.cpp is a more appropriate place for this, and having the array there makes it easier to keep things consistent. Github-Pull: #7181 Rebased-From: 9bbe71b641e2fc985daf127988a14a67c99da50a
2015-12-10net: Fix sent reject messages for blocks and transactionsWladimir J. van der Laan
Ever since we #5913 have been sending invalid reject messages for transactions and blocks. test: Add basic test for `reject` code Extend P2P test framework to make it possible to expect reject codes for transactions and blocks. Github-Pull: #7179 Rebased-From: 9fc6ed6003da42f035309240c715ce0fd063ec03 20411903d7b356ebb174df2daad1dcd5d6117f79
2015-12-07Don't do mempool lookups for "mempool" command without a filterMatt Corallo
Github-Pull: #7174 Rebased-From: 96918a2f0990a8207d7631b8de73af8ae5d24aeb
2015-12-04Replace setInventoryKnown with a rolling bloom filter.Gregory Maxwell
Github-Pull: #7133 Rebased-From: ec73ef37eccfeda76de55c4ff93ea54d4e69e1ec e20672479ef7f2048c2e27494397641d47a4d88d 6b849350ab074a7ccb80ecbef387f59e1271ded6 b6a0da45db8d534e7a77d1cebe382cd5d83ba9b8 d41e44c9accb3df84e0abbc602cc76b72754d382 aa4b0c26b0a94ca6164c441aae723e118554d214
2015-12-04Disconnect on mempool requests from peers when over the upload limit.Gregory Maxwell
Mempool requests use a fair amount of bandwidth when the mempool is large, disconnecting peers using them follows the same logic as disconnecting peers fetching historical blocks. Rebased-From: 6aadc7557823b7673b8f661b3d41cf867e2936a3 Github-Pull: #7166
2015-12-02PartitionCheck: remove useless spacespaveljanik
2015-12-02Fix various typospaveljanik
2015-12-01Flush coins cache also after transaction processingPieter Wuille
2015-12-01Uncache input txn in utxo cache if a tx is not accepted to mempoolMatt Corallo
2015-12-01Discard txn cache entries that were loaded for removed mempool txnMatt Corallo
2015-12-01-bytespersigop option to additionally limit sigops in transactions we relay ↵Luke Dashjr
and mine
2015-12-01Expose FormatStateMessageAlex Morcos
2015-12-01Store the total sig op count of a tx.Alex Morcos
Store sum of legacy and P2SH sig op counts. This is calculated in AcceptToMemory pool and storing it saves redoing the expensive calculation in block template creation.
2015-12-01Merge pull request #7141Wladimir J. van der Laan
aabc897 rpc: Don't translate warning messages (Wladimir J. van der Laan)
2015-12-01Merge pull request #6915Wladimir J. van der Laan
2d8860e Fix removeForReorg to use MedianTimePast (Suhas Daftuar) b7fa4aa Don't call removeForReorg if DisconnectTip fails (Suhas Daftuar) 7e49f5f Track coinbase spends in CTxMemPoolEntry (Suhas Daftuar) bb8ea1f removeForReorg calls once-per-disconnect-> once-per-reorg (Matt Corallo) 474b84a Make indentation in ActivateBestChainStep readable (Matt Corallo) b0a064c Fix comment in removeForReorg (Matt Corallo) 9b060e5 Fix removal of time-locked transactions during reorg (Matt Corallo) 0c9959a Add failing test checking timelocked-txn removal during reorg (Matt Corallo)
2015-12-01rpc: Don't translate warning messagesWladimir J. van der Laan
But keep translating them in the GUI. This - necessarily - requires duplication of a few messages. Alternative take on #7134, that keeps the translations from being wiped. Also document GetWarnings() input argument. Fixes #5895.
2015-12-01Merge pull request #7079Wladimir J. van der Laan
ebb25f4 Limit setAskFor and retire requested entries only when a getdata returns. (Gregory Maxwell) 5029698 prevent peer flooding request queue for an inv (kazcw)
2015-11-30Fix removeForReorg to use MedianTimePastSuhas Daftuar
2015-11-30Don't call removeForReorg if DisconnectTip failsSuhas Daftuar
2015-11-30Track coinbase spends in CTxMemPoolEntrySuhas Daftuar
This allows us to optimize CTxMemPool::removeForReorg.
2015-11-30removeForReorg calls once-per-disconnect-> once-per-reorgMatt Corallo
2015-11-30Make indentation in ActivateBestChainStep readableMatt Corallo
2015-11-30Fix removal of time-locked transactions during reorgMatt Corallo
2015-11-23Limit setAskFor and retire requested entries only when a getdata returns.Gregory Maxwell
The setAskFor duplicate elimination was too eager and removed entries when we still had no getdata response, allowing the peer to keep INVing and not responding.
2015-11-23prevent peer flooding request queue for an invkazcw
mapAlreadyAskedFor does not keep track of which peer has a request queued for a particular tx. As a result, a peer can blind a node to a tx indefinitely by sending many invs for the same tx, and then never replying to getdatas for it. Each inv received will be placed 2 minutes farther back in mapAlreadyAskedFor, so a short message containing 10 invs would render that tx unavailable for 20 minutes. This is fixed by disallowing a peer from having more than one entry for a particular inv in mapAlreadyAskedFor at a time.
2015-11-22Merge pull request #7046Gregory Maxwell
80ae230 Improve log messages for blocks only violations. (Patick Strateman) 08843ed Add relaytxes status to getpeerinfo (Peter Todd) d8aaa51 Bail early in processing transactions in blocks only mode. (Patick Strateman) 3587f6a Fix relay mechanism for whitelisted peers under blocks only mode. (Patick Strateman)
2015-11-21Improve log messages for blocks only violations.Patick Strateman
2015-11-21Merge pull request #7011Gregory Maxwell
6531f17 Add mediantime field to getblock and getblockheader (Peter Todd) 7259769 Document new mediantime field in getblockchaininfo (Peter Todd) c277a63 Clarify nLockTime-by-time comment in CheckFinalTx() (Peter Todd) 748321e Add mediantime field to getblockchaininfo RPC call (Peter Todd)
2015-11-20Bail early in processing transactions in blocks only mode.Patick Strateman
Previously unsolicited transactions would be processed as normal.
2015-11-20Fix relay mechanism for whitelisted peers under blocks only mode.Patick Strateman
Previously in blocks only mode all inv messages where type!=MSG_BLOCK would be rejected without regard for whitelisting or whitelistalwaysrelay. As such whitelisted peers would never send the transaction (which would be processed).
2015-11-19Change GetPriority calculation.Alex Morcos
Compute the value of inputs that already are in the chain at time of mempool entry and only increase priority due to aging for those inputs. This effectively changes the CTxMemPoolEntry's GetPriority calculation from an upper bound to a lower bound.
2015-11-30Merge pull request #7112Wladimir J. van der Laan
9af5f9c Move uiInterface.NotifyBlockTip signal above the core/wallet signal - This will keep getbestblockhash more in sync with blocknotify callbacks (Jonas Schnelli) 4082e46 [Qt] call GuessVerificationProgress synchronous during core signal, pass double over UI signal (Jonas Schnelli) 947d20b [Qt] reduce cs_main in getVerificationProgress() (Jonas Schnelli) e6d50fc [Qt] update block tip (height and date) without locking cs_main, update always (each block) (Jonas Schnelli) 012fc91 NotifyBlockTip signal: switch from hash (uint256) to CBlockIndex* - also adds a boolean for indication if the tip update was happening during initial sync - emit notification also during initial sync (Jonas Schnelli)
2015-11-30Move uiInterface.NotifyBlockTip signal above the core/wallet signalJonas Schnelli
- This will keep getbestblockhash more in sync with blocknotify callbacks
2015-11-30Merge pull request #7116Wladimir J. van der Laan
cb491e7 Trivial: Fix warning introduced by #7053 by casting to uint64_t (Jorge Timón)
2015-11-30[Qt] call GuessVerificationProgress synchronous during core signal, pass ↵Jonas Schnelli
double over UI signal
2015-11-30NotifyBlockTip signal: switch from hash (uint256) to CBlockIndex*Jonas Schnelli
- also adds a boolean for indication if the tip update was happening during initial sync - emit notification also during initial sync
2015-11-29Trivial: Fix warning introduced by #7053 by casting to uint64_tJorge Timón
2015-11-29Allow block announcements with headersSuhas Daftuar
This replaces using inv messages to announce new blocks, when a peer requests (via the new "sendheaders" message) that blocks be announced with headers instead of inv's. Since headers-first was introduced, peers send getheaders messages in response to an inv, which requires generating a block locator that is large compared to the size of the header being requested, and requires an extra round-trip before a reorg can be relayed. Save time by tracking headers that a peer is likely to know about, and send a headers chain that would connect to a peer's known headers, unless the chain would be too big, in which case we revert to sending an inv instead. Based off of @sipa's commit to announce all blocks in a reorg via inv, which has been squashed into this commit. Rebased-by: Pieter Wuille