aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
AgeCommit message (Collapse)Author
2014-07-31Merge pull request #4497Pieter Wuille
714a3e6 Only keep setBlockIndexValid entries that are possible improvements (Pieter Wuille)
2014-07-27Rework block processing benchmark codePieter Wuille
* Replace -benchmark (and the related fBenchmark) with a regular debug option, -debug=bench. * Increase coverage and granularity of individual block processing steps. * Add cummulative times.
2014-07-24Merge pull request #4496Wladimir J. van der Laan
5734d4d Only remove actualy failed blocks from setBlockIndexValid (Pieter Wuille)
2014-07-21Revert "Relay double-spends, subject to anti-DOS"Wladimir J. van der Laan
This reverts commit d640a3ceab4f4372c2a0f738c1286cfde4b41b50.
2014-07-21Revert "Formatting, spelling, comment fixes."Wladimir J. van der Laan
This reverts commit 7a19efe04069d9a1e251cdc94b25184f76d9d901.
2014-07-21Revert "Check signatures before respend relay"Wladimir J. van der Laan
This reverts commit 88dd3598d22197a22565e524cecdc08107cf76ac.
2014-07-21Revert "Remove signal DoubleSpendDetected, use function"Wladimir J. van der Laan
This reverts commit 0da6b3fd187da3aa810aaa584d8bd197ad4fa2b9.
2014-07-18Introduce option to disable relay/mining of bare multisig scripts in TX outputsJeff Garzik
First and foremost, this defaults to OFF. This option lets a node consider such transactions non-standard, meaning they will not be relayed or mined by default, but other miners are free to mine these as usual.
2014-07-17Merge pull request #4533Wladimir J. van der Laan
43005cf Fix semantic typo in state.CorruptionPossible check (kazcw)
2014-07-15Merge pull request #4505Wladimir J. van der Laan
d4d3fbd Do not flush the cache after every block outside of IBD (Pieter Wuille)
2014-07-14Fix semantic typo in state.CorruptionPossible checkkazcw
state.Invalid() is always false, check should be IsInvalid() Broken since 942b33a
2014-07-14Merge pull request #4400Wladimir J. van der Laan
4eedf4f make RandAddSeed() use OPENSSL_cleanse() (Philip Kaufmann) 6354935 move rand functions from util to new random.h/.cpp (Philip Kaufmann) 001a53d add GetRandBytes() as wrapper for RAND_bytes() (Philip Kaufmann)
2014-07-14Merge pull request #4378Wladimir J. van der Laan
dc942e6 Introduce whitelisted peers. (Pieter Wuille)
2014-07-11Do not flush the cache after every block outside of IBDPieter Wuille
2014-07-11Only keep setBlockIndexValid entries that are possible improvementsPieter Wuille
2014-07-11getblocktemplate: longpolling supportLuke Dashjr
2014-07-09Introduce whitelisted peers.Pieter Wuille
This adds a -whitelist option to specify subnet ranges from which peers that connect are whitelisted. In addition, there is a -whitebind option which works like -bind, except peers connecting to it are also whitelisted (allowing a separate listen port for trusted connections). Being whitelisted has two effects (for now): * They are immune to DoS disconnection/banning. * Transactions they broadcast (which are valid) are always relayed, even if they were already in the mempool. This means that a node can function as a gateway for a local network, and that rebroadcasts from the local network will work as expected. Whitelisting replaces the magic exemption localhost had for DoS disconnection (local addresses are still never banned, though), which implied hidden service connects (from a localhost Tor node) were incorrectly immune to DoS disconnection as well. This old behaviour is removed for that reason, but can be restored using -whitelist=127.0.0.1 or -whitelist=::1 can be specified. -whitebind is safer to use in case non-trusted localhost connections are expected (like hidden services).
2014-07-09Only remove actualy failed blocks from setBlockIndexValidPieter Wuille
2014-07-09add GetRandBytes() as wrapper for RAND_bytes()Philip Kaufmann
- add a small wrapper in util around RAND_bytes() and replace with GetRandBytes() in the code to log errors from calling RAND_bytes() - remove OpenSSL header rand.h where no longer needed
2014-07-07Merge pull request #4471Wladimir J. van der Laan
40f5cb8 Send rejects and apply DoS scoring for errors in direct block validation. (Pieter Wuille)
2014-07-07Merge pull request #4446Wladimir J. van der Laan
209377a Use GetBlockTime() more (jtimon)
2014-07-07Merge pull request #4470Wladimir J. van der Laan
f4b00be Add CChain::GetLocator() unit test (Pieter Wuille) 3c85d2e Fix CChain::GetLocator (Pieter Wuille)
2014-07-07Use GetBlockTime() morejtimon
2014-07-07Merge pull request #4472Wladimir J. van der Laan
9f4da19 Use pong receive time rather than processing time (Pieter Wuille)
2014-07-06Use pong receive time rather than processing timePieter Wuille
2014-07-06Send rejects and apply DoS scoring for errors in direct block validation.Pieter Wuille
75f51f2a introduced asynchronous processing for blocks, where reject messages and DoS scoring could be applied outside of ProcessBlock, because block validation may happen later. However, some types of errors are still detected immediately (in particular, CheckBlock violations), which need acting after ProcessBlock returns.
2014-07-06Fix CChain::GetLocatorPieter Wuille
2014-07-04Merge pull request #3764Wladimir J. van der Laan
2e36866 Show nodeid instead of addresses (for anonymity) unless otherwise requested. (R E Broadley)
2014-07-04Merge pull request #4450Wladimir J. van der Laan
0da6b3f Remove signal DoubleSpendDetected, use function (Tom Harding) 88dd359 Check signatures before respend relay (Tom Harding)
2014-07-04Show nodeid instead of addresses (for anonymity) unless otherwise requested.R E Broadley
2014-07-03Move fee policy out of coreGavin Andresen
2014-07-03Sanity checks for estimatesGavin Andresen
Require at least 11 samples before giving fee/priority estimates. And have wallet-created transactions go throught the fee-sanity-check code path.
2014-07-03Use fee/priority estimates in wallet CreateTransactionGavin Andresen
The wallet now uses the mempool fee estimator with a new command-line option: -txconfirmtarget (default: 1) instead of using hard-coded fees or priorities. A new bitcoind that hasn't seen enough transactions to estimate will fall back to the old hard-coded minimum priority or transaction fee. -paytxfee option overrides -txconfirmtarget. Relaying and mining code isn't changed. For Qt, the coin control dialog now uses priority estimates to label transaction priority (instead of hard-coded constants); unspent outputs were consistently labeled with a much higher priority than is justified by the free transactions actually being accepted into blocks. I did not implement any GUI for setting -txconfirmtarget; I would suggest getting rid of the "Pay transaction fee" GUI and replace it with either "target number of confirmations" or maybe a "faster confirmation <--> lower fee" slider or select box.
2014-07-02Remove signal DoubleSpendDetected, use functionTom Harding
Also removes the need for forward reference to RelayableRespend.
2014-07-01Check signatures before respend relayTom Harding
Check that all inputs are completely valid before actually relaying a double-spend.
2014-06-30Merge pull request #3883 from dgenr8/first_double_spendGavin Andresen
Relay and alert user to double spends
2014-06-29Add a skiplist to the CBlockIndex structure.Pieter Wuille
This allows fast (O(log n)) access to far predecessor blocks. Use it to speed up CChain::FindFork and CChain::GetLocator.
2014-06-29Track peers' available blocksPieter Wuille
2014-06-28Merge pull request #4436Wladimir J. van der Laan
675bcd5 Correct comment for 15-of-15 p2sh script size (Michael Ford)
2014-06-28Merge pull request #4425Wladimir J. van der Laan
6ecf3ed Display unknown commands received. (R E Broadley)
2014-06-28Merge pull request #4398Wladimir J. van der Laan
86fe1b8 update coding.md to reflect changes by pull (Philip Kaufmann) e10dcf2 ensure clean and consistent "namespace" usage (Philip Kaufmann)
2014-06-28Correct comment for 15-of-15 p2sh script sizeMichael Ford
The original comment forgets to account for the script push which will need an OP_PUSHDATA2 + 2-bytes for the 513 script bytes. props davecgh fixes #4224
2014-06-28Display unknown commands received.R E Broadley
2014-06-28Show only one zero instead of many when getblocks request received with a ↵R E Broadley
hashStop of uint256(0)
2014-06-27Formatting, spelling, comment fixes.Tom Harding
2014-06-27Relay double-spends, subject to anti-DOSTom Harding
Allows network wallets and other clients to see transactions that respend a prevout already spent in an unconfirmed transaction in this node's mempool. Knowledge of an attempted double-spend is of interest to recipients of the first spend. In some cases, it will allow these recipients to withhold goods or services upon being alerted of a double-spend that deprives them of payment. As before, respends are not added to the mempool. Anti-Denial-of-Service-Attack provisions: - Use a bloom filter to relay only one respend per mempool prevout - Rate-limit respend relays to a default of 100 thousand bytes/minute - Define tx2.IsEquivalentTo(tx1): equality when scriptSigs are not considered - Do not relay these equivalent transactions Remove an unused variable declaration in txmempool.cpp.
2014-06-27Merge pull request #4365 from gavinandresen/relax_isstandardGavin Andresen
Relax IsStandard rules for pay-to-script-hash transactions
2014-06-26JSON-RPC method: prioritisetransaction <txid> <priority delta> <priority tx fee>Luke Dashjr
Accepts the transaction into mined blocks at a higher (or lower) priority
2014-06-26ensure clean and consistent "namespace" usagePhilip Kaufmann
- remove some missplaced ; - ensure end of a namespace is clearly visible - use same formatting when using namespace
2014-06-23Refactor proof of work related functions out of mainjtimon