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
[x] Move the CardanoTransactionRepository, its associated records, providers and migrations, the from one of the node to mithril-persistence.
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
CardanoTransactionRepository
, its associated records, providers and migrations, the from one of the node tomithril-persistence
.