input-output-hk / mithril

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

Refactor Cardano transactions database layer in persistence for signer and aggregator #1677

Closed Alenar closed 2 months ago

Alenar commented 2 months ago

Why

We want to avoid code duplication between our nodes. We initially thought that the Cardano Transaction and Block range roots code would greatly differ between the aggregator and the signer. For example we thought that the signer would not needs to store the transactions at all but it was far easier to do the import step by storing them first before computing their block range roots.

The only part that differ on the repository is the implementation of a trait needed to retrieve data to compute proof of inclusion for transactions, else everything is the same.

What

Now that we have some hindsight, we need a common database layer for the Cardano transactions and Block range roots.

How