aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | | Relocate calls to CheckDiskSpaceAlex Morcos2015-05-121-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure we're checking disk space for block index writes and allow for pruning to happen before chainstate writes.
| * | | | | | Write block index more frequently than cache flushesPieter Wuille2015-05-111-15/+40
| | | | | | |
| * | | | | | Cache tweak and logging improvementsPieter Wuille2015-05-111-2/+2
| | | | | | |
| * | | | | | Use accurate memory for flushing decisionsPieter Wuille2015-05-111-3/+3
| |/ / / / /
* | / / / / Fix incorrect variable name in FindFilesToPruneSuhas Daftuar2015-05-131-4/+4
| |/ / / / |/| | | |
* | | | | Merge pull request #5159Wladimir J. van der Laan2015-05-131-3/+3
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | b649e03 Create new BlockPolicyEstimator for fee estimates (Alex Morcos)
| * | | | Create new BlockPolicyEstimator for fee estimatesAlex Morcos2015-05-131-3/+3
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This class groups transactions that have been confirmed in blocks into buckets, based on either their fee or their priority. Then for each bucket, the class calculates what percentage of the transactions were confirmed within various numbers of blocks. It does this by keeping an exponentially decaying moving history for each bucket and confirm block count of the percentage of transactions in that bucket that were confirmed within that number of blocks. -Eliminate txs which didn't have all inputs available at entry from fee/pri calcs -Add dynamic breakpoints and tracking of confirmation delays in mempool transactions -Remove old CMinerPolicyEstimator and CBlockAverage code -New smartfees.py -Pass a flag to the estimation code, using IsInitialBlockDownload as a proxy for when we are still catching up and we shouldn't be counting how many blocks it takes for transactions to be included. -Add a policyestimator unit test
* | | | Merge pull request #6055Wladimir J. van der Laan2015-05-061-17/+30
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a8cdaf5 checkpoints: move the checkpoints enable boolean into main (Cory Fields) 11982d3 checkpoints: Decouple checkpoints from Params (Cory Fields) 6996823 checkpoints: make checkpoints a member of CChainParams (Cory Fields) 9f13a10 checkpoints: store mapCheckpoints in CCheckpointData rather than a pointer (Cory Fields)
| * | | | checkpoints: move the checkpoints enable boolean into mainCory Fields2015-04-301-11/+19
| | | | | | | | | | | | | | | | | | | | | | | | | This pertains to app-state, so it doesn't make sense to handle inside the checkpoint functions.
| * | | | checkpoints: Decouple checkpoints from ParamsCory Fields2015-04-301-11/+16
| | | | | | | | | | | | | | | | | | | | Pass checkpoint data in as necessary
* | | | | Merge pull request #6085Wladimir J. van der Laan2015-05-041-22/+23
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | b05a89b Non-grammatical language improvements (Luke Dashjr) 7e6d23b Bugfix: Grammar fixes (Corinne Dashjr)
| * | | | | Non-grammatical language improvementsLuke Dashjr2015-05-021-12/+13
| | | | | |
| * | | | | Bugfix: Grammar fixesCorinne Dashjr2015-05-011-10/+10
| | | | | |
* | | | | | Replace mruset setAddrKnown with CRollingBloomFilter addrKnownGavin Andresen2015-04-301-5/+5
| |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use a probabilistic bloom filter to keep track of which addresses we think we have given our peers, instead of a list. This uses much less memory, at the cost of sometimes failing to relay an address to a peer-- worst case if the bloom filter happens to be as full as it gets, 1-in-1,000. Measured memory usage of a full mruset setAddrKnown: 650Kbytes Constant memory usage of CRollingBloomFilter addrKnown: 37Kbytes. This will also help heap fragmentation, because the 37K of storage is allocated when a CNode is created (when a connection to a peer is established) and then there is no per-item-remembered memory allocation. I plan on testing by restarting a full node with an empty peers.dat, running a while with -debug=addrman and -debug=net, and making sure that the 'addr' message traffic out is reasonable. (suggestions for better tests welcome)
* | | | | Merge pull request #5918Pieter Wuille2015-04-281-4/+5
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | f7303f9 Use equivalent PoW for non-main-chain requests (Pieter Wuille)
| * | | | Use equivalent PoW for non-main-chain requestsPieter Wuille2015-04-221-4/+5
| |/ / /
* | | | Merge pull request #5662Wladimir J. van der Laan2015-04-281-3/+3
|\ \ \ \ | | | | | | | | | | | | | | | 00dcaf4 Change download logic to allow calling getheaders/getdata on inbound peers (Suhas Daftuar)
| * | | | Change download logic to allow calling getheaders/getdata on inbound peersSuhas Daftuar2015-04-021-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SendMessages will now call getheaders on both inbound and outbound peers, once the headers chain is close to synced. It will also try downloading blocks from inbound peers once we're out of initial block download (so inbound peers will participate in parallel block fetching for the last day or two of blocks being downloaded).
* | | | | Add block pruning functionalitymrbandrews2015-04-221-30/+248
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a -prune=N option to bitcoind, which if set to N>0 will enable block file pruning. When pruning is enabled, block and undo files will be deleted to try to keep total space used by those files to below the prune target (N, in MB) specified by the user, subject to some constraints: - The last 288 blocks on the main chain are always kept (MIN_BLOCKS_TO_KEEP), - N must be at least 550MB (chosen as a value for the target that could reasonably be met, with some assumptions about block sizes, orphan rates, etc; see comment in main.h), - No blocks are pruned until chainActive is at least 100,000 blocks long (on mainnet; defined separately for mainnet, testnet, and regtest in chainparams as nPruneAfterHeight). This unsets NODE_NETWORK if pruning is enabled. Also included is an RPC test for pruning (pruning.py). Thanks to @rdponticelli for earlier work on this feature; this is based in part off that work.
* | | | Merge pull request #6010Wladimir J. van der Laan2015-04-201-4/+5
|\ \ \ \ | | | | | | | | | | | | | | | c1ecee8 Set nSequenceId when a block is fully linked (Suhas Daftuar)
| * | | | Set nSequenceId when a block is fully linkedSuhas Daftuar2015-04-141-4/+5
| | |_|/ | |/| | | | | | | | | | Also adds a test to CheckBlockIndex
* | | | Removed '()' where used without contents insideNicolas Benoit2015-04-201-2/+2
| | | | | | | | | | | | | | | | This additional patch removes '()' from current function name in LogPrintf output.
* | | | Replaced current function names with __func__ in LogPrintf() calls.Nicolas Benoit2015-04-201-17/+17
| | | |
* | | | Merge pull request #6012Wladimir J. van der Laan2015-04-161-0/+8
|\ \ \ \ | |_|_|/ |/| | | | | | | 0421c18 Fix CheckBlockIndex for reindex. (mrbandrews)
| * | | Fix CheckBlockIndex for reindex.mrbandrews2015-04-141-0/+8
| |/ / | | | | | | | | | | | | | | | Some tests in CheckBlockIndex require chainActive.Tip(), but when reindexing, chainActive has not been set on the first call to CheckBlockIndex. reindex.py starts a node, mines 3 blocks, stops, and reindexes with CheckBlockIndex enabled.
* | | Merge pull request #5997Wladimir J. van der Laan2015-04-151-6/+11
|\ \ \ | | | | | | | | | | | | 4e38217 Chainparams: Refactor: Remove redundant HashGenesisBlock() getter (Jorge Timón)
| * | | Chainparams: Refactor: Remove redundant HashGenesisBlock() getterJorge Timón2015-04-121-6/+11
| |/ /
* / / Chainparams: Cleanup: Delete CChainParams getters to attributes from ↵Jorge Timón2015-04-131-2/+4
|/ / | | | | | | Consensus::Params
* | Merge pull request #5969Wladimir J. van der Laan2015-04-081-1/+1
|\ \ | | | | | | | | | f14e687 Chainparams: Decouple CAlert from CChainParams (Jorge Timón)
| * | Chainparams: Decouple CAlert from CChainParamsJorge Timón2015-04-041-1/+1
| | |
* | | Add additional block index consistency checksSuhas Daftuar2015-04-011-0/+8
|/ / | | | | | | | | | | | | | | This adds more tests to CheckBlockIndex: - HAVE_DATA is true iff nTx > 0 - BLOCK_VALID_TRANSACTIONS is true iff nTx > 0 - BLOCK_VALID_TRANSACTIONS is true for a block and all parents iff nChainTx > 0
* | Merge pull request #5900Wladimir J. van der Laan2015-04-011-4/+142
|\ \ | |/ |/| | | 3fcfbc8 Add a consistency check for the block chain data structures (Pieter Wuille)
| * Add a consistency check for the block chain data structuresPieter Wuille2015-03-271-4/+142
| | | | | | | | | | | | This adds a -checkblockindex (defaulting to true for regtest), which occasionally does a full consistency check for mapBlockIndex, setBlockIndexCandidates, chainActive, and mapBlocksUnlinked.
* | Merge pull request #5940Wladimir J. van der Laan2015-03-301-1/+1
|\ \ | |/ |/| | | 0f5954c Regression test for ResendWalletTransactions (Gavin Andresen)
| * Regression test for ResendWalletTransactionsGavin Andresen2015-03-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a regression test for the wallet's ResendWalletTransactions function, which uses a new, hidden RPC command "resendwallettransactions." I refactored main's Broadcast signal so it is passed the best-block time, which let me remove a global variable shared between main.cpp and the wallet (nTimeBestReceived). I also manually tested the "rebroadcast unconfirmed every half hour or so" functionality by: 1. Running bitcoind -connect=0.0.0.0:8333 2. Creating a couple of send-to-self transactions 3. Connect to a peer using -addnode 4. Waited a while, monitoring debug.log, until I see: ```2015-03-23 18:48:10 ResendWalletTransactions: rebroadcast 2 unconfirmed transactions``` One last change: don't bother putting ResendWalletTransactions messages in debug.log unless unconfirmed transactions were actually rebroadcast.
* | Consensus: Refactor: Decouple pow.o from chainparams.oJorge Timón2015-03-261-3/+3
|/
* Includes: Refactor: Move CValidationInterface and CMainSignals out of mainJorge Timón2015-03-241-69/+8
|
* Merge pull request #5890Wladimir J. van der Laan2015-03-241-1/+1
|\ | | | | | | cd3d67c Fix InvalidateBlock to add chainActive.Tip to setBlockIndexCandidates (Alex Morcos)
| * Fix InvalidateBlock to add chainActive.Tip to setBlockIndexCandidatesAlex Morcos2015-03-131-1/+1
| |
* | Merge pull request #5860Wladimir J. van der Laan2015-03-171-5/+16
|\ \ | |/ |/| | | 9c27379 Reduce fingerprinting through timestamps in 'addr' messages. (Pieter Wuille)
| * Reduce fingerprinting through timestamps in 'addr' messages.Pieter Wuille2015-03-171-5/+16
| | | | | | | | Suggested by Jonas Nick.
* | fix InvalidateBlock to repopulate setBlockIndexCandidatesAlex Morcos2015-03-121-1/+1
| |
* | Merge pull request #5871Wladimir J. van der Laan2015-03-111-2/+1
|\ \ | |/ |/| | | | | 3aa0130 test: remove fSkipProofOfWork (Wladimir J. van der Laan) 59bd89f test: Remove UNITTEST params (Wladimir J. van der Laan)
| * test: remove fSkipProofOfWorkWladimir J. van der Laan2015-03-091-2/+1
| | | | | | | | | | Not used, and REGTEST already allows creating blocks at the lowerst possible difficulty.
* | Merge pull request #5864Wladimir J. van der Laan2015-03-111-1/+4
|\ \ | |/ |/| | | bb6acff fix possible block db breakage during re-index (Cory Fields)
| * fix possible block db breakage during re-indexCory Fields2015-03-101-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When re-indexing, there are a few cases where garbage data may be skipped in the block files. In these cases, the indices are correctly written to the index db, however the pointer to the next position for writing in the current block file is calculated by adding the sizes of the valid blocks found. As a result, when the re-index is finished, the index db is correct for all existing blocks, but the next block will be written to an incorrect offset, likely overwriting existing blocks. Rather than using the sum of all valid blocks to determine the next write position, use the end of the last block written to the file. Don't assume that the current block is the last one in the file, since they may be read out-of-order.
* | Merge pull request #5852Wladimir J. van der Laan2015-03-091-2/+22
|\ \ | | | | | | | | | 51598b2 Reinitialize state in between individual unit tests. (Pieter Wuille)
| * | Reinitialize state in between individual unit tests.Pieter Wuille2015-03-031-2/+22
| | | | | | | | | | | | | | | This changes the TestingSetup fixture to be per-unit-test rather than global. Most tests don't need it, so it's only invoked in a few.
* | | Merge pull request #5442Wladimir J. van der Laan2015-03-091-1/+6
|\ \ \ | | | | | | | | | | | | dca799e Ignore getaddr messages on Outbound connections. (Ivan Pustogarov)
| * | | Ignore getaddr messages on Outbound connections.Ivan Pustogarov2015-02-061-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The only time when a client sends a "getaddr" message is when he esatblishes an Outbound connection (see ProcessMessage() in src/main.cpp). Another bitcoin client is expected to receive a "getaddr" message only on Inbound connection. Ignoring "gettaddr" requests on Outbound connections can resolve potential privacy issues (and as was said such request normally do not happen anyway).