Repository navigation
Description
Why
With Leios, the transactions certified by an endorser block are stored by the Cardano node in a separate SQLite database (leios.imm.db) next to the immutable files, so a node restored from a Mithril Cardano database snapshot, which only holds the immutable and ancillary files, fails at the first certifying block with LeiosClosureMissing. Shipping a copy of leios.imm.db is not an option since its layout may change and its whole history would be served at every restoration, so the closures must travel in a form independent of the node database, verified by the client against the certified immutable files.
What
The aggregator adds the endorser block closures of each immutable file to its compressed immutable archive as a new file in a canonical form, and the client verifies them against the immutable file and imports them into leios.imm.db, into a new database or into the one already present in the download directory.
How
- Add an internal crate in
internal/cardano-nodefor the Leios closures of an immutable file- Canonical closures file format, independent of the node database layout
- Reader of the certifying blocks of an immutable file with the announcement of their endorser block
- Verifier of a closure against the announced endorser block
-
leios.imm.dblayout adapter of the pinned Leios node behind a trait
- Add the closures of each immutable file to its compressed immutable archive in the aggregator Cardano database artifact builder
- Export the closures of the certifying blocks of the immutable file from the
leios.imm.dbof the node - Add the closures file next to the immutable file in the archive (if necessary), without changing the signed message
- Export the closures of the certifying blocks of the immutable file from the
- Import the closures in the client Cardano database download
- Verify the closures of each unpacked archive against its immutable file before any write
- Create a new
leios.imm.dbwhen the download directory holds none, whatever the start of the range - Update the existing
leios.imm.dbin place when the download directory holds one, with--allow-override, a stopped Cardano node and a range contiguous with the immutable files already present (no hole)
- Add a
cardano-db mergecommand to the client CLI that attaches theleios.imm.dbof a range download into an existing one? - Update the e2e test
- Update the documentation of the client CLI, the aggregator and the website for the closures import and the merge command
- Create a follow-up issue to support the different
leios.imm.dbschemas of the node releases- Export with the schema of the aggregator node
- Import with the schema of the node started by the client
Activity