-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Prysm Version Upgrade Script #15992
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
base: develop
Are you sure you want to change the base?
Prysm Version Upgrade Script #15992
Conversation
187c32f to
94d76a5
Compare
Co-authored-by: Preston Van Loon <[email protected]>
There was a problem hiding this 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 introduces an automation script to streamline the Prysm version upgrade process from v6 to v7. The script replaces manual find-and-replace operations across multiple file types and ensures all necessary build commands are executed in the correct sequence.
Key Changes:
- Added
hack/upgrade-version.shscript that automates import path updates across.bazel,.go, and.protofiles - Script handles both file-wide replacements and specific file updates, followed by regeneration of dependencies, protobufs, and SSZ files
- Added changelog entry documenting the new automation feature
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| hack/upgrade-version.sh | Main automation script that performs find-replace operations and executes build/regeneration commands |
| changelog/bastin_version-upgrade-script.md | Changelog entry documenting the new version upgrade automation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| while IFS= read -r -d '' file; do | ||
| "${SED_INPLACE[@]}" "s/${OLD_ESCAPED}/${NEW_ESCAPED}/g" "$file" | ||
| echo "updated (by ext): $file" | ||
| done < <(find . -type f -name "*.${ext}" -print0) |
Copilot
AI
Nov 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The script searches the entire directory tree including potentially large directories like node_modules, .git, or build artifacts. Consider excluding common directories that shouldn't contain Prysm imports, e.g., find . -type f -name \"*.${ext}\" ! -path \"*/node_modules/*\" ! -path \"*/.git/*\" ! -path \"*/bazel-*/*\" -print0.
| done < <(find . -type f -name "*.${ext}" -print0) | |
| done < <(find . -type f -name "*.${ext}" \ | |
| ! -path "*/node_modules/*" \ | |
| ! -path "*/.git/*" \ | |
| ! -path "*/bazel-*/*" \ | |
| -print0) |
What type of PR is this?
Feature
What does this PR do? Why is it needed?
This PR adds a bash script to automate the prysm version upgrade process.
This is the process that the script is automating:
Migrates the Prysm dependency from
OffchainLabs/prysm/vXtoOffchainLabs/prysm/vYacross the entire codebase.File Modifications
*.bazel,*.go,*.protofilesFile Updates
go.mod,.deepsource.toml,hack/update-mockgen.sh, andhack/update-go-pbs.shCommand Updates
bazel run //:gazelle -- update-repos -from_file=go.mod -to_macro=deps.bzl%prysm_deps -prune=truego mod tidy && go get ./..../hack/update-go-pbs.shbazel clean --expunge --async./hack/update-go-ssz.shgo build ./... && bazel build //cmd/beacon-chain //cmd/validator