Repository navigation
Make discrete_log asynchronous - #396
AddressXception wants to merge 2 commits into
Conversation
propagate async/await through the decrypt functions. use asyncio.run when calling async functions from tests. while not ideal, this is the simplest ways to bridge new functionality without reworking the code significantly.
|
Propagating all that async stuff everywhere is a real mess for using ElectionGuard as a library. Much better to provide some sort of bridge so you can call an async version or a synchronous version. If you're making changes in elgamal.py, that's really bad. |
|
@danwallach This change highlights the clear asynchronous chain that's dependent on dlog. Consider for a moment, that an |
|
The issue isn't synchronous vs asynchronous. The issue is that there needs to be a write-lock around the results cache. If async pollution is the problem, the solution is to find a different way to implement the write lock. |
|
agreed, what as missing here was this ticket to track the follow-on work as part of a larger epic. |
|
replaced by #405 |
Issue
Link your PR to an issue
Fixes #393
Description
Make the dlog async/await and propagate through the rest of the API's. This is not an ideal solution for the long term but it unblocks the issue in the short term allowing the code to be called from inside a running event loop.
Further work to fix this correctly is tracked in #397 #397
Testing