aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
| * | add GetRandBytes() as wrapper for RAND_bytes()Philip Kaufmann2014-07-091-1/+1
| |/ | | | | | | | | | | - 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
* | Merge pull request #4378Wladimir J. van der Laan2014-07-141-5/+14
|\ \ | | | | | | | | | dc942e6 Introduce whitelisted peers. (Pieter Wuille)
| * | Introduce whitelisted peers.Pieter Wuille2014-07-091-5/+14
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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).
* / getblocktemplate: longpolling supportLuke Dashjr2014-07-111-0/+5
|/
* Merge pull request #4471Wladimir J. van der Laan2014-07-071-0/+10
|\ | | | | | | 40f5cb8 Send rejects and apply DoS scoring for errors in direct block validation. (Pieter Wuille)
| * Send rejects and apply DoS scoring for errors in direct block validation.Pieter Wuille2014-07-061-0/+10
| | | | | | | | | | | | | | | | | | 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.
* | Merge pull request #4446Wladimir J. van der Laan2014-07-071-4/+4
|\ \ | | | | | | | | | 209377a Use GetBlockTime() more (jtimon)
| * | Use GetBlockTime() morejtimon2014-07-071-4/+4
| | |
* | | Merge pull request #4470Wladimir J. van der Laan2014-07-071-8/+6
|\ \ \ | |/ / |/| | | | | | | | f4b00be Add CChain::GetLocator() unit test (Pieter Wuille) 3c85d2e Fix CChain::GetLocator (Pieter Wuille)
| * | Fix CChain::GetLocatorPieter Wuille2014-07-061-8/+6
| |/
* | Merge pull request #4472Wladimir J. van der Laan2014-07-071-3/+3
|\ \ | |/ |/| | | 9f4da19 Use pong receive time rather than processing time (Pieter Wuille)
| * Use pong receive time rather than processing timePieter Wuille2014-07-061-3/+3
| |
* | Merge pull request #3764Wladimir J. van der Laan2014-07-041-17/+17
|\ \ | | | | | | | | | 2e36866 Show nodeid instead of addresses (for anonymity) unless otherwise requested. (R E Broadley)
| * | Show nodeid instead of addresses (for anonymity) unless otherwise requested.R E Broadley2014-07-041-17/+17
| |/
* | Merge pull request #4450Wladimir J. van der Laan2014-07-041-63/+61
|\ \ | | | | | | | | | | | | 0da6b3f Remove signal DoubleSpendDetected, use function (Tom Harding) 88dd359 Check signatures before respend relay (Tom Harding)
| * | Remove signal DoubleSpendDetected, use functionTom Harding2014-07-021-56/+47
| | | | | | | | | | | | Also removes the need for forward reference to RelayableRespend.
| * | Check signatures before respend relayTom Harding2014-07-011-15/+22
| |/ | | | | | | | | Check that all inputs are completely valid before actually relaying a double-spend.
* | Move fee policy out of coreGavin Andresen2014-07-031-10/+8
| |
* | Sanity checks for estimatesGavin Andresen2014-07-031-2/+2
| | | | | | | | | | | | | | Require at least 11 samples before giving fee/priority estimates. And have wallet-created transactions go throught the fee-sanity-check code path.
* | Use fee/priority estimates in wallet CreateTransactionGavin Andresen2014-07-031-9/+4
|/ | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Merge pull request #3883 from dgenr8/first_double_spendGavin Andresen2014-06-301-14/+84
|\ | | | | Relay and alert user to double spends
| * Formatting, spelling, comment fixes.Tom Harding2014-06-271-4/+2
| |
| * Relay double-spends, subject to anti-DOSTom Harding2014-06-271-14/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Add a skiplist to the CBlockIndex structure.Pieter Wuille2014-06-291-1/+58
| | | | | | | | | | This allows fast (O(log n)) access to far predecessor blocks. Use it to speed up CChain::FindFork and CChain::GetLocator.
* | Track peers' available blocksPieter Wuille2014-06-291-0/+46
| |
* | Merge pull request #4436Wladimir J. van der Laan2014-06-281-2/+2
|\ \ | | | | | | | | | 675bcd5 Correct comment for 15-of-15 p2sh script size (Michael Ford)
| * | Correct comment for 15-of-15 p2sh script sizeMichael Ford2014-06-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge pull request #4425Wladimir J. van der Laan2014-06-281-0/+1
|\ \ \ | | | | | | | | | | | | 6ecf3ed Display unknown commands received. (R E Broadley)
| * | | Display unknown commands received.R E Broadley2014-06-281-0/+1
| | |/ | |/|
* | | Merge pull request #4398Wladimir J. van der Laan2014-06-281-4/+7
|\ \ \ | |_|/ |/| | | | | | | | 86fe1b8 update coding.md to reflect changes by pull (Philip Kaufmann) e10dcf2 ensure clean and consistent "namespace" usage (Philip Kaufmann)
| * | ensure clean and consistent "namespace" usagePhilip Kaufmann2014-06-261-4/+7
| | | | | | | | | | | | | | | | | | - remove some missplaced ; - ensure end of a namespace is clearly visible - use same formatting when using namespace
* | | Show only one zero instead of many when getblocks request received with a ↵R E Broadley2014-06-281-1/+1
| |/ |/| | | | | hashStop of uint256(0)
* | Merge pull request #4365 from gavinandresen/relax_isstandardGavin Andresen2014-06-271-20/+23
|\ \ | | | | | | Relax IsStandard rules for pay-to-script-hash transactions
| * | Relax IsStandard rules for pay-to-script-hash transactionsGavin Andresen2014-06-231-20/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Relax the AreInputsStandard() tests for P2SH transactions -- allow any Script in a P2SH transaction to be relayed/mined, as long as it has 15 or fewer signature operations. Rationale: https://gist.github.com/gavinandresen/88be40c141bc67acb247 I don't have an easy way to test this, but the code changes are straightforward and I've updated the AreInputsStandard unit tests.
* | | JSON-RPC method: prioritisetransaction <txid> <priority delta> <priority tx fee>Luke Dashjr2014-06-261-0/+10
| |/ |/| | | | | Accepts the transaction into mined blocks at a higher (or lower) priority
* | Refactor proof of work related functions out of mainjtimon2014-06-231-112/+1
|/
* Code simplifications after CTransaction::GetHash() cachingPieter Wuille2014-06-221-32/+27
|
* Merge pull request #4310Wladimir J. van der Laan2014-06-191-22/+22
|\ | | | | | | 7a9e0b6 Move checkpoint based heuristic checks to AcceptBlockHeader (Pieter Wuille)
| * Move checkpoint based heuristic checks to AcceptBlockHeaderPieter Wuille2014-06-091-22/+22
| |
* | Merge pull request #2784Wladimir J. van der Laan2014-06-121-7/+6
|\ \ | | | | | | | | | f1920e8 Ping automatically every 2 minutes (unconditionally) (Pieter Wuille)
| * | Ping automatically every 2 minutes (unconditionally)Pieter Wuille2014-06-091-7/+6
| | | | | | | | | | | | | | | | | | ... instead of after 30 minutes of no sending, for latency measurement and keep-alive. Also, disconnect if no reply arrives within 20 minutes, instead of 90 of inactivity (for peers supporting the 'pong' message).
* | | small formatting, indentation and comment fixesPhilip Kaufmann2014-06-101-6/+3
|/ / | | | | | | - contains zero code changes
* | Merge pull request #3824Wladimir J. van der Laan2014-06-091-25/+19
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | f0a83fc Use Params().NetworkID() instead of TestNet() from the payment protocol (jtimon) 2871889 net.h was using std namespace through chainparams.h included in protocol.h (jtimon) c8c52de Replace virtual methods with static attributes, chainparams.h depends on protocol.h instead of the other way around (jtimon) a3d946e Get rid of TestNet() (jtimon) 6fc0fa6 Add RPCisTestNet chain parameter (jtimon) cfeb823 Add RequireStandard chain parameter (jtimon) 21913a9 Add AllowMinDifficultyBlocks chain parameter (jtimon) d754f34 Move majority constants to chainparams (jtimon) 8d26721 Get rid of RegTest() (jtimon) cb9bd83 Add DefaultCheckMemPool chain parameter (jtimon) 2595b9a Add DefaultMinerThreads chain parameter (jtimon) bfa9a1a Add MineBlocksOnDemand chain parameter (jtimon) 1712adb Add MiningRequiresPeers chain parameter (jtimon)
| * | Add RequireStandard chain parameterjtimon2014-06-041-2/+2
| | |
| * | Add AllowMinDifficultyBlocks chain parameterjtimon2014-06-041-3/+3
| | |
| * | Move majority constants to chainparamsjtimon2014-06-041-20/+14
| | |
* | | Push cs_mains down in ProcessBlockPieter Wuille2014-06-091-11/+17
| | |
* | | Move all post-chaintip-change notifications to ActivateBestChainPieter Wuille2014-06-091-50/+50
| | |
* | | Allow ActivateBestChain to release its lock on cs_mainPieter Wuille2014-06-091-37/+55
| | |
* | | Get rid of the static chainMostWork (optimization)Pieter Wuille2014-06-091-29/+27
| |/ |/|