summaryrefslogtreecommitdiff
path: root/b6/be0a6b306c9fea8563fafdf1c5bf7ca34fe08d
blob: 8139fc3068d9af5183fbd14d5896adb218308a37 (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
Return-Path: <tamas@bitsofproof.com>
Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org
	[172.17.192.35])
	by mail.linuxfoundation.org (Postfix) with ESMTPS id 662A38A7
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Fri, 14 Aug 2015 16:54:57 +0000 (UTC)
X-Greylist: delayed 00:16:53 by SQLgrey-1.7.6
Received: from wp059.webpack.hosteurope.de (wp059.webpack.hosteurope.de
	[80.237.132.66])
	by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 9F17522C
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Fri, 14 Aug 2015 16:54:55 +0000 (UTC)
Received: from [81.0.112.130] (helo=[192.168.0.106]); authenticated
	by wp059.webpack.hosteurope.de running ExIM with esmtpsa
	(TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	id 1ZQHzT-0000PP-4d; Fri, 14 Aug 2015 18:37:59 +0200
Content-Type: multipart/signed;
	boundary="Apple-Mail=_D85D2123-6AF8-47A1-B6AE-EA5A82853EE2";
	protocol="application/pgp-signature"; micalg=pgp-sha512
Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2102\))
X-Pgp-Agent: GPGMail 2.5
From: Tamas Blummer <tamas@bitsofproof.com>
In-Reply-To: <D018B1B0-B613-4C05-84BB-02CE6E2FEA3E@me.com>
Date: Fri, 14 Aug 2015 18:37:57 +0200
Message-Id: <499C1F46-5EB8-4846-86B6-0B3F2E02D972@bitsofproof.com>
References: <09C8843E-8379-404D-8357-05BDB1F749C1@me.com>
	<CADZB0_YvvDDq4XzfvQeeWJ2oZxPukP0oXYSrEeC3gy9_Fk0ZuA@mail.gmail.com>
	<D018B1B0-B613-4C05-84BB-02CE6E2FEA3E@me.com>
To: bitcoin-dev@lists.linuxfoundation.org
X-Mailer: Apple Mail (2.2102)
X-bounce-key: webpack.hosteurope.de; tamas@bitsofproof.com; 1439571295;
	0b8e01bc; 
X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW
	autolearn=ham version=3.3.1
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
	smtp1.linux-foundation.org
Subject: [bitcoin-dev] libconsensus assertion fails if used in multiple
	threads
X-BeenThere: bitcoin-dev@lists.linuxfoundation.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Bitcoin Development Discussion <bitcoin-dev.lists.linuxfoundation.org>
List-Unsubscribe: <https://lists.linuxfoundation.org/mailman/options/bitcoin-dev>,
	<mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=unsubscribe>
List-Archive: <http://lists.linuxfoundation.org/pipermail/bitcoin-dev/>
List-Post: <mailto:bitcoin-dev@lists.linuxfoundation.org>
List-Help: <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=help>
List-Subscribe: <https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev>,
	<mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=subscribe>
X-List-Received-Date: Fri, 14 Aug 2015 16:54:57 -0000


--Apple-Mail=_D85D2123-6AF8-47A1-B6AE-EA5A82853EE2
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8

We integrated libconsensus into bits of proof. It works well, in-line =
for all test cases with our Java engine and is about 50% faster on a =
single thread.

The performance advantage unfortunatelly reverses if libconsensus is =
executed on several threads simultaneously as we do with the Java =
engine, since an error:

	Assertion failed: (pkey !=3D NULL), function CECKey, file =
ecwrapper.cpp, line 96.

arises under that stress.

I guess that the cause is that thread callbacks as advised for OpenSSL =
on https://www.openssl.org/docs/crypto/threads.html are not registered.
Registering those however would require access to OpenSSL functions, not =
exported from the lib.

I=E2=80=99d be thankful for a pointer to a workaround.

Tamas Blummer

--Apple-Mail=_D85D2123-6AF8-47A1-B6AE-EA5A82853EE2
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename=signature.asc
Content-Type: application/pgp-signature;
	name=signature.asc
Content-Description: Message signed with OpenPGP using GPGMail

-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - https://gpgtools.org

iQEcBAEBCgAGBQJVzhlmAAoJEPZykcUXcTkcuukH/32A1jeyEb305yJH/pv0fiJC
TlROamqF3QWiWZsvaAu/3+aOOKXKjd0Vxa9T7rW7+xIKpiQbFDu8671SSU/JNCsi
Uisl52oABWU6Q21KoW76KhVJD4Nb70b5796RBTQfAPWtnZSSARKfLKxFBJNBvjMm
L/9DfA8vHHF0Mdi7DxDvyWLdyzH3Gt3qDjdtnbJpCzP/OkABlVTjQjuOQsX1ZqTY
ojMPpsCr1m2OCCdETBgTfTzYdPtNJ4u9SoMIlbRrk3KzY2Sf0ZqxUETyI+Ux8czG
qcJla1YSyLpqjNg/e866WUTrDm/BRtFRS51bxu4Vr4GZcBe3gauAj2YddkqSxIE=
=P9xg
-----END PGP SIGNATURE-----

--Apple-Mail=_D85D2123-6AF8-47A1-B6AE-EA5A82853EE2--