Skip to content

Align protobuf TransactionHeader with domain struct #1898

@igamigo

Description

@igamigo

To support specific usecases with the new sync endpoints (#1890), we added the output note inclusion proofs for transactions returned on SyncTransactions. This made it so that the protobuf message does no longer map to the domain TransactionHeader. We should look into making it so that they are aligned again, maybe by refactoring some of the related messages or renaming it if all else fails. More context here.

Relatedly, as mentioned here, we should ideally remove the transaction_id field from the message as it is supposed to be computable from the message's inner fields.
However, contrary to what I initially suggest in that same conversation, the new inclusion proof additions makes it so that transaction ID is not removable, as NoteSyncRecord contains NoteMetadataHeader and removes the capacity of computing NoteMetadata::to_commitment(), which requires the header as a word but also the attachment as one. Before we had repeated note.NoteHeader output_notes = 6, and the note header has the full metadata which does not block this.

Metadata

Metadata

Assignees

Labels

rpcRelated to the RPC component

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions