Commit Graph

5248 Commits

Author SHA1 Message Date
Pili Guerra 9167093320
Update CONTRIBUTING.md (#8304)
We have deprecated the RFC process
2024-02-22 10:52:35 +00:00
Marek a6f8a9b192
Update `Cargo.lock` (#8310) 2024-02-22 01:20:05 +00:00
Gustavo Valverde d6314471b9
ref(docker): publish less tags in Docker Hub (#8300)
* ref(docker): publish less tags in Docker Hub

* fix: remove extra versions
2024-02-22 00:16:06 +00:00
Arya 5a9281a7a8
fix(scan): Fix minor concurrency bug in the `scan` gRPC method (#8303)
* update scan task to notify subscribe caller once the new subscribed_keys are sent on the watch channel

* Fixes timing bug in scan gRPC method:

Joins register/subscribe scan service calls, sends SubscribeResults request first, and filters out duplicate results from channel

* Removes outdated TODO

* wraps subscribed_keys in an Arc before sending to watch channel, fixes typo

* Remove result senders for keys that have been removed
2024-02-21 23:29:13 +00:00
dependabot[bot] c6b56b492a
build(deps): bump the devops group with 1 update (#8306)
Bumps the devops group with 1 update: [tj-actions/changed-files](https://github.com/tj-actions/changed-files).


Updates `tj-actions/changed-files` from 42.0.2 to 42.0.4
- [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/v42.0.2...v42.0.4)

---
updated-dependencies:
- 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>
2024-02-21 20:40:55 +00:00
Gustavo Valverde 1a0d5ffec7
fix(ci): keep `gcloud` arguments consistency (#8305)
* fix(ci): keep `gcloud` arguments consistency

* Fix the syntax for setting `DISK_OPTION`

---------

Co-authored-by: Marek <mail@marek.onl>
2024-02-21 13:53:51 +00:00
Alfredo Garcia 2f0b284997
tests(grpc): Unit tests (#8293)
* add grpc method unit tests

* add test module description

* runs tests in sequence, adds some messages to assertions, and minor cleanups (#8296)

* fix field name change

---------

Co-authored-by: Arya <aryasolhi@gmail.com>
2024-02-20 22:45:55 +00:00
Arya a7de137a7a
add(scan): Implement `scan` gRPC method (#8268)
* Adds scan method

* fix clippy warning

* Skip empty results and don't panic if the gRPC client disconnects

* moves `Results` request above `SubscribeResults` request to avoid duplicate results.

* returns early if there's a send error when sending initial results and updates response type

* move responder buffer size to const

* Adds a snapshot test for the `scan` method

* updates snapshots
2024-02-20 19:16:20 +00:00
dependabot[bot] 3a67e81300
build(deps): bump the devops group with 1 update (#8270)
Bumps the devops group with 1 update: [shimataro/ssh-key-action](https://github.com/shimataro/ssh-key-action).


Updates `shimataro/ssh-key-action` from 2.6.1 to 2.7.0
- [Release notes](https://github.com/shimataro/ssh-key-action/releases)
- [Changelog](https://github.com/shimataro/ssh-key-action/blob/v2/CHANGELOG.md)
- [Commits](https://github.com/shimataro/ssh-key-action/compare/v2.6.1...v2.7.0)

---
updated-dependencies:
- dependency-name: shimataro/ssh-key-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>
2024-02-20 10:40:46 +00:00
kai 6c0aa042ad
fix(docker): set log rotation to avoid docker bugs (#8269)
Containers can generate a significant amount of logs,
consuming disk space over time. Here I added configuration
for maximum log file size (max-size) and the number of retained
log files (max-file) in the logging driver options
to control disk usage and prevent log files from
growing indefinitely.
2024-02-20 10:40:38 +00:00
Marek 663c57700b
add(scan): Test the `RegisterKeys` scan service call (#8281)
* Impl generating continuous deserialized blocks

* Make `sapling_efvk_hrp` `pub`

* Don't wait for Sapling activation height in tests

* Set the sleep interval for scan service to 10 secs

* Simplify `sapling_key_to_scan_block_keys`

* Enable mocking Sapling scanning keys for Testnet

* Test the `RegisterKeys` scan service call

* Enable `shielded-scan` for `zebra-chain`

* Use an ephemeral database so results don't persist

* Don't generate blocks when mocking the state

* Improve error messages

* Simplify seeding mocked Sapling viewing keys

* Apply suggestions from code review

Co-authored-by: Arya <aryasolhi@gmail.com>

* Use a manual iterator over `Network`

---------

Co-authored-by: Arya <aryasolhi@gmail.com>
2024-02-19 23:45:38 +00:00
dependabot[bot] a8dcd98b6e
build(deps): bump the prod group with 3 updates (#8283)
Bumps the prod group with 3 updates: [clap](https://github.com/clap-rs/clap), [semver](https://github.com/dtolnay/semver) and [rocksdb](https://github.com/rust-rocksdb/rust-rocksdb).


Updates `clap` from 4.5.0 to 4.5.1
- [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/clap_complete-v4.5.0...clap_complete-v4.5.1)

Updates `semver` from 1.0.21 to 1.0.22
- [Release notes](https://github.com/dtolnay/semver/releases)
- [Commits](https://github.com/dtolnay/semver/compare/1.0.21...1.0.22)

Updates `rocksdb` from 0.21.0 to 0.22.0
- [Release notes](https://github.com/rust-rocksdb/rust-rocksdb/releases)
- [Changelog](https://github.com/rust-rocksdb/rust-rocksdb/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-rocksdb/rust-rocksdb/compare/v0.21.0...v0.22.0)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod
- dependency-name: semver
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod
- dependency-name: rocksdb
  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>
2024-02-19 18:17:34 +00:00
Marek 96c0d42d74
Add the `experimental_allow_proto3_optional` flag (#8282) 2024-02-19 13:09:52 +00:00
Alfredo Garcia fbddec3cb3
test(grpc): Add snapshots (#8277)
* add grpc snapshot tests

* replaces ScanService with MockService in snapshot tests

* removes dev-dep in zebra-grpc on zebra-scan and updates snapshots

* Apply suggestions from code review

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

---------

Co-authored-by: Arya <aryasolhi@gmail.com>
2024-02-16 19:41:04 +00:00
Arya f20834c373
improve error message in non_blocking_logger test (#8276) 2024-02-15 22:46:04 +00:00
Marek 85a7cc977a
add(scan): Implement gRPC support for registering viewing keys for scanning (#8266)
* Use `use tonic::Request` for consistency

* Add definitions of `proto` types

* Impl `register_keys` gRPC

* Fix a typo

---------

Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
2024-02-15 18:02:32 +00:00
Marek 584bd23718
Update Debian from Bullseye to Bookworm (#8273) 2024-02-14 23:02:06 +00:00
dependabot[bot] f342f50938
build(deps): bump the prod group with 14 updates (#8264)
* build(deps): bump the prod group with 14 updates

Bumps the prod group with 14 updates:

| Package | From | To |
| --- | --- | --- |
| [clap](https://github.com/clap-rs/clap) | `4.4.18` | `4.5.0` |
| [chrono](https://github.com/chronotope/chrono) | `0.4.33` | `0.4.34` |
| [indexmap](https://github.com/indexmap-rs/indexmap) | `2.2.2` | `2.2.3` |
| [toml](https://github.com/toml-rs/toml) | `0.8.9` | `0.8.10` |
| [thiserror](https://github.com/dtolnay/thiserror) | `1.0.56` | `1.0.57` |
| [metrics](https://github.com/metrics-rs/metrics) | `0.22.0` | `0.22.1` |
| [num-integer](https://github.com/rust-num/num-integer) | `0.1.45` | `0.1.46` |
| [metrics-exporter-prometheus](https://github.com/metrics-rs/metrics) | `0.13.0` | `0.13.1` |
| [indicatif](https://github.com/console-rs/indicatif) | `0.17.7` | `0.17.8` |
| [tempfile](https://github.com/Stebalien/tempfile) | `3.9.0` | `3.10.0` |
| [tonic](https://github.com/hyperium/tonic) | `0.10.2` | `0.11.0` |
| [tonic-build](https://github.com/hyperium/tonic) | `0.10.2` | `0.11.0` |
| [x25519-dalek](https://github.com/dalek-cryptography/curve25519-dalek) | `2.0.0` | `2.0.1` |
| [serde_with](https://github.com/jonasbb/serde_with) | `3.6.0` | `3.6.1` |


Updates `clap` from 4.4.18 to 4.5.0
- [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.18...clap_complete-v4.5.0)

Updates `chrono` from 0.4.33 to 0.4.34
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.33...v0.4.34)

Updates `indexmap` from 2.2.2 to 2.2.3
- [Changelog](https://github.com/indexmap-rs/indexmap/blob/master/RELEASES.md)
- [Commits](https://github.com/indexmap-rs/indexmap/compare/2.2.2...2.2.3)

Updates `toml` from 0.8.9 to 0.8.10
- [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.9...toml-v0.8.10)

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

Updates `metrics` from 0.22.0 to 0.22.1
- [Changelog](https://github.com/metrics-rs/metrics/blob/main/release.toml)
- [Commits](https://github.com/metrics-rs/metrics/compare/metrics-v0.22.0...metrics-v0.22.1)

Updates `num-integer` from 0.1.45 to 0.1.46
- [Changelog](https://github.com/rust-num/num-integer/blob/master/RELEASES.md)
- [Commits](https://github.com/rust-num/num-integer/compare/num-integer-0.1.45...num-integer-0.1.46)

Updates `metrics-exporter-prometheus` from 0.13.0 to 0.13.1
- [Changelog](https://github.com/metrics-rs/metrics/blob/main/release.toml)
- [Commits](https://github.com/metrics-rs/metrics/compare/metrics-exporter-prometheus-v0.13.0...metrics-v0.13.1)

Updates `indicatif` from 0.17.7 to 0.17.8
- [Release notes](https://github.com/console-rs/indicatif/releases)
- [Commits](https://github.com/console-rs/indicatif/commits)

Updates `tempfile` from 3.9.0 to 3.10.0
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Stebalien/tempfile/compare/v3.9.0...v3.10.0)

Updates `tonic` from 0.10.2 to 0.11.0
- [Changelog](https://github.com/hyperium/tonic/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hyperium/tonic/compare/v0.10.2...v0.11.0)

Updates `tonic-build` from 0.10.2 to 0.11.0
- [Changelog](https://github.com/hyperium/tonic/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hyperium/tonic/compare/v0.10.2...v0.11.0)

Updates `x25519-dalek` from 2.0.0 to 2.0.1
- [Release notes](https://github.com/dalek-cryptography/curve25519-dalek/releases)
- [Commits](https://github.com/dalek-cryptography/curve25519-dalek/compare/2.0.0...x25519-2.0.1)

Updates `serde_with` from 3.6.0 to 3.6.1
- [Release notes](https://github.com/jonasbb/serde_with/releases)
- [Commits](https://github.com/jonasbb/serde_with/compare/v3.6.0...v3.6.1)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prod
- dependency-name: chrono
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod
- dependency-name: indexmap
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod
- dependency-name: toml
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod
- dependency-name: metrics
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod
- dependency-name: num-integer
  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
- dependency-name: indicatif
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod
- dependency-name: tempfile
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prod
- dependency-name: tonic
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prod
- dependency-name: tonic-build
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prod
- dependency-name: x25519-dalek
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod
- dependency-name: serde_with
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod
...

Signed-off-by: dependabot[bot] <support@github.com>

* update deny.toml

* update deny.toml missing dup

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
2024-02-14 12:24:33 +00:00
Arya 3929a526e5
add(scan): Implement SubscribeResults request for scan service (#8253)
* processes SubscribeResults messages

* send tx ids of results to the subscribe channel

* replaces BoxError with Report in scan_range

* adds a watch channel for using subscribed_keys in scan_range

* updates args to process_messages in test

* adds a `subscribe` method to ScanTask for sending a SubscribeResults cmd

* updates test for process_messages to cover subscribe cmds

* impls SubscribeResult service request and updates sender type

* adds test for SubscribeResults scan service request

* adds acceptance test

* updates tests and imports

* fixes acceptance test by using spawn_blocking to avoid blocking async executor and setting an appropriate start height

* fixes test

* Applies suggestions from code review.

* use tokio mpsc channel in scan task instead of std/blocking mpsc

* use tokio mpsc channel for results sender

* adds `was_parsed_keys_empty` instead of checking that all the parsed keys are new keys

* fixes test failures related to send errors in scan task

* returns height and key for scan results from subcribe_results results receiver

* hide scan_service mod in zebra-node-service behind feature
2024-02-13 00:42:40 +00:00
dependabot[bot] c69befda2f
build(deps): bump the cargo group across 1 directories with 3 updates (#8263)
Bumps the cargo group with 3 updates in the /. directory: [h2](https://github.com/hyperium/h2), [libgit2-sys](https://github.com/rust-lang/git2-rs) and [shlex](https://github.com/comex/rust-shlex).


Updates `h2` from 0.3.23 to 0.3.24
- [Release notes](https://github.com/hyperium/h2/releases)
- [Changelog](https://github.com/hyperium/h2/blob/v0.3.24/CHANGELOG.md)
- [Commits](https://github.com/hyperium/h2/compare/v0.3.23...v0.3.24)

Updates `libgit2-sys` from 0.16.1+1.7.1 to 0.16.2+1.7.2
- [Changelog](https://github.com/rust-lang/git2-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/git2-rs/commits)

Updates `shlex` from 1.2.0 to 1.3.0
- [Changelog](https://github.com/comex/rust-shlex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/comex/rust-shlex/commits)

---
updated-dependencies:
- dependency-name: h2
  dependency-type: indirect
  dependency-group: cargo-security-group
- dependency-name: libgit2-sys
  dependency-type: indirect
  dependency-group: cargo-security-group
- dependency-name: shlex
  dependency-type: indirect
  dependency-group: cargo-security-group
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-12 21:42:42 +00:00
Alfredo Garcia d59c7305b0
add(grpc): `get_results` (#8255)
* add `get_results` grpc call

* nitpick
2024-02-09 23:41:26 +00:00
Marek 6b8cbf9904
add(scan): Implement `RegisterKeys` service request to register new keys (#8251)
* Refactor obtaining of activation heights

* Impl the `RegisterKeys` service request

* Mock viewing keys for tests

* Refactor tests

* Apply suggestions from code review

Co-authored-by: Arya <aryasolhi@gmail.com>

* Remove a redundant comment

I don't think we need to assume the genesis block doesn't contain
shielded data as the comment says.

* Avoid using a single-letter variable

* Refactor mocking Sapling scanning keys

---------

Co-authored-by: Arya <aryasolhi@gmail.com>
2024-02-09 15:23:19 +00:00
dependabot[bot] 0c2c421bec
build(deps): bump the devops group with 4 updates (#8246)
Bumps the devops group with 4 updates: [google-github-actions/auth](https://github.com/google-github-actions/auth), [codecov/codecov-action](https://github.com/codecov/codecov-action), [baptiste0928/cargo-install](https://github.com/baptiste0928/cargo-install) and [release-drafter/release-drafter](https://github.com/release-drafter/release-drafter).


Updates `google-github-actions/auth` from 2.1.0 to 2.1.1
- [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/v2.1.0...v2.1.1)

Updates `codecov/codecov-action` from 3.1.6 to 4.0.1
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v3.1.6...v4.0.1)

Updates `baptiste0928/cargo-install` from 2.2.0 to 3.0.0
- [Release notes](https://github.com/baptiste0928/cargo-install/releases)
- [Changelog](https://github.com/baptiste0928/cargo-install/blob/main/CHANGELOG.md)
- [Commits](https://github.com/baptiste0928/cargo-install/compare/v2.2.0...v3.0.0)

Updates `release-drafter/release-drafter` from 5 to 6
- [Release notes](https://github.com/release-drafter/release-drafter/releases)
- [Commits](https://github.com/release-drafter/release-drafter/compare/v5...v6)

---
updated-dependencies:
- dependency-name: google-github-actions/auth
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: devops
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: devops
- dependency-name: baptiste0928/cargo-install
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: devops
- dependency-name: release-drafter/release-drafter
  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>
2024-02-09 12:08:31 +00:00
Marek 130c4e95e8
Fix formatting in `proptest` macros (#8252) 2024-02-09 01:54:54 +00:00
Alfredo Garcia 20bd156689
change(release.toml): new crates owners list (#8247) 2024-02-07 23:17:43 +00:00
Arya 2c0bc3ac92
add(scan): Start scanner gRPC server with `zebrad` (#8241)
* adds clear_results RPC method for zebra-scan

* adds delete_keys rpc method

* adds docs

* Update zebra-grpc/proto/scanner.proto

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

* Apply suggestions from code review

* start zebra-scan gRPC server from zebrad start command

* adds a test that the scanner starts with zebrad

* adds a `listen_addr` field to the shielded scan config

* updates test to use a random port and set the listen_addr config field

* fixes test

* Update zebra-scan/src/config.rs

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

* fixes panic when trying to open multiple mutable storage instances.

* open db in blocking task

* fixes test

---------

Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
2024-02-07 22:36:01 +00:00
dependabot[bot] 1cfed249de
build(deps): bump the prod group with 6 updates (#8230)
Bumps the prod group with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [indexmap](https://github.com/indexmap-rs/indexmap) | `2.2.1` | `2.2.2` |
| [toml](https://github.com/toml-rs/toml) | `0.8.8` | `0.8.9` |
| [tokio](https://github.com/tokio-rs/tokio) | `1.35.1` | `1.36.0` |
| [sentry](https://github.com/getsentry/sentry-rust) | `0.32.1` | `0.32.2` |
| [serde_with](https://github.com/jonasbb/serde_with) | `3.5.1` | `3.6.0` |
| [reqwest](https://github.com/seanmonstar/reqwest) | `0.11.23` | `0.11.24` |


Updates `indexmap` from 2.2.1 to 2.2.2
- [Changelog](https://github.com/indexmap-rs/indexmap/blob/master/RELEASES.md)
- [Commits](https://github.com/indexmap-rs/indexmap/compare/2.2.1...2.2.2)

Updates `toml` from 0.8.8 to 0.8.9
- [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.8...toml-v0.8.9)

Updates `tokio` from 1.35.1 to 1.36.0
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.35.1...tokio-1.36.0)

Updates `sentry` from 0.32.1 to 0.32.2
- [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.1...0.32.2)

Updates `serde_with` from 3.5.1 to 3.6.0
- [Release notes](https://github.com/jonasbb/serde_with/releases)
- [Commits](https://github.com/jonasbb/serde_with/compare/v3.5.1...v3.6.0)

Updates `reqwest` from 0.11.23 to 0.11.24
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.11.23...v0.11.24)

---
updated-dependencies:
- dependency-name: indexmap
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod
- dependency-name: toml
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prod
- dependency-name: sentry
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod
- dependency-name: serde_with
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prod
- dependency-name: reqwest
  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>
2024-02-07 03:18:52 +00:00
Arya 8d1a1ac486
add(scan): Add `ClearResults` and `DeleteKeys` gRPC methods (#8237)
* adds clear_results RPC method for zebra-scan

* adds delete_keys rpc method

* adds docs

* Update zebra-grpc/proto/scanner.proto

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

* Apply suggestions from code review

---------

Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
2024-02-06 21:08:56 +00:00
Arya 2a004ffe9e
add(scan): Handle RegisterKeys messages in scan task (#8222)
* moves ScanTask to its own module in service module

* moves `process_messages()` method to scan_task.rs

* uses get_mut() and returns new keys

* updates types and adds scan_until() function

* adds and uses wait_for_height() function

* spawns scan_until_task_handler to poll scan_until_tasks FuturesUnordered

* corrects comment

* adds TODO

* updates expected test log, corrects panic msg, fixes fmt

* moves scan functions to scan_task module

* moves ScanTaskCommand and related method impls to its own module

* moves `ScanTask::mock()` test constructor to its own module

* creates `add_keys` mod and moves `scan_until()` function there

* moves scan task executor to its own module and adds ScanRangeTaskBuilder type

* renames add_keys to scan_range, moves executor to scan_task mod

* adds test for process_messages

* updates scan_height_and_store_results() to skip last_scanned_height check if there is no key height for a key in `parsed_keys`

* updates `default_test_config()`

* adds acceptance test for registering keys in ScanTask

* uses the right feature for the new acceptance test

* Applies suggestions from code review
2024-02-06 18:41:00 +00:00
Arya deed6f8a62
updates reference to lightwalletd source to use release v0.4.16 (#8234) 2024-02-06 13:19:57 +00:00
dependabot[bot] 6854a8950c
build(deps): bump the devops group with 5 updates (#8218)
Bumps the devops group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [arduino/setup-protoc](https://github.com/arduino/setup-protoc) | `2.1.0` | `3.0.0` |
| [codecov/codecov-action](https://github.com/codecov/codecov-action) | `3.1.4` | `3.1.6` |
| [tj-actions/changed-files](https://github.com/tj-actions/changed-files) | `42.0.0` | `42.0.2` |
| [peter-evans/dockerhub-description](https://github.com/peter-evans/dockerhub-description) | `3.4.2` | `4.0.0` |
| [docker/metadata-action](https://github.com/docker/metadata-action) | `5.5.0` | `5.5.1` |


Updates `arduino/setup-protoc` from 2.1.0 to 3.0.0
- [Release notes](https://github.com/arduino/setup-protoc/releases)
- [Commits](https://github.com/arduino/setup-protoc/compare/v2.1.0...v3.0.0)

Updates `codecov/codecov-action` from 3.1.4 to 3.1.6
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v3.1.4...v3.1.6)

Updates `tj-actions/changed-files` from 42.0.0 to 42.0.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/v42.0.0...v42.0.2)

Updates `peter-evans/dockerhub-description` from 3.4.2 to 4.0.0
- [Release notes](https://github.com/peter-evans/dockerhub-description/releases)
- [Commits](https://github.com/peter-evans/dockerhub-description/compare/v3.4.2...v4.0.0)

Updates `docker/metadata-action` from 5.5.0 to 5.5.1
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](https://github.com/docker/metadata-action/compare/v5.5.0...v5.5.1)

---
updated-dependencies:
- dependency-name: arduino/setup-protoc
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: devops
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: devops
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: devops
- dependency-name: peter-evans/dockerhub-description
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: devops
- dependency-name: docker/metadata-action
  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>
2024-02-06 13:19:46 +00:00
Pili Guerra a309d6fa66
Remove rfc.md file (#8228) 2024-02-05 12:36:56 +00:00
Alfredo Garcia 052f235ba3
add(scan): Implement `Results` request (#8224)
* implement Results service call

* call `sapling_results_for_key` from a blocking thread

Co-authored-by: Arya <aryasolhi@gmail.com>

---------

Co-authored-by: Arya <aryasolhi@gmail.com>
2024-02-02 02:29:36 +00:00
Gustavo Valverde 5feb40e0b8
feat(docker): allow users to use Zebra + LWD with persistent states (#8215)
* feat(docker): allow users to use Zebra + LWD with persistent states

* fix(docs): better documentation and compose execution

* chore(docs): better context box

* chore: do not commit further user changes to the `.env`

This can always be overriden by forcing this pushes if it was intended

* fix(compose): do not add extra volumes and ports

* Apply suggestions from code review

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

---------

Co-authored-by: Marek <mail@marek.onl>
2024-02-01 21:54:17 +00:00
Arya 2bf16a3740
add(scan): Implement `ClearResults` `ScanService` request (#8219)
* implements ClearResults request

* moves common code to another function

* Applies suggestions from code review
2024-02-01 20:07:31 +00:00
Arya 80827f5294
add(scan): Implement `DeleteKeys` `ScanService` request (#8217)
* handle RemoveKeys command in ScanTask

* implements DeleteKeys request

* uses spawn_blocking and updates comments

* removes spawn_init fn

* adds test for new Storage method

* adds fake_sapling_results helper function

* adds test for scan service DeleteKeys request

* adds TODO for unwrap_or_clone

* checks the keys sent to the scan task for removal

* moves message processing to its own function

* adds a timeout for the scanner task response

* hide mock() methods behind cfg(test) or feature

* adds MAX_REQUEST_KEYS constant

* updates test to insert and delete results for a second key

* Update zebra-scan/src/init.rs

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

* test that the expected number of results are in the db

* fix unused import lint

* fixes unused imports

---------

Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
2024-01-31 19:34:24 +00:00
Arya 768eb90722
add(chain): Adds `ViewingKey` type in zebra-chain (#8198)
* adds/impls types in zebra-chain to be used by the zebra-scan RPC server

* Adds methods for parsing and a test

* adds test for key hash encoding

* Apply suggestions from code review

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

* refactors viewing key type

* refactors/renames for viewing keys

* fixes doc links

* Apply suggestions from code review

* Apply suggestions from code review

* removes ViewingKeyHash and ViewingKeyWithHash types

* removes `to_bytes` methods

* remove outdated method and call

---------

Co-authored-by: Marek <mail@marek.onl>
2024-01-30 20:32:36 +00:00
Gustavo Valverde 18477ecbbe
feat(docker): add `docker-compose` file to run CI locally (#8209)
* ref(docker): Consolidate all tests in the `entrypoint.sh` script

* fix(ci): missing docker argument

* fix(ci): do not blank `ENTRYPOINT_FEATURES` vairable

* fix(docker): do not add `shielded-scan` as part of `TEST_FEATURES`

* chore: remove misleading comment

* feat(docker): add `docker-compose` file to run CI locally

* fix(docs): do not remove previous sections until we have a substitute for users

* fix(docs): revert some changes

* fix: typos

* ref(docker): Consolidate all tests in the `entrypoint.sh` script

* fix(ci): missing docker argument

* fix(ci): do not blank `ENTRYPOINT_FEATURES` vairable

* fix(docker): do not add `shielded-scan` as part of `TEST_FEATURES`

* chore: remove misleading comment

* Update docker/Dockerfile

Co-authored-by: Arya <aryasolhi@gmail.com>

---------

Co-authored-by: Arya <aryasolhi@gmail.com>
2024-01-30 19:19:44 +00:00
Gustavo Valverde 184c30e0fc
ref(docker): Consolidate all tests in the `entrypoint.sh` script (#8175)
* ref(docker): Consolidate all tests in the `entrypoint.sh` script

* fix(ci): missing docker argument

* fix(ci): do not blank `ENTRYPOINT_FEATURES` vairable

* fix(docker): do not add `shielded-scan` as part of `TEST_FEATURES`

* chore: remove misleading comment

* Update docker/Dockerfile

Co-authored-by: Arya <aryasolhi@gmail.com>

---------

Co-authored-by: Arya <aryasolhi@gmail.com>
2024-01-30 17:47:05 +00:00
dependabot[bot] c9401ad754
build(deps): bump the prod group with 7 updates (#8208)
* build(deps): bump the prod group with 7 updates

Bumps the prod group with 7 updates:

| Package | From | To |
| --- | --- | --- |
| [chrono](https://github.com/chronotope/chrono) | `0.4.32` | `0.4.33` |
| [indexmap](https://github.com/indexmap-rs/indexmap) | `2.1.0` | `2.2.1` |
| [serde](https://github.com/serde-rs/serde) | `1.0.195` | `1.0.196` |
| [pin-project](https://github.com/taiki-e/pin-project) | `1.1.3` | `1.1.4` |
| [serde_json](https://github.com/serde-rs/json) | `1.0.111` | `1.0.113` |
| [serde_with](https://github.com/jonasbb/serde_with) | `3.5.0` | `3.5.1` |
| [itertools](https://github.com/rust-itertools/itertools) | `0.12.0` | `0.12.1` |


Updates `chrono` from 0.4.32 to 0.4.33
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.32...v0.4.33)

Updates `indexmap` from 2.1.0 to 2.2.1
- [Changelog](https://github.com/indexmap-rs/indexmap/blob/master/RELEASES.md)
- [Commits](https://github.com/indexmap-rs/indexmap/compare/2.1.0...2.2.1)

Updates `serde` from 1.0.195 to 1.0.196
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.195...v1.0.196)

Updates `pin-project` from 1.1.3 to 1.1.4
- [Release notes](https://github.com/taiki-e/pin-project/releases)
- [Changelog](https://github.com/taiki-e/pin-project/blob/main/CHANGELOG.md)
- [Commits](https://github.com/taiki-e/pin-project/compare/v1.1.3...v1.1.4)

Updates `serde_json` from 1.0.111 to 1.0.113
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.111...v1.0.113)

Updates `serde_with` from 3.5.0 to 3.5.1
- [Release notes](https://github.com/jonasbb/serde_with/releases)
- [Commits](https://github.com/jonasbb/serde_with/compare/v3.5.0...v3.5.1)

Updates `itertools` from 0.12.0 to 0.12.1
- [Changelog](https://github.com/rust-itertools/itertools/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-itertools/itertools/compare/v0.12.0...v0.12.1)

---
updated-dependencies:
- dependency-name: chrono
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod
- dependency-name: indexmap
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prod
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod
- dependency-name: pin-project
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod
- dependency-name: serde_with
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod
- dependency-name: itertools
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod
...

Signed-off-by: dependabot[bot] <support@github.com>

* replaces call to deprecated `IndexMap::remove()` with `swap_remove`

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Arya <aryasolhi@gmail.com>
2024-01-30 14:00:28 +00:00
Alfredo Garcia 78d33f3e9e
feat(grpc): Add initial `Getinfo` grpc (#8178)
* add `zebra-grpc` crate

* add missing fields

* convert to a lib

* add zebra-scan and tonic as depenency

* add a getinfo grpc

* remove zebra-scanner dependency

* Adds scan_service field to scanner grpc server

* remove dependency

* test launching the grpc server from the zebra-scan crate (not building)

* fix async issue

* fixes build issues

* add binary for manual testing

* try fix try run

---------

Co-authored-by: Arya <aryasolhi@gmail.com>
2024-01-26 01:29:37 +00:00
Marek c08ad45fc3
Unpin `EmbarkStudios/cargo-deny-action` (#8197) 2024-01-25 16:17:56 +00:00
dependabot[bot] 0d18b91b29
build(deps): bump the devops group with 4 updates (#8194)
Bumps the devops group with 4 updates: [google-github-actions/auth](https://github.com/google-github-actions/auth), [google-github-actions/setup-gcloud](https://github.com/google-github-actions/setup-gcloud), [tj-actions/changed-files](https://github.com/tj-actions/changed-files) and [reviewdog/action-actionlint](https://github.com/reviewdog/action-actionlint).


Updates `google-github-actions/auth` from 2.0.1 to 2.1.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/v2.0.1...v2.1.0)

Updates `google-github-actions/setup-gcloud` from 2.0.1 to 2.1.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/v2.0.1...v2.1.0)

Updates `tj-actions/changed-files` from 41.1.2 to 42.0.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/v41.1.2...v42.0.0)

Updates `reviewdog/action-actionlint` from 1.40.0 to 1.41.0
- [Release notes](https://github.com/reviewdog/action-actionlint/releases)
- [Commits](https://github.com/reviewdog/action-actionlint/compare/v1.40.0...v1.41.0)

---
updated-dependencies:
- dependency-name: google-github-actions/auth
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: devops
- dependency-name: google-github-actions/setup-gcloud
  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-major
  dependency-group: devops
- dependency-name: reviewdog/action-actionlint
  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>
2024-01-25 00:56:50 +00:00
Arya 513ace2646
add(scan): Create a tower Service in zebra-scan (#8185)
* Adds ScanService and ScanTask

* renames ScannerCommand to ScanTaskCommand

* fixes doc errors

* fixes clippy lints

* panic if the scan task finishes unexpectedly

* updates TODOs

---------

Co-authored-by: Marek <mail@marek.onl>
2024-01-24 22:37:03 +00:00
dependabot[bot] d231b3b435
build(deps): bump the prod group with 6 updates (#8190)
Bumps the prod group with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [chrono](https://github.com/chronotope/chrono) | `0.4.31` | `0.4.32` |
| [rayon](https://github.com/rayon-rs/rayon) | `1.8.0` | `1.8.1` |
| [regex](https://github.com/rust-lang/regex) | `1.10.2` | `1.10.3` |
| [vergen](https://github.com/rustyhorde/vergen) | `8.3.0` | `8.3.1` |
| [bitflags](https://github.com/bitflags/bitflags) | `2.4.1` | `2.4.2` |
| [serde_with](https://github.com/jonasbb/serde_with) | `3.4.0` | `3.5.0` |


Updates `chrono` from 0.4.31 to 0.4.32
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.31...v0.4.32)

Updates `rayon` from 1.8.0 to 1.8.1
- [Changelog](https://github.com/rayon-rs/rayon/blob/master/RELEASES.md)
- [Commits](https://github.com/rayon-rs/rayon/compare/rayon-core-v1.8.0...rayon-core-v1.8.1)

Updates `regex` from 1.10.2 to 1.10.3
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.10.2...1.10.3)

Updates `vergen` from 8.3.0 to 8.3.1
- [Release notes](https://github.com/rustyhorde/vergen/releases)
- [Commits](https://github.com/rustyhorde/vergen/compare/8.3.0...8.3.1)

Updates `bitflags` from 2.4.1 to 2.4.2
- [Release notes](https://github.com/bitflags/bitflags/releases)
- [Changelog](https://github.com/bitflags/bitflags/blob/main/CHANGELOG.md)
- [Commits](https://github.com/bitflags/bitflags/compare/2.4.1...2.4.2)

Updates `serde_with` from 3.4.0 to 3.5.0
- [Release notes](https://github.com/jonasbb/serde_with/releases)
- [Commits](https://github.com/jonasbb/serde_with/compare/v3.4.0...v3.5.0)

---
updated-dependencies:
- dependency-name: chrono
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod
- dependency-name: rayon
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod
- dependency-name: vergen
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod
- dependency-name: bitflags
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod
- dependency-name: serde_with
  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>
Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
2024-01-24 22:36:32 +00:00
Marek c103dd6db0
Downgrade `cargo-deny-action` to v1.5.10 (#8192) 2024-01-24 17:19:31 +00:00
Marek 34a3ba8c69
add(scan): Add the `scan_start_where_left` test to CI (#8172)
* Add the `scan_start_where_left` test to CI

* Fix passing of features

Co-authored-by: Arya <aryasolhi@gmail.com>

---------

Co-authored-by: Arya <aryasolhi@gmail.com>
2024-01-23 23:07:53 +00:00
Alfredo Garcia 001555b134
build(crate): Add a new `zebra-grpc` crate (#8167)
* add `zebra-grpc` crate

* add missing fields

* convert to a lib

* add zebra-scan and tonic as depenency
2024-01-23 23:07:32 +00:00
dependabot[bot] 5bd8593367
build(deps): bump the devops group with 2 updates (#8166)
Bumps the devops group with 2 updates: [tj-actions/changed-files](https://github.com/tj-actions/changed-files) and [Swatinem/rust-cache](https://github.com/swatinem/rust-cache).


Updates `tj-actions/changed-files` from 41.0.1 to 41.1.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/v41.0.1...v41.1.2)

Updates `Swatinem/rust-cache` from 2.7.1 to 2.7.3
- [Release notes](https://github.com/swatinem/rust-cache/releases)
- [Changelog](https://github.com/Swatinem/rust-cache/blob/master/CHANGELOG.md)
- [Commits](https://github.com/swatinem/rust-cache/compare/v2.7.1...v2.7.3)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: devops
- dependency-name: Swatinem/rust-cache
  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>
2024-01-23 23:07:22 +00:00
Alfredo Garcia 2c18835510
chore: Release (#8187) 2024-01-23 20:00:38 +00:00