Commit graph

73 commits

Author SHA1 Message Date
Pieter Wuille
66b02c93e6 Move external block import to separate thread 2012-10-20 01:54:10 +02:00
Luke Dashjr
814efd6f1f Bugfix: Fix a variety of misspellings 2012-08-01 17:49:51 +00:00
Jeff Garzik
a823faecf1 Merge pull request #1344 from rebroad/AskForTimeFormat
Unless debugging, show a more useful format for the askfors
2012-08-01 09:08:00 -07:00
Matt Corallo
24154ed64b Fix remaining warnings. 2012-07-04 16:40:16 +02:00
R E Broadley
812392d325 Include human readble format for nRequestTime. 2012-07-02 21:45:43 +01:00
Matt Corallo
6d6c2afb2b Change default send buffer to 1Mb. 2012-07-01 04:17:26 +02:00
Jeff Garzik
1006f0707e RPC: add 'getpeerinfo', returning easy-to-retrieve per-CNode data 2012-06-29 17:24:53 -04:00
Matt Corallo
9d6cd04b3b Stop processing messages on full send buffer and dont disconnect.
Also decrease default send/receive buffer sizes from 10 to 5 mb
as this patch makes it easy for a node to fill both instead of
only send.
2012-06-27 15:31:34 +02:00
Gregory Maxwell
817ee0d826 Merge pull request #1174 from sipa/torhs
Tor hidden service support
2012-06-23 19:21:13 -07:00
Pieter Wuille
54ce3bad64 Add -tor and related configuration 2012-06-23 01:11:38 +02:00
Jeff Garzik
d07eaba195 Introduce -debugnet option, thereby quieting some redundant debug messages
Prior to this change, each TX typically generated 3+ debug messages,

	askfor tx 8644cc97480ba1537214   0
	sending getdata: tx 8644cc97480ba1537214
	askfor tx 8644cc97480ba1537214   1339640761000000
	askfor tx 8644cc97480ba1537214   1339640881000000
	CTxMemPool::accept() : accepted 8644cc9748 (poolsz 6857)

After this change, there is only one message for each valid TX received

	CTxMemPool::accept() : accepted 22a73c5d8c (poolsz 42)

and two messages for each orphan tx received

	ERROR: FetchInputs() : 673dc195aa mempool Tx prev not found 1e439346fc
	stored orphan tx 673dc195aa (mapsz 19)

The -debugnet option, or its superset -debug, will restore the full debug
output.
2012-06-22 13:11:57 -04:00
Pieter Wuille
587f929c64 Rework network config settings 2012-05-31 18:12:35 +02:00
Fordy
3a25a2b9b0 Update License in File Headers
I originally created a pull to replace the "COPYING" in crypter.cpp and
crypter.h, but it turned out that COPYING was actually the correct
file.
2012-05-18 22:02:28 +08:00
Jeff Garzik
928d3a011c CAddrDB: Replace BDB-managed addr.dat with internally managed peers.dat 2012-05-16 22:11:19 -04:00
Gregory Maxwell
20f19893cb Merge pull request #1262 from Diapolo/no_double_timestamps
no more double timestamps in debug.log
2012-05-14 18:59:28 -07:00
Pieter Wuille
0f1707de67 -onlynet instead of -blocknet 2012-05-14 17:52:45 +02:00
Philip Kaufmann
0985816bf6 ensure that no double timestamps show up in the debug.log, by removing manual timestamps from the source (now only -logtimestamps parameter adds timestamps to debug.log) 2012-05-13 14:36:35 +02:00
Pieter Wuille
5a3cb32e59 Take -port into account when resolving -bind's 2012-05-13 01:26:14 +02:00
Pieter Wuille
a3878873f3 Merge pull request #1021 from sipa/ipv6
IPv6 node support
2012-05-11 18:23:56 -07:00
Gregory Maxwell
c05271901a Merge pull request #1260 from sipa/splitsync
Split synchronization mechanisms from util.{h,cpp}
2012-05-11 18:05:49 -07:00
Pieter Wuille
c59abe2589 Use semaphores instead of condition variables 2012-05-11 17:02:11 +02:00
Pieter Wuille
8f10a28890 Separate listening sockets, -bind=<addr> 2012-05-11 15:29:20 +02:00
Pieter Wuille
7fa4443f77 Keep port information for local addresses 2012-05-11 15:29:19 +02:00
Pieter Wuille
457754d2c2 Add -blocknet to prevent connections to a given network 2012-05-11 15:29:19 +02:00
Pieter Wuille
090e5b40f1 Limited relaying/storing of foreign addresses
Introduce a boolean variable for each "network" (ipv4, ipv6, tor, i2p),
and track whether we are likely to able to connect to it. Addresses in
"addr" messages outside of our network get limited relaying and are not
stored in addrman.
2012-05-11 15:29:19 +02:00
David Joel Schwartz
e9205293bd Support multi-threaded JSON-RPC
Change internal HTTP JSON-RPC server from single-threaded to
thread-per-connection model.  The IP filter list is applied prior to starting
the thread, which then processes the RPC.

A mutex covers the entire RPC operation, because not all RPC operations are
thread-safe.

[minor modifications by jgarzik, to make change upstream-ready]
2012-05-08 20:11:17 -04:00
Pieter Wuille
19b6958cfd Added -externalip and -discover
-externalip=<ip> can be used to explicitly set the public IP address
of your node. -discover=0 can be used to disable the automatic public
IP discovery system.
2012-05-04 16:12:23 +02:00
Pieter Wuille
39857190de Support for multiple local addresses 2012-05-04 16:12:23 +02:00
Pieter Wuille
478b01d9a7 Add -seednode connections, and use this for -dnsseed + -proxydns 2012-05-04 16:11:54 +02:00
Pieter Wuille
9bab521df8 Support connecting by hostnames passed to proxy (-proxydns) 2012-05-04 16:11:54 +02:00
Pieter Wuille
6b6aaa1698 Further reduce header dependencies
This commit removes the dependency of serialize.h on PROTOCOL_VERSION,
and makes this parameter required instead of implicit. This is much saner,
as it makes the places where changing a version number can have an
influence obvious.
2012-04-17 20:03:42 +02:00
Gavin Andresen
b97d54355e Merge pull request #1106 from jgarzik/sign-compare
Fix many sign-comparison warnings found in bitcoin codebase
2012-04-17 10:55:56 -07:00
Jeff Garzik
0dd710acb6 CNode's nHeaderStart may be negative, so change its type 2012-04-15 16:59:48 -04:00
Jeff Garzik
8b09cd3a4d Replace several network protocol version numbers with named constants
stored in version.h.

Also, a minor CAddress code reformat while we're in there, fixing
some incorrect indentation.
2012-04-12 20:07:49 -04:00
Pieter Wuille
f8dcd5ca6f Use scoped locks instead of CRITICAL_BLOCK 2012-04-09 01:59:46 +02:00
Gavin Andresen
f487746ded Remove half-implemented publish/subscribe system 2012-04-04 15:56:00 -04:00
Pieter Wuille
6b8de05d0a Begin doxygen-compatible comments 2012-03-26 16:48:23 +02:00
Gavin Andresen
a6b4a11385 Merge branch 'addrman' of https://github.com/sipa/bitcoin 2012-03-22 09:19:01 -04:00
Pieter Wuille
c4341fa6ab Add mruset and use it for setInventoryKnown 2012-02-27 21:04:32 +01:00
Pieter Wuille
5fee401fe1 CAddrMan: stochastic address manager
Design goals:
 * Only keep a limited number of addresses around, so that addr.dat does not grow without bound.
 * Keep the address tables in-memory, and occasionally write the table to addr.dat.
 * Make sure no (localized) attacker can fill the entire table with his nodes/addresses.

See comments in addrman.h for more detailed information.
2012-02-24 13:41:04 +01:00
Gavin Andresen
e7e6ae2104 Merge branch 'postfeb20' of https://github.com/sipa/bitcoin 2012-02-22 11:06:44 -05:00
Pieter Wuille
18c0fa97d0 Post-feb20 simplifications
Now the entire network upgraded to (initial) protocol version 209,
crtainl simplifications in the source code are possible.
2012-02-21 20:46:39 +01:00
Pieter Wuille
a3342d096f Fix #626: RecvLine wrong error message
Also moved RecvLine to net.cpp.
2012-02-19 19:06:42 +01:00
Pieter Wuille
c59881eaee Symbolic names for threads
Introduce an enum threadId, and use symbolic indices when accessing
vnThreadsRunning.
2012-02-16 12:43:06 +01:00
Pieter Wuille
88bc5f9485 Macros for manual critical sections 2012-02-11 21:59:33 +01:00
Gavin Andresen
882164196e Update all copyrights to 2012 2012-02-07 11:28:30 -05:00
Gavin Andresen
a1de57a063 Compile with extra warnings turned on. And more makefile/code tidying up.
This turns on most gcc warnings, and removes some unused variables and other code that triggers warnings.
Exceptions are:
 -Wno-sign-compare : triggered by lots of comparisons of signed integer to foo.size(), which is unsigned.
 -Wno-char-subscripts : triggered by the convert-to-hex functions (I may fix this in a future commit).
2012-01-12 20:02:47 -05:00
Pieter Wuille
67a42f929b Network stack refactor
This introduces CNetAddr and CService, respectively wrapping an
(IPv6) IP address and an IP+port combination. This functionality used
to be part of CAddress, which also contains network flags and
connection attempt information. These extra fields are however not
always necessary.

These classes, along with logic for creating connections and doing
name lookups, are moved to netbase.{h,cpp}, which does not depend on
headers.h.

Furthermore, CNetAddr is mostly IPv6-ready, though IPv6
functionality is not yet enabled for the application itself.
2012-01-06 18:55:37 +01:00
Wladimir J. van der Laan
bde280b9a4 Revert "Use standard C99 (and Qt) types for 64-bit integers"
This reverts commit 21d9f36781.
2011-12-21 22:33:19 +01:00
Luke Dashjr
21d9f36781 Use standard C99 (and Qt) types for 64-bit integers 2011-12-20 16:52:59 -05:00