aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2012-10-29No need for test fixture now that multisig is enabled on main network.Gavin Andresen
2012-10-29Remove P2SH transition code: P2SH violations may cause DoS triggerPieter Wuille
2012-10-25First flush block tree, then coin setPieter Wuille
As the coinset data refers to the best block, stored in the block tree. Flushing the coin set first can cause inconsistencies if the process gets killed in between.
2012-10-25Added checks for null pointers in Shutdowntucenaber
Estetics
2012-10-25Merge pull request #1904 from laanwj/2012_10_remove_getorderPieter Wuille
remove "checkorder" P2P command
2012-10-25Merge pull request #1899 from Diapolo/proxy_optionsmodelPieter Wuille
make optionsmodel query real proxy state for ::data()
2012-10-25Merge pull request #1953 from gmaxwell/createnewblock-racePieter Wuille
Fixes a race condition in CreateNewBlock and a future null deref on testnet.
2012-10-25Merge pull request #1926 from laanwj/2012_10_maindummyboundsWladimir J. van der Laan
Fix out-of-bounds read in main (issue #1924)
2012-10-25Merge pull request #1956 from laanwj/2012_10_prerelease_warningWladimir J. van der Laan
Show warning when using prerelease version
2012-10-25Merge pull request #1955 from gmaxwell/gbt_paramfixPieter Wuille
Don't force getblocktemplate to have a parameter.
2012-10-25ensure AskPassphraseDialog::eventFilter forwards eventsPhilip Kaufmann
- instead of "return false;" use "return QDialog::eventFilter(object, event);" to harmonize this event filter with our default behaviour - remove orphan spaces found while editting the files
2012-10-25Show warning when using prerelease versionWladimir J. van der Laan
Implements #1948 - Add macro `CLIENT_VERSION_IS_RELEASE` to clientversion.h - When running a prerelease (the above macro is `false`): - In UI, show an orange warning bar at the top. This will be used for other warnings (and alerts) as well, instead of the status bar. - For `bitcoind`, show the warning in the "errors" field in `getinfo` response.
2012-10-24Don't force getblocktemplate to have a parameter.Gregory Maxwell
This looks like it was just a munged merge when ultraprune was committed.
2012-10-24Merge pull request #1947 from centromere/freebsd_cpu_fixPieter Wuille
Fixed 100% CPU utilization problem on FreeBSD 9
2012-10-24Fix out-of-bounds read noticed by Ricardo CorreiaWladimir J. van der Laan
Sizeof() returned the size of a pointer instead of the size of the buffer. Fixes issue #1924.
2012-10-24Fixes a race condition in CreateNewBlock and a future null deref on testnet.Gregory Maxwell
CreateNewBlock was reading pindexBest at the start before taking the lock so it was possible to have the the block content not match the prevheader and this can also trigger a newly added assert in ConnectBlock. I noticed this during a code review after twobitcoins reported that ab91bf39 (BIP30 for all blocks) could cause a null dereference on a modified node that mined during the IBD, or on testnet when it reached heights 91842 and 91880 due to CreateNewBlock calling ConnectBlock with pindex->phashBlock NULL.
2012-10-23Bugfix: actually use CCoinsViewMemPoolPieter Wuille
2012-10-23Added some commentsPieter Wuille
Some clarifications after a code review by Mike Hearn.
2012-10-23Bugfix: off-by-one in priority calculationPieter Wuille
2012-10-23Bugfix: add missing fee checkPieter Wuille
2012-10-23Bugfix: off-by-one error in coinbase maturity checkPieter Wuille
2012-10-22Fixed 100% CPU utilization problem on FreeBSD 9Alex
2012-10-21Merge pull request #1939 from sipa/bugfix_zerobalanceGregory Maxwell
Bugfix: do not mark all future coins spent
2012-10-21change blockchain -> block chain (spelling)Philip Kaufmann
- Wiki says "block chain" is correct ;) - remove some unneeded spaces I found in the source, while fixing the spelling
2012-10-21remove init messages from ThreadImport()Philip Kaufmann
- remove uiInterface.InitMessage() calls from ThreadImport(), as Qt doesn't like them getting called out of it's main thread and because the thread will continue to run after the GUI was loaded
2012-10-21Tab instead of 4 spaces in makefile.mingwPieter Wuille
2012-10-21Bugfix: do not mark all future coins spentPieter Wuille
2012-10-21Merge pull request #1938 from sipa/v0799Gregory Maxwell
Update version numbers to 0.7.99
2012-10-21Update version numbers to 0.7.99Pieter Wuille
2012-10-20Merge pull request #1916 from jgarzik/caddrdb-bugGregory Maxwell
Fix: CAddrMan: verify pchMessageStart file marker, before reading address data
2012-10-20Merge pull request #1936 from sipa/morehashwriterPieter Wuille
Use CHashWriter also in SignatureHash(), and for message signing
2012-10-20Remove BDB block database supportPieter Wuille
2012-10-20Add gettxout and gettxoutsetinfo RPCsPieter Wuille
2012-10-20Add LevelDB MemEnv supportPieter Wuille
Support LevelDB memory-backed environments, and use them in unit tests.
2012-10-20LevelDB block and coin databasesPieter Wuille
Split off CBlockTreeDB and CCoinsViewDB into txdb-*.{cpp,h} files, implemented by either LevelDB or BDB. Based on code from earlier commits by Mike Hearn in his leveldb branch.
2012-10-20Flush and sync block dataPieter Wuille
2012-10-20Use singleton block tree database instancePieter Wuille
2012-10-20Prepare database format for multi-stage block processingPieter Wuille
This commit adds a status field and a transaction counter to the block indexes.
2012-10-20Automatically reorganize at startup to best known blockPieter Wuille
Given that the block tree database (chain.dat) and the active chain database (coins.dat) are entirely separate now, it becomes legal to swap one with another instance without affecting the other. This commit introduces a check in the startup code that detects the presence of a better chain in chain.dat that has not been activated yet, and does so efficiently (in batch, while reusing the blk???.dat files).
2012-10-20Direct CCoins referencesPieter Wuille
To prevent excessive copying of CCoins in and out of the CCoinsView implementations, introduce a GetCoins() function in CCoinsViewCache with returns a direct reference. The block validation and connection logic is updated to require caching CCoinsViews, and exploits the GetCoins() function heavily.
2012-10-20Transaction hash cachingPieter Wuille
Use CBlock's vMerkleTree to cache transaction hashes, and pass them along as argument in more function calls. During initial block download, this results in every transaction's hash to be only computed once.
2012-10-20Batch block connection during IBDPieter Wuille
During the initial block download (or -loadblock), delay connection of new blocks a bit, and perform them in a single action. This reduces the load on the database engine, as subsequent blocks often update an earlier block's transaction already.
2012-10-20UltraprunePieter Wuille
This switches bitcoin's transaction/block verification logic to use a "coin database", which contains all unredeemed transaction output scripts, amounts and heights. The name ultraprune comes from the fact that instead of a full transaction index, we only (need to) keep an index with unspent outputs. For now, the blocks themselves are kept as usual, although they are only necessary for serving, rescanning and reorganizing. The basic datastructures are CCoins (representing the coins of a single transaction), and CCoinsView (representing a state of the coins database). There are several implementations for CCoinsView. A dummy, one backed by the coins database (coins.dat), one backed by the memory pool, and one that adds a cache on top of it. FetchInputs, ConnectInputs, ConnectBlock, DisconnectBlock, ... now operate on a generic CCoinsView. The block switching logic now builds a single cached CCoinsView with changes to be committed to the database before any changes are made. This means no uncommitted changes are ever read from the database, and should ease the transition to another database layer which does not support transactions (but does support atomic writes), like LevelDB. For the getrawtransaction() RPC call, access to a txid-to-disk index would be preferable. As this index is not necessary or even useful for any other part of the implementation, it is not provided. Instead, getrawtransaction() uses the coin database to find the block height, and then scans that block to find the requested transaction. This is slow, but should suffice for debug purposes.
2012-10-20Pre-allocate block and undo files in chunksPieter Wuille
Introduce a AllocateFileRange() function in util, which wipes or at least allocates a given range of a file. It can be overriden by more efficient OS-dependent versions if necessary. Block and undo files are now allocated in chunks of 16 and 1 MiB, respectively.
2012-10-20Multiple blocks per filePieter Wuille
Change the block storage layer again, this time with multiple files per block, but tracked by txindex.dat database entries. The file format is exactly the same as the earlier blk00001.dat, but with smaller files (128 MiB for now). The database entries track how many bytes each block file already uses, how many blocks are in it, which range of heights is present and which range of dates.
2012-10-20Preliminary undo file creationPieter Wuille
Create files (one per block) with undo information for the transactions in it.
2012-10-20One file per blockPieter Wuille
Refactor of the block storage code, which now stores one file per block. This will allow easier pruning, as blocks can be removed individually.
2012-10-20Add CTxUndo: transaction undo informationPieter Wuille
The CTxUndo class encapsulates data necessary to undo the effects of a transaction on the txout set, namely the previous outputs consumed by it (script + amount), and potentially transaction meta-data when it is spent entirely.
2012-10-20Add CCoins: pruned list of transaction outputsPieter Wuille
The CCoins class represents a pruned set of transaction outputs from a given transaction. It only retains information about its height in the block chain, whether it was a coinbase transaction, and its unspent outputs (script + amount). It has a custom serializer that has very low redundancy.
2012-10-20Compact serialization for amountsPieter Wuille
Special serializer/deserializer for amount values. It is optimized for values which have few non-zero digits in decimal representation. Most amounts currently in the txout set take only 1 or 2 bytes to represent.