Commit Graph

23 Commits

Author SHA1 Message Date
Carter Jernigan 640a72434c Android Gradle Plugin 8.0.1 2023-05-18 07:54:40 -04:00
Carter Jernigan d513ac6559 [#972] Min API 27 2023-04-13 06:29:42 -04: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 1c76ea6998 [#880] Create sdk-incubator-lib
Add dependency link between lib and incubator

Make AndroidApiVersion internal in SDK
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 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 66ad391865
[#862] Disable logging with ProGuard for Demo-app 2023-01-05 08:56:26 +01:00
Carter Jernigan a4a6b25bfb
[#631] Initial Compose scaffolding for demo app
* [#631] Initial Compose scaffolding for demo app

* Bump Compose Compiler

- To bypass Kotlin version incompatibility

* Switch ConfigureSeed from Column to Scaffold

- To unify our screens UI components
- And to have a fullscreen content, and thus avoid another background color out of column (e.g. in system dark mode)

* Split addresses to two rows

- To reduce a risk of a user overlooks other addresses scrolled out of the screen

* Additional code migrated from Secant

- Added just missing test files, fixtures and model classes
- Fix previously broken dependencies imports

* Link issue to code

Co-authored-by: Honza <rychnovsky.honza@gmail.com>
2022-12-23 11:00:37 +01: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 f2d71593ec [#723] Fix inclusion of native libraries in demo-app 2022-12-03 09:00:40 -05:00
Carter Jernigan b1f38ab912
[#786] Simplify signing during development 2022-11-22 09:34:09 +01:00
Honza Rychnovsky 9614a63f89
[#706] Fix crashes identified by robo tests
* [#706] Fix crashes identified by robo tests

- Removed unused xml layouts
- Fixed several xml attributes to be backward compatible

* Reduce number of unnecessary logs in console

* Bump min Android SDK version from 19 to 21

* Bump demo-app minSdk to version 21 too

* Update changelog

Co-authored-by: Carter Jernigan <git@carterjernigan.com>
2022-10-04 16:27:09 +02:00
Carter Jernigan 0873ae73e1 [#711] Android Gradle Plugin 7.3 2022-09-22 16:06:00 -04:00
Carter Jernigan 251bb4dbfc
[#697] Fix running robo test (#698) 2022-08-31 11:17:47 -04:00
Honza Rychnovsky c721a5e24e
[#343] Store database files in no_backup folder
Co-authored-by: Carter Jernigan <git@carterjernigan.com>
2022-08-12 11:05:00 -04:00
Carter Jernigan a5a07becd8
[#548] Configure testing with emulator.wtf 2022-06-21 07:57:04 -04:00
Carter Jernigan 6496d717b9 [#543] Align gradle properties for included builds 2022-06-07 07:07:30 -04:00
Carter Jernigan aba6800be7 [#464] Flank 22.03.0 2022-04-06 15:42:46 -04:00
Carter Jernigan f3b66797d3 [#394] Add robo test configuration 2022-02-10 08:06:43 -05:00
Carter Jernigan 1ab79286f4 [#374] Android Gradle Plugin 7.1 2022-02-02 14:22:55 -05:00
Carter Jernigan 4994718549
[#302] Add ProGuard consumer rules
This allows consumers of the SDK to use ProGuard without breaking the SDK
2021-11-22 10:14:21 -05:00
Carter Jernigan dfe7dad834 [#256] Use Gradle Version Catalog for dependencies 2021-09-25 12:54:42 -04:00
Carter Jernigan 07d02e6cea [#285] Implement gradle build conventions
In addition to using build-conventions to make the build scripts more DRY, the following additional changes are included in this commit:

- Convert build scripts to kts
- Fix a double-build issue with the SDK
- Add configurable options for treating compiler warnings as errors (disabled for now, due to extensive warnings that need to be corrected first)
- Added detekt as an additional static analysis tool
2021-09-25 12:54:42 -04:00