librustzcash icon indicating copy to clipboard operation
librustzcash copied to clipboard

zcash_client_backend: Expose the set of unexpired transactions having zero confirmations.

Open nuttycom opened this issue 1 year ago • 1 comments

This is needed for the client to be able to determine whether to rebroadcast a transaction.

nuttycom avatar May 09 '24 14:05 nuttycom

I think this can currently be supported by v_transactions: these are the set of transactions for which mined_height IS NULL and expiry_height is not greater than the current chain tip.

We may still want to add a direct Rust API for this to help us move away from v_transactions, but I don't see this issue as a blocker for rebroadcasts.

str4d avatar Jul 25 '24 20:07 str4d

these are the set of transactions for which mined_height IS NULL and expiry_height is not greater than the current chain tip.

I got that completely backwards: it's the set of transactions for which mined_height IS NULL and expiry_height is greater than the current chain tip. This is because expiry_height is the last height at which a transaction can be mined; if expiry_height <= chain_tip_height then the transaction can never be mined.

We currently have the opposite concept exposed in v_transactions as expired_unmined (although that uses the narrower / more conservative upper bound of the largest height we've scanned).

str4d avatar Aug 29 '25 11:08 str4d