Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consolidate transaction inputs and outputs in dedicated modules #385

Merged
merged 26 commits into from
Jan 2, 2024

Conversation

bobbinth
Copy link
Contributor

@bobbinth bobbinth commented Dec 26, 2023

To be merged after #384.

This PR consolidates and renames transaction input and output structs (along the lines of what is described in #350). The main changes are:

  • RecordedNote renamed into InputNote and moved to transaction module.
  • ConsumedNotes renamed into InputNotes and updated interfaces a little.
  • NoteStub renamed into OutputNote and moved to transaction module.
  • CreatedNotes renamed into OutputNotes and updated interfaces a little.
  • Removed FinalAccountStub struct.
  • Introduced TransactionOutputs struct.
  • Updated ExecutedTransaction, PreparedTransaction, and TransactionResult to use TransactionInputs and TransactionOutputs structs.

This does not yet complete the refactoring - I will need to complete other things mentioned in #350 and also clean up transaction objects a bit more. But since this PR is already quite big, I'll do these in a follow-up PR.

@bobbinth bobbinth marked this pull request as ready for review December 26, 2023 21:58
Copy link
Collaborator

@igamigo igamigo left a comment

Choose a reason for hiding this comment

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

Looks good to me, did not see anything of note other than very minor nits such as the TransactionResultError enum not being alphabetically ordered after the changes.
In favor of this PR, makes everything more intuitive and clearer.

Move transaction `AdviceInput` construction logic to `miden-lib`
Replace `TransactionResult` with `ExecutedTransaction`
@bobbinth bobbinth merged commit 58e4573 into bobbin-tx-aux-data Jan 2, 2024
6 checks passed
@bobbinth bobbinth deleted the bobbin-tx-io branch January 2, 2024 18:37
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.

2 participants