Skip to content

Commit b409aca

Browse files
committed
chore: update sp1-verifier with profiling
1 parent 7bc3193 commit b409aca

3 files changed

Lines changed: 46 additions & 3 deletions

File tree

.cursor/skills/sp1/SKILL.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
name: sp1
3+
description: How to run and benchmark the SP1 verifier on CKB-VM
4+
---
5+
6+
# SP1 Verifier on CKB-VM
7+
8+
## Build
9+
10+
Build the SP1 verifier from the project root:
11+
12+
```
13+
make build CONTRACT=sp1-test
14+
```
15+
16+
## Estimate Cost Cycles
17+
18+
Run from the project root:
19+
20+
```
21+
ckb-debugger --max-cycles 35000000000 --bin build/release/sp1-test
22+
```
23+
24+
An example output of total cycles:
25+
```
26+
All cycles: 6168800817(5883.0M)
27+
```
28+
29+
## Local Debugging
30+
31+
When debugging locally, change the dependency in `Cargo.toml` from:
32+
33+
```toml
34+
sp1-verifier = { git = "https://github.com/XuJiandong/sp1.git", default-features = false, rev="f5586e9" }
35+
```
36+
37+
to a local path:
38+
39+
```toml
40+
sp1-verifier = { path = "../../../sp1/crates/verifier", default-features = false }
41+
```

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

contracts/sp1-test/Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ edition = "2021"
88
[dependencies]
99
ckb-std = { version = "0.18.0", default-features = false, features = ["allocator", "dummy-atomic"]}
1010
hex = { version = "0.4", default-features = false, features = ["alloc"] }
11-
sp1-verifier = { version = "5.0.8", default-features = false }
11+
# debug locally
12+
# sp1-verifier = { path = "../../../sp1/crates/verifier", default-features = false }
13+
sp1-verifier = { git = "https://github.com/XuJiandong/sp1.git", default-features = false, rev="f5586e9" }
1214

1315
[features]
1416
default = []

0 commit comments

Comments
 (0)