-
Notifications
You must be signed in to change notification settings - Fork 23
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
Split compatible transaction building and signing #750
base: master
Are you sure you want to change the base?
Conversation
ad9e94c
to
04db64e
Compare
@@ -224,3 +210,77 @@ createCommonTxBody era ins outs txFee' = | |||
.~ Seq.fromList txOuts' | |||
& L.feeTxBodyL | |||
.~ txFee' | |||
|
|||
-- | Sign a transaction body | |||
makeSignedTransaction |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'ts a 1-1 copy from Cardano.Api.Internal.Tx.Sign
. I imagine that we'll be deprecating eras and simplifying Cardano.Api.Internal.Tx.Sign
so we won't be able to reuse code easily.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will sit in a separate command group in cardano-cli
. We need access to all the eras, so we won't be deprecating any eras. Remember QA has a hardforking test where they submit protocol parameter updates across all eras.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need access to all the eras, so we won't be deprecating any eras.
But we will be supporting only current and next eras so only Cardano.Api.Internal.Compatible
will support older eras, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cardano.Api.Internal.Compatible
has to support all Shelley based eras only for the functionality QA needs.
Once we can provide what QA needs, we can consider parameterizing functions in Cardano.Api.Internal.Compatible
on CardanoEra era
however the Byron/Shelley split in the code makes things cleaner.
-- ^ a signed transaction | ||
makeSignedTransaction | ||
witnesses | ||
( ShelleyTxBody |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We want to eventually remove ShelleyTxBody
so lets not do this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok I'll try to rewrite this without using our TxBody
type
Changelog
Context
createCompatibleSignedTx
wasn't really signing the transaction but just blindly adding signatures. It's split into two separate functions for building and signing.Checklist