Skip to content

update run-clvm tool#743

Open
arvidn wants to merge 1 commit into
mainfrom
run-clvm
Open

update run-clvm tool#743
arvidn wants to merge 1 commit into
mainfrom
run-clvm

Conversation

@arvidn

@arvidn arvidn commented Mar 17, 2026

Copy link
Copy Markdown
Contributor

improve output and ability to read parameters from a hex file


Note

Low Risk
Low risk CLI-only change: adds an alternative way to provide the CLVM environment and adjusts printed execution metrics without affecting core library behavior.

Overview
run-clvm now supports passing the CLVM environment via --envfile (hex-encoded serialized node) as an alternative to --env arguments, with clap-enforced mutual exclusion.

Output is tweaked to print execution time in both success and failure cases and, on success, include a derived performance metric (ns/cost).

Written by Cursor Bugbot for commit 1ab7c73. This will update automatically on new commits. Configure here.

@coveralls-official

coveralls-official Bot commented Mar 17, 2026

Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 23289762662

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 87.725%

Totals Coverage Status
Change from base Build 23258658751: 0.0%
Covered Lines: 7268
Relevant Lines: 8285

💛 - Coveralls

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Comment thread tools/src/bin/run-clvm.rs
Ok(Reduction(cost, _result)) => {
println!("cost: {cost}");
println!("execution time: {duration:.3?}");
let ns_per_cost = duration.as_nanos() as f64 / cost as f64;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Division by zero when cost is zero

Low Severity

The ns_per_cost computation divides by cost as f64, which produces inf or NaN when cost is zero. While Rust's f64 division by zero won't panic, the printed output (ns/cost: inf or ns/cost: NaN) would be confusing. A guard checking for zero cost before computing and printing this metric would make the tool's output cleaner.

Fix in Cursor Fix in Web

@github-actions

Copy link
Copy Markdown

'This PR has been flagged as stale due to no activity for over 60
days. It will not be automatically closed, but it has been given
a stale-pr label and should be manually reviewed.'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant