-
Notifications
You must be signed in to change notification settings - Fork 141
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
Transaction role prepare blocks take one signer each #2284
Transaction role prepare blocks take one signer each #2284
Conversation
…n/extended-transaction-format-6
Codecov Report
@@ Coverage Diff @@
## feature/extended-transaction-format #2284 +/- ##
====================================================================
Coverage 77.81% 77.81%
====================================================================
Files 309 309
Lines 66207 66230 +23
====================================================================
+ Hits 51517 51540 +23
Misses 12906 12906
Partials 1784 1784
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
prepare(first: AuthAccount, second: AuthAccount) {} | ||
|
||
role role1 { | ||
prepare(signer: AuthAccount) {} | ||
} | ||
|
||
role role2 { | ||
prepare(signer: AuthAccount) {} | ||
} |
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 still think this feature would benefit from some way to encode in Cadence which of the signers in the outer prepare
is tied to which role; but that may be beyond the scope of this PR and might just be another discussion point for the FLIP.
Cadence Benchstat comparisonThis branch with compared with the base branch onflow:feature/extended-transaction-format commit f6f0fc3 Collapsed results for better readability
|
@SupunS Could you please have a look? It's (currently) the last PR for the feature, and would allow us to get a preview build out. Thanks! |
if roleCount > 0 && | ||
prepareFunctionDeclaration != nil && | ||
transactionPrepareParameterCount > 0 && | ||
roleCount != transactionPrepareParameterCount { |
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.
Do they have to be equal? roleCount <= transactionPrepareParameterCount
should be also fine?
i.e: There can be accounts used by the transaction's prepare only, but not by any roles.
But maybe this should be also something to discuss on the FLIP
Work towards #2177
Description
As clarified in the FLIP, a prepare block in a transaction role may have one parameter, and each role is passed one signer, sequentially from the full list of all signers.
master
branchFiles changed
in the Github PR explorer