Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
557e0eb
feat: add zcash chain runtime workspace
ByteZhang1024 Sep 8, 2026
4f23461
fix: make zcash opfs storage durable across workers
ByteZhang1024 Sep 8, 2026
c19cde7
feat: pczt combine, spending-purpose ufvk import, transparent account…
ByteZhang1024 Sep 9, 2026
da22f21
chore: wip snapshot of zcash runtime transparent shielding
ByteZhang1024 Sep 11, 2026
fdc95fc
feat: guard pczt combining and drop the stateful shielding path
ByteZhang1024 Sep 18, 2026
d51ade6
feat: prepare independent zcash runtime releases
ByteZhang1024 Sep 20, 2026
790f36c
fix: validate zcash recipients and remove pre-release compatibility
ByteZhang1024 Sep 20, 2026
ba2b133
fix: verify zcash transparent previous transactions
ByteZhang1024 Sep 20, 2026
f9cd9f7
refactor: simplify zcash previous transaction parsing
ByteZhang1024 Sep 21, 2026
06b222a
fix: harden zcash runtime validation and lifecycle
ByteZhang1024 Sep 21, 2026
1aa7e10
feat: add monero runtime and harden zcash send handling
ByteZhang1024 Oct 1, 2026
e6c5701
feat(monero): bind signing to a reviewed request and claim inputs bef…
ByteZhang1024 Oct 13, 2026
e4dde24
feat(zcash): review PCZTs before signing and route lightwalletd throu…
ByteZhang1024 Oct 13, 2026
faa6cd7
fix(zcash): never report an uncertain broadcast as rejected
ByteZhang1024 Oct 13, 2026
facad65
fix(monero): record sends before broadcasting and validate node fees …
ByteZhang1024 Oct 13, 2026
e5446b1
docs: align chain runtime docs with current behavior
ByteZhang1024 Oct 13, 2026
a804163
test(monero): follow connect returning the node network in live tests
ByteZhang1024 Oct 13, 2026
0b03e66
chore: translate chain runtime comments to English
ByteZhang1024 Oct 13, 2026
5d65850
fix(monero): load the runtime package in measure-scan
ByteZhang1024 Oct 13, 2026
7d4ca5f
docs: keep only the docs needed to build, integrate and release
ByteZhang1024 Oct 13, 2026
72221e4
docs: drop design history and release-candidate checklists from chain…
ByteZhang1024 Oct 13, 2026
8e0d4c8
docs: rewrite chain runtime READMEs in English against the current API
ByteZhang1024 Oct 13, 2026
fc7e5c1
fix(zcash): treat shielded-requirements-not-met as an unknown broadca…
ByteZhang1024 Oct 13, 2026
f6d68a3
fix(monero): keep only reorgable own sends pending on rewind
ByteZhang1024 Oct 13, 2026
1aedcc6
chore: version zcash and monero runtimes 0.1.0-alpha.1
ByteZhang1024 Oct 13, 2026
6e41a57
ci(zcash): allow alpha releases from any branch
ByteZhang1024 Oct 13, 2026
1ffe792
ci(monero): add build and npm publish workflows
ByteZhang1024 Oct 13, 2026
79b2389
build: share one toolchain across the zcash and monero runtimes
ByteZhang1024 Oct 13, 2026
b7740d5
ci: publish alpha manually and rc/latest only from main
ByteZhang1024 Oct 13, 2026
ada587b
ci: publish runtime alphas to npm next like the native previews
ByteZhang1024 Oct 13, 2026
8aed7cf
ci: publish from the runtime workflows like package-publish
ByteZhang1024 Oct 13, 2026
7b9dab9
ci: build, pack and publish on manual runs only
ByteZhang1024 Oct 13, 2026
32cf763
fix(monero): bind broadcast records to the sending account and accept…
ByteZhang1024 Oct 14, 2026
89486d1
test(monero): change to an own subaddress or another account is refused
ByteZhang1024 Oct 14, 2026
0a61dbf
ci: merge runtime workflows into publish-runtime-packages
ByteZhang1024 Oct 14, 2026
6382ac5
ci: publish runtime packages from a separate job with pinned actions
ByteZhang1024 Oct 14, 2026
b262e71
fix(zcash): derive the UFVK without Sapling
ByteZhang1024 Oct 14, 2026
c5ffe71
ci: build chain runtimes through a per-runtime ci.sh hook
ByteZhang1024 Oct 14, 2026
1a9213d
ci: limit runtime publishing to own packages and alpha off main
ByteZhang1024 Oct 14, 2026
affda0a
ci: publish only discovered runtimes with NPM_TOKEN
ByteZhang1024 Oct 14, 2026
2cd705c
ci: run runtime publishing manually only and verify published versions
ByteZhang1024 Oct 15, 2026
b7225a9
feat(runtime): reclaim free database pages and report unsupported sto…
ByteZhang1024 Oct 15, 2026
9a60244
ci: publish a fixed list of runtime packages
ByteZhang1024 Oct 15, 2026
77fdcec
fix(zcash): send hardware signers a copy without Sapling or proving f…
ByteZhang1024 Oct 15, 2026
387e47c
fix(monero): use the patched OPFS VFS and check storage before broadc…
ByteZhang1024 Oct 15, 2026
997f6a7
feat(zcash): sign with account keys instead of the seed and mark chan…
ByteZhang1024 Oct 16, 2026
aa67a39
docs: trim chain runtime docs to usage, design reasons and pitfalls
ByteZhang1024 Oct 16, 2026
0b4b0dc
fix(zcash): stop copying the device PCZT size limit into the runtime
ByteZhang1024 Oct 17, 2026
f7e7cc6
fix(monero): follow wallet2 unlock rules, keep the latest node select…
ByteZhang1024 Oct 17, 2026
208bd65
docs(zcash): describe signer redaction and accepted outputs accurately
ByteZhang1024 Oct 17, 2026
10fae0b
fix: simplify privacy runtimes and preserve transaction identity
ByteZhang1024 Oct 18, 2026
2c16031
chore: bump privacy runtimes to 0.1.0-alpha.3
ByteZhang1024 Oct 19, 2026
bb5af27
test: avoid sensitive values in zcash assertion output
ByteZhang1024 Oct 19, 2026
eab5389
fix: bind monero broadcast amounts to reviewed outputs
ByteZhang1024 Oct 19, 2026
f43c8ac
chore: merge main into privacy runtimes
ByteZhang1024 Oct 19, 2026
db4598f
fix: distinguish zcash self payments from change
ByteZhang1024 Oct 19, 2026
7106e1f
fix: allow zcash transparent change at the receive address
ByteZhang1024 Oct 20, 2026
1e10e4c
fix: keep the monero spend key inside the runtime
ByteZhang1024 Oct 20, 2026
477f96f
fix: wipe remaining monero key copies
ByteZhang1024 Oct 20, 2026
422972d
docs: note that hosts never resubmit stored zcash sends
ByteZhang1024 Oct 20, 2026
2b5da9e
fix: enable secure delete on every zcash wallet connection
ByteZhang1024 Oct 21, 2026
202d022
chore: bump privacy runtimes to 0.1.0-alpha.5
ByteZhang1024 Oct 21, 2026
73b270c
docs: trim privacy runtime comments and docs to current behavior
ByteZhang1024 Oct 21, 2026
bb09840
fix: truncate deleted runtime files and refuse newer zcash databases
ByteZhang1024 Oct 21, 2026
df9007f
chore: bump privacy runtimes to 0.1.0-alpha.6
ByteZhang1024 Oct 21, 2026
92bdee1
perf: skip the flush after truncating a freed runtime file
ByteZhang1024 Oct 21, 2026
ca04fce
feat: report zcash dust change beside the account balance
ByteZhang1024 Oct 21, 2026
95c16ce
chore: bump privacy runtimes to 0.1.0-alpha.7
ByteZhang1024 Oct 21, 2026
d768225
fix(zcash): refuse half a spending derivation pair on import
ByteZhang1024 Oct 21, 2026
e056c75
ci: check the chain runtimes on pull requests
ByteZhang1024 Oct 21, 2026
a6a6529
chore: remove runtime debug tooling and unused exports
ByteZhang1024 Oct 22, 2026
9cc48c3
fix(zcash): name the address an output actually paid in history
ByteZhang1024 Oct 22, 2026
15c510e
chore: bump privacy runtimes to 0.1.0-alpha.8
ByteZhang1024 Oct 22, 2026
a1ae6df
fix(zcash): improve sync reliability and restart at a later birthday
ByteZhang1024 Oct 27, 2026
3b8a09a
fix(monero): improve scanning, restart at a later birthday, record sp…
ByteZhang1024 Oct 27, 2026
4b26790
chore: bump privacy runtimes to 0.1.0-alpha.9
ByteZhang1024 Oct 27, 2026
a28c995
chore: trim chain runtime comments and docs
ByteZhang1024 Oct 27, 2026
5981ec3
fix: clear clippy warnings in the chain runtimes
ByteZhang1024 Oct 27, 2026
5a2a851
feat: prune the Zcash scan queue on account removal and look accounts…
ByteZhang1024 Oct 27, 2026
7d49ca2
chore: bump privacy runtimes to 0.1.0-alpha.10
ByteZhang1024 Oct 27, 2026
afcea40
fix: prune the scan queue when a Zcash rescan moves the birthday late…
ByteZhang1024 Oct 27, 2026
ebc73b5
feat: export Monero outputs for device key image sync and import veri…
ByteZhang1024 Oct 27, 2026
7d9a32e
chore: bump privacy runtimes to 0.1.0-alpha.11
ByteZhang1024 Oct 27, 2026
455a387
feat: report Monero receive fees, primary-address receipts and confir…
ByteZhang1024 Oct 27, 2026
f1d8e44
test: cover the fee a Zcash receive reports
ByteZhang1024 Oct 27, 2026
62ffe20
feat: record the payment ID of Monero receives
ByteZhang1024 Oct 27, 2026
8d6d94e
feat: plan, assemble and verify Monero transactions signed on a hardw…
ByteZhang1024 Oct 27, 2026
b84cb87
feat: return the Monero tx private key from signing, checked against …
ByteZhang1024 Oct 28, 2026
f20db62
feat: mark Monero coinbase receives and keep their tx public key for …
ByteZhang1024 Oct 28, 2026
9039d0f
feat: share one Zcash fee and expiry policy across the runtimes (ZIP …
ByteZhang1024 Oct 28, 2026
003a2de
feat: seal Zcash transparent-to-shielded outputs to the Orchard OVK a…
ByteZhang1024 Oct 28, 2026
fee159d
fix: release the notes of a definitively rejected Zcash send at once …
ByteZhang1024 Oct 28, 2026
d63d74e
fix: refuse a Zcash lightwalletd endpoint on another chain and bound …
ByteZhang1024 Oct 28, 2026
fdf75e0
fix: report a Monero chain tip with the network of the node that serv…
ByteZhang1024 Oct 28, 2026
7c39250
fix: drop queued Monero scan ranges above a lowered chain tip
ByteZhang1024 Oct 28, 2026
b18d54a
fix: saturate the Monero confirmation count at the largest chain tip
ByteZhang1024 Oct 28, 2026
a162994
chore: bump the Monero runtime to 0.1.0-alpha.12
ByteZhang1024 Oct 28, 2026
daf733d
chore: publish the runtimes as @onekeyfe/zcash-runtime, @onekeyfe/zca…
ByteZhang1024 Oct 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions .github/workflows/publish-runtime-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,9 @@ jobs:
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
# The only packages this workflow publishes, as <runtime>/<package>.
packages='zcash/onekey-zcash-keys zcash/onekey-zcash-runtime monero/onekey-monero-runtime'
# The only packages this workflow publishes, as <runtime>/<package>;
# each is published as @onekeyfe/<package>.
packages='zcash/zcash-keys zcash/zcash-runtime monero/monero-runtime'
# main publishes x.y.z or x.y.z-<pre>.n; other branches only x.y.z-alpha.n.
versions='^[0-9]+\.[0-9]+\.[0-9]+(-[a-z]+\.[0-9]+)?$'
if [ "$GITHUB_REF" != refs/heads/main ]; then
Expand All @@ -78,8 +79,8 @@ jobs:

# Check every package before publishing any.
for pkg in $packages; do
if [ "$(field "$pkg" name)" != "$(basename "$pkg")" ]; then
echo "::error::dist/$pkg.tgz is missing or is not $(basename "$pkg")"
if [ "$(field "$pkg" name)" != "@onekeyfe/$(basename "$pkg")" ]; then
echo "::error::dist/$pkg.tgz is missing or is not @onekeyfe/$(basename "$pkg")"
exit 1
fi
if [[ ! "$(field "$pkg" version)" =~ $versions ]]; then
Expand All @@ -89,7 +90,7 @@ jobs:
done

for pkg in $packages; do
name=$(basename "$pkg")
name="@onekeyfe/$(basename "$pkg")"
version=$(field "$pkg" version)
if [ -n "$(npm view "$name@$version" version 2>/dev/null)" ]; then
echo "$name@$version already published"
Expand Down
51 changes: 51 additions & 0 deletions .github/workflows/runtime-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: runtime-checks

# Runs each runtime's scripts/ci.sh on pull requests; mirrors the build tools of publish-runtime-packages.yml.
on:
pull_request:
paths:
- 'chain-runtimes/**'
- '.github/workflows/runtime-checks.yml'

permissions:
contents: read

concurrency:
group: runtime-checks-${{ github.ref }}
cancel-in-progress: true

jobs:
check:
strategy:
fail-fast: false
matrix:
runtime: [zcash, monero]
runs-on: ubuntu-24.04
timeout-minutes: 60
defaults:
run:
working-directory: chain-runtimes/${{ matrix.runtime }}
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
with:
persist-credentials: false
- uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0
with:
node-version: 24.21.0
- name: Install build tools
run: |
curl -sSfL -o /tmp/binaryen.tgz https://github.com/WebAssembly/binaryen/releases/download/version_133/binaryen-version_133-x86_64-linux.tar.gz
echo "2dc9c7813f5375db93d96ead4b78222fcc3e2677bbb832297af4797782a37489 /tmp/binaryen.tgz" | sha256sum -c -
sudo tar xzf /tmp/binaryen.tgz -C /opt
echo /opt/binaryen-version_133/bin >> "$GITHUB_PATH"
sudo apt-get update
sudo apt-get install -y clang llvm libsqlite3-dev libssl-dev pkg-config
rustup toolchain install
cargo install wasm-pack --version 0.15.0 --locked
# Must match wasm-bindgen in both runtimes' Cargo.lock.
cargo install wasm-bindgen-cli --version 0.2.127 --locked
- name: Test, build and pack
env:
CC_wasm32_unknown_unknown: /usr/bin/clang
AR_wasm32_unknown_unknown: /usr/bin/llvm-ar
run: bash scripts/ci.sh
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,8 @@ Merged fork PRs are intentionally skipped with a workflow summary notice; run `p
Before enabling the workflow, install a GitHub App on `app-monorepo` with repository Contents (write) and Pull requests (write) permissions. Set repository variable `APP_RELEASE_APP_ID` and secret `APP_RELEASE_PRIVATE_KEY` in `app-modules`, and retain the existing `NPM_TOKEN` secret for npm publishing. The app-monorepo PR is never merged automatically.

The app-monorepo job checks the existing module-ID registry but does not regenerate it: `module-id:update` requires a fresh Union Build module-ID map, which is unavailable in a clean dependency-update job. If a release adds native runtime modules, generate that map and update the registry during app-monorepo PR validation before merging it.

## Chain runtimes

Rust chain libraries (Zcash and Monero) live in [chain-runtimes](./chain-runtimes/README.md),
separately from React Native workspaces; see their build and test commands there.
19 changes: 19 additions & 0 deletions chain-runtimes/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Chain runtimes

Rust chain libraries compiled to wasm. Each chain owns its Cargo workspace,
lockfile, toolchain, patches and build outputs. These are not React Native packages
and are not part of the root Yarn workspaces or their version/publish commands.

- [Zcash](./zcash/README.md)
- [Monero](./monero/README.md)

Root shortcuts for Zcash (the direct commands in its README need no Node install):

```sh
yarn zcash:prepare
yarn zcash:test
yarn zcash:build
```

Generated wasm stays out of Git. Both runtimes are built, tested and published to
npm by the manually triggered **publish-runtime-packages** workflow.
Comment thread
ByteZhang1024 marked this conversation as resolved.
Resolved
5 changes: 5 additions & 0 deletions chain-runtimes/monero/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# macOS /usr/bin/ar cannot read wasm object files and silently writes an empty
# archive, which surfaces at link time as `undefined symbol: sqlite3_*`.
# Use LLVM's ar; the cc crate reads AR_<target>.
[env]
AR_wasm32_unknown_unknown = "/opt/homebrew/opt/llvm/bin/llvm-ar"
13 changes: 13 additions & 0 deletions chain-runtimes/monero/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/target
/pkg
/pkg-keys
/zcash-wasm-manifest.json
/vendor
*.log
__pycache__/

# Keep local wallet fixtures out of source control.
/.secrets/

/dist
/pkg-node
Loading
Loading