libconsensus assertion fails if used in multiple threads



Summary:

Tamas Blummer has confirmed that libconsensus is working correctly within the Bits of Proof stack, in line with test cases borrowed from Bitcoin Core to verify the Java implementation of the script engine. He found that the performance of libconsensus is surprisingly close to the java version, and that validating a 2-of-2 a multi-sig transaction runs at 1021 ops/sec with java and 1135 ops/sec in libconsensus. Tamas Blummer also disagreed that the problem was rare in the real-world, stating it should affect any modern implementation that validates transactions parallel in multiple threads. Cory Fields managed to reproduce the issue on an OSX operating system, and prepared a patch for anyone who may run into the issue in the short-term. Corey Fields also stated that since Bitcoin Core and libbitcoinconsensus are switching away from OpenSSL for verification in the near future, he does not think this is much of an issue. Meanwhile, Tamas Blummer is unsure when secp256k1 integration will be added.


Updated on: 2023-06-10T19:30:54.425726+00:00