Re: [bitcoin-dev] libconsensus assertion fails if used in multiple threads

2015-08-18 Thread Eric Voskuil via bitcoin-dev
On 08/18/2015 03:31 AM, Tamas Blummer via bitcoin-dev wrote: > The performance of libconsensus is surprisingly close to the java one. ... > Another nice demonstration why one should not trade in advances > of languages for the last decades for a marginal gain of performance > with C/C++... If per

Re: [bitcoin-dev] libconsensus assertion fails if used in multiple threads

2015-08-18 Thread Cory Fields via bitcoin-dev
Pull request submitted: https://github.com/bitcoin/bitcoin/pull/6571 Regards, Cory On Tue, Aug 18, 2015 at 1:25 PM, Cory Fields wrote: > See responses inline. > > On Tue, Aug 18, 2015 at 6:31 AM, Tamas Blummer wrote: >> Thanks a lot Cory for following through the test case and producing a patch

Re: [bitcoin-dev] libconsensus assertion fails if used in multiple threads

2015-08-18 Thread Cory Fields via bitcoin-dev
See responses inline. On Tue, Aug 18, 2015 at 6:31 AM, Tamas Blummer wrote: > Thanks a lot Cory for following through the test case and producing a patch. > > I confirm that libconsensus is now running stable within the Bits of Proof > stack, > in-line with test cases we use to verify the java im

Re: [bitcoin-dev] libconsensus assertion fails if used in multiple threads

2015-08-18 Thread Tamas Blummer via bitcoin-dev
Thanks a lot Cory for following through the test case and producing a patch. I confirm that libconsensus is now running stable within the Bits of Proof stack, in-line with test cases we use to verify the java implementation of the script engine, that are BTW borrowed from Bitcoin Core. The perf

Re: [bitcoin-dev] libconsensus assertion fails if used in multiple threads

2015-08-17 Thread Cory Fields via bitcoin-dev
Back to the list (from github) in case anyone finds this via Google. The patch that I posted here a few days ago did not fix the issue for Tamas. I spent some time tracking down this edge-case because libbitcoinconsensus needs to be as bullet-proof as possible. Thanks to Tamas for creating a bare

Re: [bitcoin-dev] libconsensus assertion fails if used in multiple threads

2015-08-14 Thread Cory Fields via bitcoin-dev
Ugh, what an unfortunate oversight! The good news is that this issue should be solved in future versions when we switch to the new libsecp256k1 lib for validation. For now, I've thrown together a quick hack to allow a user-specifiable callback for libbitcoinconsensus. I think it's not worth messi

[bitcoin-dev] libconsensus assertion fails if used in multiple threads

2015-08-14 Thread Tamas Blummer via bitcoin-dev
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,