# Can block validation benefit from CUDA?

**URL:** <https://delvingbitcoin.org/t/can-block-validation-benefit-from-cuda/224>\
**Category:** Implementation\
**Created:** [November 28, 2023, 3:17am UTC](https://delvingbitcoin.org/t/can-block-validation-benefit-from-cuda/224 "2023-11-28T03:17:39Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![real-or-random](https://delvingbitcoin.org/user_avatar/delvingbitcoin.org/real-or-random/32/413_2.png) [@real-or-random](https://delvingbitcoin.org/u/real-or-random)\
**Post date:** [March 7, 2024, 10:55am UTC](https://delvingbitcoin.org/t/can-block-validation-benefit-from-cuda/224/3 "2024-03-07T10:55:38Z")

</div>

> [@ZmnSCPxj](#):
>
> Maybe the best bet would be to focus on the “pure math” SECP256K1 signature validations (i.e. have the `SIGHASH`es come from the CPU and then push them into the GPU for validation).

This may indeed work, and it has been discussed before:

> **[Speeding up signature verification](https://bitcointalk.org/index.php?topic=3238.20)**
>
> Speeding up signature verification

> <https://github.com/bitcoin-core/secp256k1/issues/1214>
>
> I've been looking for versions of secp256k1 that can run on GPUs. I've found thi…s project, which seems like a fork: https://github.com/ilaychen/ECDSA-OpenCL
> 
> Maybe it would make sense to upstream some of these changes, to better support GPU acceleration? Am willing to donate 7900 XTX to Sipa.
> 
> I saw this comment: https://github.com/bitcoin-core/secp256k1/issues/502#issuecomment-357767815
> 
> I'm not sure what that meant other than it's possible, and GPUs certainly have improved since that paper was written 10 years ago. It might make sense to revisit this.

But I’m not aware that anyone is seriously looking into it, at least not currently.

> [@ZmnSCPxj](#):
>
> I believe SECP256K1 Schnorr signatures as used in Taproot can be batch validated, meaning you only do a single calculation to validate multiple transactions that use the keyspend path. Since only a single calculation is needed, there seems to be no advantage to using a GPU in that case.

Yes, but batch verification does not mean that the work of verifying n Schnorr signatures is the same (or similar) to the work of verifying a single Schnorr signature. Batch verification of n signatures will yield nice speed-ups as compared to verifying the n signatures individually, but it’s [at most a factor of ~2 in practice](https://github.com/jonasnick/secp256k1/blob/869e7097d9835945a1663a321239418ad2f93ca4/doc/speedup-batch.md).

---

_[View the full topic](https://delvingbitcoin.org/t/can-block-validation-benefit-from-cuda/224)._
