Commit Graph

101 Commits

Author SHA1 Message Date
Carter Jernigan bc19797125
[#971] Refactor Rust FFI to separate module
---------

Co-authored-by: Honza <rychnovsky.honza@gmail.com>
2023-05-18 07:36:15 -04:00
Honza Rychnovsky ca0e69d97f
[#1031] StrictMode violation: LeakedClosableViolation data db 2023-05-16 14:26:34 +02:00
Honza Rychnovsky 15603fcdf1
[#1023] Move Fetch UTXOs Before Block Sync
* [#1023] Move Fetch UTXOs Before Sync

* Add refreshTransparentBalance() after UTXOs fetch

* Add refreshTransactions() after UTXOs fetched
2023-05-11 14:55:58 +02:00
Honza Rychnovsky dfaa827fd1
[#1013] Sync stages parallelization
* [#1013] Sync blockchain sub-phases parallelization

- Remove the unnecessary comment after the latest changes in this code fragment

* Move solely CompactBlockProcessor-related constants

* Simplify sync range update construction

* [#1013] Sync blockchain sub-phases parallelization

* Changelog update

* Block files deletion documentation update

* Leverage buildList API

* CompactBlockRepository documentation update

* Move BlockBatch to internal models
2023-05-10 12:45:23 +02:00
Francisco Gindre e5c7e4b6c8
[#1018] add limit parameter to validateCombinedChain
* rust: cargo update

* rust: Migrate to `zcash_client_sqlite 0.7`

* rust: cargo fmt

* Adopt zcash_client_sqlite 0.7 database changes

* [#1018] add limit parameter to validateCombinedChain

* Adopt limit parameter in Android layer

* Switch limit argument to Long

- Switched from Int to Long type
- Done for both validate and scan blocks functions
- Changed the default parameter for nullable one in the public interface to let callers be explicit about the argument
- Changed in the Rust layer as well

---------

Co-authored-by: Carter Jernigan <git@carterjernigan.com>
Co-authored-by: Jack Grigg <jack@z.cash>
Co-authored-by: Honza <rychnovsky.honza@gmail.com>
2023-05-10 11:49:42 +02:00
Carter Jernigan 953042e982
[#239] Remove pending transaction database 2023-05-05 17:46:07 -04:00
Carter Jernigan bb6d37d701 Adopt zcash_client_sqlite 0.7 database changes 2023-05-05 14:57:43 -04:00
Carter Jernigan 354ef9efc9 [#1011] Ktlint 0.49.0 2023-05-03 10:16:24 -04:00
Honza Rychnovsky 2593556890
[#1009] Change CompactBlockProcessor methods signature
* [#1009] Change CompactBlockProcessor methods signature

* Remove withContext {}

Since our networking, RustBackend, and CompactBlockRepository all use coroutines internally by implementing `suspend` for their APIs, we don’t need withContext() anymore.  (If we discover something does do blocking IO on the thread, we should deal with it at the point the IO is occurring rather than at the top level)

* Sort FileExt functions

* Add isDirectorySuspend

- To avoid strict mode disc IO violation warning

* Omit try/catch on block files delete action

* Refactor scan batch function

- Removed retry mechanisms, as it’s not needed now after the previous switch from the database-based blocks persisting to file-based blocks persisting
- scan function now works with the current processing range of blocks size instead of hardcoded constant value

* Eliminate duplicate processorInfo object

* Change log text

* MutableList instead of ArrayList

* Eliminate sync range nullability

* Rewind not scanned blocks

If we find out that we previously downloaded, but not validated and scanned persisted blocks, we need to rewind the blocks above the last scanned height first.

* Fix ktlint warning

---------

Co-authored-by: Carter Jernigan <git@carterjernigan.com>
2023-05-01 13:12:38 +02:00
Carter Jernigan fef809c015 [#978] Eliminate sent/received transaction APIs 2023-04-17 08:24:41 -04:00
Honza Rychnovsky b7a20698cc
[#895] Adopt new Response result
* [#895] Adopt new Response result

* Change catch flow part

* Correct emit from flow catch

* Additional changes after Block store on disk merged

* Simplify networking model structure

* Enhance flow filter

* Switch to coroutine client in a few tests too

* Use StatusException

* Switch client in a few tests

* Switch client for download block case

* Link fetch UTXOs issue

* Refactor refresh and process UTXOs

* Improve downloadBlockRange logging

* Switch getTAddressTransactions to the Response result

* Move some parts of requests out of try-catch

* Remove link to issue

* Refactor fetchUtxos to return Response

* Throws custom exception from ResponseFailure

- To trigger existing re-try mechanisms in case of any particular trouble
2023-04-14 12:55:51 +02:00
Honza Rychnovsky 9a816ee25f
[#674] Use suspending functions for networking
* [#674] Use suspending functions for networking

- Initial commit to set up how we transform to the coroutine version of networking client

* Enhance flow filter

* Switch to coroutine client in a few tests too

* Use StatusException

* Comment out old UI demo app cases

* Switch client in a few tests

* Switch client for download block case

* Remove the blocking networking client entirely

* Link fetch UTXOs issue

* Refactor refresh and process UTXOs

* Improve downloadBlockRange logging

* Remove CompactBlockRepository.write(sequence)

* Remove “Coroutine” prefix

Since we only have a single implementation, the designation shouldn’t matter anymore

* Fix collection bug

* Finish network client renaming

* Collect write results internally

* Write method simplification

* Blocks sync logging reduce

* Unused unsafe models remove

---------

Co-authored-by: Carter Jernigan <git@carterjernigan.com>
2023-04-13 13:36:24 +02:00
Carter Jernigan d513ac6559 [#972] Min API 27 2023-04-13 06:29:42 -04:00
Carter Jernigan 38df994bfc [#971] Rust backend refactoring
This is an initial step before moving the Rust backend into a separate Gradle module

- Use primitive values for the Rust backend interface. This will allow the backend to be moved into a new Gradle module in the future, without needing to access the model objects of the SDK
 - Add extension functions to the Backend to replace the existing usage of more strongly typed objects.  The extension functions can continue to live in the sdk-lib even after refactoring the Rust backend
 - Add new decorator that can eventually replace using the Rust backend within the SDK
2023-04-11 06:43:18 -04:00
Honza Rychnovsky b9990f501e
[#766] Delete Blocks After Scanning
* [#766] Delete blocks after scanning

- Initial commit

* Minor formatting changes

* Add automated test

* Update manual test

* Move delete before enhance

* Improve terminology about deletion
2023-04-07 08:12:25 +02:00
Francisco Gindre c7914d9584
[#904] Fetch all UXTOs per account
Co-authored-by: Honza <rychnovsky.honza@gmail.com>
Co-authored-by: Kris Nuttycombe <kris@electriccoin.co>
2023-03-09 17:07:59 -05:00
Alex 9ee5a4e568
[#765] Store blocks on disk instead of in SQLite
* Switch to FsBlockDb for caching CompactBlocks

* Add RustBackend.getLatestHeight() method

* Raise MSRV to 1.60

* Migrate to latest Rust crate API

* Add RustBackend.findBlockMetadata() method

* Add RustBackend.rewindBlockMetadataToHeight() method

* [#765] implementation of FileCompactBlockRepository

* writing block metadata to database

* split write function into smaller easier to test blocks

* testing for FileCompactBlockRepository

* fixed rewinding

* fixed tests

* fixed FileCompactBlockRepositoryTest and SynchronizerFactoryTest

* code review fixes

* updated proto files

* override all functions in FakeRustBackend

* code review fixes

* Fix function body formatting

* Improve clear function clarity

* Use length of string const

* Delete single file instead of directory

* Improve function clarity

* Refactor outputs counting

- Found a typo in intermediary model class JniBlockMeta parameter change of which does not impact encoding from rust to kotlin according to rust layer implementation.

* Check blocks mkdir result

* Remove unnecessary detekt warning suppression

* Refactor buffer size check

* Improve visibility annotations

* Make file finalise obvious and self documenting

* Remove prevHash logging

* Move instantiation to the object itself

* Enrich fixture with default values

* Extend eror message

* Rename benchmark blocks range fixture

* Fix rebase changes

* Improve FileCompactBlockRepositoryTest

- "De-integrated" the test suite - it now works with fixture blocks
- Created needed fixtures for a clear mocked blocks providing
- Enhanced getting of FileCompactBlockRepository in FileCompactBlockRepositoryTest to clarify that it works with mock components

* Fix ktlintFormat findings

* Bump actions/cache from 3.2.4 to 3.2.5 in /.github/actions/setup (#927)

Bumps [actions/cache](https://github.com/actions/cache) from 3.2.4 to 3.2.5.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](627f0f41f6...6998d139dd)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Fix incorrect dir checking

* More robust min/max checking

* Rewinding to more robust middle value

* Strengthen blocks counts after rewind

* Add check of temp finalized file

* Refactor DatabaseCoordinatorTest

* Rename cache files root directory

- To have the same unified variable name across our repositories - fsBlockDbRoot

* Refactor FileCompactBlockRepositoryTest

- To have these tests more clear
- Fixed FakeRustBackend instantiation bug

* Revert back JniBlockMeta param name

* Delete legacy Cache db files

- Deleted from both the older and the newer legacy locations
- All related db files deleted - rollback files included
- The deletion is run once we try to access the new store blocks on disk root directory
- The deletion check does not throw any exception in case of failure, we just log it in console and try it on the next time
- Related new test added too

* Test refactoring

- Made few changes to improve clarity of provided tests and fixtures
- Prepared few new "failure path" tests
- Enhanced existing tests

* Manual test case

* Simplify error printing

- As we had some commented out code there

* Reset manual tests steps numbering

* [#924] Remove alias from WalletCoordinator

Also make Compose UI the default.  The old UI is deprecated but is still used by the benchmarking tests

* Bump benchmark version

* Protect JniBlockMetadata agains minification

* Enable debuggable while benchmarking

* Enhance benchmark screen waiting

* Fix cache db files deletion

- With this construct we delete all blocks blob metadata files, as well as their sqlite file

* Add new benchmark results

* Remove benchmark operations receiver fix

- As it's not needed after the latest profiler dependency update

* Bump gradle/wrapper-validation-action from 1.0.5 to 1.0.6 (#928)

Bumps [gradle/wrapper-validation-action](https://github.com/gradle/wrapper-validation-action) from 1.0.5 to 1.0.6.
- [Release notes](https://github.com/gradle/wrapper-validation-action/releases)
- [Commits](55e685c48d...8d49e559aa)

---
updated-dependencies:
- dependency-name: gradle/wrapper-validation-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump actions/cache from 3.2.5 to 3.2.6 in /.github/actions/setup (#929)

Bumps [actions/cache](https://github.com/actions/cache) from 3.2.5 to 3.2.6.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](6998d139dd...69d9d449ac)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update DatabaseCoordinator.kt

Move if/else out from log message body

* Update Switch cache to store blocks on disk.md

Reset documentation bullets numbering

* Hide internal constants from public package

* Update manual test user with new UI requirement

* Comment out cargo.toml test values

* Inline fixture blocks metadata with its creation

* Switch to FsBlockDb for caching CompactBlocks

* Add RustBackend.getLatestHeight() method

* Raise MSRV to 1.60

* Migrate to latest Rust crate API

* Add RustBackend.findBlockMetadata() method

* Add RustBackend.rewindBlockMetadataToHeight() method

* Update cargo.lock

* Switch to FsBlockDb for caching CompactBlocks

* Migrate to latest Rust crate API

* [#765] implementation of FileCompactBlockRepository

* writing block metadata to database

* split write function into smaller easier to test blocks

* testing for FileCompactBlockRepository

* fixed rewinding

* fixed tests

* fixed FileCompactBlockRepositoryTest and SynchronizerFactoryTest

* code review fixes

* updated proto files

* override all functions in FakeRustBackend

* code review fixes

* Fix function body formatting

* Improve clear function clarity

* Use length of string const

* Delete single file instead of directory

* Improve function clarity

* Refactor outputs counting

- Found a typo in intermediary model class JniBlockMeta parameter change of which does not impact encoding from rust to kotlin according to rust layer implementation.

* Check blocks mkdir result

* Remove unnecessary detekt warning suppression

* Refactor buffer size check

* Improve visibility annotations

* Make file finalise obvious and self documenting

* Remove prevHash logging

* Move instantiation to the object itself

* Enrich fixture with default values

* Extend eror message

* Rename benchmark blocks range fixture

* Fix rebase changes

* Improve FileCompactBlockRepositoryTest

- "De-integrated" the test suite - it now works with fixture blocks
- Created needed fixtures for a clear mocked blocks providing
- Enhanced getting of FileCompactBlockRepository in FileCompactBlockRepositoryTest to clarify that it works with mock components

* Fix ktlintFormat findings

* Fix incorrect dir checking

* More robust min/max checking

* Rewinding to more robust middle value

* Strengthen blocks counts after rewind

* Add check of temp finalized file

* Refactor DatabaseCoordinatorTest

* Rename cache files root directory

- To have the same unified variable name across our repositories - fsBlockDbRoot

* Refactor FileCompactBlockRepositoryTest

- To have these tests more clear
- Fixed FakeRustBackend instantiation bug

* Revert back JniBlockMeta param name

* Delete legacy Cache db files

- Deleted from both the older and the newer legacy locations
- All related db files deleted - rollback files included
- The deletion is run once we try to access the new store blocks on disk root directory
- The deletion check does not throw any exception in case of failure, we just log it in console and try it on the next time
- Related new test added too

* Test refactoring

- Made few changes to improve clarity of provided tests and fixtures
- Prepared few new "failure path" tests
- Enhanced existing tests

* Manual test case

* Simplify error printing

- As we had some commented out code there

* Reset manual tests steps numbering

* Bump benchmark version

* Protect JniBlockMetadata agains minification

* Enable debuggable while benchmarking

* Enhance benchmark screen waiting

* Fix cache db files deletion

- With this construct we delete all blocks blob metadata files, as well as their sqlite file

* Add new benchmark results

* Remove benchmark operations receiver fix

- As it's not needed after the latest profiler dependency update

* Update DatabaseCoordinator.kt

Move if/else out from log message body

* Update Switch cache to store blocks on disk.md

Reset documentation bullets numbering

* Hide internal constants from public package

* Update manual test user with new UI requirement

* Comment out cargo.toml test values

* Inline fixture blocks metadata with its creation

* Update cargo.lock

* Update Cargo.lock

* Check and document JniBlockMeta params ranges

* Add assert for gradle property

* Use UInt internally

uint

* Change array API to list

* Fix for using correct SDK Synchronizer alias

- Only the older Demo-app UI was impacted.
- Thus also our benchmarking was impacted.

* Apply documentation suggestions from code review

Co-authored-by: Kris Nuttycombe <kris@electriccoin.co>

* Final manual test instructions update

* Fixture block hash deterministically generated from block height

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Jack Grigg <jack@electriccoin.co>
Co-authored-by: Jack Grigg <jack@z.cash>
Co-authored-by: Honza <rychnovsky.honza@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Carter Jernigan <git@carterjernigan.com>
Co-authored-by: Kris Nuttycombe <kris@electriccoin.co>
2023-03-08 16:04:04 +01:00
Carter Jernigan 153072b903 [#880] Refactor Twig 2023-02-09 15:44:22 -05:00
Carter Jernigan 8df7a5d3ec
[#917] Min API 24
Co-authored-by: Honza <rychnovsky.honza@gmail.com>
2023-02-09 06:52:10 -05:00
Carter Jernigan c0a2c11418
[#615] Refactor lightwalletd client
* [#615] Refactor lightwalletd client

This moves the lightwalletd client code to a separate Gradle module, but does not yet do much clean up the public API (e.g. hiding generated GRPC objects).  That will be a followon change via #673

I’ve prototyped a safer version of the API that would be implemented for #673 for two specific calls: obtaining the current block height and obtaining the light wallet info.  These were the easiest endpoints to update and they provide a useful exploration for the future changes needed.

* 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

* Align with previous review comment

* Fix wrong merge

* Add basic sanity test

- To satisfy tests requirements on emulators.wtf service

* Remove grpc dependency from sdk-lib module

* Repackage cash.z.wallet.sdk.rpc to cash.z.wallet.sdk.internal.rpc

* Fix BuildConfig path

* Update demo-app paths to rpc

* Fix broken grpc services locations

- Our aim here is to change only the local services location (package name), the server location can't be changed due to backward compatibility.

* Enhance GRPC Response model

* Adopt enhanced GRPC response model

- Adopted in a few endpoints

* Enhance Connection failure type

* Add simple fixture test

* 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

* Remove commented out log

* Unify return type of collection returning methods

- Switched fetchUtxos() to return Sequence instead of List
- Added a check on empty tAddress input

* fetchUtxos returns flow

- Switched fetchUtxos() to return Flow of Service.GetAddressUtxosReply
- Internally it calls getAddressUtxosStream() instead of getAddressUtxos() from GRPC layer

* Update unsafe suffix documentation

* Address several minor change requests

* Remove code parameter

- Removed from the locally triggered failures with default codes.

* Rename local variable

* Switch from empty response to exception

- Our server calls now rather throw IllegalArgumentException than return an empty response
- Removed commented out log message
- Updated javadocs

* Update proto files

- Plus related api changes adoption

* Unify new clients instances name

* AGP 7.4.0 changes

-  packagingOptions -> androidComponents in sdk-lib and lightwallet-client-lib modules

* SDK version bump

* Response resolver tests

* Release build upload timeout increase

* Release build upload timeout increase fix

* Revert timeout

- As Github has some infrastructure troubles and we need to wait

* Add migrations documentation

* Sort packaging filters

* Remove private field from public documentation

* Hide private variables

* Remove package from Android Manifest

* Throw exception instead of custom error

- This step unify our approach to validation on client side across all server calls

* Replace setAddresses index const with number

* Fix indentation in proto file

---------

Co-authored-by: Honza <rychnovsky.honza@gmail.com>
2023-02-01 11:14:55 +01:00
Honza Rychnovsky 7d065ceaf7
[#843] Ktlint 0.48.2
- Removed semicolon in enum classes suppression
- Created and linked issue for test wallets values
2023-01-31 15:17:51 +01:00
Carter Jernigan 30979e5ebf [#851] Androidx Updates
Note that the APIs for Room, Sqlite, and Compose changed slightly with these dependency updates
2023-01-18 11:23:25 -05:00
Carter Jernigan 4ad1da49d0
[#886] Support null block heights
Co-authored-by: Honza <rychnovsky.honza@gmail.com>
2023-01-12 11:32:43 -05: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 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 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
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
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 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
Carter Jernigan b288b8cad9 Rename Synchronizer.getAddress APIs 2022-11-08 14:25:56 -05:00
Carter Jernigan d1e9b28c91 [#771] Update documentation for SDK 1.10.0 2022-11-08 09:32:07 -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 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
Carter Jernigan f169b112ef [#743] Add API for reading memos 2022-10-24 11:54:57 -04:00
Carter Jernigan 4c2807aefd
[#705] Roomoval
The Android and Rust code have previously managed joint custody of the derived data database.  With more complex migrations now required, we need to make the Android side read-only.  To achieve that, the Android side will remove Room and instead rely on more primitive SQLite APIs for read-only access.

As part of implementing this change, database management throughout the SDK is being refactored.

There will be multiple representations of the data:
 - Database representation (and some Entity representations in the places that Room hasn’t been removed yet).  These representations are not as type safe and don’t match Kotlin best practices in all cases.
 - Once #615 is implemented there will also be network representations
 - Type safe models, which often appear in the public API  The Database and Network representations will be converted to and from the type safe model representation.
2022-10-19 16:52:54 -04:00
Carter Jernigan f2effc8dd2 Merge branch 'main' of github.com:zcash/zcash-android-wallet-sdk into merge-main
# Conflicts:
#	CHANGELOG.md
#	sdk-lib/src/androidTest/java/cash/z/ecc/android/sdk/ext/TestExtensions.kt
#	sdk-lib/src/androidTest/java/cash/z/ecc/android/sdk/integration/SanityTest.kt
#	sdk-lib/src/androidTest/java/cash/z/ecc/android/sdk/integration/SmokeTest.kt
#	sdk-lib/src/androidTest/java/cash/z/ecc/android/sdk/util/AddressGeneratorUtil.kt
#	sdk-lib/src/androidTest/java/cash/z/ecc/android/sdk/util/BalancePrinterUtil.kt
#	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/internal/transaction/WalletTransactionEncoder.kt
#	sdk-lib/src/main/java/cash/z/ecc/android/sdk/jni/RustBackendWelding.kt
2022-10-18 07:28:12 -04:00
Jack Grigg 4a37f3976f rust: Migrate to latest upstream Zcash crates 2022-10-15 10:08:04 +13:00
Carter Jernigan e95e43b83b Add simple tests for Account and UnifiedSpendingKey
test
2022-10-06 14:49:04 -04:00