input-output-hk / mithril

Stake-based threshold multi-signatures protocol
https://mithril.network
Apache License 2.0
123 stars 39 forks source link

Implement database connection pooling for Cardano transaction repository #1760

Closed jpraynaud closed 3 months ago

jpraynaud commented 3 months ago

Why

We have noticed during performances optimization of the Cardano transaction prover that the connections to the SQLite database is a bottleneck. A first prototype showed throughtput increased by a factor of ~x10 when implementing resource pooling on the connections to the database. However, in order to be properly implemented, the resource pooling must be done in a setup where all write queries are implemented with SQL transactions.

What

Implement a connection pooling mechanism for the Cardano transaction repository and remove the performance bottleneck on the Cardano transaction prover.

How