Plan for zcash_client_backend
memory wallet code with Zebra
#8388
Replies: 2 comments
-
I think this will not do what we need to integrate with the memory wallet but i might be wrong. The memory wallet needs to be filled with blocks: https://github.com/zcash/librustzcash/blob/147c033f6aa9a1d5f98206b62ebcb227ab0495e8/zcash_client_backend/src/data_api/mem_wallet.rs#L87 The function that fills the blocks is This is exactly what we get in zebra as a result of the So the idea in the wallet integration spec is to add a new The zebrad also creates the memory wallet when it gets started by using https://github.com/zcash/librustzcash/blob/147c033f6aa9a1d5f98206b62ebcb227ab0495e8/zcash_client_backend/src/data_api/mem_wallet.rs#L106 |
Beta Was this translation helpful? Give feedback.
-
If we have a populated memory wallet we will be able to use any of the methods it has, for example: https://github.com/zcash/librustzcash/blob/147c033f6aa9a1d5f98206b62ebcb227ab0495e8/zcash_client_backend/src/data_api/mem_wallet.rs#L332 This methods are not done yet but the idea is to fill the memory wallet in collaboration with the ECC. As far as they said, once we have the memory wallet all the information needed to do any of the zcashd wallet rpc calls will be possible. So for example if we want to implement and expose https://zcash.github.io/rpc/getbalance.html in Zebra we can make an rpc/grpc call that calls https://github.com/zcash/librustzcash/blob/147c033f6aa9a1d5f98206b62ebcb227ab0495e8/zcash_client_backend/src/data_api/mem_wallet.rs#L332 |
Beta Was this translation helpful? Give feedback.
-
I created a plan for a possible memory wallet integration with Zebra, the details can be found at https://github.com/oxarbitrage/zebra-grpc-scan-spec/blob/main/client_integration.md
However, there are a few questions made by @arya2 for possible changes and simplifications:
For the zcash_client_backend wallet integration, is it possible to limit the interface to calling the
scan
gRPC method to get all of the relevant shielded transaction ids, followed by calls toget_raw_transaction
(then decrypting transactions in the zcash_client_backend wallet)Do we want to update the
scan
method to return an empty array whenever a new block height is scanned so it’s possible to tell when the chain tip has changed to call theget_address_tx_ids
orget_address_utxos
RPC methods?Other opinions can be shared in this discussion.
Beta Was this translation helpful? Give feedback.
All reactions