cardano-db-sync
cardano-db-sync copied to clipboard
[SPIKE] - Assess UTxO HD impact on DBSync & Make Compatibility Changes
Business Hypothesis
We need to determine whether the UTxO HD implementation will impact DB-Sync. After discussion with Consensus team on 11/1/2022, it is likely that DBSync needs to change types.
Drivers
-UTxO HD LMDB is nearing completion and will require a compatibility upgrade
Functional Requirements
- Identify modifications needed to support the UTxO HD LMDB release
NFRs
-Performance should not degrade or be materially different than baseline.
External Dependencies
-UTxO HD LMDB version is stable and available for testing against.
DoD
-QA testing completed -audits completed -benchmarks pass, no significant regressions -merge to mainnet/release branch
My understanding is that the UTxO HD was never designed to be used by db-sync
(ie the functionality is not exposed as a library) and therefore db-sync
needs to keep on hold the whole of ledger state in memory which is actually kind of :hankey: .
For over 2 years, I have been advocating for ledger
and consensus
to be enhanced so that db-sync
can provide all the functionality it has now, without db-sync
having to maintain its own copy of ledger state (db-sync
has to maintain a copy but only actually uses a tiny, tiny portion of it).
Related https://github.com/input-output-hk/cardano-db-sync/issues/1233