@stellar-registry/perch-artifacts 0.1.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -3
- package/deployments/pending-registry.json +1 -0
- package/deployments/testnet.json +53 -53
- package/package.json +3 -2
- package/scripts/fetch-infra-wasm.sh +53 -17
package/README.md
CHANGED
|
@@ -84,6 +84,5 @@ because the ZK adapter compiles them in.
|
|
|
84
84
|
|
|
85
85
|
## Not included
|
|
86
86
|
|
|
87
|
-
Perch's Rust crates are not here. A project that links them (as path
|
|
88
|
-
dependencies
|
|
89
|
-
a checkout) still needs the repository.
|
|
87
|
+
Perch's Rust crates are not here. A project that links them (as git or path
|
|
88
|
+
dependencies) still needs the repository.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
package/deployments/testnet.json
CHANGED
|
@@ -4,23 +4,23 @@
|
|
|
4
4
|
"network_passphrase": "Test SDF Network ; September 2015",
|
|
5
5
|
"rpc_url": "https://soroban-testnet.stellar.org",
|
|
6
6
|
"channel": "beta",
|
|
7
|
-
"deployed_at": "2026-10-
|
|
8
|
-
"deployed_ledger":
|
|
7
|
+
"deployed_at": "2026-10-22T13:41:43Z",
|
|
8
|
+
"deployed_ledger": 5330546,
|
|
9
9
|
"source": {
|
|
10
|
-
"commit": "
|
|
10
|
+
"commit": "c135aca277745434f2abf679edd9868c95204b51",
|
|
11
11
|
"dirty": false
|
|
12
12
|
},
|
|
13
13
|
"toolchain": {
|
|
14
14
|
"builder": "scaffold",
|
|
15
|
-
"rustc": "rustc 1.
|
|
16
|
-
"stellar": "stellar
|
|
15
|
+
"rustc": "rustc 1.99.1 (58cf8f9c3 2026-10-13)",
|
|
16
|
+
"stellar": "stellar 28.0.0-aha.0 (70667cde89632b363d1c8dfb84ff698cbb646988)",
|
|
17
17
|
"scaffold": "scaffold 0.0.27 (stellar-scaffold-cli-v0.0.27-0-g6f1f06c3e8d2cf82573ec214b20d1550e9ce326b)"
|
|
18
18
|
},
|
|
19
19
|
"registry": {
|
|
20
|
-
"id": "
|
|
21
|
-
"wasm_hash": "
|
|
22
|
-
"admin": "
|
|
23
|
-
"manager": "
|
|
20
|
+
"id": "CDZGU4AIND6QRCGAN72I7DCS2EKRZ76JSKYY7KKJR4CG5IR2AMFIBZTM",
|
|
21
|
+
"wasm_hash": "0acc4da2b0b44b70988fe9a3b64b31e7ace166e5a949e9e6846f72c6ce93c055",
|
|
22
|
+
"admin": "GAMPJROHOAW662FINQ4XQOY2ULX5IEGYXCI4SMZYE75EHQBR6PSTJG3M",
|
|
23
|
+
"manager": "GAMPJROHOAW662FINQ4XQOY2ULX5IEGYXCI4SMZYE75EHQBR6PSTJG3M",
|
|
24
24
|
"root": "CAAXJETKPYAATU4HVVQUTE2FFBULNFGZNEOC3MS635U5K3GZLAY2HI4M"
|
|
25
25
|
},
|
|
26
26
|
"zk": {
|
|
@@ -30,100 +30,100 @@
|
|
|
30
30
|
},
|
|
31
31
|
"contracts": {
|
|
32
32
|
"perch-doc-compiler": {
|
|
33
|
-
"version": "0.3.
|
|
33
|
+
"version": "0.3.5",
|
|
34
34
|
"wasm": "perch_doc_compiler.wasm",
|
|
35
|
-
"sha256": "
|
|
36
|
-
"bytes":
|
|
35
|
+
"sha256": "2730a7d39d619579bb7873818900fa5f9150d69d49fa1ee3b4a38f61ba768a16",
|
|
36
|
+
"bytes": 109947,
|
|
37
37
|
"tier": 0,
|
|
38
38
|
"pins": {},
|
|
39
|
-
"address": "
|
|
39
|
+
"address": "CAYCPM5O6SGGAZOCCAUJ27CZZ7SMHU4VYSA25ZHDMGKILP4Z5RGF467E"
|
|
40
40
|
},
|
|
41
41
|
"perch-interpreter": {
|
|
42
|
-
"version": "0.1.
|
|
42
|
+
"version": "0.1.6",
|
|
43
43
|
"wasm": "perch_interpreter.wasm",
|
|
44
|
-
"sha256": "
|
|
45
|
-
"bytes":
|
|
44
|
+
"sha256": "f884913eba4a9491f8bcf89d1a687381c7c0699b148f98f8dc344e9a6223b26e",
|
|
45
|
+
"bytes": 17999,
|
|
46
46
|
"tier": 0,
|
|
47
47
|
"pins": {},
|
|
48
|
-
"address": "
|
|
48
|
+
"address": "CBOGVUQWY5G7BP7OWEJX3Z5PSZLYJXHM54A7OEMXQQ7ZO4GHHM4WCEAP"
|
|
49
49
|
},
|
|
50
50
|
"perch-spending-limit": {
|
|
51
|
-
"version": "0.1.
|
|
51
|
+
"version": "0.1.4",
|
|
52
52
|
"wasm": "perch_spending_limit.wasm",
|
|
53
|
-
"sha256": "
|
|
54
|
-
"bytes":
|
|
53
|
+
"sha256": "8c043dcc24f944d7c3e349fb5fd83cedba4a9124b5791b625bd76b520b0f4a80",
|
|
54
|
+
"bytes": 12923,
|
|
55
55
|
"tier": 0,
|
|
56
56
|
"pins": {},
|
|
57
|
-
"address": "
|
|
57
|
+
"address": "CAG3IDO3FXE2HQVQHRGRBKWGL2IPAA2V6B3UMHES4ZUNS7OEV646HYV5"
|
|
58
58
|
},
|
|
59
59
|
"perch-ed25519-verifier": {
|
|
60
|
-
"version": "10.0.
|
|
60
|
+
"version": "10.0.2",
|
|
61
61
|
"wasm": "perch_ed25519_verifier.wasm",
|
|
62
|
-
"sha256": "
|
|
63
|
-
"bytes":
|
|
62
|
+
"sha256": "defdab3434b361272c2461a174b94271a49e67fa0a6714b53689aca32e8d1592",
|
|
63
|
+
"bytes": 1863,
|
|
64
64
|
"tier": 0,
|
|
65
65
|
"pins": {},
|
|
66
|
-
"address": "
|
|
66
|
+
"address": "CC7ZFUIENDZPX3C7R4XTA4LG3PCLJM63UGAFYW5XKN35ACIKHZPEDXOG"
|
|
67
67
|
},
|
|
68
68
|
"perch-webauthn-verifier": {
|
|
69
|
-
"version": "0.1.
|
|
69
|
+
"version": "0.1.2",
|
|
70
70
|
"wasm": "perch_webauthn_verifier.wasm",
|
|
71
|
-
"sha256": "
|
|
72
|
-
"bytes":
|
|
71
|
+
"sha256": "f2e1dfce8c496be6d318045bc5a24ac5eb799ada837f92e8032ec953f1994230",
|
|
72
|
+
"bytes": 11825,
|
|
73
73
|
"tier": 0,
|
|
74
74
|
"pins": {},
|
|
75
|
-
"address": "
|
|
75
|
+
"address": "CDEV5YPS5IITPLQPYTKJGWBNZ2YZ7FQZIJNSHUMJRBE4QWYK2IVK4EJT"
|
|
76
76
|
},
|
|
77
77
|
"perch-zk-pool": {
|
|
78
|
-
"version": "0.1.
|
|
78
|
+
"version": "0.1.4",
|
|
79
79
|
"wasm": "perch_zk_pool.wasm",
|
|
80
|
-
"sha256": "
|
|
81
|
-
"bytes":
|
|
80
|
+
"sha256": "985660d4a6d6baa31a863158e89b8cbecc37cececd7104382172a1805b7289d5",
|
|
81
|
+
"bytes": 47959,
|
|
82
82
|
"tier": 0,
|
|
83
83
|
"pins": {},
|
|
84
|
-
"address": "
|
|
84
|
+
"address": "CASXCXSBIG6ECB3LO4LCEW6SZIFHZDTJ3PFOZJK5JI56VKXLSZY6J67P"
|
|
85
85
|
},
|
|
86
86
|
"perch-zk-adapter": {
|
|
87
|
-
"version": "0.1.
|
|
87
|
+
"version": "0.1.4",
|
|
88
88
|
"wasm": "perch_zk_adapter.wasm",
|
|
89
|
-
"sha256": "
|
|
90
|
-
"bytes":
|
|
89
|
+
"sha256": "95869bab4b89e5a4306ffe0d7a9e91931a56518ef18b3f61e95df86145dda63e",
|
|
90
|
+
"bytes": 69803,
|
|
91
91
|
"tier": 0,
|
|
92
92
|
"pins": {},
|
|
93
|
-
"address": "
|
|
93
|
+
"address": "CDWVAUSTU2DHBBWANQKGSHCXFK5C46WMUEMWRBOV2LBVXQGK4PGIFBQS"
|
|
94
94
|
},
|
|
95
95
|
"perch-recovery": {
|
|
96
|
-
"version": "0.1.
|
|
96
|
+
"version": "0.1.5",
|
|
97
97
|
"wasm": "perch_recovery.wasm",
|
|
98
|
-
"sha256": "
|
|
99
|
-
"bytes":
|
|
98
|
+
"sha256": "daaf09d9f73f6890753572b33a5c41a22c2ebf0e9ce29593e8407ff858844eb8",
|
|
99
|
+
"bytes": 68263,
|
|
100
100
|
"tier": 0,
|
|
101
101
|
"pins": {},
|
|
102
|
-
"address": "
|
|
102
|
+
"address": "CBOFO5KWQKCZ7LBS4LDIYXA6LGZSUSA6JKOHHBBL64KQNZLPGDJ252FT"
|
|
103
103
|
},
|
|
104
104
|
"perch-account": {
|
|
105
|
-
"version": "0.
|
|
105
|
+
"version": "0.5.1",
|
|
106
106
|
"wasm": "perch_account.wasm",
|
|
107
|
-
"sha256": "
|
|
108
|
-
"bytes":
|
|
107
|
+
"sha256": "2c976bfd98678f3b6fcf5514420a81ef5e5b9fc1c5b6c60ec6f2dd64448479d5",
|
|
108
|
+
"bytes": 70702,
|
|
109
109
|
"tier": 1,
|
|
110
110
|
"pins": {
|
|
111
|
-
"perch-doc-compiler": "
|
|
112
|
-
"perch-interpreter": "
|
|
113
|
-
"perch-spending-limit": "
|
|
111
|
+
"perch-doc-compiler": "2730a7d39d619579bb7873818900fa5f9150d69d49fa1ee3b4a38f61ba768a16",
|
|
112
|
+
"perch-interpreter": "f884913eba4a9491f8bcf89d1a687381c7c0699b148f98f8dc344e9a6223b26e",
|
|
113
|
+
"perch-spending-limit": "8c043dcc24f944d7c3e349fb5fd83cedba4a9124b5791b625bd76b520b0f4a80"
|
|
114
114
|
}
|
|
115
115
|
},
|
|
116
116
|
"perch-account-factory": {
|
|
117
|
-
"version": "0.1
|
|
117
|
+
"version": "0.3.1",
|
|
118
118
|
"wasm": "perch_account_factory.wasm",
|
|
119
|
-
"sha256": "
|
|
120
|
-
"bytes":
|
|
119
|
+
"sha256": "6b434991d983063c92a47ba1573514f46e5c2ecb184d8c654af60a637ccd3fc2",
|
|
120
|
+
"bytes": 4533,
|
|
121
121
|
"tier": 2,
|
|
122
122
|
"pins": {
|
|
123
|
-
"perch-account": "
|
|
124
|
-
"perch-webauthn-verifier": "
|
|
123
|
+
"perch-account": "2c976bfd98678f3b6fcf5514420a81ef5e5b9fc1c5b6c60ec6f2dd64448479d5",
|
|
124
|
+
"perch-webauthn-verifier": "f2e1dfce8c496be6d318045bc5a24ac5eb799ada837f92e8032ec953f1994230"
|
|
125
125
|
},
|
|
126
|
-
"address": "
|
|
126
|
+
"address": "CC7QOMXP6IJRBE6APO7FVCBCPJTDHP3USE3XSQF7AAXWSJ2DZWDV3YXK"
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
129
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stellar-registry/perch-artifacts",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Perch's consumable artifacts as files: deployment manifests, the Noir ZK recovery circuits and their manifest, test vectors, document and program limits, and the scripts that fetch the deployed wasm and install the pinned ZK toolchain",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -51,5 +51,6 @@
|
|
|
51
51
|
"type": "git",
|
|
52
52
|
"url": "https://github.com/stellar-registry/perch",
|
|
53
53
|
"directory": "packages/perch-artifacts"
|
|
54
|
-
}
|
|
54
|
+
},
|
|
55
|
+
"gitHead": "6af7622da80309b9c6764f1e05c8a6186ad2e0ad"
|
|
55
56
|
}
|
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# Populate the
|
|
2
|
+
# Populate the build-time pin directories from a deployment manifest
|
|
3
3
|
# (deployments/<network>.json, written by scripts/deploy-stack.sh):
|
|
4
4
|
#
|
|
5
|
-
# crates/perch-smart-account/wasm/
|
|
6
|
-
# perch-
|
|
7
|
-
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
5
|
+
# crates/perch-smart-account/wasm/ perch-doc-compiler, perch-interpreter,
|
|
6
|
+
# perch-spending-limit
|
|
7
|
+
# crates/perch-account-factory/wasm/ perch-account, perch-webauthn-verifier
|
|
8
|
+
#
|
|
9
|
+
# Each name gets <name>.wasm (git-ignored; only tests read the bytes) and
|
|
10
|
+
# <name>.sha256 (committed, with registry.path: all a build reads, so a plain
|
|
11
|
+
# checkout builds without this script). scripts/check-pins.sh checks the
|
|
12
|
+
# committed pins against the manifest.
|
|
13
|
+
#
|
|
14
|
+
# The registry is not a fetched pin: both crates commit the path they derive
|
|
15
|
+
# it from (wasm/registry.path), and the manifest's registry must be the one
|
|
16
|
+
# that path derives on its network, or a migration
|
|
17
|
+
# deployments/pending-registry.json declares (scripts/manifest-registry.sh).
|
|
18
|
+
# This script refuses any other manifest and never rewrites the path.
|
|
10
19
|
#
|
|
11
20
|
# Each wasm is fetched from the chain by the exact address (or, for the
|
|
12
21
|
# account, the exact wasm hash) the manifest records, and refused unless
|
|
@@ -21,7 +30,8 @@
|
|
|
21
30
|
# --manifest default deployments/${STELLAR_NETWORK:-testnet}.json
|
|
22
31
|
# --stack also fetch every manifest contract into <dir> and write
|
|
23
32
|
# <dir>/build.json, so tests/release_stack.rs runs against the
|
|
24
|
-
# deployed bytes
|
|
33
|
+
# deployed bytes; it keeps the manifest's zk circuit, which
|
|
34
|
+
# those bytes compile in
|
|
25
35
|
#
|
|
26
36
|
# Requires the Stellar CLI. After a redeploy, run
|
|
27
37
|
# `cargo test -p perch-integration-tests --test testnet_pins`.
|
|
@@ -29,7 +39,8 @@
|
|
|
29
39
|
# The npm package @stellar-registry/perch-artifacts ships this script as
|
|
30
40
|
# `perch-fetch-infra-wasm`, beside a copy of deployments/. There is no crate
|
|
31
41
|
# tree to pin there, so it needs --stack, fills only that, and checks content
|
|
32
|
-
# addresses with the package's own perch-derive-id
|
|
42
|
+
# addresses with the package's own perch-derive-id (a perch checkout uses
|
|
43
|
+
# scripts/derive-id.py).
|
|
33
44
|
set -euo pipefail
|
|
34
45
|
|
|
35
46
|
repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
@@ -39,7 +50,7 @@ while [ $# -gt 0 ]; do
|
|
|
39
50
|
case "$1" in
|
|
40
51
|
--manifest) manifest="$2"; shift 2 ;;
|
|
41
52
|
--stack) stack="$2"; shift 2 ;;
|
|
42
|
-
-h|--help)
|
|
53
|
+
-h|--help) awk 'NR>1 && /^#/{sub(/^# ?/,""); print; next} NR>1{exit}' "$0"; exit 0 ;;
|
|
43
54
|
*) echo "unknown option: $1" >&2; exit 1 ;;
|
|
44
55
|
esac
|
|
45
56
|
done
|
|
@@ -58,12 +69,32 @@ registry="$(m .registry.id)"
|
|
|
58
69
|
|
|
59
70
|
sha256() { if command -v sha256sum >/dev/null; then sha256sum "$1" | cut -d' ' -f1; else shasum -a 256 "$1" | cut -d' ' -f1; fi; }
|
|
60
71
|
if $checkout; then
|
|
61
|
-
(
|
|
62
|
-
derive() { "$repo_root/target/debug/perch-derive-id" content "$registry" "$1" "$(m .network_passphrase)"; }
|
|
72
|
+
derive() { "$repo_root/scripts/derive-id.py" content "$registry" "$1" "$(m .network_passphrase)"; }
|
|
63
73
|
else
|
|
64
74
|
derive() { node "$repo_root/dist/cli/derive-id.js" content "$registry" "$1" "$(m .network_passphrase)"; }
|
|
65
75
|
fi
|
|
66
76
|
|
|
77
|
+
# The RPC answers a fetch with an occasional 502, so a failed fetch is retried
|
|
78
|
+
# with backoff (2/4/8/16s, STELLAR_FETCH_ATTEMPTS tries in all). Only the
|
|
79
|
+
# network call is retried; a hash mismatch below still fails at once.
|
|
80
|
+
fetch_retry() { # contract-name out-file stellar-contract-fetch-args...
|
|
81
|
+
local name="$1" out="$2" attempts="${STELLAR_FETCH_ATTEMPTS:-5}" try=1 delay=2 err
|
|
82
|
+
shift 2
|
|
83
|
+
err="$(mktemp)"
|
|
84
|
+
until stellar contract fetch "${net[@]}" "$@" --out-file "$out" 2>"$err"; do
|
|
85
|
+
rm -f "$out"
|
|
86
|
+
if [ "$try" -ge "$attempts" ]; then
|
|
87
|
+
echo "error: $name: fetch failed after $try attempts: $(tr -s '\n' ' ' <"$err")" >&2
|
|
88
|
+
rm -f "$err"
|
|
89
|
+
exit 1
|
|
90
|
+
fi
|
|
91
|
+
echo "warning: $name: fetch attempt $try/$attempts failed ($(tr -s '\n' ' ' <"$err")); retrying in ${delay}s" >&2
|
|
92
|
+
sleep "$delay"
|
|
93
|
+
try=$((try + 1)) delay=$((delay * 2))
|
|
94
|
+
done
|
|
95
|
+
rm -f "$err"
|
|
96
|
+
}
|
|
97
|
+
|
|
67
98
|
fetch() { # contract-name out-file
|
|
68
99
|
local name="$1" out="$2" hash addr
|
|
69
100
|
hash="$(jq -r --arg n "$name" '.contracts[$n].sha256 // empty' "$manifest")"
|
|
@@ -74,9 +105,9 @@ fetch() { # contract-name out-file
|
|
|
74
105
|
echo "error: $name: $addr is not the content address of $hash under $registry" >&2
|
|
75
106
|
exit 1
|
|
76
107
|
}
|
|
77
|
-
|
|
108
|
+
fetch_retry "$name" "$out" --id "$addr"
|
|
78
109
|
else
|
|
79
|
-
|
|
110
|
+
fetch_retry "$name" "$out" --wasm-hash "$hash"
|
|
80
111
|
fi
|
|
81
112
|
[ "$(sha256 "$out")" = "$hash" ] || {
|
|
82
113
|
echo "error: $name: fetched $(sha256 "$out"), manifest says $hash" >&2
|
|
@@ -89,12 +120,17 @@ fetch() { # contract-name out-file
|
|
|
89
120
|
pin() { # crate names...
|
|
90
121
|
local dir="$repo_root/crates/$1/wasm" name
|
|
91
122
|
shift
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
123
|
+
for name in "$@"; do
|
|
124
|
+
fetch "$name" "$dir/$name.wasm"
|
|
125
|
+
sha256 "$dir/$name.wasm" >"$dir/$name.sha256"
|
|
126
|
+
done
|
|
95
127
|
}
|
|
96
128
|
|
|
97
129
|
if $checkout; then
|
|
130
|
+
state="$("$repo_root/scripts/manifest-registry.sh" --manifest "$manifest")"
|
|
131
|
+
case "$state" in
|
|
132
|
+
pending\ *) echo "warning: pending registry migration (deployments/pending-registry.json): $state" >&2 ;;
|
|
133
|
+
esac
|
|
98
134
|
echo "fetching pins from $(basename "$manifest") (registry $registry) ..." >&2
|
|
99
135
|
pin perch-smart-account perch-doc-compiler perch-interpreter perch-spending-limit
|
|
100
136
|
pin perch-account-factory perch-account perch-webauthn-verifier
|
|
@@ -105,7 +141,7 @@ if [ -n "$stack" ]; then
|
|
|
105
141
|
for name in $(m '.contracts | keys[]'); do
|
|
106
142
|
fetch "$name" "$stack/${name//-/_}.wasm"
|
|
107
143
|
done
|
|
108
|
-
jq '{registry: .registry.id, source, toolchain
|
|
144
|
+
jq '{registry: .registry.id, source, toolchain} + (if .zk then {zk} else {} end) + {
|
|
109
145
|
artifacts: [.contracts | to_entries[] |
|
|
110
146
|
{package: .key, version: .value.version, wasm: (.key | gsub("-"; "_") + ".wasm"),
|
|
111
147
|
sha256: .value.sha256, bytes: .value.bytes, tier: .value.tier,
|