aboutsummaryrefslogtreecommitdiff
path: root/src/main.h
AgeCommit message (Collapse)Author
2016-09-01Merge #8176: [0.12.x]: Versionbits: GBT supportWladimir J. van der Laan
db4bacf getblocktemplate: Use version/force mutation to support pre-BIP9 clients (Luke Dashjr) 65ee332 getblocktemplate: Explicitly handle the distinction between GBT-affecting softforks vs not (Luke Dashjr) 40e81f5 qa/rpc-tests: bip9-softforks: Add tests for getblocktemplate versionbits updates (Luke Dashjr) ddd8c01 Implement BIP 9 GBT changes (Luke Dashjr)
2016-06-08Implement 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-04-07Reduce block timeout to 10 minutesWladimir J. van der Laan
Now that #7804 fixed the timeout handling, reduce the block timeout from 20 minutes to 10 minutes. 20 minutes is overkill. Conflicts: src/main.h Github-Pull: #7832 Rebased-From: 62b9a557fca2aa55803c336ffcceccc50ccf0c3e
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. Conflicts: src/main.cpp src/main.h Self check after the last peer is removed Github-Pull: #7804 Rebased-From: 2d1d6581eca4508838cd339cc19c72efc42d6ea0 0e24bbf679c95784ed5514a6a1f2fbf99dd97725
2016-04-04Merge #7543: [0.12] Backport BIP9, BIP68 and BIP112 with softforkWladimir J. van der Laan
640666b [qa] rpc-tests: Properly use integers, floats (BtcDrak) c270b62 Fix comments in tests (BtcDrak) caf1381 Add bip68-sequence.py to extended rpc tests (BtcDrak) 26e9a05 Test of BIP9 fork activation of mtp, csv, sequence_lock (NicolasDorier) 3a99feb Add RPC test for BIP 68/112/113 soft fork. (Alex Morcos) 159ee3d Policy: allow transaction version 2 relay policy. (BtcDrak) 9713ed3 Soft fork logic for BIP68 (BtcDrak) 648be9b Soft fork logic for BIP113 (BtcDrak) ee40924 Add CHECKSEQUENCEVERIFY softfork through BIP9 (Pieter Wuille) 6ff0b9f RPC test for BIP9 warning logic (Suhas Daftuar) 0710b30 Test versionbits deployments (Suhas Daftuar) 8ebc6f2 Add testing of ComputeBlockVersion (Suhas Daftuar) 0bdaacd Softfork status report in RPC (Pieter Wuille) 5f90d4e Versionbits tests (Pieter Wuille) 6f83cf2 BIP9 Implementation (Pieter Wuille) ade85e1 Add LockPoints (Alex Morcos) c8d309e Code style fix. (BtcDrak) 6170506 Separate CheckLockTime() and CheckSequence() logic (BtcDrak) c0c5e09 BIP112: Implement CHECKSEQUENCEVERIFY (Mark Friedenbach) 197c376 fix sdaftuar's nits again (Alex Morcos) 0a79c04 Bug fix to RPC test (Alex Morcos) 0d09af7 Add RPC test exercising BIP68 (mempool only) (Suhas Daftuar) 15ba08c Implement SequenceLocks functions (Alex Morcos)
2016-03-24Mark p2p alert system as deprecated.BtcDrak
Set default to off This feature is removed entirely as of 0.13.0
2016-03-18Softfork status report in RPCPieter Wuille
2016-03-18BIP9 ImplementationPieter Wuille
Inspired by former implementations by Eric Lombrozo and Rusty Russell, and based on code by Jorge Timon.
2016-03-18Add LockPointsAlex Morcos
Obtain LockPoints to store in CTxMemPoolEntry and during a reorg, evaluate whether they are still valid and if not, recalculate them.
2016-03-18fix sdaftuar's nits againAlex Morcos
it boggles the mind why these nits can't be delivered on a more timely basis
2016-03-18Implement SequenceLocks functionsAlex Morcos
SequenceLocks functions are used to evaluate sequence lock times or heights per BIP 68. The majority of this code is copied from maaku in #6312 Further credit: btcdrak, sipa, NicolasDorier
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-01Rename replacebyfee=opt-in to mempoolreplacement=feeLuke 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
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-01-bytespersigop option to additionally limit sigops in transactions we relay ↵Luke Dashjr
and mine
2015-12-01Expose FormatStateMessageAlex Morcos
2015-12-01Merge pull request #7141Wladimir J. van der Laan
aabc897 rpc: Don't translate warning messages (Wladimir J. van der Laan)
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-11-30removeForReorg calls once-per-disconnect-> once-per-reorgMatt Corallo
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-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
2015-11-28[trivial] Reuse translation and cleanup DEFAULT_* valuesMarcoFalke
* DEFAULT_DISABLE_SAFEMODE = false * Use DEFAULT_* constants for extern bools
2015-11-28Constrain constant values to a single location in codeLuke Dashjr
2015-11-27Merge pull request #7053Wladimir J. van der Laan
2e29e7e Globals: Remove a bunch of Params() calls from main.cpp: (Jorge Timón)
2015-11-27Merge pull request #6134Wladimir J. van der Laan
e304432 Pass reference to estimateSmartFee and cleanup whitespace (Suhas Daftuar) 56106a3 Expose RPC calls for estimatesmart functions (Alex Morcos) e93a236 add estimateSmartFee to the unit test (Alex Morcos) 6303051 EstimateSmart functions consider mempool min fee (Alex Morcos) f22ac4a Increase success threshold for fee estimation to 95% (Alex Morcos) 4fe2823 Change wallet and GUI code to use new smart fee estimation calls. (Alex Morcos) 22eca7d Add smart fee estimation functions (Alex Morcos)
2015-11-23Globals: Remove a bunch of Params() calls from main.cpp:Jorge Timón
1) Chainparams: Explicit CChainParams arg for main: -AcceptBlock -AcceptBlockHeader -ActivateBestChain -ConnectTip -InitBlockIndex -LoadExternalBlockFile -VerifyDB parametric constructor 2) Also pickup more Params()\. in main.cpp 3) Pass nPruneAfterHeight explicitly to new FindFilesToPrune() in main.cpp
2015-11-16Merge pull request #6986Gregory Maxwell
6bc9e40 Chainparams: Explicit CChainParams arg for miner: (Jorge Timón) 598e494 Chainparams: Explicit CChainParams arg for main (pre miner): (Jorge Timón)
2015-11-16EstimateSmart functions consider mempool min feeAlex Morcos
2015-11-14Add whitelistalwaysrelay optionPatick Strateman
2015-11-12Merge #6771 from branch 'lowerLimits' of git://github.com/morcos/bitcoinJeff Garzik
2015-11-11Chainparams: Explicit CChainParams arg for main (pre miner):Jorge Timón
-ProcessNewBlock -TestBlockValidity
2015-11-11Merge pull request #6982Wladimir J. van der Laan
7267843 Globals: Make AcceptBlockHeader static (Fix #6163) (Jorge Timón)
2015-11-11Globals: Make AcceptBlockHeader static (Fix #6163)Jorge Timón
..and at the same time prevent AcceptBlockHeader() from calling global function Params()
2015-11-10Merge pull request #6822Wladimir J. van der Laan
e20d924 [trivial] init: Use defaults MIN_RELAY_TX_FEE & TRANSACTION_MAXFEE (MarcoFalke) 536766c [trivial] New DEFAULT_MIN_RELAY_TX_FEE = 1000 (MarcoFalke) 5f46a7d transaction_tests: Be more strict checking dust (MarcoFalke)
2015-11-10Merge pull request #6163Wladimir J. van der Laan
87cbdb8 Globals: Explicit Consensus::Params arg for main: (Jorge Timón)
2015-11-09[trivial] New DEFAULT_MIN_RELAY_TX_FEE = 1000MarcoFalke
2015-11-05Merge pull request #6934Wladimir J. van der Laan
d1c3762 Revert "Revert "Enable policy enforcing GetMedianTimePast as the end point of lock-time constraints"" (Gregory Maxwell) e4e5334 Restore MedianTimePast for locktime. (Gregory Maxwell)
2015-11-04Merge pull request #6905Wladimir J. van der Laan
a6efc01 Bugfix: Omit wallet-related options from -help when wallet is disabled (Luke Dashjr) 5f9260f Bugfix: If genproclimit is omitted to RPC setgenerate, don't change it; also show correct default in getmininginfo (Luke Dashjr) 420a82f Bugfix: Describe dblogsize option correctly (it refers to the wallet database, not memory pool) (Luke Dashjr) caa3d42 Bugfix: RPC: blockchain: Display correct defaults in help for verifychain method (Luke Dashjr)
2015-11-03Restore MedianTimePast for locktime.Gregory Maxwell
Revert "Revert "Add rules--presently disabled--for using GetMedianTimePast as endpoint for lock-time calculations"" This reverts commit 40cd32e835092c3158175511da5193193ec54939. After careful analysis it was determined that the change was, in fact, safe and several people were suffering momentary confusion about locktime semantics.
2015-11-01Revert "Add rules--presently disabled--for using GetMedianTimePast as ↵Gregory Maxwell
endpoint for lock-time calculations" This reverts commit 9d55050773d57c0e12005e524f2e54d9e622c6e2. As noted by Luke-Jr, under some conditions this will accept transactions which are invalid by the network rules. This happens when the current block time is head of the median time past and a transaction's locktime is in the middle. This could be addressed by changing the rule to MAX(this_block_time, MTP+offset) but this solution and the particular offset used deserve some consideration.
2015-10-30Globals: Explicit Consensus::Params arg for main:Jorge Timón
-CheckBlockIndex -DisconnectTip -GetTransaction -InvalidateBlock -ProcessGetData -ReadBlockFromDisk
2015-10-27Lower default policy limitsAlex Morcos
Reduce the default limits on maximum number of transactions and the cumulative size of those transactions in both ancestor and descendant packages to 25 txs and 101kb total size.
2015-10-23Add rules--presently disabled--for using GetMedianTimePast as endpoint for ↵Mark Friedenbach
lock-time calculations The lock-time code currently uses CBlock::nTime as the cutoff point for time based locked transactions. This has the unfortunate outcome of creating a perverse incentive for miners to lie about the time of a block in order to collect more fees by including transactions that by wall clock determination have not yet matured. By using CBlockIndex::GetMedianTimePast from the prior block instead, the self-interested miner no longer gains from generating blocks with fraudulent timestamps. Users can compensate for this change by simply adding an hour (3600 seconds) to their time-based lock times. If enforced, this would be a soft-fork change. This commit only adds the functionality on an unexecuted code path, without changing the behaviour of Bitcoin Core.