phoreproject / graphene

Phore Synapse working repository
MIT License
13 stars 6 forks source link

Process block signature validation parallelized as much as possible during sync #36

Closed meyer9 closed 5 years ago

meyer9 commented 5 years ago

Process block signature validation in parallel for the current epoch while syncing and then set a flag to skip signature validation on processing. Then, we can sync 8 blocks at a time and process them each as they become ready.

Validate signatures 1-8 in parallel (8/numcores)
Process blocks 1-8 skipping signature validation (8)
--------
Total Runtime = 8 + 8/numcores

vs.

Validate block 1 (1)
Process block 1 (1)
Validate block 2 (1)
Process block 2 (1)
Validate block 3 (1)
Process block 3 (1)
Validate block 4 (1)
Process block 4 (1)
Validate block 5 (1)
Process block 5 (1)
Validate block 6 (1)
Process block 6 (1)
Validate block 7 (1)
Process block 7 (1)
Validate block 8 (1)
Process block 8 (1)
--------
Total Runtime = 16
meyer9 commented 5 years ago

This is basically done.