aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
AgeCommit message (Collapse)Author
2015-11-18Merge pull request #6932Wladimir J. van der Laan
1cf3dd8 Add unit test for UpdateCoins (Alex Morcos) 03c8282 Make CCoinsViewTest behave like CCoinsViewDB (Alex Morcos) 14470f9 ModifyNewCoins saves database lookups (Alex Morcos)
2015-11-17Fix debug log message for block filesAlex Morcos
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-15Fixed integer comparison warning.Eric Lombrozo
2015-11-14Merge pull request #6993Gregory Maxwell
bbf49da Fix comment for blocksonly parameter interactions (Patick Strateman) 6a4982f Fix fRelayTxs comment (Patick Strateman) 59441a0 Display DEFAULT_WHITELISTALWAYSRELAY in help text (Patick Strateman) 71a2683 Use DEFAULT_BLOCKSONLY and DEFAULT_WHITELISTALWAYSRELAY constants (Patick Strateman) 762b13b Add help text for blocksonly and whitelistalwaysrelay (Patick Strateman) 3a96497 Add whitelistalwaysrelay option (Patick Strateman) 420fa81 Do not process tx inv's in blocksonly mode (Patick Strateman) 4044f07 Add blocksonly mode (Patick Strateman)
2015-11-14Use DEFAULT_BLOCKSONLY and DEFAULT_WHITELISTALWAYSRELAY constantsPatick Strateman
2015-11-14Add whitelistalwaysrelay optionPatick Strateman
2015-11-14Do not process tx inv's in blocksonly modePatick Strateman
2015-11-13don't enforce maxuploadtargets disconnect for whitelisted peersJonas Schnelli
2015-11-12Merge pull request #6639Wladimir J. van der Laan
58ef0ff doc: update docs for Tor listening (Wladimir J. van der Laan) 68ccdc4 doc: Mention Tor listening in release notes (Wladimir J. van der Laan) 09c1ae1 torcontrol improvements and fixes (Wladimir J. van der Laan) 2f796e5 Better error message if Tor version too old (Peter Todd) 8f4e67f net: Automatically create hidden service, listen on Tor (Wladimir J. van der Laan)
2015-11-12Merge pull request #6918Wladimir J. van der Laan
69d373f Don't wipe the sigcache in TestBlockValidity (Pieter Wuille) 0b9e9dc Evict sigcache entries that are seen in a block (Pieter Wuille) 830e3f3 Make sigcache faster and more efficient (Pieter Wuille)
2015-11-12Merge pull request #6931Pieter Wuille
33c90cf Make skipping BIP30 check chain agnostic (Alex Morcos) 06d81ad Skip BIP30 check after BIP34 activation (Alex Morcos)
2015-11-11Merge pull request #6974Wladimir J. van der Laan
40b77d4 Always allow getheaders from whitelisted peers (Wladimir J. van der Laan)
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 #6965Wladimir J. van der Laan
77f1f59 Benchmark sanity checks and fork checks in ConnectBlock (Matt Corallo)
2015-11-10net: Automatically create hidden service, listen on TorWladimir J. van der Laan
Starting with Tor version 0.2.7.1 it is possible, through Tor's control socket API, to create and destroy 'ephemeral' hidden services programmatically. https://stem.torproject.org/api/control.html#stem.control.Controller.create_ephemeral_hidden_service This means that if Tor is running (and proper authorization is available), bitcoin automatically creates a hidden service to listen on, without user manual configuration. This will positively affect the number of available .onion nodes. - When the node is started, connect to Tor through control socket - Send `ADD_ONION` command - First time: - Make it create a hidden service key - Save the key in the data directory for later usage - Make it redirect port 8333 to the local port 8333 (or whatever port we're listening on). - Keep control socket connection open for as long node is running. The hidden service will (by default) automatically go away when the connection is closed.
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-09Always allow getheaders from whitelisted peersWladimir J. van der Laan
Process `getheaders` messages from whitelisted peers even if we are in initial block download. Whitelisted peers can always use a node as a block source. Also log a debug message when the request is ignored, for troubleshooting. Fixes #6971.
2015-11-06Benchmark sanity checks and fork checks in ConnectBlockMatt Corallo
2015-11-05Merge pull request #6948Wladimir J. van der Laan
22e7807 Always flush block and undo when switching to new file (Pieter Wuille)
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-05Merge pull request #6887Wladimir J. van der Laan
53238ff Clarify what minrelaytxfee does (MarcoFalke) abd8b76 [qt] Properly display required fee instead of minTxFee (MarcoFalke)
2015-11-05Always flush block and undo when switching to new filePieter Wuille
Previously, the undo weren't being flushed during a reindex because fKnown was set to true in FindBlockPos. That is the correct behaviour for block files as they aren't being touched, but undo files are touched. This changes the behaviour to always flush when switching to a new file (even for block files, though that isn't really necessary).
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-03Clarify what minrelaytxfee doesMarcoFalke
2015-11-02ModifyNewCoins saves database lookupsAlex Morcos
When processing a new transaction, in addition to spending the Coins of its txin's it creates a new Coins for its outputs. The existing ModifyCoins function will first make sure this Coins does not already exist. It can not exist due to BIP 30, but because of that the lookup can't be cached and always has to go to the database. Since we are creating the coins to match the new tx anyway, there is no point in checking if they exist first anyway. However this should not be used for coinbase tx's in order to preserve the historical behavior of overwriting the two existing duplicate tx pairs.
2015-11-02Make skipping BIP30 check chain agnosticAlex Morcos
2015-11-02Skip BIP30 check after BIP34 activationAlex Morcos
2015-11-02Don't wipe the sigcache in TestBlockValidityPieter Wuille
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-26Merge pull request #6622Wladimir J. van der Laan
17a073a Add RPC test for -maxuploadtarget (Suhas Daftuar) 872fee3 Introduce -maxuploadtarget (Jonas Schnelli)
2015-10-26Introduce -maxuploadtargetJonas Schnelli
* -maxuploadtarget can be set in MiB * if <limit> - ( time-left-in-24h-cycle / 600 * MAX_BLOCK_SIZE ) has reach, stop serve blocks older than one week and filtered blocks * no action if limit has reached, no guarantee that the target will not be surpassed * add outbound limit informations to rpc getnettotals
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.
2015-10-23Merge pull request #6856Wladimir J. van der Laan
d3b09f6 Do not allow blockfile pruning during reindex. (Alex Morcos)
2015-10-23Merge pull request #6351Wladimir J. van der Laan
65ef372 Add BIP65 to getblockchaininfo softforks list (Peter Todd) cde7ab2 Add RPC tests for the CHECKLOCKTIMEVERIFY (BIP65) soft-fork (Peter Todd) 287f54f Add CHECKLOCKTIMEVERIFY (BIP65) soft-fork logic (Peter Todd)
2015-10-21Merge pull request #6722Wladimir J. van der Laan
58254aa Fix stale comment in CTxMemPool::TrimToSize. (Matt Corallo) 2bc5018 Fix comment formatting tabs (Matt Corallo) 8abe0f5 Undo GetMinFee-requires-extra-call-to-hit-0 (Matt Corallo) 9e93640 Drop minRelayTxFee to 1000 (Matt Corallo) 074cb15 Add reasonable test case for mempool trimming (Matt Corallo) d355cf4 Only call TrimToSize once per reorg/blocks disconnect (Matt Corallo) 794a8ce Implement on-the-fly mempool size limitation. (Matt Corallo) e6c7b36 Print mempool size in KB when adding txn (Matt Corallo) 241d607 Add CFeeRate += operator (Matt Corallo) e8bcdce Track (and define) ::minRelayTxFee in CTxMemPool (Matt Corallo) 9c9b66f Fix calling mempool directly, instead of pool, in ATMP (Matt Corallo) 49b6fd5 Add Mempool Expire function to remove old transactions (Pieter Wuille) 78b82f4 Reverse the sort on the mempool's feerate index (Suhas Daftuar)
2015-10-19Do not allow blockfile pruning during reindex.Alex Morcos
Also clarify startup message.
2015-10-14doc: add comment explaining initial header requestDaniel Kraft
Add a comment that explains why the initial "getheader" requests are made starting from the block preceding the currently best one. Thanks to sdaftuar for the explanation!
2015-10-13Drop minRelayTxFee to 1000Matt Corallo
There is no exact science to setting this parameter, but 5000 (just over 1 US cent at the time of writing) is higher than the cost to relay a transaction around the network (the new benchmark due to mempool limiting).
2015-10-13Only call TrimToSize once per reorg/blocks disconnectMatt Corallo
2015-10-13Implement on-the-fly mempool size limitation.Matt Corallo
After each transaction which is added to mempool, we first call Expire() to remove old transactions, then throwing away the lowest-feerate transactions. After throwing away transactions by feerate, we set the minimum relay fee to the maximum fee transaction-and-dependant-set we removed, plus the default minimum relay fee. After the next block is received, the minimum relay fee is allowed to decrease exponentially. Its halflife defaults to 12 hours, but is decreased to 6 hours if the mempool is smaller than half its maximum size, and 3 hours if the mempool is smaller than a quarter its maximum size. The minimum -maxmempool size is 40*-limitdescendantsize, as it is easy for an attacker to play games with the cheapest -limitdescendantsize transactions. -maxmempool defaults to 300MB. This disables high-priority transaction relay when the min relay fee adjustment is >0 (ie when the mempool is full). When the relay fee adjustment drops below the default minimum relay fee / 2 it is set to 0 (re-enabling priority-based free relay).
2015-10-13Print mempool size in KB when adding txnMatt Corallo
2015-10-13Fix calling mempool directly, instead of pool, in ATMPMatt Corallo
2015-10-09Bump minrelaytxfee defaultWladimir J. van der Laan
To bridge the time until a dynamic method for determining this fee is merged. This is especially aimed at the stable releases (0.10, 0.11) because full mempool limiting, as will be in 0.12, is too invasive and risky to backport.
2015-10-08Add CHECKLOCKTIMEVERIFY (BIP65) soft-fork logicPeter Todd
Based on the earlier BIP66 soft-fork logic implemented by Pieter Wuille's 5a47811da5158df763aa2fca09ce646ee0c51e7b