Skip to content

Conversation

@mmtftr
Copy link
Contributor

@mmtftr mmtftr commented Nov 28, 2025

Description

  • Introduced GenerateBitvmCache actor in the CLI.
  • Added parse_cli_args function to handle CLI arguments without loading configuration.
  • Implemented early command handling for generate-bitvm-cache in the main function, allowing for cache generation without requiring full configuration.
  • Enhanced error handling for CLI argument parsing.
  • Refactored CLI parsing code to separately handle CLI args and config sources

Describe what this pull request does, here.

Linked Issues

  • Closes # (issue, if applicable)
  • Related to # (issue)

- Introduced `GenerateBitvmCache` actor in the CLI.
- Added `parse_cli_args` function to handle CLI arguments without loading configuration.
- Implemented early command handling for `generate-bitvm-cache` in the main function, allowing for cache generation without requiring full configuration.
- Enhanced error handling for CLI argument parsing.
@mmtftr mmtftr requested a review from a team as a code owner November 28, 2025 13:41
Copilot AI review requested due to automatic review settings November 28, 2025 13:41
Copilot finished reviewing on behalf of mmtftr November 28, 2025 13:45
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds CLI support for generating the BitVM cache independently without requiring full configuration. The implementation introduces a new GenerateBitvmCache actor and handles it early in the main function before configuration loading.

Key changes:

  • Introduced GenerateBitvmCache actor for cache generation without config requirements
  • Added parse_cli_args function to parse CLI arguments independently of configuration loading
  • Implemented early command handling that bypasses configuration requirements for cache generation

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
core/src/cli.rs Adds GenerateBitvmCache actor enum variant and parse_cli_args function for config-independent argument parsing
core/src/main.rs Implements early handling of GenerateBitvmCache command before config loading, and adds unreachable branch for the actor in the main match statement

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

ekrembal
ekrembal previously approved these changes Dec 1, 2025
@mmtftr mmtftr changed the title Add support for generating BitVM cache via CLI command Add support for generating BitVM cache via CLI command and minor refactor Dec 2, 2025
Copy link
Contributor

@atacann atacann left a comment

Choose a reason for hiding this comment

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

LGTM, its just that cli::Actors::GenerateBitvmCache looks funny :D, we could use clap Subcommand maybe

@mmtftr mmtftr requested a review from atacann December 4, 2025 15:39
@mmtftr mmtftr requested a review from ekrembal December 5, 2025 13:53
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.

4 participants