changes the parallel backend from OpenMP to nim-taskpools.
add tests to ensure that the library is protected against batch signature forgery / rogue key attacks.
Reminder an Eth2 block contains 3 to 6 messages to verify:
block proposals signatures (always)
randao reveal signatures (always)
attestations signatures (always)
proposer slashings signatures (rare)
attester slashings signatures (rare)
validator exits signatures (optional)
Advantages:
no special compiler required on MacOS (Apple LLVM doesn't support OpenMP and so custom LLVM/GCC compilation via brew is required)
no issues on Windows with OpenMP-less Mingw
OpenMP threads get stuck working and don't sleep fast enough driving up power consumption
nim-taskpools is a small codebase that can be tuned to our performance and energy consumption need.
Disadvantages:
At the moment for parallel batch verification which creates an even workload on all cores,
OpenMP perf is equivalent for batches of size 6 (full block) but 2x faster for batches of size 60 to 180 (10 to 30 blocks)
This:
Reminder an Eth2 block contains 3 to 6 messages to verify:
Advantages:
Disadvantages: