Arya
4ebd7a80d0
add(scan): Adds gRPC reflection and documents how to use the zebra-scan gRPC server ( #8288 )
...
* adds tonic-reflection
* adds listen_addr to log
* Adds user guide for scan server to zebra book
* fixes typo
* Applies suggestions from code review
* update link
Co-authored-by: Marek <mail@marek.onl>
---------
Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
Co-authored-by: Marek <mail@marek.onl>
2024-02-22 18:51:14 +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
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
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
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
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
Alfredo Garcia
d59c7305b0
add(grpc): `get_results` ( #8255 )
...
* add `get_results` grpc call
* nitpick
2024-02-09 23:41:26 +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
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
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