aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-01-13Make the cs_sendProcessing a LOCK instead of a TRY_LOCKMatt Corallo
Technically cs_sendProcessing is entirely useless now because it is only ever taken on the one MessageHandler thread, but because there may be multiple of those in the future, it is left in place
2017-01-13Split CNode::cs_vSend: message processing and message sendingMatt Corallo
cs_vSend is used for two purposes - to lock the datastructures used to queue messages to place on the wire and to only call SendMessages once at a time per-node. I believe SendMessages used to access some of the vSendMsg stuff, but it doesn't anymore, so these locks do not need to be on the same mutex, and also make deadlocking much more likely.
2017-01-13Merge #9441: Net: Massive speedup. Net locks overhaulPieter Wuille
e60360e net: remove cs_vRecvMsg (Cory Fields) 991955e net: add a flag to indicate when a node's send buffer is full (Cory Fields) c6e8a9b net: add a flag to indicate when a node's process queue is full (Cory Fields) 4d712e3 net: add a new message queue for the message processor (Cory Fields) c5a8b1b net: rework the way that the messagehandler sleeps (Cory Fields) c72cc88 net: remove useless comments (Cory Fields) ef7b5ec net: Add a simple function for waking the message handler (Cory Fields) f5c36d1 net: record bytes written before notifying the message processor (Cory Fields) 60befa3 net: handle message accounting in ReceiveMsgBytes (Cory Fields) 56212e2 net: set message deserialization version when it's actually time to deserialize (Cory Fields) 0e973d9 net: remove redundant max sendbuffer size check (Cory Fields) 6042587 net: wait until the node is destroyed to delete its recv buffer (Cory Fields) f6315e0 net: only disconnect if fDisconnect has been set (Cory Fields) 5b4a8ac net: make GetReceiveFloodSize public (Cory Fields) e5bcd9c net: make vRecvMsg a list so that we can use splice() (Cory Fields) 53ad9a1 net: fix typo causing the wrong receive buffer size (Cory Fields)
2017-01-12net: remove cs_vRecvMsgCory Fields
vRecvMsg is now only touched by the socket handler thread. The accounting vars (nRecvBytes/nLastRecv/mapRecvBytesPerMsgCmd) are also only used by the socket handler thread, with the exception of queries from rpc/gui. These accesses are not threadsafe, but they never were. This needs to be addressed separately. Also, update comment describing data flow
2017-01-12net: add a flag to indicate when a node's send buffer is fullCory Fields
Similar to the recv flag, but this one indicates whether or not the net's send buffer is full. The socket handler checks the send queue when a new message is added and pauses if necessary, and possibly unpauses after each message is drained from its buffer.
2017-01-12net: add a flag to indicate when a node's process queue is fullCory Fields
Messages are dumped very quickly from the socket handler to the processor, so it's the depth of the processing queue that's interesting. The socket handler checks the process queue's size during the brief message hand-off and pauses if necessary, and the processor possibly unpauses each time a message is popped off of its queue.
2017-01-12net: add a new message queue for the message processorCory Fields
This separates the storage of messages from the net and queued messages for processing, allowing the locks to be split.
2017-01-12net: rework the way that the messagehandler sleepsCory Fields
In order to sleep accurately, the message handler needs to know if _any_ node has more processing that it should do before the entire thread sleeps. Rather than returning a value that represents whether ProcessMessages encountered a message that should trigger a disconnnect, interpret the return value as whether or not that node has more work to do. Also, use a global fProcessWake value that can be set by other threads, which takes precedence (for one cycle) over the messagehandler's decision. Note that the previous behavior was to only process one message per loop (except in the case of a bad checksum or invalid header). That was changed in PR #3180. The only change here in that regard is that the current node now falls to the back of the processing queue for the bad checksum/invalid header cases.
2017-01-12net: remove useless commentsCory Fields
2017-01-12net: Add a simple function for waking the message handlerCory Fields
This may be used publicly in the future
2017-01-12net: record bytes written before notifying the message processorCory Fields
2017-01-12net: handle message accounting in ReceiveMsgBytesCory Fields
This allows locking to be pushed down to only where it's needed Also reuse the current time rather than checking multiple times.
2017-01-12Merge #9525: test: Include tx data in EXTRA_DISTMarcoFalke
fa29736 test: Include tx data in EXTRA_DIST (MarcoFalke)
2017-01-12test: Include tx data in EXTRA_DISTMarcoFalke
2017-01-12Merge #9222: Add 'subtractFeeFromAmount' option to 'fundrawtransaction'.Wladimir J. van der Laan
453bda6 Add 'subtractFeeFromOutputs' option to 'fundrawtransaction'. (Chris Moore)
2017-01-12Merge #9468: [Depends] Dependency updates for 0.14.0Wladimir J. van der Laan
7f1fa99 [depends] native_ds_store 1.1.0 (fanquake) c6347ae [depends] dbus 1.10.14 (fanquake) a4c6da0 [depends] ccache 3.3.3 (fanquake) 6019d21 [depends] FreeType 2.7.1 (fanquake) 4ed6faf [depends] Boost 1.63.0 (fanquake) 8ac1830 [depends] Latest config.guess and config.sub (fanquake)
2017-01-12Merge #9261: Add unstored orphans with rejected parents to recentRejectsWladimir J. van der Laan
dfbe0d5 Add unstored orphans with rejected parents to recentRejects (Alex Morcos)
2017-01-12Merge #8883: Add all standard TXO types to bitcoin-txWladimir J. van der Laan
0c50909 testcases: explicitly specify transaction version 1 (John Newbery) b7e144b Add test cases to test new bitcoin-tx functionality (jnewbery) 61a1534 Add all transaction output types to bitcoin-tx. (jnewbery) 1814b08 add p2sh and segwit options to bitcoin-tx outscript command (Stanislas Marion)
2017-01-12Merge #9472: Disentangle progress estimation from checkpoints and update itWladimir J. van der Laan
df36371 Update estimated transaction count data (Pieter Wuille) e356d9a Shorten variable names and switch to tx/s (Pieter Wuille) 6dd8116 Remove SIGCHECK_VERIFICATION_FACTOR (Pieter Wuille) 3641141 Move tx estimation data out of CCheckPointData (Pieter Wuille) a4bac66 [MOVEONLY] Move progress estimation out of checkpoints (Pieter Wuille)
2017-01-12Merge #9518: Return height of last block pruned by pruneblockchain RPCMarcoFalke
918d1fb Return height of last block pruned by pruneblockchain RPC (Russell Yanofsky)
2017-01-12Merge #9520: Deprecate non-txindex getrawtransaction and better warningMarcoFalke
db904db Deprecate non-txindex getrawtransaction and better warning (Pieter Wuille)
2017-01-12Merge #9416: travis: make distdir before makeMarcoFalke
faaf3ca travis: make distdir before make (MarcoFalke)
2017-01-12Merge #9297: Various RPC help outputs updatedMarcoFalke
54ee3fc RPC help updated (Michael Rotarius)
2017-01-11Deprecate non-txindex getrawtransaction and better warningPieter Wuille
2017-01-11Merge #9507: Fix use-after-free in CTxMemPool::removeConflicts()Pieter Wuille
fe7e593 Fix use-after-free in CTxMemPool::removeConflicts() (Suhas Daftuar)
2017-01-11RPC help updatedMichael Rotarius
2017-01-11Return height of last block pruned by pruneblockchain RPCRussell Yanofsky
Change suggested by Jonas Schnelli <dev@jonasschnelli.ch> in https://github.com/bitcoin/bitcoin/pull/7871#discussion_r95577623
2017-01-11Update estimated transaction count dataPieter Wuille
2017-01-11Shorten variable names and switch to tx/sPieter Wuille
2017-01-11Merge #7871: Manual block file pruning.Wladimir J. van der Laan
afffeea fixup! Add pruneblockchain RPC to enable manual block file pruning. (Russell Yanofsky) 1fc4ec7 Add pruneblockchain RPC to enable manual block file pruning. (mrbandrews)
2017-01-11Merge #9471: [depends] libevent 2.1.7rcWladimir J. van der Laan
8217bd1 [depends] libevent 2.1.7rc (fanquake)
2017-01-11Merge #9506: RFC: Improve style for if indentationWladimir J. van der Laan
74994c6 Improve style w.r.t. if (Pieter Wuille)
2017-01-11Merge #9513: build: fix qt distdir builds (retry)Wladimir J. van der Laan
67ca130 build: fix for out-of-tree/distdir qt builds (Cory Fields)
2017-01-11travis: make distdir before makeMarcoFalke
2017-01-11[depends] native_ds_store 1.1.0fanquake
2017-01-10build: fix for out-of-tree/distdir qt buildsCory Fields
2017-01-11[depends] dbus 1.10.14fanquake
2017-01-11[depends] ccache 3.3.3fanquake
2017-01-11[depends] FreeType 2.7.1fanquake
2017-01-11[depends] Boost 1.63.0fanquake
2017-01-11[depends] Latest config.guess and config.subfanquake
2017-01-10Fix use-after-free in CTxMemPool::removeConflicts()Suhas Daftuar
2017-01-10Improve style w.r.t. ifPieter Wuille
2017-01-10Merge #8811: rpc: Add support for JSON-RPC named argumentsWladimir J. van der Laan
4e7e2e1 Update RPC argument names (John Newbery) 481f289 rpc: Named argument support for bitcoin-cli (Wladimir J. van der Laan) 9adb4e1 rpc: Argument name consistency (Wladimir J. van der Laan) 8d713f7 rpc: Named arguments for rawtransaction calls (Wladimir J. van der Laan) 37a166f rpc: Named arguments for wallet calls (Wladimir J. van der Laan) 78b684f rpc: Named arguments for mining calls (Wladimir J. van der Laan) b8ebc59 rpc: Named arguments for net calls (Wladimir J. van der Laan) 2ca9dcd test: Add test for RPC named arguments (Wladimir J. van der Laan) fba1a61 rpc: Named arguments for misc calls (Wladimir J. van der Laan) 286ec08 rpc: Add 'echo' call for testing (Wladimir J. van der Laan) 495eb44 rpc: Named arguments for blockchain calls (Wladimir J. van der Laan) 6f1c76a rpc: Support named arguments (Wladimir J. van der Laan) 5865d41 authproxy: Add support for RPC named arguments (Wladimir J. van der Laan)
2017-01-10fixup! Add pruneblockchain RPC to enable manual block file pruning.Russell Yanofsky
Extend pruneblockchain RPC to accept block timestamps as well as block indices.
2017-01-10Add pruneblockchain RPC to enable manual block file pruning.mrbandrews
2017-01-10qt: periodic translations updateWladimir J. van der Laan
2017-01-10Update RPC argument namesJohn Newbery
2017-01-10rpc: Named argument support for bitcoin-cliWladimir J. van der Laan
Usage e.g.: $ src/bitcoin-cli -testnet -named echo arg0="dfdf" [ "dfdf" ] Argument conversion also works, for arguments thus flagged in the table in `src/rpc/client.cpp`. $ src/bitcoin-cli -testnet -named echojson arg0="[1,2,3]" [ [ 1, 2, 3 ] ] Unknown parameter (detected server-side): $ src/bitcoin-cli -testnet -named getinfo arg0="dfdf" error code: -8 error message: Unknown named parameter arg0
2017-01-10Merge #9496: Rename lambda argument name to prevent shadowingMarcoFalke
7df5e38 Rename lambda argument name to prevent shadowing. (Pavel Janík)