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

Output TransactionEnvelope instead of Transaction for --build-only #1323

Merged
merged 4 commits into from
May 10, 2024

Conversation

leighmcculloch
Copy link
Member

What

Output TransactionEnvelope instead of Transaction for --build-only

Why

Tools should always output, and accept as input, full envelopes because otherwise other tools that the inputs/outputs are used with won’t know what type of transaction we’ve given them.

It’s a bit confusing because tools always use the term ‘transaction’ to talk about what they accept as input, but in reality when tools like the Lab and others say they accept or build a transaction, they actually mean a transaction envelope.

@leighmcculloch leighmcculloch marked this pull request as ready for review May 10, 2024 10:19
@leighmcculloch leighmcculloch enabled auto-merge (squash) May 10, 2024 10:58
@willemneal
Copy link
Member

willemneal commented May 10, 2024

My thought here was that signing should result in a transaction envelope since there are no signatures. So you only construct one if the transaction is ready to be submitted.

@leighmcculloch
Copy link
Member Author

Yeah I understand that logic and approach, but the way that other tools work is that you always pass around an envelope, because there are more than one type of transaction and the way to distinguish between them is to pass around the envelope and then within it it can have the different types. Other tools like the Lab pass around the envelope so we should do the same.

@leighmcculloch leighmcculloch merged commit 38d0fa6 into main May 10, 2024
19 checks passed
@leighmcculloch leighmcculloch deleted the i1322 branch May 10, 2024 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants