Skip to content

Conversation

noel2004
Copy link
Member

@noel2004 noel2004 commented Sep 1, 2025

This PR fixed the broken script to detect plonky3gpu version. Also add an make entry for printing out the version string

Summary by CodeRabbit

  • New Features

    • Added a command to print a comprehensive version string combining release tag, Git revision, and dependency version/commit.
    • Exposed the version command from both the prover and GPU components for easy access.
    • Standardized dependency version reporting to always output version and short commit, ensuring consistent results.
  • Chores

    • Aligned version propagation between components to simplify build and release workflows.

Copy link

coderabbitai bot commented Sep 1, 2025

Walkthrough

Adds a version-reporting target to two Makefiles and rewrites a helper script to derive plonky3-gpu version and commit from Cargo.lock instead of using Git.

Changes

Cohort / File(s) Summary
Makefile version targets
crates/gpu_override/Makefile, zkvm-prover/Makefile
Adds target version in gpu_override that echoes ${GO_TAG}-${GIT_REV}-${ZK_VERSION}. Adds target version in zkvm-prover that invokes make -C ../crates/gpu_override version passing GO_TAG, GIT_REV, ZKVM_COMMIT.
plonky3-gpu version script update
crates/gpu_override/print_plonky3gpu_version.sh
Replaces Git-based lookup with Cargo.lock parsing to output the highest plonky3-gpu version and its 7-char commit hash on two lines. Removes path discovery and direct Git access.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Dev as Developer
  participant ZP as zkvm-prover/Makefile
  participant GO as crates/gpu_override/Makefile

  Dev->>ZP: make version (GO_TAG, GIT_REV, ZKVM_COMMIT)
  ZP->>GO: make -C ../crates/gpu_override version<br/>(env: GO_TAG, GIT_REV, ZKVM_COMMIT)
  GO->>GO: Compose string "${GO_TAG}-${GIT_REV}-${ZK_VERSION}"
  GO-->>ZP: Echo version string
  ZP-->>Dev: Print version string
Loading
sequenceDiagram
  autonumber
  actor User as Invoker
  participant SH as print_plonky3gpu_version.sh
  participant CL as Cargo.lock

  User->>SH: Run script
  SH->>CL: Read lines matching "plonky3-gpu"
  SH->>SH: Parse highest version and commit<br/>(truncate commit to 7)
  SH-->>User: Output version (line 1)
  SH-->>User: Output short commit (line 2)
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I thump my paw: a tag, a rev, a zing—
New Makefiles hum a version string.
From Cargo’s lock I sniff the trail,
A tidy hash, a bunny’s grail.
Two lines hop out, concise and bright—
Commit and version, just right. 🐇✨

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/plonky3gpu_ver_script

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@lispc
Copy link
Contributor

lispc commented Sep 1, 2025

OK (it will be irreverent soon since we are going to use the open sourced upstream openvm gpu later)

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
crates/gpu_override/Makefile (1)

19-20: Add PHONY + prefer printf for stable, parseable output

  • Declare version as .PHONY to avoid collisions with a file named version.
  • printf is safer than echo for strings that may begin with dashes.
 version:
-	echo ${GO_TAG}-${GIT_REV}-${ZK_VERSION}
+	printf "%s-%s-%s\n" "${GO_TAG}" "${GIT_REV}" "${ZK_VERSION}"

Optional: consider renaming PLONKY3_GPU_VERSION (it holds a commit, not a semver) to PLONKY3_GPU_COMMIT to reduce confusion.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between b297edd and 23058ed.

📒 Files selected for processing (3)
  • crates/gpu_override/Makefile (1 hunks)
  • crates/gpu_override/print_plonky3gpu_version.sh (1 hunks)
  • zkvm-prover/Makefile (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: tests
🔇 Additional comments (1)
zkvm-prover/Makefile (1)

41-43: Delegation LGTM

Target correctly forwards env and delegates to crates/gpu_override/version.

@georgehao georgehao merged commit c11e028 into develop Sep 9, 2025
3 checks passed
@georgehao georgehao deleted the fix/plonky3gpu_ver_script branch September 9, 2025 02:45
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