IntersectMBO / cardano-cli

This repository contains sources for the command-line interface (CLI) tool for interacting with the Cardano blockchain.
Apache License 2.0
39 stars 14 forks source link

Query a node for a snapshot of big ledger peers #727

Open crocodile-dentist opened 5 months ago

crocodile-dentist commented 5 months ago

Changelog

- description: |
   added `runQueryLedgerPeerSnapshot` function to retrieve and store
   a snapshot of big ledger peers. This function is invoked by ledger-peer-snapshot
   subcommand of query.
# uncomment types applicable to the change:
  type:
  # - feature        # introduces a new feature
  - breaking       # the API has changed in a breaking way
  # - compatible     # the API has changed but is non-breaking
  # - optimisation   # measurable performance improvements
  # - improvement    # QoL changes e.g. refactoring
  # - bugfix         # fixes a defect
  # - test           # fixes/modifies tests
  # - maintenance    # not directly related to the code
  # - release        # related to a new release preparation
  # - documentation  # change in code docs, haddocks...

Context

A new query subcommand ledger-peer-snapshot was introduced to serialize a snapshot of big ledger peers. These relays will be relied on by network layer when a node is syncing up in Genesis consensus mode, since a node may not have any or up to date information from its own ledger which are the big ledger peer relays.

Closes #571

Checklist

github-actions[bot] commented 3 months ago

This PR is stale because it has been open 45 days with no activity.

smelc commented 3 months ago

Seems this is blocked on updated in https://github.com/IntersectMBO/ouroboros-network, so putting as draft until this is really mergeable. @crocodile-dentist> please undraft when this is close to being merged.

palas commented 2 months ago

Backup: https://github.com/IntersectMBO/cardano-cli/tree/backup/mwojtowicz/ledger-query-peer-snapshot

palas commented 2 months ago

FYI: I have rebased your branch because we have done changes to the formatting. I have made a copy of the unrebased branch that you can find in my previous comment in this PR.