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

[Zcash]: Migrate Zcash blockchain to Rust #4232

Merged
merged 26 commits into from
Jan 27, 2025
Merged

Conversation

satoshiotomakan
Copy link
Collaborator

@satoshiotomakan satoshiotomakan commented Jan 22, 2025

Description

Continued the C++ -> Rust port of the Bitcoin chains, in particular, ZEC, ZEL and KMD.

Adds Rust crates:

  1. tw_zcash - ZCash blockchain implementation (including transparent transaction, address) based on tw_bitcoin and tw_utxo.
  2. tw_komodo - ZCash-like chain base on tw_zcash

How to test

Run C++, Rust, iOS, Android, WASM tests

Breaking Changes

  1. BitcoinV2.Proto.OutPoint -> Utxo.Proto.OutPoint
  2. BitcoinV2.Proto.SigningOutput.transaction is now a oneof either Utxo.Proto.Transaction or Zcash.Proto.Transaction

Checklist

  • Create pull request as draft initially, unless its complete.
  • Add tests to cover changes as needed.
  • Update documentation as needed.
  • If there is a related Issue, mention it in the description.

If you're adding a new blockchain

  • I have read the guidelines for adding a new blockchain.

* Add `TransactionBuilder::zcash_extra_data`
* Add `ZcashTransaction`, `ZcashSighash`
* Add `UtxoSigningContext`
* Revert `TransactionBuilder.fee_policy`
* Add `Utxo.proto`
* Fix `ZcashTransaction`preImage and sighashing
* Add `tw_zcash` doc comments
* Add ZCash transaction builder test
* Enable Rust doc tests on CI
@satoshiotomakan satoshiotomakan marked this pull request as ready for review January 23, 2025 23:25
Copy link

github-actions bot commented Jan 23, 2025

Binary size comparison

➡️ aarch64-apple-ios:

- 12.78 MB
+ 12.92 MB 	 +148 KB

➡️ aarch64-apple-ios-sim:

- 12.78 MB
+ 12.92 MB 	 +148 KB

➡️ aarch64-linux-android:

- 16.57 MB
+ 16.78 MB 	 +217 KB

➡️ armv7-linux-androideabi:

- 14.01 MB
+ 14.16 MB 	 +161 KB

➡️ wasm32-unknown-emscripten:

- 11.73 MB
+ 11.89 MB 	 +167 KB

registry.json Show resolved Hide resolved
rust/chains/tw_bitcoin/src/modules/planner/psbt_planner.rs Outdated Show resolved Hide resolved
rust/chains/tw_zcash/src/compiler.rs Outdated Show resolved Hide resolved
rust/chains/tw_zcash/src/lib.rs Outdated Show resolved Hide resolved
rust/chains/tw_zcash/src/lib.rs Show resolved Hide resolved
@satoshiotomakan satoshiotomakan merged commit 6adb32d into master Jan 27, 2025
14 checks passed
@satoshiotomakan satoshiotomakan deleted the s/rust-zcash branch January 27, 2025 19:01
@Brindle79
Copy link

Description

Continued the C++ -> Rust port of the Bitcoin chains, in particular, ZEC, ZEL and KMD.

Adds Rust crates:

  1. tw_zcash - ZCash blockchain implementation (including transparent transaction, address) based on tw_bitcoin and tw_utxo.

  2. tw_komodo - ZCash-like chain base on tw_zcash

How to test

Run C++, Rust, iOS, Android, WASM tests

Breaking Changes

  1. BitcoinV2.Proto.OutPoint -> Utxo.Proto.OutPoint

  2. BitcoinV2.Proto.SigningOutput.transaction is now a oneof either Utxo.Proto.Transaction or Zcash.Proto.Transaction

Checklist

  • Create pull request as draft initially, unless its complete.

  • Add tests to cover changes as needed.

  • Update documentation as needed.

  • If there is a related Issue, mention it in the description.

If you're adding a new blockchain

  • I have read the guidelines for adding a new blockchain.

I don't have compatible desk top to miragte bnb beach from trust wallet to bnb wallet as iPad is not compatible transfer beacon to to bnb wallet from trusted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants