Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement artifacts builder for Incremental Cardano DB #2151

Open
5 of 8 tasks
Tracked by #2047
jpraynaud opened this issue Dec 2, 2024 · 0 comments
Open
5 of 8 tasks
Tracked by #2047

Implement artifacts builder for Incremental Cardano DB #2151

jpraynaud opened this issue Dec 2, 2024 · 0 comments
Assignees
Labels
feature 🚀 New implemented feature

Comments

@jpraynaud
Copy link
Member

jpraynaud commented Dec 2, 2024

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": "https://storage.googleapis.com/cdn.aggregator.release-mainnet.api.mithril.network/mainnet-e525-i6550.{immutable_file_number}.tar.zst"
      },
      {
        "type": "bit_torrent",
        "uri": "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:

Image

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)
  • Implement a retry decorator for the file uploader
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature 🚀 New implemented feature
Projects
None yet
Development

No branches or pull requests

3 participants