summaryrefslogtreecommitdiff
path: root/cb/a42c605effcad3e295539eb06aceb633838429
blob: 1a9a3fbcd5cb360e7e036779864bee4295079c21 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194]
	helo=mx.sourceforge.net)
	by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76)
	(envelope-from <pw@vps7135.xlshosting.net>) id 1SDxQ3-0000GH-Ba
	for bitcoin-development@lists.sourceforge.net;
	Sat, 31 Mar 2012 12:28:35 +0000
X-ACL-Warn: 
Received: from vps7135.xlshosting.net ([178.18.90.41])
	by sog-mx-4.v43.ch3.sourceforge.com with esmtp (Exim 4.76)
	id 1SDxQ2-0007Ai-Ew for bitcoin-development@lists.sourceforge.net;
	Sat, 31 Mar 2012 12:28:35 +0000
Received: by vps7135.xlshosting.net (Postfix, from userid 1000)
	id 8BBCA614C2; Sat, 31 Mar 2012 14:28:28 +0200 (CEST)
Date: Sat, 31 Mar 2012 14:28:28 +0200
From: Pieter Wuille <pieter.wuille@gmail.com>
To: Michael =?iso-8859-1?Q?Gr=F8nager?= <gronager@mac.com>
Message-ID: <20120331122827.GA15726@vps7135.xlshosting.net>
References: <201203310003.18599.luke@dashjr.org>
	<20120331105401.GA14117@vps7135.xlshosting.net>
	<FF86C935-B407-4983-BCB2-61A79DAF8DB8@mac.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
In-Reply-To: <FF86C935-B407-4983-BCB2-61A79DAF8DB8@mac.com>
X-PGP-Key: http://sipa.ulyssis.org/pubkey.asc
User-Agent: Mutt/1.5.20 (2009-06-14)
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 1.2 (+)
X-Spam-Report: Spam Filtering performed by mx.sourceforge.net.
	See http://spamassassin.org/tag/ for more details.
	0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider
	(pieter.wuille[at]gmail.com)
	0.0 DKIM_ADSP_CUSTOM_MED   No valid author signature, adsp_override is
	CUSTOM_MED
	-0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay
	domain 1.2 NML_ADSP_CUSTOM_MED    ADSP custom_med hit,
	and not from a mailing list
X-Headers-End: 1SDxQ2-0007Ai-Ew
Cc: bitcoin-development@lists.sourceforge.net
Subject: Re: [Bitcoin-development] 0.7 merge recommendations/status
X-BeenThere: bitcoin-development@lists.sourceforge.net
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <bitcoin-development.lists.sourceforge.net>
List-Unsubscribe: <https://lists.sourceforge.net/lists/listinfo/bitcoin-development>,
	<mailto:bitcoin-development-request@lists.sourceforge.net?subject=unsubscribe>
List-Archive: <http://sourceforge.net/mailarchive/forum.php?forum_name=bitcoin-development>
List-Post: <mailto:bitcoin-development@lists.sourceforge.net>
List-Help: <mailto:bitcoin-development-request@lists.sourceforge.net?subject=help>
List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/bitcoin-development>,
	<mailto:bitcoin-development-request@lists.sourceforge.net?subject=subscribe>
X-List-Received-Date: Sat, 31 Mar 2012 12:28:35 -0000

On Sat, Mar 31, 2012 at 01:16:56PM +0200, Michael Gr=F8nager wrote:
> If you are interested, I could push libcoin to bitcoin (e.g. bitcoin/li=
bcoin) and then you could build bitcoind bitcoin-qt on libcoin.
>=20
> libcoin solved most of the problems you list below. And if you worry ab=
out the copyright/license I am also willing to change that to make it fit=
.

Thanks for that - without a license change it would not be possible to me=
rge anything.

> libcoin have no global thread mutexes and and there is no blocking of t=
he main thread due to rpc methods (except for a sendto), further, e.g. a =
reorganize only locks the main thread for a split second while the final =
commit is done.=20

Yes, I like its design and refactorings a lot, but at the same time it's =
very large change to accept at once. In particular, I'm not entirely conv=
inced yet about its thread-safety. For example, acceptblock is a public m=
ethod, but it seems (i may be missing something) to grab no lock at all u=
ntil setBestBlock or reorganize is called. Is it impossible to call accep=
tBlock twice simultaneously? One may start with a bestblockindex value th=
at gets modified a split second later by a simultaneous call. It may be t=
he case that there are indeed no possibilities for this to happen because=
 of things I'm missing, but although I'm a big fan of well-encapsulated l=
ocks and the use of reader-writer locks, it's hard to verify whether you =
use them enough. My suggestion would be: make each publicly accessible me=
thod of BlockChain grab either a reader lock (if it's a const function) o=
r an upgradable lock, and take a writer lock in each method that actually=
 performs changes.

> The libcoin rpc supports keep_alive and pipelining, runs in its own thr=
ead (but can also run in the same thread as the node) and uses async oper=
ation. Ipv6 is easy to implement in libcoin as the CAddress/Endpoint clas=
s is implemented as a subclass of boost::endpoint, only thing holding bac=
k is deciding on an ipv6 format on IRC, and, I then I would really like t=
o reverse the order of the last 12 bytes in the address db (they are oppo=
site to boost).

Not sure what you mean: the serialized combination of the 32-bit IPv4 add=
ress and 12 bytes padding in CAddress are exactly a bsd socket library in=
6_addr in network byte order. In 0.6.0, CAddress derives from CNetAddr, w=
hich encapsulates these 16 bytes.

--=20
Pieter