Skip to content

Comments

Implement darkside getaddresstxids support#551

Open
zmanian wants to merge 1 commit intozcash:masterfrom
zmanian:darkside-getaddresstxids
Open

Implement darkside getaddresstxids support#551
zmanian wants to merge 1 commit intozcash:masterfrom
zmanian:darkside-getaddresstxids

Conversation

@zmanian
Copy link

@zmanian zmanian commented Feb 11, 2026

Summary

Implement the getaddresstxids RPC in darkside test mode so wallet clients (e.g. Zingo) that use GetTaddressTransactions can detect transparent outputs during integration testing. Previously this returned "not implemented yet".

Fixes #455

Approach

Adds a staging mechanism for address-transaction associations following the existing AddAddressUtxo/ClearAddressUtxo pattern:

  • New proto message DarksideAddressTransaction with address, raw transaction bytes (data), and height fields
  • New RPCs AddAddressTransaction and ClearAddressTransactions on DarksideStreamer
  • getaddresstxids handler in darkside mode parses each stored transaction to compute its txid, then filters by address and block range
  • darksideGetRawTransaction also searches stored address transactions, so getrawtransaction can find them without requiring separate staging into blocks
  • The full GetTaddressTransactions flow works end-to-end: getaddresstxids returns txids, then getrawtransaction returns the full transaction bytes

Storing full transaction bytes (rather than just txids) makes the helper self-contained -- callers don't need to separately stage the transaction into a block for getrawtransaction to find it.

Test plan

  • go build ./... compiles cleanly
  • go vet ./common/... ./frontend/... passes with no new warnings
  • go test ./... all existing tests pass
  • Start darkside, stage blocks, call AddAddressTransaction with address/raw-tx/height, then call GetTaddressTransactions and verify the transaction is returned

Generated with Claude Code

Copy link
Collaborator

@LarryRuane LarryRuane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The GetTaddressTxids method has been deprecated, but it was actually recently renamed to GetTaddressTransactions (see around line 255 of service.proto). This rename was done because the old name was confusing, since this method returned full transactions, not just txids. (And it looks like this misled you too when writing this PR!)

So this PR will need to implement the functionality of GetTaddressTransactions, which will affect the two darkside methods you added; i.e., the darksideAddressTxid type will have to store transactions instead of txids.

Add staging for address-transaction associations in darkside mode so
wallet clients using GetTaddressTransactions can detect transparent
outputs during integration testing. Follows the existing
AddAddressUtxo/ClearAddressUtxo pattern.

Store full transaction bytes rather than just txids, making the helper
self-contained: callers don't need to separately stage the transaction
into a block for getrawtransaction to find it. The getaddresstxids
handler parses stored transactions to compute txids on the fly, and
darksideGetRawTransaction searches address transactions directly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@zmanian zmanian force-pushed the darkside-getaddresstxids branch from ee0a38c to c58b262 Compare February 25, 2026 03:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

does not receive transparent transactions on zingo darkside test

2 participants