Closed
Description
Why
We need to create artifacts for the Incremental Cardano Database certification. We want the artifact structure to be versatile enough to support new type of storage (e.g. BitTorrent, IPFS, ...)
What
Implement the artifact builder for the Incremental Cardano Database with the target JSON structure:
{
"merkle_root": "0506e5e1f7df9314ebdbb532768a5addc2931004c5cd8fd8cd464090f95e46e4",
"beacon": {
"network": "mainnet",
"epoch": 525,
"immutable_file_number": 6550
},
"certificate_hash": "04219eb7a66c37f0d917160b8bdc617dc4ff911344f2e72bdb22c1316cbe8d71",
"total_db_size_uncompressed": 52470081414,
"created_at": "2024-12-02T04:36:40.811764301Z",
"locations": {
"digests": [
{
"type": "aggregator",
"uri": "https://aggregator.release-mainnet.api.mithril.network/aggregator/artifact/cardano-database/digests"
},
{
"type": "cloud_storage",
"uri": "https://storage.googleapis.com/cdn.aggregator.release-mainnet.api.mithril.network/mainnet-e525-i6550.digests.tar.zst"
}
],
"immutables": [
{
"type": "cloud_storage",
"uri": {
"Template": "https://storage.googleapis.com/cdn.aggregator.release-mainnet.api.mithril.network/mainnet-e525-i6550.{immutable_file_number}.tar.zst"
}
},
{
"type": "bit_torrent",
"uri": {
"Template": "https://storage.googleapis.com/cdn.aggregator.release-mainnet.api.mithril.network/mainnet-e525-i6550.{immutable_file_number}.tar.zst"
}
}
],
"ancillary": [
{
"type": "cloud_storage",
"uri": "https://storage.googleapis.com/cdn.aggregator.release-mainnet.api.mithril.network/mainnet-e525.ancillary.tar.zst"
}
]
},
"compression_algorithm": "zstandard",
"cardano_node_version": "10.1.2"
}
And the target design:
How
- Scaffold the artifact builder for the Incremental Cardano Database with minimum implementation
- Compute the size of the uncompressed database used in
total_db_size_uncompressed
- Refactor the
snapshot_uploaders
module to prepare the implementation of the sub builders - Implement the sub builders skeleton with a fake implementation of the uploader for the Ancillary builder
- Ancillary builder: Create and verify the ancillary archive (local file-system) and reference it in the artifact
- Immutable builder: Create immutable files archives if not already existing (local file-system) and reference them in the artifact
- Digest builder: Reference the aggregator url in the artifact (light implementation now, will be completed later)