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

Refactor param binaries #1392

Merged
merged 5 commits into from
Jan 5, 2021
Merged

Refactor param binaries #1392

merged 5 commits into from
Jan 5, 2021

Conversation

DrPeterVanNostrand
Copy link
Contributor

@DrPeterVanNostrand DrPeterVanNostrand commented Jan 4, 2021

Changes

  • Use rust-fil-logger everywhere.
  • Changes CLI library from clap to structopt.
  • Use "humanized" sector sizes in user prompts.
  • Change all user prompts from filecoin_proofs::param::choose_from() to dialoguer::{MultiSelect, Select}.

Commit 7758886 (fakeipfsadd)

  • Change CLI library.

Commit e1bd75b (paramcache)

  • Renames CLI argument from --params-for-sector-sizes to --sector-sizes
  • Manually implements Clone for circuits: StackedCircuit, SDR Proof, FallbackPoStCircuit, FallbackPoSt Sector
  • Manually implementing Clone is required because we can't reliably #[derive(Clone)] on generic structs having PhantomData fields.
  • Clone-ing circuits makes it so that we don't need to call ::blank_circuit() every time we need a circuit instance.

Commit 4627bd1 (paramfetch)

  • Renames CLI argument from --params-for-sector-sizes to --sector-sizes
  • Changed ipget to latest version (v0.4.0 to 0.6.0).
  • Renamed test file from fil-proofs-param/tests/paramfetch/prompts_to_fetch.rs to fil-proofs-param/tests/paramfetch/mod.rs.

Commit bfb3811 (parampublish)

  • Rename CLI argument from --all to --list-all (used for listing all parameter files in the cache dir).
  • Add FileInfo struct to store a each parameter's: filename, param-id, file extension, and parameter version (so those strings do not have to be repeatedly derived, also makes filtering and sorting easier).
  • Add function is_well_formed_filename() to ensure that a parameter filename are in the expected format.

Commit e913a9a

  • Remove filecoin_proofs::param::{choose, choose_from} in favor of dialoguer::{MultiSelect, Select}.

@DrPeterVanNostrand DrPeterVanNostrand changed the title Refactor binaries Refactor param binaries Jan 4, 2021
Copy link
Collaborator

@cryptonemo cryptonemo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@DrPeterVanNostrand
Copy link
Contributor Author

Nice, thank you guys for reading through it. If no one has an objection, I am going to rebase this into a single commit before merging (cc. @cryptonemo @dignifiedquire)

@cryptonemo
Copy link
Collaborator

Nice, thank you guys for reading through it. If no one has an objection, I am going to rebase this into a single commit before merging (cc. @cryptonemo @dignifiedquire)

Manually, or using the 'squash and merge'? I recommend the latter.

@DrPeterVanNostrand
Copy link
Contributor Author

I was going to do a manual rebase, but it doesn't matter. I'll squash and merge.

@DrPeterVanNostrand DrPeterVanNostrand merged commit fdf8658 into master Jan 5, 2021
@DrPeterVanNostrand DrPeterVanNostrand deleted the refactor-binaries branch January 5, 2021 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants