aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2015-10-09Merge pull request #6779Wladimir J. van der Laan
b22692c build: Make use of ZMQ_CFLAGS (Cory Fields)
2015-10-09Merge pull request #6770Wladimir J. van der Laan
b2af29b Ignore bench_bitcoin binary. (Pavel Janík)
2015-10-08build: Make use of ZMQ_CFLAGSCory Fields
2015-10-07Merge pull request #6720Wladimir J. van der Laan
1534d9a Creates unittests for addrman, makes addrman testable. Adds several unittests for addrman to verify it works as expected. Makes small modifications to addrman to allow deterministic and targeted tests. (EthanHeilman)
2015-10-07Merge pull request #6769Wladimir J. van der Laan
b196b68 Test LowS in standardness, removes nuisance malleability vector. (Gregory Maxwell)
2015-10-06Merge pull request #6650Wladimir J. van der Laan
42cb388 Add chainstate obfuscation to avoid spurious antivirus detection (James O'Beirne)
2015-10-06Ignore bench_bitcoin binary.Pavel Janík
2015-10-06Add chainstate obfuscation to avoid spurious antivirus detectionJames O'Beirne
Adds an `obfuscate` parameter to `CLevelDBWrapper` and makes use of it for all new chainstate stores built via `CCoinsViewDB`. Also adds an `Xor` method to `CDataStream`. Thanks to @sipa @laanwj @pstratem @dexX7 @KyrosKrane @gmaxwell.
2015-10-06Merge pull request #6733Wladimir J. van der Laan
7072c54 Support very-fast-running benchmarks (Gavin Andresen) 535ed92 Simple benchmarking framework (Gavin Andresen)
2015-10-06Merge pull request #6742Wladimir J. van der Laan
58981d4 Changed logging to make -logtimestamps to work also for -printtoconsole (Arne Brutschy)
2015-10-06Test LowS in standardness, removes nuisance malleability vector.Gregory Maxwell
This adds SCRIPT_VERIFY_LOW_S to STANDARD_SCRIPT_VERIFY_FLAGS which will make the node require the canonical 'low-s' encoding for ECDSA signatures when relaying or mining. Consensus behavior is unchanged. The rational is explained in a81cd96805ce6b65cca3a40ebbd3b2eb428abb7b: Absent this kind of test ECDSA is not a strong signature as given a valid signature {r, s} both that value and {r, -s mod n} are valid. These two encodings have different hashes allowing third parties a vector to change users txids. These attacks are avoided by picking a particular form as canonical and rejecting the other form(s); in the of the LOW_S rule, the smaller of the two possible S values is used. If widely deployed this change would eliminate the last remaining known vector for nuisance malleability on boring SIGHASH_ALL p2pkh transactions. On the down-side it will block most transactions made by sufficiently out of date software. Unlike the other avenues to change txids on boring transactions this one was randomly violated by all deployed bitcoin software prior to its discovery. So, while other malleability vectors where made non-standard as soon as they were discovered, this one has remained permitted. Even BIP62 did not propose applying this rule to old version transactions, but conforming implementations have become much more common since BIP62 was initially written. Bitcoin Core has produced compatible signatures since a28fb70e in September 2013, but this didn't make it into a release until 0.9 in March 2014; Bitcoinj has done so for a similar span of time. Bitcoinjs and electrum have been more recently updated. This does not replace the need for BIP62 or similar, as miners can still cooperate to break transactions. Nor does it replace the need for wallet software to handle malleability sanely[1]. This only eliminates the cheap and irritating DOS attack. [1] On the Malleability of Bitcoin Transactions Marcin Andrychowicz, Stefan Dziembowski, Daniel Malinowski, Łukasz Mazurek http://fc15.ifca.ai/preproceedings/bitcoin/paper_9.pdf
2015-10-01Accept any sequence of PUSHDATAs in OP_RETURN outputsPeter Todd
Previously only one PUSHDATA was allowed, needlessly limiting applications such as matching OP_RETURN contents with bloom filters that operate on a per-PUSHDATA level. Now any combination that passes IsPushOnly() is allowed, so long as the total size of the scriptPubKey is less than 42 bytes. (unchanged modulo non-minimal PUSHDATA encodings) Also, this fixes the odd bug where previously the PUSHDATA could be replaced by any single opcode, even sigops consuming opcodes such as CHECKMULTISIG. (20 sigops!)
2015-10-01Add IsPushOnly(const_iterator pc)Peter Todd
Allows IsPushOnly() to be applied to just part of the script for OP_RETURN outputs.
2015-10-01Make TX_SCRIPTHASH clear vSolutionsRet firstPeter Todd
Previously unlike other transaction types the TX_SCRIPTHASH would not clear vSolutionsRet, which means that unlike other transaction types if it was called twice in a row you would get the result of the previous invocation as well.
2015-10-01Merge pull request #6637Wladimir J. van der Laan
95acf3c remove $(@F) and subdirs from univalue make (Jonas Schnelli) 9623e93 [Univalue] add univalue over subtree (Jonas Schnelli) 2f9f082 Squashed 'src/univalue/' content from commit 87d9045 (Jonas Schnelli) 0917306 remove univalue, prepare for subtree (Jonas Schnelli)
2015-10-01remove $(@F) and subdirs from univalue makeJonas Schnelli
2015-10-01Merge pull request #5987Wladimir J. van der Laan
e761d7a Bugfix: Allow mining on top of old tip blocks for testnet (fixes testnet-in-a-box use case) (Luke Dashjr)
2015-10-01Merge pull request #6588Jeff Garzik
2015-10-01Merge pull request #5924Wladimir J. van der Laan
835c122 Clean up change computation in CreateTransaction. (Daniel Kraft)
2015-10-01[Univalue] add univalue over subtreeJonas Schnelli
similar to secp256k1 include and compile univalue over a subtree
2015-10-01Merge commit '2f9f082b5ef3c495c70598ef23383effef675f9a' as 'src/univalue'Jonas Schnelli
2015-10-01remove univalue, prepare for subtreeJonas Schnelli
2015-09-30Changed logging to make -logtimestamps to work also for -printtoconsoleArne Brutschy
2015-09-30Support very-fast-running benchmarksGavin Andresen
Avoid calling gettimeofday every time through the benchmarking loop, by keeping track of how long each loop takes and doubling the number of iterations done between time checks when they take less than 1/16'th of the total elapsed time.
2015-09-30Simple benchmarking frameworkGavin Andresen
Benchmarking framework, loosely based on google's micro-benchmarking library (https://github.com/google/benchmark) Wny not use the Google Benchmark framework? Because adding Even More Dependencies isn't worth it. If we get a dozen or three benchmarks and need nanosecond-accurate timings of threaded code then switching to the full-blown Google Benchmark library should be considered. The benchmark framework is hard-coded to run each benchmark for one wall-clock second, and then spits out .csv-format timing information to stdout. It is left as an exercise for later (or maybe never) to add command-line arguments to specify which benchmark(s) to run, how long to run them for, how to format results, etc etc etc. Again, see the Google Benchmark framework for where that might end up. See src/bench/MilliSleep.cpp for a sanity-test benchmark that just benchmarks 'sleep 100 milliseconds.' To compile and run benchmarks: cd src; make bench Sample output: Benchmark,count,min,max,average Sleep100ms,10,0.101854,0.105059,0.103881
2015-09-30Merge pull request #6680Wladimir J. van der Laan
d76a8ac use CBlockIndex* insted of uint256 for UpdatedBlockTip signal (Jonas Schnelli)
2015-09-30Merge pull request #6713Wladimir J. van der Laan
43edd51 SanitizeString: Allow hypen char (MarcoFalke)
2015-09-29Bugfix: Allow mining on top of old tip blocks for testnet (fixes ↵Luke Dashjr
testnet-in-a-box use case)
2015-09-29Merge pull request #6730Wladimir J. van der Laan
a5b78c2 build: Remove dependency of bitcoin-cli on secp256k1 (Wladimir J. van der Laan)
2015-09-29qt: periodic translations updateWladimir J. van der Laan
2015-09-29Merge pull request #6728Wladimir J. van der Laan
9fea833 timedata: Prevent warning overkill (Wladimir J. van der Laan)
2015-09-28http: Force-exit event loop after predefined timeWladimir J. van der Laan
This makes sure that the event loop eventually terminates, even if an event (like an open timeout, or a hanging connection) happens to be holding it up.
2015-09-28http: Wait for worker threads to exitWladimir J. van der Laan
Add a WaitExit() call to http's WorkQueue to make it delete the work queue only when all worker threads stopped. This fixes a problem that was reproducable by pressing Ctrl-C during AppInit2: ``` /usr/include/boost/thread/pthread/condition_variable_fwd.hpp:81: boost::condition_variable::~condition_variable(): Assertion `!ret' failed. /usr/include/boost/thread/pthread/mutex.hpp:108: boost::mutex::~mutex(): Assertion `!posix::pthread_mutex_destroy(&m)' failed. ``` I was assuming that `threadGroup->join_all();` would always have been called when entering the Shutdown(). However this is not the case in bitcoind's AppInit2-non-zero-exit case "was left out intentionally here".
2015-09-28Make HTTP server shutdown more gracefulWladimir J. van der Laan
Shutting down the HTTP server currently breaks off all current requests. This can create a race condition with RPC `stop` command, where the calling process never receives confirmation. This change removes the listening sockets on shutdown so that no new requests can come in, but no longer breaks off requests in progress. Meant to fix #6717.
2015-09-28build: Remove dependency of bitcoin-cli on secp256k1Wladimir J. van der Laan
bitcoin-cli (in contrast to bitcoin-tx, which does signing ops) shouldn't need secp256k1, and indeed it doesn't.
2015-09-27timedata: Prevent warning overkillWladimir J. van der Laan
The "please check your computer's data and time" message when the clock deviates from the network currently generates an overkill of messages: orion@lethe:~/bitcoin$ src/bitcoind Warning: Warning: Please check that your computer's date and time are correct! If your clock is wrong Bitcoin Core will not work properly. In the log: 2015-09-27 16:24:13 *** Warning: Please check that your computer's date and time are correct! If your clock is wrong Bitcoin Core will not work properly. 2015-09-27 16:24:13 Warning: Warning: Please check that your computer's date and time are correct! If your clock is wrong Bitcoin Core will not work properly. Remove one level of 'Warning:' and reduce to one log message.
2015-09-25Merge pull request #5264Wladimir J. van der Laan
af3208b Resolve issue 3166. These changes decode valid SIGHASH types on signatures in assembly (asm) representations of scriptSig scripts. This squashed commit incorporates substantial helpful feedback from jtimon, laanwj, and sipa. (mruddy)
2015-09-24Creates unittests for addrman, makes addrman testable.EthanHeilman
Adds several unittests for addrman to verify it works as expected. Makes small modifications to addrman to allow deterministic and targeted tests.
2015-09-24Merge pull request #6664Wladimir J. van der Laan
51ff777 [trivial] Fix rpc message "help generate" (MarcoFalke) 4c3cab1 [trivial] init cleanup (MarcoFalke)
2015-09-24Merge pull request #6715Wladimir J. van der Laan
60de0d5 Fix mempool package tracking edge case (Suhas Daftuar) 598b25d Add test showing bug in mempool packages (Suhas Daftuar)
2015-09-23Fix mempool package tracking edge caseSuhas Daftuar
CalculateMemPoolAncestors was always looping over a transaction's inputs to find in-mempool parents. When adding a new transaction, this is the correct behavior, but when removing a transaction, we want to use the ancestor set that would be calculated by walking mapLinks (which should in general be the same set, except during a reorg when the mempool is in an inconsistent state, and the mapLinks-based calculation would be the correct one).
2015-09-23Merge pull request #6550Wladimir J. van der Laan
3b33ec8 Avoid duplicate CheckBlock checks (Pieter Wuille) 391dff1 Do not store Merkle branches in the wallet. (Pieter Wuille)
2015-09-23Merge pull request #6653Wladimir J. van der Laan
4dee609 Rename rpcconsole.ui => debugwindow.ui (MarcoFalke) 0d0a2d6 [Qt] Raise debug window when requested (MarcoFalke)
2015-09-23Merge pull request #6645Wladimir J. van der Laan
77c6072 Enable wallet key imports without rescan in pruned mode. (Gregory Maxwell)
2015-09-23Merge pull request #6688Wladimir J. van der Laan
131c23d Fix locking in GetTransaction. (Alex Morcos)
2015-09-23Merge pull request #6148Wladimir J. van der Laan
ae6f957 Enable block relay when pruning (Suhas Daftuar) 0da6ae2 Do not inv old or missing blocks when pruning (Suhas Daftuar)
2015-09-23SanitizeString: Allow hypen charMarcoFalke
2015-09-23Merge pull request #6646Wladimir J. van der Laan
6ecaec3 [Trivial] [logging] Rm extraneous cleansubver in serveral debug messages. (Gregory Maxwell)
2015-09-23Rename rpcconsole.ui => debugwindow.uiMarcoFalke
2015-09-23[Qt] Raise debug window when requestedMarcoFalke
* Raise the debug window when hidden behind other windows * Switch to the debug window when on another virtual desktop * Show the debug window when minimized This change is a conceptual copy of 5ffaaba and 382e9e2