Commit Graph

7 Commits

Author SHA1 Message Date
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 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
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
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