Skip to content

Commit 3448cec

Browse files
tamirhemobergkvist
andauthored
chore: update version for release 6.0.0-beta.1 (#1087)
* Update version in Cargo.toml to 6.0.0-beta.1 * Allow workflow_dispatch for publishing without merging to main * Add dummy descriptions and specify crate versions explicitly * Use test artifacts explicitly in all crates and remove it from the top level workspace * chore: rss-lib crates dependency * Remove include.workspace = true * chore: update lock * lock * skip gpu-perf * update patches * chore: update skill * update release script --------- Co-authored-by: Tobias Bergkvist <[email protected]>
1 parent 4681e8d commit 3448cec

File tree

84 files changed

+837
-737
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+837
-737
lines changed
Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
---
2+
name: update-sp1-patches
3+
description: Update sp1-patches git repos when releasing a new SP1 version. Use when bumping SP1 version and need to update patched crypto crates.
4+
allowed-tools: Read, Grep, Glob, Bash, Edit, Write
5+
argument-hint: [OLD_VERSION] [NEW_VERSION]
6+
---
7+
8+
# Update SP1 Patches for New Version
9+
10+
Update all patched crates from SP1 version `$0` to `$1`.
11+
12+
## Context
13+
14+
SP1 maintains patched versions of cryptographic crates in the `sp1-patches` GitHub organization. These patches:
15+
- Depend on `sp1-lib` from crates.io
16+
- Are referenced via git tags in Cargo.toml files
17+
- Follow the naming convention: `patch-[CRATE]-[VERSION]-sp1-[SP1_VERSION]`
18+
19+
When releasing a new SP1 version, patches must be updated so their `sp1-lib` dependency matches.
20+
21+
## Step 1: Identify Current Patches
22+
23+
Find all patch references in the codebase:
24+
25+
```bash
26+
grep -r "sp1-patches" --include="*.toml" . | grep -v target | grep "tag ="
27+
```
28+
29+
Key locations:
30+
- `patch-testing/Cargo.toml` - Main patch testing workspace
31+
- `patch-testing/*/program/Cargo.toml` - Individual program tests
32+
- `examples/Cargo.toml` - Example programs
33+
- `crates/test-artifacts/programs/*/Cargo.toml` - Test artifacts
34+
- `crates/verifier/guest-verify-programs/Cargo.toml` - Verifier programs
35+
36+
## Step 2: Categorize Repositories
37+
38+
**Repos WITH sp1-lib dependency** (need version update):
39+
- `curve25519-dalek` - Ed25519 curve operations
40+
- `curve25519-dalek-ng` - Ed25519 (ng version)
41+
- `tiny-keccak` - Keccak hashing
42+
- `bn` (substrate-bn) - BN254 pairing
43+
- `bls12_381` - BLS12-381 pairing
44+
- `RustCrypto-RSA` - RSA operations
45+
- `elliptic-curves` (k256, p256) - ECDSA operations
46+
47+
**Repos with TRANSITIVE sp1-lib dependency**:
48+
- `rust-secp256k1` - depends on `k256` from elliptic-curves
49+
50+
**Repos WITHOUT sp1-lib** (create alias tags):
51+
- `RustCrypto-hashes` - SHA2, SHA3 patches
52+
- `RustCrypto-bigint` - BigInt operations
53+
54+
## Step 3: Update Process
55+
56+
### For repos WITH sp1-lib:
57+
58+
```bash
59+
cd /tmp/sp1-patches-update
60+
git clone [email protected]:sp1-patches/<REPO>.git
61+
cd <REPO>
62+
63+
# Checkout old tag
64+
git checkout patch-<CRATE_VERSION>-sp1-<OLD_SP1_VERSION>
65+
git checkout -b temp-update-branch
66+
67+
# Find and update sp1-lib version (check format first!)
68+
grep -r "sp1-lib" --include="Cargo.toml" .
69+
70+
# Update (adjust sed pattern based on format found):
71+
# For: sp1-lib = "X.Y.Z"
72+
sed -i 's/sp1-lib = "<OLD_VERSION>"/sp1-lib = "<NEW_VERSION>"/g' */Cargo.toml Cargo.toml
73+
74+
# For: sp1-lib = { version = "X.Y.Z", ... }
75+
sed -i 's/sp1-lib = { version = "<OLD_VERSION>"/sp1-lib = { version = "<NEW_VERSION>"/g' */Cargo.toml Cargo.toml
76+
77+
# Commit and create new tag
78+
git add -A
79+
git commit -m "Update sp1-lib dependency to <NEW_VERSION>"
80+
git tag patch-<CRATE_VERSION>-sp1-<NEW_SP1_VERSION>
81+
git push origin patch-<CRATE_VERSION>-sp1-<NEW_SP1_VERSION>
82+
```
83+
84+
### For repos with TRANSITIVE dependencies (rust-secp256k1):
85+
86+
Also update references to other sp1-patches repos:
87+
```bash
88+
# Update k256 dependency tag
89+
sed -i 's/patch-k256-13.4-sp1-<OLD>/patch-k256-13.4-sp1-<NEW>/g' Cargo.toml
90+
```
91+
92+
### For repos WITHOUT sp1-lib (alias tags):
93+
94+
```bash
95+
git checkout patch-<CRATE_VERSION>-sp1-<OLD_SP1_VERSION>
96+
git tag patch-<CRATE_VERSION>-sp1-<NEW_SP1_VERSION>
97+
git push origin patch-<CRATE_VERSION>-sp1-<NEW_SP1_VERSION>
98+
```
99+
100+
## Step 4: Update Local Cargo.toml Files
101+
102+
```bash
103+
# Find all files with old tags
104+
find . -name "Cargo.toml" -exec grep -l "sp1-<OLD_VERSION>\"" {} \;
105+
106+
# Update all occurrences
107+
find . -name "Cargo.toml" -exec sed -i 's/-sp1-<OLD_VERSION>"/-sp1-<NEW_VERSION>"/g' {} \;
108+
```
109+
110+
## Step 5: Verify
111+
112+
```bash
113+
# Check tags exist on GitHub
114+
gh api repos/sp1-patches/<REPO>/git/refs/tags/patch-<VERSION>-sp1-<NEW> --jq '.ref'
115+
116+
# Build to verify resolution
117+
cd patch-testing && cargo check
118+
119+
# Ensure no old tags remain
120+
grep -r "sp1-<OLD_VERSION>\"" --include="*.toml" . | grep -v target
121+
```
122+
123+
## Tag Reference
124+
125+
| Repository | Tag Pattern | Has sp1-lib |
126+
|------------|-------------|-------------|
127+
| RustCrypto-hashes | patch-sha2-X.Y.Z-sp1-V, patch-sha3-X.Y.Z-sp1-V | No |
128+
| RustCrypto-bigint | patch-X.Y.Z-sp1-V | No |
129+
| tiny-keccak | patch-X.Y.Z-sp1-V | Yes |
130+
| curve25519-dalek | patch-X.Y.Z-sp1-V | Yes |
131+
| curve25519-dalek-ng | patch-X.Y.Z-sp1-V | Yes |
132+
| rust-secp256k1 | patch-X.Y.Z-sp1-V | No (transitive via k256) |
133+
| bn | patch-X.Y.Z-sp1-V | Yes |
134+
| bls12_381 | patch-X.Y.Z-sp1-V | Yes |
135+
| RustCrypto-RSA | patch-X.Y.Z-sp1-V | Yes |
136+
| elliptic-curves | patch-k256-X.Y.Z-sp1-V, patch-p256-X.Y.Z-sp1-V | Yes |
137+
138+
## Important Notes
139+
140+
- **Never overwrite existing tags** - always create new tags
141+
- **Check sp1-lib format** before sed replacement (simple string vs table format)
142+
- **Update transitive deps first** - elliptic-curves before rust-secp256k1
143+
- **Verify with cargo check** - ensures all dependencies resolve correctly

.github/workflows/release-plz.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88
push:
99
branches:
1010
- main
11+
workflow_dispatch:
12+
inputs: {}
1113

1214
jobs:
1315
release-plz:

.github/workflows/release.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@ on:
77
branches:
88
- main
99
workflow_dispatch:
10+
inputs:
11+
prerelease:
12+
description: 'Mark as pre-release'
13+
type: boolean
14+
default: false
15+
target_branch:
16+
description: 'Target branch (leave empty for current branch)'
17+
type: string
18+
default: ''
1019

1120
env:
1221
CARGO_TERM_COLOR: always
@@ -51,7 +60,9 @@ jobs:
5160
env:
5261
GH_TOKEN: ${{ secrets.SP1_RELEASE_TOKEN }}
5362
run: |
54-
GH_DEBUG=api gh release create ${{ steps.release_info.outputs.tag_name }} --target main --generate-notes --latest=false
63+
TARGET_BRANCH="${{ inputs.target_branch || github.ref_name }}"
64+
PRERELEASE_FLAG=${{ inputs.prerelease && '"--prerelease"' || '""' }}
65+
GH_DEBUG=api gh release create ${{ steps.release_info.outputs.tag_name }} --target "$TARGET_BRANCH" --generate-notes --latest=false $PRERELEASE_FLAG
5566
5667
- name: Print GH version
5768
run: |
@@ -292,7 +303,7 @@ jobs:
292303
name: Set latest release
293304
runs-on: ubuntu-latest
294305
needs: [sp1-gpu-server-release, cargo-prove-release, prepare]
295-
if: success()
306+
if: ${{ success() && inputs.prerelease != true }}
296307
steps:
297308
- uses: actions/checkout@v4
298309

0 commit comments

Comments
 (0)