Commit Graph

5172 Commits

Author SHA1 Message Date
teor ad015e04d9
Move history tree and value balance to typed column families (#8115)
* impl TryFrom<zcash_primitives::BlockHeight> for Height

* Add type-safe read and write database methods

* Only allow typed access to the scanner DB

* Update docs

* Implement a common method as a trait

* Fix imports

* Tidy state imports

* Activate tracing logging macros in the whole scanner crate

* Fix dead code warnings

* Use a more sensible export order

* Remove a 1.72 lint exception now 1.74 is stable

* Switch history trees over to TypedColumnFamily, and remove redundant code

* Add typed batch creation methods, and switch history trees to them

* Convert ValueBalance to typed column families

* Make the APIs compatible after a merge

* Use `ZebraDb` instead of `DiskDb` where needed

---------

Co-authored-by: Marek <mail@marek.onl>
2023-12-20 23:20:57 +00:00
dependabot[bot] 3c8b93d986
build(deps): bump the prod group with 4 updates (#8117)
Bumps the prod group with 4 updates: [thiserror](https://github.com/dtolnay/thiserror), [sentry](https://github.com/getsentry/sentry-rust), [hyper](https://github.com/hyperium/hyper) and [metrics-exporter-prometheus](https://github.com/metrics-rs/metrics).


Updates `thiserror` from 1.0.50 to 1.0.51
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.50...1.0.51)

Updates `sentry` from 0.32.0 to 0.32.1
- [Release notes](https://github.com/getsentry/sentry-rust/releases)
- [Changelog](https://github.com/getsentry/sentry-rust/blob/master/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-rust/compare/0.32.0...0.32.1)

Updates `hyper` from 0.14.27 to 0.14.28
- [Release notes](https://github.com/hyperium/hyper/releases)
- [Changelog](https://github.com/hyperium/hyper/blob/v0.14.28/CHANGELOG.md)
- [Commits](https://github.com/hyperium/hyper/compare/v0.14.27...v0.14.28)

Updates `metrics-exporter-prometheus` from 0.12.1 to 0.12.2
- [Changelog](https://github.com/metrics-rs/metrics/blob/main/release.toml)
- [Commits](https://github.com/metrics-rs/metrics/commits)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod
- dependency-name: sentry
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod
- dependency-name: hyper
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod
- dependency-name: metrics-exporter-prometheus
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-18 22:03:41 +00:00
Alfredo Garcia 2d217e29e7
rename worflows to fix readme badges (#8116) 2023-12-18 21:07:40 +00:00
teor 4b5838c500
Make sure scanner database is accessed using the correct types (#8112)
* impl TryFrom<zcash_primitives::BlockHeight> for Height

* Add type-safe read and write database methods

* Only allow typed access to the scanner DB

* Update docs

* Implement a common method as a trait

* Fix imports

* Tidy state imports

* Activate tracing logging macros in the whole scanner crate

* Fix dead code warnings
2023-12-18 16:33:49 +00:00
dependabot[bot] 39830b0b55
build(deps): bump the devops group with 2 updates (#8100)
Bumps the devops group with 2 updates: [google-github-actions/setup-gcloud](https://github.com/google-github-actions/setup-gcloud) and [tj-actions/changed-files](https://github.com/tj-actions/changed-files).


Updates `google-github-actions/setup-gcloud` from 1.1.1 to 2.0.0
- [Release notes](https://github.com/google-github-actions/setup-gcloud/releases)
- [Changelog](https://github.com/google-github-actions/setup-gcloud/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google-github-actions/setup-gcloud/compare/v1.1.1...v2.0.0)

Updates `tj-actions/changed-files` from 40.2.1 to 40.2.2
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v40.2.1...v40.2.2)

---
updated-dependencies:
- dependency-name: google-github-actions/setup-gcloud
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: devops
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: devops
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-15 10:54:25 +00:00
dependabot[bot] 2dcc873337
build(deps): bump zerocopy from 0.7.30 to 0.7.31 (#8111)
Bumps [zerocopy](https://github.com/google/zerocopy) from 0.7.30 to 0.7.31.
- [Release notes](https://github.com/google/zerocopy/releases)
- [Changelog](https://github.com/google/zerocopy/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google/zerocopy/compare/v0.7.30...v0.7.31)

---
updated-dependencies:
- dependency-name: zerocopy
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-15 07:03:57 +00:00
Marek 8f090e605d
Add a scanning results reader (#8104)
* Add a scanning results reader

* Simplify intro & titles in `zebra-utils/README.md`

* Add a tutorial for the scanning results reader

* Reformat `zebra-utils/Cargo.toml`

Co-authored-by: teor <teor@riseup.net>

* Update `zebra-utils/README.md`

Co-authored-by: teor <teor@riseup.net>

* standard grouping

Co-authored-by: teor <teor@riseup.net>

* Add a comment on a first empty memo

Co-authored-by: teor <teor@riseup.net>

* Use `exactly_one()` instead of `next()`

* Simplify various type conversions

---------

Co-authored-by: teor <teor@riseup.net>
2023-12-14 23:19:35 +00:00
teor a14cb40c1f
test: Add progress markers to the snapshot tests (#8106)
* Add progress tracking markers to snapshot tests

* Simplify sapling_keys_and_last_scanned_heights()
2023-12-14 21:32:09 +00:00
teor 8734fd98f3
Ignore segmentation fault errors when shutting down Docker in tests (#8107) 2023-12-13 23:47:42 +00:00
Marek 22852bc81d
change(state): Allow opening the database in a read-only mode (#8079)
* Allow opening the database read-only mode

* Update zebra-scan/src/storage/db.rs

Co-authored-by: teor <teor@riseup.net>

* Refactor skipping database upgrades

* Fix errors caused by the merge

* Add new argument in new_test_storage()

* Simplify test storage code

* Fix importing the `new_test_storate` fn

---------

Co-authored-by: teor <teor@riseup.net>
2023-12-13 21:54:00 +00:00
Alfredo Garcia 92758a0d9f
feat(scanner): Restart scanning where left (#8080)
* start scanner where it was left

* fix tests

* add a `scan_start_where_left` test

* refactor a log msg

* fix some comments

* remove function

* fix doc comment

* clippy

* fix `sapling_keys_and_last_scanned_heights()`

* simplify start height

* i went too far, revert some changes back

* change log info to every 10k blocks

* fix build

* Update height snapshot code and check last height is consistent

* Add strictly before and strictly after database key gets

* Move to the previous key using strictly before ops

* Assert that keys are only inserted once

* Update the index in each loop

* Update snapshots

* Remove debugging code

* start scanning at min available height

---------

Co-authored-by: teor <teor@riseup.net>
2023-12-13 20:16:26 +00:00
teor ac72c2b1de
Add shielded-scan.md to the index (#8095) 2023-12-12 23:51:52 +00:00
Gustavo Valverde d85b010cf9
ref(workflow): move most scripts to their own executables (#8005)
* ref(workflow): move most scripts to their own executable

* debug: JSON value

* fix(scripts): move remaining script to its own file

* fix(script): revert to the correct disk search logic

* fix(scripts)

* fix(scripts): use correct NETWORK with lowercase

* fix: typo

* fix(script): wrong variable assignment

* fix(script): use correct return values inside a function

* fix(script): fix value assigment

* test: debug

* fix(script): make disk conditions simpler

* fix(script): export variables to the `shell` executing the script

* fix(script): do not fail on expected unbound variables

* test: output

* fix(scripts): do not `echo` a variable more than once

* fix(scripts): typo

* docs(workflow): adds a description at the top of each file (#8009)

Co-authored-by: Marek <mail@marek.onl>
Co-authored-by: teor <teor@riseup.net>

---------

Co-authored-by: teor <teor@riseup.net>
Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
Co-authored-by: Marek <mail@marek.onl>
2023-12-12 23:51:28 +00:00
teor 9ace6f8a4e
test(scan): Add typed database format snapshots to the scanner (#8083)
* Refactor test data into functions

* Add a typed snapshot test for scanner storage

* Use standard hex serialization with SaplingScannedResult

* Simplify transaction::Hash hex serialization

* Sort HashMaps before snapshotting

* Add typed snapshot data
2023-12-12 22:34:59 +00:00
teor fa4c80f35a
Send all zebrad logs to the journal under systemd (#7965) 2023-12-12 13:15:55 +00:00
teor 3318eaaa22
test(scan): Add raw database format snapshots to the scanner (#8075)
* Make some scanner storage methods more flexible

* Move tests to a submodule and expose test functions and constants

* Make scanner functions clearer and easier to use

* Simplify state snapshot test code

* Add raw data snapshot tests for the scanner

* Add snapshots

* Fix import path

* Fix import conditional compilation

* fix imports

* fix imports 2

* Put read and write db exports together

* Remove confusing IntoDisk/FromDisk impl

* Fix an incorrect unused method that could panic

* Delete a test that is no longer valid

---------

Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
2023-12-12 07:45:12 +00:00
Arya 5bdad1bcaa
Release Zebra 1.5.0 (#8027)
* adds a summary to changelog

* chore: Release

* Apply suggestions from code review

* updates Changelog.md

* updates changelog.md

* mentions/updates MSRV

* updates checkpoints

* updates ESTIMATE_RELEASE_HEIGHT

* Apply suggestions from code review

Co-authored-by: teor <teor@riseup.net>

* updates estimated release height

* combines changelog entries about scanner db

* zebra-scan is still in alpha

* Update CHANGELOG.md

* update release checklist for zebra-scan

* use fastmod to update zebra-scan version

* corrects zebra-scan version requirement in zebrad

* Applies suggestions from review

* updates changelog

* Update zebrad/src/components/sync/end_of_support.rs

---------

Co-authored-by: teor <teor@riseup.net>
2023-12-12 00:44:15 +00:00
Arya b0b8b1a028
cargo update (#8086) 2023-12-11 23:39:01 +00:00
Gustavo Valverde e5b810a52a
imp(ci): fix `codespell` words and ignore others (#8089)
This cleans the annotations on every PR, so it doesn't show up from now on.
2023-12-11 22:33:03 +00:00
Gustavo Valverde fc478ebb32
fix(ci): use a bigger machine for config file tests (#8088)
* fix(ci): use a bigger machine for config file tests

* chore: run `Docker Unit Tests` if `sub-test-zebra-config.yml` changes
2023-12-11 22:32:53 +00:00
Gustavo Valverde 9ae55853ad
fix(ci): use official `codespell` action (#8087) 2023-12-11 21:08:59 +00:00
Marek 9acdf0e512
Make the `verbose` argument optional (#8076)
The `verbose` argument of the `getrawtransaction` RPC is specified as
optional in the documentation:
https://zcash.github.io/rpc/getrawtransaction.html.
2023-12-10 21:44:43 +00:00
teor 5dd33d7265
Add `ldb` RocksDB query tool to the Dockerfile (#8074)
* Add `ldb` RocksDB query tool to the Dockerfile

* Add shielded scanning link to run.md

* Add `ldb` tool instructions to install.md

* Add a rough framework for shielded-scan.md

* Add security warning and feature limitations to shielded-scan.md
2023-12-08 00:14:54 +00:00
teor 1ccf5fba46
scan(test): Implement scanner format round-trip tests (#8071)
* Implement scanner format round-trip tests

* Limit random heights to database range

* Increase coverage of state height serialization proptests #7443
2023-12-07 19:43:49 +00:00
teor 6306a755de
change(log): Silence verbose failed connection logs (#8072)
* Silence verbose failed connection logs

* Update comment and fix formatting
2023-12-07 03:34:52 +00:00
teor e692b943d2
Stop logging viewing keys in the config (#8064) 2023-12-06 21:58:12 +00:00
teor 9fec7116ca
cleanup(db): Give forward and reverse database iterators explicit names (#8063)
* Give forward and reverse database iterators explicit names

* clippy: Ignore large error variants
2023-12-06 21:57:43 +00:00
dependabot[bot] 1be140b9ee
build(deps): bump the devops group with 2 updates (#8067)
Bumps the devops group with 2 updates: [tj-actions/changed-files](https://github.com/tj-actions/changed-files) and [docker/metadata-action](https://github.com/docker/metadata-action).


Updates `tj-actions/changed-files` from 40.2.0 to 40.2.1
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v40.2.0...v40.2.1)

Updates `docker/metadata-action` from 5.0.0 to 5.3.0
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](https://github.com/docker/metadata-action/compare/v5.0.0...v5.3.0)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: devops
- dependency-name: docker/metadata-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: devops
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-06 19:25:18 +00:00
teor 36f226362d
change(scan): Store one transaction ID per database row, to make queries easier (#8062)
* Upgrade the scanner database major version to 1

* Update format docs

* Change the high-level scanner db format

* Change the scanner serialization formats

* Fix value format and tests

* Fix incorrect types

* Update documentation

---------

Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
2023-12-06 17:34:21 +00:00
teor 358e52bc64
change(scan): Create a function that scans one block by height, and stores the results in the database (#8045)
* Update multiple key docs

* Add a TODO for the tree size

* Fix scan() docs

* Split out a scan_height...() function

* Clarify it's the state database we're using for scanning heights

Co-authored-by: Marek <mail@marek.onl>

* Remove unused import

---------

Co-authored-by: Marek <mail@marek.onl>
2023-12-06 01:57:29 +00:00
Marek 7c6a0f8388
change(scan): Refactor scanning tests (#8047)
* Derive & impl helper traits from `std`

* Create `compact_to_v4` fn

* Create `fake_block` fn

* Refactor existing tests to use the new functions

* Cosmetics

* Refactor docs

* Put `Default` behind `cfg_attr(test)`

Rationale
---------

We avoid implementing `Default` on consensus-critical types because it's
easy to miss an incorrect use in a review. It's easy to hide a
`default()` in a call like `unwrap_or_default()` or even more subtle
methods.

---------

Co-authored-by: teor <teor@riseup.net>
2023-12-06 01:57:01 +00:00
Alfredo Garcia cdfbecf5f5
avoid starting the scan task if no keys to scan are present (#8059) 2023-12-06 01:56:43 +00:00
teor 73b3ed1f9f
Remove least used ci-build-crates.yml step and increase concurrency (#8058) 2023-12-06 01:56:18 +00:00
teor 05a28b97f2
change(ci): Split experimental feature tests into their own step (#8039)
* Split experimental feature tests into their own step

* Only log a checkpoint error warning once
2023-12-06 00:52:47 +00:00
Marek d3dc7d0f0e
change(scan): Store scanned TXIDs in "display order" (#8057)
* Store scanned TXIDs in "display order"

* Unrelated: Remove a redundant `Arc`

---------

Co-authored-by: teor <teor@riseup.net>
2023-12-05 22:49:39 +00:00
teor ba58d637d9
change(ci): Build the crate target by itself in ci-build-crates.yml (#8042)
* Also build just the crate target in ci-build-crates.yml

* Run 3 jobs in parallel and run zebrad first

* Actually sort the jobs
2023-12-05 20:16:05 +00:00
teor 5d80c646fe
clippy: fix implied iterator bounds (#8052) 2023-12-05 04:06:42 +00:00
dependabot[bot] 5bc26b301f
build(deps): bump the devops group with 1 update (#8033)
Bumps the devops group with 1 update: [google-github-actions/auth](https://github.com/google-github-actions/auth).

- [Release notes](https://github.com/google-github-actions/auth/releases)
- [Changelog](https://github.com/google-github-actions/auth/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google-github-actions/auth/compare/v1.2.0...v2.0.0)

---
updated-dependencies:
- dependency-name: google-github-actions/auth
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: devops
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-05 01:57:57 +00:00
teor 4306a00f3c
Scan blocks with sapling keys and write the results to the database (#8040)
* Fix availability of tokio::time in scanner

* Create a function that parses a key into a list of keys

* Pass a ChainTipChange to the scanner function

* Convert a scanned block to a sapling result

* Make it easier to pass keys and blocks

* Increase scanner wait times

* Parse keys once at the start of the scan

* Get a block from the state instead of the tip

* Don't log secret keys, only log every 100,000 blocks

* Scan each block and add the results to storage

* Move blocking tasks into spawn_blocking()

* Update the acceptance test

* Use a dummy sapling tree size

* Use a larger dummy size
2023-12-03 21:58:48 +00:00
teor fc2576b27d
Standardise on the shielded-scan feature name (#8038) 2023-12-01 00:05:57 +00:00
teor db05845f98
change(scan): Use the on-disk database for keys and results (#8036)
* Expose IntoDisk and FromDisk in zebra-state

* Implement database serialization for SaplingScanningKey Strings

* Implement serialization for Vec<SaplingScannedResult> (Vec<transaction::Hash>)

* Implement seralization for SaplingScannedDatabaseIndex

* Add an is_empty() method

* Add a read method for a specific index, and document it

* Implement writing scanner results to the database

* Make read name more explicit

* Implement writing scanner keys

* Implement reading sapling keys

* Spawn blocking tasks correctly in async code

* Change storage results methods to use the database

* Update tests that use storage

* Use spawn_blocking() for database methods

* Change the check interval to slightly less than the block interval

* Expose raw database methods with shielded-scan

* fix `scan_task_starts` test

* minor doc change in test

---------

Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
2023-11-30 21:27:46 +00:00
teor 8c717c92dd
change(scan): Create a scanner storage database, but don't use it yet (#8031)
* Create an empty storage/db module

* Use ephemeral storage in tests

* Populate storage inside new() method

* Move scanner setup into an init() method

* Pass the network to scanner init

* Create a database but don't actually use it

* Skip shutdown format checks when skipping format upgrades

* Allow the scanner to skip launching format upgrades in production

* Refactor skipping format upgrades so it is consistent

* Allow checking configs for equality

* Restore Network import
2023-11-30 12:59:15 +00:00
Alfredo Garcia 1708f9d946
change(zebra-scan): Scan only one key per backend call (#8034)
* scan one key per backend call

* fix docs
2023-11-30 00:51:32 +00:00
teor cb9452c5e3
change(ci): When building crates individually, build all targets, and run clippy (#8024)
* Run clippy and build all targets on all crates individually

* Fix prod and test features for scanner deps

* Standardise dependency order

* Remove unnecessary async in tests

* Fix an unused import in a test

* Work around a no space left on device error

* Actually just use a larger runner
2023-11-30 00:51:20 +00:00
teor d28386ca12
Temporarily disable validating dependabot (#8029) 2023-11-29 14:46:18 +00:00
dependabot[bot] 620b751a71
build(deps): bump the devops group with 4 updates (#8014)
Bumps the devops group with 4 updates: [actions/github-script](https://github.com/actions/github-script), [google-github-actions/auth](https://github.com/google-github-actions/auth), [tj-actions/changed-files](https://github.com/tj-actions/changed-files) and [docker/build-push-action](https://github.com/docker/build-push-action).


Updates `actions/github-script` from 7.0.0 to 7.0.1
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/v7.0.0...v7.0.1)

Updates `google-github-actions/auth` from 1.1.1 to 1.2.0
- [Release notes](https://github.com/google-github-actions/auth/releases)
- [Changelog](https://github.com/google-github-actions/auth/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google-github-actions/auth/compare/v1.1.1...v1.2.0)

Updates `tj-actions/changed-files` from 40.1.1 to 40.2.0
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v40.1.1...v40.2.0)

Updates `docker/build-push-action` from 5.0.0 to 5.1.0
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v5.0.0...v5.1.0)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: devops
- dependency-name: google-github-actions/auth
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: devops
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: devops
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: devops
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-29 05:25:55 +00:00
dependabot[bot] 9a57cec110
build(deps): bump the prod group with 2 updates (#8026)
Bumps the prod group with 2 updates: [clap](https://github.com/clap-rs/clap) and [sentry](https://github.com/getsentry/sentry-rust).


Updates `clap` from 4.4.9 to 4.4.10
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.4.9...v4.4.10)

Updates `sentry` from 0.31.8 to 0.32.0
- [Release notes](https://github.com/getsentry/sentry-rust/releases)
- [Changelog](https://github.com/getsentry/sentry-rust/blob/master/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-rust/compare/0.31.8...0.32.0)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod
- dependency-name: sentry
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prod
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-29 03:16:31 +00:00
teor 961b720d20
Revert "excludes hyper from production dependabot upgrades (#8010)" (#8016)
This reverts commit de978d065b.
2023-11-29 01:26:36 +00:00
Marek e00a762856
Create a `scan_block` function to use across scanning tasks (#7994)
* Wrap `zcash_client_backend::scanning::scan_block`

* Use the new `scan_block` fn

* Use full path for `zcash::primitives::Network`

* Add docs for `scan_block`

* Impl `From` for networks in `zcash_primitives`

* Update zebra-scan/src/tests.rs

Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>

* Move code from `tests.rs` to `scan.rs`

---------

Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
2023-11-28 21:58:18 +00:00
teor 1d241afbaa
change(state): Expose ZebraDb methods that can create different kinds of databases (#8002)
* Provide access to DiskDb and DiskWriteBatch outside the state using a feature

* Actually let's export ZebraDb for the format upgrade code

* Pass column families to ZebraDb as an argument

* Allow the database kind to be changed in config.rs

* Use the state kind in finalized_state.rs

* Allow different database kinds in ZebraDb, but don't move the upgrade code yet

* Allow different database kinds in DiskDb

* Allow different database kinds in upgrade.rs, but don't split the upgrade code out yet

* Add new arguments to raw database tests

* Fix doc links

* Fix internal imports

* Fix unused code

* Update zebrad version metadata

* Create a specific state database delete function

* Fix state exports

* Fix zebrad tests

* Fix zebrad state write tests

* Make CI run again

* Fix dead code warnings for test methods

* Remove unnecessary async on some tests

* Fix logging required by tests

* Fix logging required in test itself

* Fix variable names

* Try to copy the message and add regexes
2023-11-28 13:49:11 +00:00