Skip to content
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

[WIP]Feat/zcash #1366

Merged
merged 77 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from 70 commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
c6a5fbe
feat: zcash basic support
soralit Aug 22, 2024
45a5272
feat: introduce pczt vendor crate
soralit Oct 29, 2024
938ba47
refactor: zcash crates
soralit Oct 29, 2024
7b2bfc8
fix: build
soralit Oct 30, 2024
9a18035
feat: update pczt data hash
soralit Oct 31, 2024
ac2ece9
feat: extend pczt functionality
soralit Oct 31, 2024
a612b34
feat: impl signer for pczt
soralit Oct 31, 2024
905f9f7
fix: pczt hash
soralit Nov 5, 2024
7fdb07d
fix: adjust transaction signing code
soralit Nov 5, 2024
b3e1b9a
feat: adopt pczt latest changes
soralit Nov 13, 2024
ec80558
feat: support pczt check and parse output ciphertext
soralit Nov 14, 2024
40b156d
feat: parst pczt transparent and orchard
soralit Nov 18, 2024
df4dbcf
feat: add zcash interfaces
soralit Nov 18, 2024
f25494f
feat: zcash ui
soralit Nov 19, 2024
ee311c6
feat: add rust structs
soralit Nov 21, 2024
ff00372
chore: reduce firmware size
soralit Nov 21, 2024
8a7e196
chore: update dep
soralit Nov 22, 2024
2d58467
feat: zcash basic transaction view
soralit Nov 26, 2024
783845d
feat: pull pczt latest changes
soralit Dec 6, 2024
c68244a
fix: correct sign hash and check
soralit Dec 9, 2024
3b98da7
chore: bump version
soralit Dec 10, 2024
5ac5d2c
fix: should not render transparent part when it is None
soralit Dec 11, 2024
33dfe7a
fix: omit pczt checking ATM
soralit Dec 11, 2024
6b0db39
fix: wrong total transfer value
soralit Dec 12, 2024
b8979c1
fix: pczt transaction signing and display issues
soralit Dec 12, 2024
049014a
fix: memo decode / an edge case of crash / use TRGN randomness when s…
soralit Dec 13, 2024
7b76767
feat: Use TRNG as a custom `getrandom` backend
str4d Dec 13, 2024
286f73b
zcash: Switch to obtaining randomness through `rand_core::OsRng`
str4d Dec 13, 2024
e6d109e
zcash: Replace vendored `zcash_protocol` with published crate
str4d Dec 13, 2024
2717029
zcash: Replace vendored `zcash_encoding` with published crate
str4d Dec 13, 2024
0b4e182
zcash: Replace vendored `zcash_address` with published crate
str4d Dec 13, 2024
9d7d6ea
zcash: Replace vendored `zip32` with published crate
str4d Dec 13, 2024
a29783e
zcash: Replace vendored Sinsemilla with `sinsemilla` crate
str4d Dec 13, 2024
d5923d3
fix: zcash memory leak
soralit Dec 13, 2024
b0ab795
fix: sign transparent input should return der signature with sighash …
soralit Dec 14, 2024
d3c483b
fix(zcash): shielding transaction display issue and modify tx_modifia…
soralit Dec 16, 2024
6dfe512
fix: unshielding transaction failed because of the hash calculation
soralit Dec 16, 2024
1ef4480
chore: update rust-toolchain
soralit Dec 16, 2024
99379eb
chore: update toolchain
soralit Dec 16, 2024
3c3cc5e
fix: judge dummy output
soralit Dec 16, 2024
ca92e5e
chore: upgrade toolchain for CI
soralit Dec 16, 2024
43ee41b
fix: unshielding transaction signing
soralit Dec 16, 2024
a9075ea
zcash: Remove vendored `zcash_encoding` files
str4d Dec 16, 2024
df5de09
zcash: Replace vendored `zcash_primitives` with `zcash_transparent`
str4d Dec 16, 2024
50109c9
zcash: Replace vendored `orchard` with upstream branch
str4d Dec 16, 2024
ddd20ba
zcash: Replace vendored `zcash_keys` with upstream branch
str4d Dec 16, 2024
ac1c0ec
zcash: Replace vendored `pczt` with upstream branch
str4d Dec 17, 2024
eaf9f30
zcash: Display user-facing addresses for outputs
str4d Dec 17, 2024
5934b1e
fix: change output is marked as invalid
soralit Dec 17, 2024
373df13
feat: add fee value display
soralit Dec 17, 2024
3034a28
chore: refine checking logic
soralit Dec 17, 2024
76d6a9d
fix(zcash): home page zec issue
soralit Dec 17, 2024
5539026
refactor(zcash): no hardcoded network
soralit Dec 17, 2024
90b26f5
style: run fmt
soralit Dec 17, 2024
7a179c9
style(zcash): optimize import
soralit Dec 17, 2024
b379e52
style(zcash): run cargo fix
soralit Dec 17, 2024
dd637e4
fix(bitcoin): issues happened after upgrade bitcoin
soralit Dec 17, 2024
f2fb1c3
fix: disable checking ATM
soralit Dec 17, 2024
aa0220a
fix: transaction signing failed issue
soralit Dec 17, 2024
2e2e5b9
feat: ui refinement for sapling part
soralit Dec 17, 2024
b0b01da
feat: ui refinement for sapling part
soralit Dec 17, 2024
0b79d5c
fix: zcash receive page issue
soralit Dec 18, 2024
4641f77
fix: unit test
soralit Dec 18, 2024
1a8bc53
feat: upgrade zcash dep
soralit Dec 18, 2024
bed660d
feat: support passphrase and slip39 to zcash
soralit Dec 18, 2024
fa3f10c
fix: ui issue
soralit Dec 18, 2024
6a04d69
fix: open checking logic
soralit Dec 18, 2024
3882c14
fix: disable zcash for passphrase and slip39 wallet for now
soralit Dec 18, 2024
2a7c871
chore: bump beta version
soralit Dec 18, 2024
6cc43e1
fix: build
soralit Dec 18, 2024
d41a8f2
fix: passphrase judge error
soralit Dec 18, 2024
337981f
fix: issues
soralit Dec 19, 2024
9a81ada
feat: allow p2sh transparent output and input. refactor ut
soralit Dec 19, 2024
05b1372
fix: amount calculation
soralit Dec 19, 2024
71bdfb8
fix: app crash
soralit Dec 19, 2024
79cc493
fix: connect wallet issue
soralit Dec 19, 2024
82a380c
fix: ui issues
soralit Dec 19, 2024
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
4 changes: 2 additions & 2 deletions .github/workflows/rust-aptos-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2023-12-01
toolchain: nightly-2024-01-31
override: true
components: rustfmt
target: x86_64-apple-darwin
Expand All @@ -24,4 +24,4 @@ jobs:
uses: taiki-e/install-action@cargo-llvm-cov

- name: Run rust/apps/aptos
run: cd rust/apps/aptos && cargo +nightly-2023-12-01 llvm-cov --fail-under-functions 50 --fail-under-lines 50 --fail-under-regions 50
run: cd rust/apps/aptos && cargo +nightly-2024-01-31 llvm-cov --fail-under-functions 50 --fail-under-lines 50 --fail-under-regions 50
4 changes: 2 additions & 2 deletions .github/workflows/rust-arweave-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2023-12-01
toolchain: nightly-2024-01-31
override: true
components: rustfmt
target: x86_64-apple-darwin
Expand All @@ -24,4 +24,4 @@ jobs:
uses: taiki-e/install-action@cargo-llvm-cov

- name: Run rust/apps/arweave
run: cd rust/apps/arweave && cargo +nightly-2023-12-01 llvm-cov --fail-under-functions 50 --fail-under-lines 50 --fail-under-regions 50
run: cd rust/apps/arweave && cargo +nightly-2024-01-31 llvm-cov --fail-under-functions 50 --fail-under-lines 50 --fail-under-regions 50
4 changes: 2 additions & 2 deletions .github/workflows/rust-bitcoin-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2023-12-01
toolchain: nightly-2024-01-31
override: true
components: rustfmt
target: x86_64-apple-darwin
Expand All @@ -24,4 +24,4 @@ jobs:
uses: taiki-e/install-action@cargo-llvm-cov

- name: Run rust/apps/bitcoin
run: cd rust/apps/bitcoin && cargo +nightly-2023-12-01 llvm-cov --fail-under-functions 50 --fail-under-lines 50 --fail-under-regions 50
run: cd rust/apps/bitcoin && cargo +nightly-2024-01-31 llvm-cov --fail-under-functions 50 --fail-under-lines 50 --fail-under-regions 50
4 changes: 2 additions & 2 deletions .github/workflows/rust-cardano-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2023-12-01
toolchain: nightly-2024-01-31
override: true
components: rustfmt
target: x86_64-apple-darwin
Expand All @@ -24,4 +24,4 @@ jobs:
uses: taiki-e/install-action@cargo-llvm-cov

- name: Run rust/apps/cardano
run: cd rust/apps/cardano && cargo +nightly-2023-12-01 llvm-cov --fail-under-functions 50 --fail-under-lines 50 --fail-under-regions 50
run: cd rust/apps/cardano && cargo +nightly-2024-01-31 llvm-cov --fail-under-functions 50 --fail-under-lines 50 --fail-under-regions 50
4 changes: 2 additions & 2 deletions .github/workflows/rust-cosmos-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2023-12-01
toolchain: nightly-2024-01-31
override: true
components: rustfmt
target: x86_64-apple-darwin
Expand All @@ -24,4 +24,4 @@ jobs:
uses: taiki-e/install-action@cargo-llvm-cov

- name: Run rust/apps/cosmos
run: cd rust/apps/cosmos && cargo +nightly-2023-12-01 llvm-cov --fail-under-functions 50 --fail-under-lines 50 --fail-under-regions 50
run: cd rust/apps/cosmos && cargo +nightly-2024-01-31 llvm-cov --fail-under-functions 50 --fail-under-lines 50 --fail-under-regions 50
4 changes: 2 additions & 2 deletions .github/workflows/rust-ethereum-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2023-12-01
toolchain: nightly-2024-01-31
override: true
components: rustfmt
target: x86_64-apple-darwin
Expand All @@ -24,4 +24,4 @@ jobs:
uses: taiki-e/install-action@cargo-llvm-cov

- name: Run rust/apps/ethereum
run: cd rust/apps/ethereum && cargo +nightly-2023-12-01 llvm-cov --fail-under-functions 50 --fail-under-lines 50 --fail-under-regions 50
run: cd rust/apps/ethereum && cargo +nightly-2024-01-31 llvm-cov --fail-under-functions 50 --fail-under-lines 50 --fail-under-regions 50
34 changes: 17 additions & 17 deletions .github/workflows/rust-fmt-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,40 +15,40 @@ jobs:

- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2023-12-01
toolchain: nightly-2024-01-31
override: true
target: x86_64-apple-darwin
components: rustfmt

- name: Run rust/apps/bitcoin
run: cd rust/apps/bitcoin && cargo +nightly-2023-12-01 fmt --check
run: cd rust/apps/bitcoin && cargo +nightly-2024-01-31 fmt --check
- name: Run rust/apps/ethereum
run: cd rust/apps/ethereum && cargo +nightly-2023-12-01 fmt --check
run: cd rust/apps/ethereum && cargo +nightly-2024-01-31 fmt --check
- name: Run rust/apps/solana
run: cd rust/apps/solana && cargo +nightly-2023-12-01 fmt --check
run: cd rust/apps/solana && cargo +nightly-2024-01-31 fmt --check
- name: Run rust/apps/cardano
run: cd rust/apps/cardano && cargo +nightly-2023-12-01 fmt --check
run: cd rust/apps/cardano && cargo +nightly-2024-01-31 fmt --check
- name: Run rust/apps/tron
run: cd rust/apps/tron && cargo +nightly-2023-12-01 fmt --check
run: cd rust/apps/tron && cargo +nightly-2024-01-31 fmt --check
- name: Run rust/apps/near
run: cd rust/apps/near && cargo +nightly-2023-12-01 fmt --check
run: cd rust/apps/near && cargo +nightly-2024-01-31 fmt --check
- name: Run rust/apps/xrp
run: cd rust/apps/xrp && cargo +nightly-2023-12-01 fmt --check
run: cd rust/apps/xrp && cargo +nightly-2024-01-31 fmt --check
- name: Run rust/apps/cosmos
run: cd rust/apps/cosmos && cargo +nightly-2023-12-01 fmt --check
run: cd rust/apps/cosmos && cargo +nightly-2024-01-31 fmt --check
- name: Run rust/apps/aptos
run: cd rust/apps/aptos && cargo +nightly-2023-12-01 fmt --check
run: cd rust/apps/aptos && cargo +nightly-2024-01-31 fmt --check
- name: Run rust/apps/sui
run: cd rust/apps/sui && cargo +nightly-2023-12-01 fmt --check
run: cd rust/apps/sui && cargo +nightly-2024-01-31 fmt --check
- name: Run rust/apps/arweave
run: cd rust/apps/arweave && cargo +nightly-2023-12-01 fmt --check
run: cd rust/apps/arweave && cargo +nightly-2024-01-31 fmt --check
- name: Run rust/apps/stellar
run: cd rust/apps/stellar && cargo +nightly-2023-12-01 fmt --check
run: cd rust/apps/stellar && cargo +nightly-2024-01-31 fmt --check
- name: Run rust/apps/utils
run: cd rust/apps/utils && cargo +nightly-2023-12-01 fmt --check
run: cd rust/apps/utils && cargo +nightly-2024-01-31 fmt --check
- name: Run rust/apps/wallets
run: cd rust/apps/wallets && cargo +nightly-2023-12-01 fmt --check
run: cd rust/apps/wallets && cargo +nightly-2024-01-31 fmt --check
- name: Run rust/keystore
run: cd rust/keystore && cargo +nightly-2023-12-01 fmt --check
run: cd rust/keystore && cargo +nightly-2024-01-31 fmt --check
- name: Run rust/rust_c
run: cd rust/rust_c && cargo +nightly-2023-12-01 fmt --check
run: cd rust/rust_c && cargo +nightly-2024-01-31 fmt --check
4 changes: 2 additions & 2 deletions .github/workflows/rust-keystore-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2023-12-01
toolchain: nightly-2024-01-31
override: true
components: rustfmt
target: x86_64-apple-darwin
Expand All @@ -24,4 +24,4 @@ jobs:
uses: taiki-e/install-action@cargo-llvm-cov

- name: Run rust/keystore
run: cd rust/keystore && cargo +nightly-2023-12-01 llvm-cov --fail-under-functions 50 --fail-under-lines 50 --fail-under-regions 50
run: cd rust/keystore && cargo +nightly-2024-01-31 llvm-cov --fail-under-functions 50 --fail-under-lines 50 --fail-under-regions 50
4 changes: 2 additions & 2 deletions .github/workflows/rust-near-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2023-12-01
toolchain: nightly-2024-01-31
override: true
components: rustfmt
target: x86_64-apple-darwin
Expand All @@ -24,4 +24,4 @@ jobs:
uses: taiki-e/install-action@cargo-llvm-cov

- name: Run rust/apps/near
run: cd rust/apps/near && cargo +nightly-2023-12-01 llvm-cov --fail-under-functions 50 --fail-under-lines 50 --fail-under-regions 50
run: cd rust/apps/near && cargo +nightly-2024-01-31 llvm-cov --fail-under-functions 50 --fail-under-lines 50 --fail-under-regions 50
4 changes: 2 additions & 2 deletions .github/workflows/rust-solana-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2023-12-01
toolchain: nightly-2024-01-31
override: true
components: rustfmt
target: x86_64-apple-darwin
Expand All @@ -24,4 +24,4 @@ jobs:
uses: taiki-e/install-action@cargo-llvm-cov

- name: Run rust/apps/solana
run: cd rust/apps/solana && cargo +nightly-2023-12-01 llvm-cov --fail-under-functions 50 --fail-under-lines 50 --fail-under-regions 50
run: cd rust/apps/solana && cargo +nightly-2024-01-31 llvm-cov --fail-under-functions 50 --fail-under-lines 50 --fail-under-regions 50
4 changes: 2 additions & 2 deletions .github/workflows/rust-stellar-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2023-12-01
toolchain: nightly-2024-01-31
override: true
components: rustfmt
target: x86_64-apple-darwin
Expand All @@ -24,4 +24,4 @@ jobs:
uses: taiki-e/install-action@cargo-llvm-cov

- name: Run rust/apps/stellar
run: cd rust/apps/stellar && cargo +nightly-2023-12-01 llvm-cov --fail-under-functions 50 --fail-under-lines 50 --fail-under-regions 50
run: cd rust/apps/stellar && cargo +nightly-2024-01-31 llvm-cov --fail-under-functions 50 --fail-under-lines 50 --fail-under-regions 50
4 changes: 2 additions & 2 deletions .github/workflows/rust-sui-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2023-12-01
toolchain: nightly-2024-01-31
override: true
components: rustfmt
target: x86_64-apple-darwin
Expand All @@ -24,4 +24,4 @@ jobs:
uses: taiki-e/install-action@cargo-llvm-cov

- name: Run rust/apps/sui
run: cd rust/apps/sui && cargo +nightly-2023-12-01 llvm-cov --fail-under-functions 50 --fail-under-lines 50 --fail-under-regions 50
run: cd rust/apps/sui && cargo +nightly-2024-01-31 llvm-cov --fail-under-functions 50 --fail-under-lines 50 --fail-under-regions 50
4 changes: 2 additions & 2 deletions .github/workflows/rust-ton-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2023-12-01
toolchain: nightly-2024-01-31
override: true
components: rustfmt
target: x86_64-apple-darwin
Expand All @@ -24,4 +24,4 @@ jobs:
uses: taiki-e/install-action@cargo-llvm-cov

- name: Run rust/apps/ton
run: cd rust/apps/ton && cargo +nightly-2023-12-01 llvm-cov --fail-under-functions 50 --fail-under-lines 50 --fail-under-regions 50
run: cd rust/apps/ton && cargo +nightly-2024-01-31 llvm-cov --fail-under-functions 50 --fail-under-lines 50 --fail-under-regions 50
4 changes: 2 additions & 2 deletions .github/workflows/rust-tron-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2023-12-01
toolchain: nightly-2024-01-31
override: true
components: rustfmt
target: x86_64-apple-darwin
Expand All @@ -24,4 +24,4 @@ jobs:
uses: taiki-e/install-action@cargo-llvm-cov

- name: Run rust/apps/tron
run: cd rust/apps/tron && cargo +nightly-2023-12-01 llvm-cov --fail-under-functions 50 --fail-under-lines 50 --fail-under-regions 50
run: cd rust/apps/tron && cargo +nightly-2024-01-31 llvm-cov --fail-under-functions 50 --fail-under-lines 50 --fail-under-regions 50
4 changes: 2 additions & 2 deletions .github/workflows/rust-utils-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2023-12-01
toolchain: nightly-2024-01-31
override: true
components: rustfmt
target: x86_64-apple-darwin
Expand All @@ -24,4 +24,4 @@ jobs:
uses: taiki-e/install-action@cargo-llvm-cov

- name: Run rust/apps/utils
run: cd rust/apps/utils && cargo +nightly-2023-12-01 llvm-cov --fail-under-functions 50 --fail-under-lines 50 --fail-under-regions 50
run: cd rust/apps/utils && cargo +nightly-2024-01-31 llvm-cov --fail-under-functions 50 --fail-under-lines 50 --fail-under-regions 50
4 changes: 2 additions & 2 deletions .github/workflows/rust-wallets-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2023-12-01
toolchain: nightly-2024-01-31
override: true
components: rustfmt
target: x86_64-apple-darwin
Expand All @@ -24,4 +24,4 @@ jobs:
uses: taiki-e/install-action@cargo-llvm-cov

- name: Run rust/apps/wallets
run: cd rust/apps/wallets && cargo +nightly-2023-12-01 llvm-cov --fail-under-functions 50 --fail-under-lines 50 --fail-under-regions 50
run: cd rust/apps/wallets && cargo +nightly-2024-01-31 llvm-cov --fail-under-functions 50 --fail-under-lines 50 --fail-under-regions 50
4 changes: 2 additions & 2 deletions .github/workflows/rust-xrp-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2023-12-01
toolchain: nightly-2024-01-31
override: true
components: rustfmt
target: x86_64-apple-darwin
Expand All @@ -24,4 +24,4 @@ jobs:
uses: taiki-e/install-action@cargo-llvm-cov

- name: Run rust/apps/xrp
run: cd rust/apps/xrp && cargo +nightly-2023-12-01 llvm-cov --fail-under-functions 50 --fail-under-lines 50 --fail-under-regions 50
run: cd rust/apps/xrp && cargo +nightly-2024-01-31 llvm-cov --fail-under-functions 50 --fail-under-lines 50 --fail-under-regions 50
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ RUN apt-get install -y \
RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly -y
ENV PATH=/root/.cargo/bin:$PATH

RUN rustup default nightly-2023-12-01
RUN rustup target add thumbv7em-none-eabihf --toolchain nightly-2023-12-01
RUN rustup default nightly-2024-01-31
RUN rustup target add thumbv7em-none-eabihf --toolchain nightly-2024-01-31
RUN cargo install cbindgen bindgen-cli

RUN pip3 install PyYaml
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ brew install armmbed/formulae/arm-none-eabi-gcc

# Install Rust
# For instructions, visit https://www.rust-lang.org/tools/install
rustup install nightly-2023-12-01
rustup install nightly-2024-01-31
rustup target add thumbv7em-none-eabihf
cargo install bindgen-cli
cargo install cbindgen
Expand Down
2 changes: 1 addition & 1 deletion docs/SIMULATOR.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ We recommend creating a virtual env for this project: https://docs.python.org/3/
Please follow Rust official site: https://www.rust-lang.org/tools/install

We have fixed the rust version in most of our rust libs so please run this command when you finish rust setup:
> rustup install nightly-2023-12-01
> rustup install nightly-2024-01-31

`cbindgen` is also required to build essential C header files for Rust libs, so run the following after rust setup:
> cargo install cbindgen
Expand Down
59 changes: 59 additions & 0 deletions docs/protocols/ur_registrys/draft/zcash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
## Keystone Zcash UR Registries

This protocol is based on the [Uniform Resources](https://github.com/BlockchainCommons/Research/blob/master/papers/bcr-2020-005-ur.md). It describes the data schemas (UR Registries) used in Zcash integrations.

### Introduction

Keystone's QR workflow involves two main steps: linking the wallet and signing data, broken down into three sub-steps:

1. **Wallet Linking:** Keystone generates a QR code with public key info for the Watch-Only wallet to scan and import.
2. **Transaction Creation:** The Watch-Only wallet creates a transaction and generates a QR code for Keystone to scan, parse, and display.
3. **Signing Authorization:** Keystone signs the transaction, displays the result as a QR code for the Watch-Only wallet to scan and broadcast.

Two UR Registries are needed for these steps, utilizing the Partially Created Zcash Transaction structure.

### Zcash Accounts

#### Unified Full Viewing Key (UFVK)

UFVK is a standard account expression format in Zcash as per [ZIP-316](https://zips.z.cash/zip-0316). It consists of:

1. Transparent
2. Sprout
3. Sapling
4. Orchard

This protocol focuses on the Transparent and Orchard components.

#### CDDL for Zcash Accounts

The specification uses CDDL and includes `crypto-hdkey` and `crypto-key-path` specs defined in https://github.com/BlockchainCommons/Research/blob/master/papers/bcr-2020-007-hdkey.md.

```cddl
zcash-accounts = {
seed-fingerprint: bytes.32, ; the seed fingerprint specified by ZIP-32 to identify the wallet
accounts: [+ zcash-ufvk],
? origin: text, ; source of data, e.g., Keystone
}

zcash-ufvk = {
? transparent: crypto-hdkey,
orchard: zcash-fvk,
? name: text,
}

zcash-fvk = {
key-path: crypto-key-path,
key-data: bytes,
}
```

`zcash-ufvk` describes the UFVK of a Zcash account. Each seed has multiple accounts with different indexes. For index 0, `zcash-ufvk` should contain a BIP32 extended public key with path `M/44'/133'/0'` (transparent) and an Orchard FVK with path `M_orchard/32'/133'/0'` (Orchard).
soralit marked this conversation as resolved.
Show resolved Hide resolved

#### CDDL for Zcash PCZT

```cddl
zcash-pczt {
data: bytes, ; Zcash PCZT, signatures inserted after signing.
}
```
Binary file added images/coin/coinZec.png
soralit marked this conversation as resolved.
Show resolved Hide resolved
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/wallet/walletZashi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/walletList/walletListZashi.png
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably not going to work in light mode, because the Zashi logo and name are in white.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion keystone3-firmware-release
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nightly-2023-12-01
nightly-2024-01-31
Loading
Loading