ZcashFoundation / zebra

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

Tracking: RPC support for ZavaX Bridge #8859

Closed pacu closed 2 months ago

pacu commented 2 months ago

Motivation

According to what Red.Dev engineers have responded, the bridge is currently using these four endpoints:

I couldn't find a 1:1 replacement for get block count

According to documentation: https://zcash.github.io/rpc/getblockcount.html

getblockcount - Zcash 5.5.0 RPC
getblockcount

Returns the number of blocks in the best valid block chain.

Result:
n    (numeric) The current block count

Examples:
> zcash-cli getblockcount 
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getblockcount", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8232/

A reasonable implementation would be for them to use et_best_block_height_and_hash. Would this be appropriate @arya2 ?

Specifications

No response

Complex Code or Requirements

No response

Testing

No response

Related Work

No response

oxarbitrage commented 2 months ago

All RPC methods mentioned here are currently supported by zebra including getblockcount.

You can paste the openapi spec into a swagger editor to see what we currently support, which should be easier than reading the zebra source code or developer documentation.

mpguerra commented 2 months ago

@pacu can you please confirm whether our implementation of getblockcount satisfies the needs of the Red.Dev team? Happy to help out further and/or implement any missing functionality.

pacu commented 2 months ago

yes it does!

thanks @oxarbitrage for the open api link.