zcash/lightwalletd

Implement darkside counterpart for `z_getsubtreesbyindex` method

pacu opened this issue · 2 comments

pacu commented

What is your feature request?
Implement darkside z_getsubtreesbyindex method

Similarly as it is done with TreeStates we could expose some darkside RPCs that allow tests to add SubTreeRoots to a cache

How would this feature help you?
Currently, ECC SDK can't run the darksidewalletd tests because this method is missing.

-[DarksideTests.AdvancedReOrgTests testReOrgChangesInboundTxMinedHeight] : failed - Failed with error: serviceSubtreeRootsStreamFailed(ZcashLightClientKit.LightWalletServiceError.generalError(message: "there was an attempt to call an unsupported RPC: z_getsubtreesbyindex"))

Which of the following two options is easier, better for you for the darkside gRPC's interface?

  • add a single subtree entry (arguments would be index, merkle root hash, end height)
  • add an entire list (array) of subtree entries, which would replace the existing array?

Or something else?

pacu commented

Which of the following two options is easier, better for you for the darkside gRPC's interface?

  • add a single subtree entry (arguments would be index, merkle root hash, end height)
  • add an entire list (array) of subtree entries, which would replace the existing array?

Or something else?

I think the first case will make the interface equal or similar to the TreeState one won't it? I would go for that for the sake of an uniform api