-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjustfile
More file actions
42 lines (31 loc) · 1.41 KB
/
justfile
File metadata and controls
42 lines (31 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/env sh
set dotenv-load
default:
@just --list
check-env-var name env_file=".env":
#!/usr/bin/env sh
# find the non-commented line for the specified variable in the .env file and extract its value.
value=$(grep -E "^\s*{{name}}=" "{{env_file}}" | grep -v '^\s*#' | head -n 1 | cut -d '=' -f2-)
if [ -z "$value" ]; then
echo "[env variable checker]: {{name}} should be set in .env"
exit 1
fi
# Run all tests including online tests - this is a very time-consuming test.
test-all:
#!/usr/bin/env sh
just check-env-vars SP1_PRIVATE_KEY
cargo nextest run --release --workspace --all --all-features --no-capture
# Verify the proof which generated by `test_online_scenario`
run-onchain-verify proof_data="prover-proxy/tests/data/proof.json":
#!/usr/bin/env sh
anvil --accounts 1 &
geth_pid=$!
trap "kill $geth_pid" EXIT QUIT INT
// Deploy the verifier contract.
cd sp1-contracts/contracts
forge create --private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 src/v4.0.0-rc.3/SP1VerifierPlonk.sol:SP1Verifier
cd ../../
program_key=$(jq -r '.program_key' {{proof_data}})
public_values=$(jq -r '.public_values' {{proof_data}})
proof=$(jq -r '.proof' {{proof_data}})
cast call 0x5FbDB2315678afecb367f032d93F642f64180aa3 "verifyProof(bytes32,bytes calldata,bytes calldata)" $program_key $public_values $proof