tangle-network / gadget

A framework for building modular AVS and Tangle Blueprints: https://docs.tangle.tools/developers/blueprints.
https://tangle.tools
Apache License 2.0
12 stars 3 forks source link

[TASK] Cache EVM Providers and Subxt Client in Context Extensions #320

Closed shekohex closed 1 week ago

shekohex commented 2 weeks ago

Currently we do not cache EVM alloy providers and Tangle subxt client, every time you call ctx.evm_provider() or ctx.tangle_client() you will get a new instance as a new connection. That is no ideal especially if there is many concurrent jobs which would lead to hitting the Rate-Limit for each RPC endpoint.