You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we lock the client for the whole processing of get_tokens endpoint of faucet. This leads to sequential processing of requests instead of parallel despite the using multithreading asynchronous runtime. The task is to get rid of this blocking and make requests to the faucet work in parallel.
How should it be done?
The simplest solution would be to instantiate new client on each request. But we should extract at least building of faucet account ID to initialization stage of the faucet because it takes long time.
If even after refactoring account instantiation takes too long, we can improve this solution by introduction of client pool for already instantiated clients.
When is this task done?
When requests to get_tokens in faucet can work in parallel.
I'm not sure we can parallelize this. In the end, all transactions against the faucet must be applied one-by-one (i.e., updates to the faucet account must be serialized).
What should be done?
Currently we lock the client for the whole processing of
get_tokens
endpoint of faucet. This leads to sequential processing of requests instead of parallel despite the using multithreading asynchronous runtime. The task is to get rid of this blocking and make requests to the faucet work in parallel.How should it be done?
The simplest solution would be to instantiate new client on each request. But we should extract at least building of faucet account ID to initialization stage of the faucet because it takes long time.
If even after refactoring account instantiation takes too long, we can improve this solution by introduction of client pool for already instantiated clients.
When is this task done?
When requests to
get_tokens
in faucet can work in parallel.Additional context
See TODO here: https://github.com/0xPolygonMiden/miden-node/pull/511/files#diff-0fa2a05cdce31b7eeefc3ab0f1a1d7560016fbabf0b9baca3d182e3c3d47f646R58-R60
The text was updated successfully, but these errors were encountered: