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

How to produce snapshots #84

Closed
5 tasks done
abailly-iohk opened this issue Mar 29, 2022 · 0 comments
Closed
5 tasks done

How to produce snapshots #84

abailly-iohk opened this issue Mar 29, 2022 · 0 comments
Assignees
Labels

Comments

@abailly-iohk
Copy link
Collaborator

abailly-iohk commented Mar 29, 2022

As the actual value of Mithril lies in the capability it gives to cardano-node users to boot their node faster, in minutes instead of hours, we want to understand how to produce reliable and reproducible snapshots from a node's DB.

Tasks to do:

  • Determine information needed to create a valid snapshot
  • the whole immutable folder of the database (required)
  • the protocolMagicId file (required)
  • the latest ledger state snapshot file in the ledger folder (optional)
  • Verify that the snapshotted files are platform independent

Tests successfully ran on the first 20 chunks of the immutable folders (macOS, Ubuntu, Ubuntu on Docker, Windows on 3 separate computers) 🟢

  • Determine best option to create a snapshot (difficulty to produce vs size vs time to restore)

Best option is Immutable + Ledger State, but this implies to modify the Cardano Node

Mainnet

Data Node Full Archive Snapshot Upload Download Restore Startup
Immutable Only standard 43GB 24GB ~28m ~45m ~25m ~12m ~420m
With Ledger State modified 45GB 25GB ~28m ~45m ~25m ~12m ~65m

Testnet

Data Node Full Archive Snapshot Upload Download Restore Startup
Immutable Only standard 9.5 GB 3.5 GB ~7m ~5m ~3m ~2m ~130m
With Ledger State modified 10 GB 3.5 GB ~7m ~5m ~3m ~2m ~6m

Host: x86 / +2 cores / +8GB RAM / +100GB HDD
Network: Download 150Mbps / Upload 75Mbps
Compression: gzip
Cardano Node: not running during snapshotting

  • Modify the Cardano Node such that it can produce deterministic snapshots

Commit: abailly-iohk/ouroboros-network@ae552cc
This task will be finalized in a separate issue: #100

  • Create a light CLI/shell script that can produce a snapshot and a deterministic digest from it

Question: Do we need to stop the node when the snapshot is done?
Answer: We can keep it running
Commit: 8fcbce9

@jpraynaud jpraynaud changed the title SPIKE: How to produce snapshots How to produce snapshots Mar 30, 2022
@jpraynaud jpraynaud self-assigned this Mar 30, 2022
@jpraynaud jpraynaud added the task label Mar 31, 2022
jpraynaud added a commit that referenced this issue Mar 31, 2022
jpraynaud added a commit that referenced this issue Apr 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants