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

Mithril client last snapshot download #1078

Closed
3 tasks done
v0d1ch opened this issue Jul 24, 2023 · 4 comments · Fixed by #1110
Closed
3 tasks done

Mithril client last snapshot download #1078

v0d1ch opened this issue Jul 24, 2023 · 4 comments · Fixed by #1110
Assignees
Labels
D-medium Difficulty: medium devX 🌞 Developer experience idea 💡 Something to discuss and refine task

Comments

@v0d1ch
Copy link

v0d1ch commented Jul 24, 2023

Why

I wanted to wrap mithirl-client in a separate app and provide the option for the users to just download the lastest snapshot. To do that I would had to parse the snapshot list output which contains a list of snapshots and then take the latest one to do a snapshot download in the background. Would it be possible to provide a separate command to just download the latest known snapshot for the specified network or alternatively some other type of output like json? It is hard to get rid of all unwanted characters in the output and separate command would make this a breeze.

To do

  • Add a latest value in snapshot list command which downloads the latest snapshot
  • Add a latest value in msd list command which downloads the latest snapshot
  • Update documentations
@jpraynaud
Copy link
Member

Hi @v0d1ch, thanks for your feedback.
There is actually a --json option that you can use with the command snapshot list in order to get machine readable output.

@jpraynaud
Copy link
Member

Thanks for the idea of downloading the latest snapshot by default, we will try to implement it 👍

@jpraynaud jpraynaud added idea 💡 Something to discuss and refine D-medium Difficulty: medium task dev 💪 labels Jul 24, 2023
@v0d1ch
Copy link
Author

v0d1ch commented Jul 24, 2023

Oh 🤦‍♂️ good to know. Maybe show the possible outputs when invoking --help since I was not aware of that at all (probably should read the docs). Thanks!

@jpraynaud
Copy link
Member

This is actually a specific option to each sub command so it does not show on the global help.
However, it is displayed in the snapshot list command help:

./mithril-client snapshot list --help
List available snapshots

Usage: mithril-client snapshot list [OPTIONS]

Options:
      --json  Enable JSON output
  -h, --help  Print help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
D-medium Difficulty: medium devX 🌞 Developer experience idea 💡 Something to discuss and refine task
Projects
None yet
4 participants