Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Agree on final design spec of new remote functionality for "full node" wallets and block explorers #69

Open
idky137 opened this issue Sep 25, 2024 · 3 comments
Labels
Discussion Issue to be resolved through discussion with the wider community rather than implementing code.. tracking ZGM2 Issues that need to be resolved for the completion of the Zaino dev grant milestone 2

Comments

@idky137
Copy link
Contributor

idky137 commented Sep 25, 2024

Several options have been discussed:

  • A wrapper around the ReadStateService from Zebra, either hyper or a gRPC implementation. Offering a 1-2-1 correlation of functionality provided by the ReadStateService would provide a tidy way for "cli-wallets" to access chain data either locally or remotely but adds dev time duplicating functionality already offered by the lightwallet gRPC service.

  • Extending The lightwallet gRPC service with functionality required by "cli-wallets" and block explorers to provide a single unified API would lead to a more concise and easier to maintain service but would require extra dev by consumers to implement both local and remote functionality. (This could be nullified by adding a set of public methods in Zaino-State with a 1-2-1 correlation with the extended wallet gRPC service.)

@idky137 idky137 added the ZGM2 Issues that need to be resolved for the completion of the Zaino dev grant milestone 2 label Sep 25, 2024
@idky137 idky137 added this to the Zaino - Dev grant Milestone 2 milestone Sep 25, 2024
@idky137 idky137 added Discussion Issue to be resolved through discussion with the wider community rather than implementing code.. tracking labels Sep 25, 2024
@idky137
Copy link
Contributor Author

idky137 commented Sep 25, 2024

A possible gRPC implementation:

This would allow any wallets or block explorers to have a simple interface to fetch data both locally and remotely and allow for more complex indices to be built when running code privately. But would also stop public Zaino servers that will replace lightwalletd from exposing potentially dangerous functionality.

@arya2
Copy link

arya2 commented Sep 25, 2024

A simple wrapper for the ReadStateService seems best. Multiple encodings could be supported by tonic as long as there are From and Codec impls for them (though tonic doesn't yet support selecting a codec with the content-type header so it would need to use different endpoints or rust cfg flags).

@idky137
Copy link
Contributor Author

idky137 commented Oct 31, 2024

Having thought more Ive come round to this idea of using a simple wrapper for the "RemoteReadStateService", as it should only ever be Zaino using this implementation.

There is the separate issue of the wallet / Block explorer RPCs that Zaino will be taking responsibility for serving. Currently Zcashd and Zebrad use JsonRPC for this. We at Zaino would prefer to implement all remote services using gRPC.

This will allow for much more efficient server build and will simplify implementing these services over TOR / NYM. We are not completely fixed on this but do strongly advocate for this approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussion Issue to be resolved through discussion with the wider community rather than implementing code.. tracking ZGM2 Issues that need to be resolved for the completion of the Zaino dev grant milestone 2
Projects
None yet
Development

No branches or pull requests

2 participants