Repository navigation
Feat/zcash chain runtime #149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
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 4f23461
fix: make zcash opfs storage durable across workers
ByteZhang1024 c19cde7
feat: pczt combine, spending-purpose ufvk import, transparent account…
ByteZhang1024 da22f21
chore: wip snapshot of zcash runtime transparent shielding
ByteZhang1024 fdc95fc
feat: guard pczt combining and drop the stateful shielding path
ByteZhang1024 d51ade6
feat: prepare independent zcash runtime releases
ByteZhang1024 790f36c
fix: validate zcash recipients and remove pre-release compatibility
ByteZhang1024 ba2b133
fix: verify zcash transparent previous transactions
ByteZhang1024 f9cd9f7
refactor: simplify zcash previous transaction parsing
ByteZhang1024 06b222a
fix: harden zcash runtime validation and lifecycle
ByteZhang1024 1aa7e10
feat: add monero runtime and harden zcash send handling
ByteZhang1024 e6c5701
feat(monero): bind signing to a reviewed request and claim inputs bef…
ByteZhang1024 e4dde24
feat(zcash): review PCZTs before signing and route lightwalletd throu…
ByteZhang1024 faa6cd7
fix(zcash): never report an uncertain broadcast as rejected
ByteZhang1024 facad65
fix(monero): record sends before broadcasting and validate node fees …
ByteZhang1024 e5446b1
docs: align chain runtime docs with current behavior
ByteZhang1024 a804163
test(monero): follow connect returning the node network in live tests
ByteZhang1024 0b03e66
chore: translate chain runtime comments to English
ByteZhang1024 5d65850
fix(monero): load the runtime package in measure-scan
ByteZhang1024 7d4ca5f
docs: keep only the docs needed to build, integrate and release
ByteZhang1024 72221e4
docs: drop design history and release-candidate checklists from chain…
ByteZhang1024 8e0d4c8
docs: rewrite chain runtime READMEs in English against the current API
ByteZhang1024 fc7e5c1
fix(zcash): treat shielded-requirements-not-met as an unknown broadca…
ByteZhang1024 f6d68a3
fix(monero): keep only reorgable own sends pending on rewind
ByteZhang1024 1aedcc6
chore: version zcash and monero runtimes 0.1.0-alpha.1
ByteZhang1024 6e41a57
ci(zcash): allow alpha releases from any branch
ByteZhang1024 1ffe792
ci(monero): add build and npm publish workflows
ByteZhang1024 79b2389
build: share one toolchain across the zcash and monero runtimes
ByteZhang1024 b7740d5
ci: publish alpha manually and rc/latest only from main
ByteZhang1024 ada587b
ci: publish runtime alphas to npm next like the native previews
ByteZhang1024 8aed7cf
ci: publish from the runtime workflows like package-publish
ByteZhang1024 7b9dab9
ci: build, pack and publish on manual runs only
ByteZhang1024 32cf763
fix(monero): bind broadcast records to the sending account and accept…
ByteZhang1024 89486d1
test(monero): change to an own subaddress or another account is refused
ByteZhang1024 0a61dbf
ci: merge runtime workflows into publish-runtime-packages
ByteZhang1024 6382ac5
ci: publish runtime packages from a separate job with pinned actions
ByteZhang1024 b262e71
fix(zcash): derive the UFVK without Sapling
ByteZhang1024 c5ffe71
ci: build chain runtimes through a per-runtime ci.sh hook
ByteZhang1024 1a9213d
ci: limit runtime publishing to own packages and alpha off main
ByteZhang1024 affda0a
ci: publish only discovered runtimes with NPM_TOKEN
ByteZhang1024 2cd705c
ci: run runtime publishing manually only and verify published versions
ByteZhang1024 b7225a9
feat(runtime): reclaim free database pages and report unsupported sto…
ByteZhang1024 9a60244
ci: publish a fixed list of runtime packages
ByteZhang1024 77fdcec
fix(zcash): send hardware signers a copy without Sapling or proving f…
ByteZhang1024 387e47c
fix(monero): use the patched OPFS VFS and check storage before broadc…
ByteZhang1024 997f6a7
feat(zcash): sign with account keys instead of the seed and mark chan…
ByteZhang1024 aa67a39
docs: trim chain runtime docs to usage, design reasons and pitfalls
ByteZhang1024 0b4b0dc
fix(zcash): stop copying the device PCZT size limit into the runtime
ByteZhang1024 f7e7cc6
fix(monero): follow wallet2 unlock rules, keep the latest node select…
ByteZhang1024 208bd65
docs(zcash): describe signer redaction and accepted outputs accurately
ByteZhang1024 10fae0b
fix: simplify privacy runtimes and preserve transaction identity
ByteZhang1024 2c16031
chore: bump privacy runtimes to 0.1.0-alpha.3
ByteZhang1024 bb5af27
test: avoid sensitive values in zcash assertion output
ByteZhang1024 eab5389
fix: bind monero broadcast amounts to reviewed outputs
ByteZhang1024 f43c8ac
chore: merge main into privacy runtimes
ByteZhang1024 db4598f
fix: distinguish zcash self payments from change
ByteZhang1024 7106e1f
fix: allow zcash transparent change at the receive address
ByteZhang1024 1e10e4c
fix: keep the monero spend key inside the runtime
ByteZhang1024 477f96f
fix: wipe remaining monero key copies
ByteZhang1024 422972d
docs: note that hosts never resubmit stored zcash sends
ByteZhang1024 2b5da9e
fix: enable secure delete on every zcash wallet connection
ByteZhang1024 202d022
chore: bump privacy runtimes to 0.1.0-alpha.5
ByteZhang1024 73b270c
docs: trim privacy runtime comments and docs to current behavior
ByteZhang1024 bb09840
fix: truncate deleted runtime files and refuse newer zcash databases
ByteZhang1024 df9007f
chore: bump privacy runtimes to 0.1.0-alpha.6
ByteZhang1024 92bdee1
perf: skip the flush after truncating a freed runtime file
ByteZhang1024 ca04fce
feat: report zcash dust change beside the account balance
ByteZhang1024 95c16ce
chore: bump privacy runtimes to 0.1.0-alpha.7
ByteZhang1024 d768225
fix(zcash): refuse half a spending derivation pair on import
ByteZhang1024 e056c75
ci: check the chain runtimes on pull requests
ByteZhang1024 a6a6529
chore: remove runtime debug tooling and unused exports
ByteZhang1024 9cc48c3
fix(zcash): name the address an output actually paid in history
ByteZhang1024 15c510e
chore: bump privacy runtimes to 0.1.0-alpha.8
ByteZhang1024 a1ae6df
fix(zcash): improve sync reliability and restart at a later birthday
ByteZhang1024 3b8a09a
fix(monero): improve scanning, restart at a later birthday, record sp…
ByteZhang1024 4b26790
chore: bump privacy runtimes to 0.1.0-alpha.9
ByteZhang1024 a28c995
chore: trim chain runtime comments and docs
ByteZhang1024 5981ec3
fix: clear clippy warnings in the chain runtimes
ByteZhang1024 5a2a851
feat: prune the Zcash scan queue on account removal and look accounts…
ByteZhang1024 7d49ca2
chore: bump privacy runtimes to 0.1.0-alpha.10
ByteZhang1024 afcea40
fix: prune the scan queue when a Zcash rescan moves the birthday late…
ByteZhang1024 ebc73b5
feat: export Monero outputs for device key image sync and import veri…
ByteZhang1024 7d9a32e
chore: bump privacy runtimes to 0.1.0-alpha.11
ByteZhang1024 455a387
feat: report Monero receive fees, primary-address receipts and confir…
ByteZhang1024 f1d8e44
test: cover the fee a Zcash receive reports
ByteZhang1024 62ffe20
feat: record the payment ID of Monero receives
ByteZhang1024 8d6d94e
feat: plan, assemble and verify Monero transactions signed on a hardw…
ByteZhang1024 b84cb87
feat: return the Monero tx private key from signing, checked against …
ByteZhang1024 f20db62
feat: mark Monero coinbase receives and keep their tx public key for …
ByteZhang1024 9039d0f
feat: share one Zcash fee and expiry policy across the runtimes (ZIP …
ByteZhang1024 003a2de
feat: seal Zcash transparent-to-shielded outputs to the Orchard OVK a…
ByteZhang1024 fee159d
fix: release the notes of a definitively rejected Zcash send at once …
ByteZhang1024 d63d74e
fix: refuse a Zcash lightwalletd endpoint on another chain and bound …
ByteZhang1024 fdf75e0
fix: report a Monero chain tip with the network of the node that serv…
ByteZhang1024 7c39250
fix: drop queued Monero scan ranges above a lowered chain tip
ByteZhang1024 b18d54a
fix: saturate the Monero confirmation count at the largest chain tip
ByteZhang1024 a162994
chore: bump the Monero runtime to 0.1.0-alpha.12
ByteZhang1024 daf733d
chore: publish the runtimes as @onekeyfe/zcash-runtime, @onekeyfe/zca…
ByteZhang1024 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.