lightwalletd
lightwalletd copied to clipboard
does not receive transparent transactions on zingo darkside test
What is the bug? heres what ive got https://github.com/fluidvanadium/zingolib/tree/darkside_foray
running cargo test --package zingo-cli --test integration_tests --features darkside_tests -- sync_transparent --nocapture
results in a test failure because no transparent transaction is picked up by the reciever.
sending to "unified" or "sapling" instead of "transparent" comes through. transparent also works in production.
Additional context lightwalletd version: v0.4.16-7-g8003d7f from commit: 8003d7fb6e3c47fb0561121a0ee47d080c8c46b9
"Ubuntu"="20.04.6 LTS (Focal Fossa)"
This is because zingo relies on the RPC gettaddresstxids
for detecting transparent outputs...which isn't implemented on the darkside server, see https://github.com/zcash/lightwalletd/blob/8003d7fb6e3c47fb0561121a0ee47d080c8c46b9/common/darkside.go#L597-L600
@AloeareV
We could implement a darkside RPC that actually sets an in memory list of TxIDs for the test to set up, and then this RPC would return that info, would that work? What other things would be needed?
@pacu - what you suggest is probably the best way. I think the interface to this darkside test-only gRPC would be a list of ("hex", integer) pairs (32-byte hex string (64 characters), and a height). These would be saved internally and returned by (production) GetTaddressTxids
gRPC.
As Pacu asked, what else would be needed? A test-only method to clear the list? The ability to clear individual items? We can do either or both, or whatever you prefer.
I did look briefly into trying to "really" implement this in the darkside server (i.e., return results based on the current fake blockchain), but it would be a lot of work. The zcashd
code is doing a lot of heavy lifting, and since in darkside mode there is no zcashd
, we would have to replicate a lot of logic. So I prefer Pacu's suggestion; it's pretty easy to implement. But, @fluidvanadium, let me know if that works for you.