ZcashFoundation / zebra

Zcash - Financial Privacy in Rust 🦓
https://zfnd.org/zebra/
Apache License 2.0
402 stars 94 forks source link

Tracking: Block Explorer support #8435

Open mpguerra opened 4 months ago

mpguerra commented 4 months ago

Motivation

This is the tracking issue to outline the work necessary in order for zebra to support block explorers.

Zcash Block explorers

We're initially implementing support for https://github.com/nighthawk-apps/zcash-explorer.

RPC Methods

Using the Zcash Block Explorer from above as an example, these are the following RPC methods that would need to be implemented in zebra:

The following RPC methods should also be updated to support all of the required query and result fields:

Other

oxarbitrage commented 4 months ago

Hey @mpguerra , thank you for putting all this together. I think we need a ticket to install (fork if changes are needed) locally the https://github.com/nighthawk-apps/zcash-explorer

mpguerra commented 4 months ago

Hey @mpguerra , thank you for putting all this together. I think we need a ticket to install (fork if changes are needed) locally the https://github.com/nighthawk-apps/zcash-explorer

This is now #8456

upbqdn commented 4 months ago

@mpguerra could you add the resources you used to compose the lists of the RPCs?

mpguerra commented 4 months ago

@mpguerra could you add the resources you used to compose the lists of the RPCs?

https://gist.github.com/oxarbitrage/a56f7e6b9b198ba70150a3afb2ffc949

mpguerra commented 4 months ago

It may be that we want to prioritise some RPC methods first as there may be some features from the Tools section that we may not want to support from the start:

Screenshot 2024-04-25 at 10 18 35
upbqdn commented 2 months ago

@conradoplg I noticed you tried running https://github.com/nighthawk-apps/zcash-explorer locally. It should use this tool https://github.com/nighthawk-apps/zcashex as a middleware between the explorer and full node. It looks like it should be sufficient to implement the RPCs used in this file https://github.com/nighthawk-apps/zcashex/blob/main/lib/zcashex.ex to have a full support of the block explorer.

upbqdn commented 2 months ago

(So I think you don't need to list the RPCs manually.)

upbqdn commented 2 months ago

I extracted the RPCs from https://github.com/nighthawk-apps/zcashex/blob/main/lib/zcashex.ex:

Some of the RPCs are already listed in the PR description, but these are missing:

upbqdn commented 1 month ago

Here's a list of RPCs from Conrado which splits them according to what Zebra does and doesn't implement:

Zebra has: getblockchaininfo getinfo getmininginfo getpeerinfo getbestblockhash getblockcount getdifficulty getblock getblocksubsidy getnetworksolps getrawtransaction sendrawtransaction getaddressbalance getaddresstxids validateaddress z_validateaddress getrawmempool z_listunifiedreceivers

Zebra doesn't have: getmempoolinfo gettxoutsetinfo getmemoryinfo getnetworkinfo getblockhashes z_validatepaymentdisclosure getaddressdeltas decoderawtransaction getblockheader