AntelopeIO / leap

C++ implementation of the Antelope protocol
Other
113 stars 69 forks source link

IF: Verify bls signature of vote while not holding a mutex #2359

Closed heifner closed 3 months ago

heifner commented 3 months ago

Since bls signature verification can take 6-8ms on ci/cd machines (~2ms on i7 or i9 12th gen), perform the verify while not holding a mutex. This reduces the contention on the pending_quorum_certificate mutex.

I believe we still need to do the verify off the net thread, but this is a simple improvement we can get in now.

This PR severely aggravated #2289, so added a fix for that issue.

Resolves #2289

ericpassmore commented 3 months ago

Note:start group: IF category: INTERNALS summary: Reduce lock contention during BLS signature verification. Note:end