Commit Graph

159 Commits

Author SHA1 Message Date
Honza 2abc7ae2e6 Address several minor change requests 2023-01-24 16:14:44 +01:00
Honza 0f1663f02c Unify return type of collection returning methods
- Switched fetchUtxos() to return Sequence instead of List
- Added a check on empty tAddress input
2023-01-24 11:41:20 +01:00
Honza 703d4034af Refactor fetchTransaction() to work with Response
- Refactored this server call to adopt our new Response mechanism
- GrpsStatusResolver.resolveFailureFromStatus() now accepts Throwable input
- Added Response.Failure.toThrowable() to satisfy subsequent server calls results processing
- A few other minor refactoring changes
2023-01-23 17:18:20 +01:00
Honza 64e5a5cfa5 Adopt enhanced GRPC response model
- Adopted in a few endpoints
2023-01-16 17:50:36 +01:00
Honza b1b474af5b Repackage cash.z.wallet.sdk.rpc to cash.z.wallet.sdk.internal.rpc 2023-01-11 16:18:33 +01:00
Honza fb50329862 Remove grpc dependency from sdk-lib module 2023-01-11 14:36:56 +01:00
Honza 1f22703191 Fix wrong merge 2023-01-11 10:29:39 +01:00
Honza 7c3f3f24bc Merge branch 'main' into 615-networking-module
* main:
  Bump actions/cache from 3.2.2 to 3.2.3 in /.github/actions/setup (#878)
  [#861] Remove cancel spend from public API
  [#631] Improve demo app compose UI for testing
  [#866] Clipboardmanager on Android level 21 in Demo-app
  Bump actions/upload-artifact from 3.1.1 to 3.1.2 (#871)
  Bump actions/download-artifact from 3.0.1 to 3.0.2 (#870)
  Bump actions/checkout from 3.2.0 to 3.3.0 (#869)
  [#864] Duplicate Synchronizers in Demo-app

# Conflicts:
#	demo-app/src/main/java/cash/z/ecc/android/sdk/demoapp/MainActivity.kt
#	demo-app/src/main/java/cash/z/ecc/android/sdk/demoapp/SharedViewModel.kt
#	sdk-lib/src/main/java/cash/z/ecc/android/sdk/Synchronizer.kt
2023-01-10 15:36:46 +01:00
Honza e7e0424d1f Fix benchmarking for networking module
- Moved to fixture and build type check components to the new networking module, so it's accessible from all needed parts of the projects
- Changed fixture return type to fit to all needed usages
2023-01-10 15:25:01 +01:00
Carter Jernigan 01da937fdc
[#861] Remove cancel spend from public API 2023-01-09 11:55:30 -05:00
Carter Jernigan 3afe655737
[#631] Improve demo app compose UI for testing
* Add testnet faucet to Compose UI
* Show status on home view
* Add BlockHeight for fixture wallets
* Add balance screen
* Keep screen on while syncing
* Fix conversion of seed phrase to bytes
2023-01-09 10:42:38 -05:00
Honza 8e1bef361d Merge branch 'main' into 615-networking-module
* main: (108 commits)
  [#862] Disable logging with ProGuard for Demo-app
  [#704] No static field PREVIEW_SDK_INT
  [#824] rust: cargo update
  [#855] Abandoned address property
  [#854] Regular checkpoint files update
  [#850] Use new API for build step outputs
  Bump actions/cache from 3.2.0 to 3.2.2 in /.github/actions/setup
  [#631] Initial Compose scaffolding for demo app
  Bump actions/cache from 3.0.11 to 3.2.0 in /.github/actions/setup (#845)
  [#841] Ktlint 0.48.0
  [#795] Detekt 1.22.0
  [#820] Kotlin 1.7.21 + KSP 1.7.21
  rust: Lower default log level to INFO
  Initialize the Rust library atomically
  rust: Cache span names as `CString`s
  rust: Document NDK methods and expose `ATrace_isEnabled`
  rust: cargo update
  [#819] Dokka 1.7.20
  [#815] Gradle Versions Plugin 0.44.0
  [#796] Gradle 7.6
  ...

# Conflicts:
#	CHANGELOG.md
#	darkside-test-lib/src/androidTest/java/cash/z/ecc/android/sdk/darkside/test/TestWallet.kt
#	demo-app/src/androidTest/java/cash/z/wallet/sdk/sample/demoapp/SampleCodeTest.kt
#	demo-app/src/main/java/cash/z/ecc/android/sdk/demoapp/MainActivity.kt
#	demo-app/src/main/java/cash/z/ecc/android/sdk/demoapp/demos/getbalance/GetBalanceFragment.kt
#	demo-app/src/main/java/cash/z/ecc/android/sdk/demoapp/demos/listtransactions/ListTransactionsFragment.kt
#	demo-app/src/main/java/cash/z/ecc/android/sdk/demoapp/demos/listutxos/ListUtxosFragment.kt
#	demo-app/src/main/java/cash/z/ecc/android/sdk/demoapp/demos/send/SendFragment.kt
#	gradle.properties
#	sdk-lib/src/androidTest/java/cash/z/ecc/android/sdk/integration/SanityTest.kt
#	sdk-lib/src/androidTest/java/cash/z/ecc/android/sdk/integration/TestnetIntegrationTest.kt
#	sdk-lib/src/androidTest/java/cash/z/ecc/android/sdk/integration/service/ChangeServiceTest.kt
#	sdk-lib/src/androidTest/java/cash/z/ecc/android/sdk/internal/transaction/PersistentTransactionManagerTest.kt
#	sdk-lib/src/androidTest/java/cash/z/ecc/android/sdk/util/TestWallet.kt
#	sdk-lib/src/main/AndroidManifest.xml
#	sdk-lib/src/main/java/cash/z/ecc/android/sdk/Initializer.kt
#	sdk-lib/src/main/java/cash/z/ecc/android/sdk/SdkSynchronizer.kt
#	sdk-lib/src/main/java/cash/z/ecc/android/sdk/Synchronizer.kt
#	sdk-lib/src/main/java/cash/z/ecc/android/sdk/block/CompactBlockProcessor.kt
#	sdk-lib/src/main/java/cash/z/ecc/android/sdk/internal/block/CompactBlockDownloader.kt
#	sdk-lib/src/main/java/cash/z/ecc/android/sdk/internal/service/LightWalletGrpcService.kt
#	sdk-lib/src/main/java/cash/z/ecc/android/sdk/internal/transaction/PersistentTransactionManager.kt
#	settings.gradle.kts
2023-01-09 14:29:14 +01:00
str4d 1e843fb77c
[#824] rust: cargo update
Closes zcash/zcash-android-wallet-sdk#824.
2023-01-03 13:01:21 -05:00
Honza Rychnovsky e80f3be7e3
[#854] Regular checkpoint files update 2023-01-03 13:32:01 +01:00
Honza Rychnovsky e784ddf353
[#841] Ktlint 0.48.0
* [#841] Ktlint 0.48.0

* Update + Suppress

- Missing-trailing-comma globally
- Broken no-semi rule locally
- Fixed few other minor formatting troubles
2022-12-20 09:25:04 +01:00
Honza Rychnovsky c3e41a68c2
[#795] Detekt 1.22.0
* [#795] Detekt 1.22.0

* Fix rules/its findings
2022-12-19 08:08:25 +01:00
Jack Grigg 3669afd0e2 rust: Lower default log level to INFO
This ensures that errors are logged and tracing events are generated,
but prevents debug logging in release mode. Eventually this will be
made configurable based on the SDK build type, but for now we impose
the same limits on debug builds.
2022-12-15 16:22:36 -05:00
Jack Grigg dec24e9787 Initialize the Rust library atomically
Previously if `initLogs()` was called more than once, the application
would crash. `NativeLibraryLoader` already implements a singleton for
loading the Rust library, so we now hook into that for initialization.

We now always initialize the Rust logging system, along with the tracing
event hooks and anything else we add in future.
2022-12-15 16:22:36 -05:00
Jack Grigg 7852ea1243 rust: Cache span names as `CString`s
We also avoid parsing span names as `CString`s if tracing is disabled.
2022-12-15 16:22:36 -05:00
Jack Grigg a3b575a5bb rust: Document NDK methods and expose `ATrace_isEnabled` 2022-12-15 16:22:36 -05:00
Jack Grigg ff93581945 rust: cargo update
Includes updates to Zcash Rust crates that add profiling to light client
chain scanning subcomponents.
2022-12-15 16:22:36 -05:00
Carter Jernigan 2ab6d038ed
[#742] Prevent multiple synchronizer instances
Co-authored-by: Honza <rychnovsky.honza@gmail.com>
2022-12-14 10:33:18 -05:00
Honza Rychnovsky 97c0628798
[#789] Benchmarking Demo-app
* [#789] Add Benchmark module to Demo-app

* Code cleanup

* Opti-in experimental coroutines api in tests

* Add Testing documentation

* Documentation update + ktlint

* Check screen on and keyguard unlocked in each test

* Introduce UiAutomator extensions

* Enhance BenchmarkTrace events definition

* Remove unnecessary mutex

* Change blocks range

* Increase sync blockchain timeout

- To always fit in the Balances screen timeout for the selected blocks range

* Remove unnecessary fun suspend modifiers

* Macrobenchmark lib bump to 1.2.0-alpha8

* Remove duplicate label attr in app/manifest

* File and link benchmark on CI task

* Add proguard keep rules

* Documentation update
2022-12-13 14:25:09 +01:00
Carter Jernigan d9a0e98dc0 [#811] Eliminate suspending function for sending/shielding 2022-12-12 07:34:07 -05:00
Carter Jernigan d25d67c470 [#723] Fail fast when native library fails to load 2022-12-03 09:00:40 -05:00
Jack Grigg f4755cfbd7 Create Android trace events (if available) from tracing spans 2022-11-29 19:20:24 +00:00
Jack Grigg 4c2bf6da69 Use `tracing` crate for logs
This exposes any more structured `tracing` events that are logged within
the Rust crates, while continuing to collect `log` records.
2022-11-29 19:20:24 +00:00
Carter Jernigan d118632919
[#723] Fix crash with minified release builds 2022-11-24 11:15:03 +01:00
Carter Jernigan 103d2748c6 [#780] Fix failure to submit transactions 2022-11-17 08:35:37 -05:00
Carter Jernigan 3eddd56691 [#778] Fix PendingTransactionEntity crash 2022-11-17 08:35:37 -05:00
Jack Grigg 8472d84cce rust: Define private constant for enabling ZIP 317 fees 2022-11-16 20:37:34 +00:00
Jack Grigg 727918680e rust: Fix usage of `WalletRead::get_target_and_anchor_heights`
The previous code was using the "target" height instead of the "anchor"
height, which meant the provided value of `min_confirmations` was ignored.
2022-11-16 20:37:34 +00:00
Jack Grigg e5df95c9e5 rust: `cargo update` 2022-11-16 20:37:34 +00:00
Jack Grigg c4b5c70b7d Migrate to published Zcash Rust crates with ZIP 317 support
ZIP 317 fee calculations are hard-coded off, continuing to use the
fixed fee logic for now, but enabling them in a future SDK update is
now possible.
2022-11-16 20:37:34 +00:00
Honza Rychnovsky 6e8f5943cd
[#781] Regular checkpoints files update 2022-11-16 12:58:02 +01:00
Carter Jernigan b288b8cad9 Rename Synchronizer.getAddress APIs 2022-11-08 14:25:56 -05:00
Carter Jernigan ee99b36798
Merge branch 'main' into feature/zip-316-and-latest-upstream 2022-11-08 10:13:43 -05:00
Carter Jernigan d1e9b28c91 [#771] Update documentation for SDK 1.10.0 2022-11-08 09:32:07 -05:00
Jack Grigg 54f8cf2069 rust: Bump revision of librustzcash crates for bugfix
Fixes a bug where Sapling change notes were being spent with the wrong key.
2022-11-07 15:19:19 -05:00
Jack Grigg 872c0fda6f rust: Set MSRV to 1.59
One of our dependencies uses a feature added in 1.59.0.
2022-11-07 15:19:19 -05:00
Jack Grigg 5ad0efcbea Remove `DerivationTool` APIs for deriving transparent keys and addresses
Users should use the UnifiedAddress etc. APIs instead.
2022-11-07 15:19:19 -05:00
Jack Grigg 5e82f8cf07 rust: jni 0.20 2022-11-07 15:19:19 -05:00
Jack Grigg 2566b9692b rust: android_logger 0.11 2022-11-07 15:19:19 -05:00
Jack Grigg 54df39652c rust: Migrate to latest revision of librustzcash crates 2022-11-07 15:19:19 -05:00
Jack Grigg e1ad71a392 rust: cargo update 2022-11-07 15:19:19 -05:00
Jack Grigg 9ff3621980 rust: Remove duplicate FFI method
We already use -1 to indicate no block scanning limit on the Kotlin side of
the FFI; we can do the same across the FFI to the Rust side.
2022-11-07 15:19:19 -05:00
Carter Jernigan 6a6cbf4048 [#760] Fix database queries
This resolves some query regressions that were introduced as part of [#705]
2022-11-04 10:01:09 -04:00
Carter Jernigan f976b79a46
[#758] Add default alias for erase method 2022-11-03 12:40:44 -04:00
Carter Jernigan 61f1c1a9cb
[#753] Add API for querying recipients 2022-10-31 15:27:34 -04:00
Carter Jernigan 9af6986e43
[#748] Internal recipients for pending transactions 2022-10-26 21:37:40 -04:00