allora-network / allora-chain

Node software to run the Allora Network
https://www.allora.network/
Apache License 2.0
73 stars 67 forks source link

Remove Parallelization in topic handler over topics #444

Closed relyt29 closed 1 month ago

relyt29 commented 1 month ago

What is the purpose of the change

this change removes parallelization in the topics handler over topics. Instead of parallelizing the math to craft the request for each topic, this change only allows the actual submission of HTTP requests to be parallelized.

The reason for this is that it makes the code simpler to reason about especially with regards to race conditions across many threads accessing the same keeper

Testing and Verifying

This code is covered by our existing unit tests. No functionality is changed.

Documentation and Release Note

This PR has no implications for our documentation

guilherme-brandao commented 1 month ago

It seems like we could have maintained the parallelization just by adding Mutex on specific keeper functions

relyt29 commented 1 month ago

I'm actually going to close this in favor of #458 - when 458 is merged, this issue becomes moot because the block proposer no longer has to fire off these kinds of requests to the off-chain components