-
Notifications
You must be signed in to change notification settings - Fork 19
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
Fix vulnerabilities of staking components found by the audit team #195
Conversation
03c846c
to
00798e6
Compare
00798e6
to
96f40f9
Compare
96f40f9
to
8c40110
Compare
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.
Looks good to me, now.
authorizedBy <- pletC $ pauthorizedBy # authorizationContext txInfoF | ||
|
||
let ownerSignsTransaction = authorizedBy # firstStakeInputDatumF.owner | ||
PPair allHaveSameOwner allHaveSameDelegatee <- | ||
pmatchC $ |
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 refactoring works but it's less readable. Was it needed for performance purposes, e.g. there's only one pass through restOfStakeInputDatums
instead of two?
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.
Yeah, exactly. We have to do manual list fusion in plutarch for now.
pmatchC $ | ||
pfoldr | ||
# plam | ||
( \d p -> unTermCont $ do |
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.
Please use longer names, so that the reader can guess the types used, otherwise it's hard to read.
( \d p -> unTermCont $ do | |
( \stakeInputDatum pair -> unTermCont $ do |
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.
Great point. I will write that down.
# pcon (PPair (pconstant True) (pconstant True)) | ||
# restOfStakeInputDatums | ||
|
||
let ownerSignsTransaction = |
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.
As far as I can see, the Privilege escalation: Acting on behalf of delegatee role
issue has been resolved.
No description provided.