# ECC Acceleration using GPU Compute on Mobile devices

**URL:** <https://forum.zcashcommunity.com/t/ecc-acceleration-using-gpu-compute-on-mobile-devices/39827>\
**Category:** Community Grants\
**Created:** [August 16, 2021, 11:12pm UTC](https://forum.zcashcommunity.com/t/ecc-acceleration-using-gpu-compute-on-mobile-devices/39827 "2021-08-16T23:12:46Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![aiyadt](https://avatars.discourse-cdn.com/v4/letter/a/e9bcb4/32.png) [@aiyadt](https://forum.zcashcommunity.com/u/aiyadt)\
**Post date:** [August 18, 2021, 11:04pm UTC](https://forum.zcashcommunity.com/t/ecc-acceleration-using-gpu-compute-on-mobile-devices/39827/7 "2021-08-18T23:04:17Z")

</div>

> [@hanh](#):
>
> I’m not sure what you mean by data structures used in Jubjub & Pasta. Could you clarify the question?

The data structures support in platform/devices for Open CL or any other framework that you are planning to build on. If you are sticking to Open CL, it should support all kinds of data types VS experimenting with Vulcan/MLkit. Maybe you can go over it in details.

> [@hanh](#):
>
> I’d be glad to participate in an official benchmark with ZecWallet, NightHawk, and ZWallet.

I don’t see the point in benchmarking with wallets that are not optimized. IMO it would have been beneficial for the broader Zcash users had you contributed WarpSync upstream, so wallets that depend on full calculations using ECC SDKs like Nighthawk & Unstoppable would have benefitted with your improvements. Not a problem now, as there are even faster variants of fast sync in the works. I have made the point earlier about how the small Zcash dev community should learn to fill the gaps and contribute to building the software that enables financial privacy to the world.

> [@hanh](#):
>
> No, but initial investigation shows that it is not really different than regular C code. It should be easier than using assembly language for instance. OpenCL is quite portable.

Okay, do you agree it would be better to apply for this grant with a working barebones PoC lib & integrating it to a client app to check what it takes to offloading dummy tasks to the GPU before embarking on a paid research for PoC?

Per your own recent comment in [ΚΣ Labs / 1y Fellowship](https://forum.zcashcommunity.com/t/labs-1y-fellowship/39672) :

> [@ΚΣ Labs / 1y Fellowship](https://forum.zcashcommunity.com/t/labs-1y-fellowship/39672/3):
>
> I’m generally not in favor of funding research & development. In my opinion, R&D doesn’t present actionable deliverables and tends to bundle together many tasks of various complexity, size, and benefit.  
> Generally, In the end, the community has a hard time figuring out what exactly is being worked on and to what extend the deliverables fit the right goals.
> 
> I think that’s not what R&D is about. If you do research, we (the community) should know what paper you plan to publish and how it benefits zcash. Also, I’d like to know who will review your research and verify its correctness. At this moment, it’s unclear what contacts you have with other researchers in the industry.
> 
> If it is about development, then we should know what product you intend to create. We should have a design, technical specifications, and some kind of business plan.
> 
> As it stands, the proposal is a rather long list of items. In the past, this has led to underwhelming results where only the small tasks were delivered.
> 
> You are looking for a 1-year commitment. Personally, I’d need to do more due diligence before backing your proposal.

You stated this in a very confident manner, to have technical specifications ready for a research driven proposal.

> [@hanh](#):
>
> I had a discussion with @str4d on the R&D discord. I don’t want to quote him without permission but he seemed interested for Sapling and Orchard too.

Good, but I don’t believe @str4d would be the end user of the output of this research, sure he can help verify and port the GPGPU support upstream as your grant doesn’t include the creation of ready-to-use libs for wallet developers. Would you be willing to collaborate and chart a path for your work for use in existing Zcash toolchain?

> [@hanh](#):
>
> GPU programming is hard. It is akin to embedded development (i.e. Hardware wallets). We may experience delays due to technical difficulties.

This is one _primary concern_ of this grant, without connecting with wallet developers and getting their feedback, how do we know if the output of this work will benefit Zcash users? And how to avoid a Ledger grant like situation where the underlying cryptography work is paid for, done & verified; but the output remains un-useable and un-available for the broader Zcash community?

> [@hanh](#):
>
> I welcome any help. **Moreover, if anyone wants to do this project (even without me), I’ll be backing their submission as long as they can show the right skillset.**

So it will be you working by yourself. Do you have a mentor or a researcher with whom you will be sharing your progress? You have good documentation skills as seen in the WarpSync writeup, maybe you can help document the tech specs planned out for this grant like the one for the FPGA improvements?

> [@hanh](#):
>
> That’s exactly the purpose of funding the first phase. We can investigate the math, write a prototype, evaluate and audit the results. And then decide whether to proceed with the rest. Yes, there is no hurry at all. I believe it is fairly priced with clearly defined objectives and deliverables. This proposal could also be a bounty.

This is a _secondary concern_, 3 months ago Han had proposed to integrate ZEC to BTCPayServer for $80,000. [https://grants.zfnd.org/proposals/620226773-payment-gateway](https://grants.zfnd.org/proposals/620226773-payment-gateway)  
Which was replaced with another grant to add ZEC support to CoinPayments where the rate was more than doubled to $192,000 [https://grants.zfnd.org/proposals/721236325-coinpayments-integration](https://grants.zfnd.org/proposals/721236325-coinpayments-integration) which ran in to the identified execution risk of “Not much risks except the dependencies on vendor participation.”  
Can you provide an update on the status of CoinPayments/BTCPayServer work? Are you going to help add Zcash support to BTCPayServer upstream repo so BTCPayServer users can start accepting payments in ZEC?

> [@hanh](#):
>
> # Budget
> 
> 1. ~1 month  
> 2-5: 6-12 months  
> 7-8: 4 months

The rates for month 2-16 of this grant are unknown. It would be good to have an approximate estimate of the ask, it can always be extended if the work needs more time.  
Otherwise, the ask to start work on this PoC with a $15,000 funding and an approximate 11-16 months timeline(which can turn to a full fledged $240,000 payment for 16 months considering $15,000/month) to deliver the end result. **I am all for long term funding high skilled individuals who can collaborate & contribute to Zcash.** Keep in ming though, several grants for projects with lower burn rate per team member(and possibly higher ROI) than this R&D grant were struck down recently.

---

_[View the full topic](https://forum.zcashcommunity.com/t/ecc-acceleration-using-gpu-compute-on-mobile-devices/39827)._
