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

Bug Fix PR #33

Merged
merged 4 commits into from
Jan 2, 2025
Merged

Bug Fix PR #33

merged 4 commits into from
Jan 2, 2025

Conversation

colll78
Copy link
Collaborator

@colll78 colll78 commented Dec 31, 2024

Fix a few miscellaneous bugs and remove some unnecessary checks.

The bugs mostly had to do with the credential validation within directory node datums.

Importantly, added programmableLogicBase payment credential as a parameter to the freezeAndSeizeTransfer contract because without it we have no way of identifying the actual required witness list and thus the redeemer gets bloated with tons of irrelevant proofs, i.e. a proof that freezeAndSeizeTransfer itself is not blacklisted.

@j-mueller
Copy link
Collaborator

Looks ok to me, the tests don't compile though.

innerValue
-- drop the ada entry in the value before traversing the rest of the value entries
in go # proofList # (ptail # mapInnerList)
-- pcheckTransferLogic :: Term s (PAsData PCurrencySymbol :--> PBuiltinList (PAsData PTxInInfo) :--> PBuiltinList (PAsData PTokenProof) :--> PBuiltinList (PAsData PByteString) :--> PValue 'Sorted 'Positive :--> PBool)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Delete


-- in pforgetData insertedKey #== pforgetData outputNodeDatumF.key
-- #&& pforgetData coveringNext #== pforgetData ptailNextData
-- in ptraceInfo (pshow $ pmkBuiltinList [pforgetData expectedDirectoryNode]) $ outputNode #== expectedDirectoryNode
Copy link
Collaborator

Choose a reason for hiding this comment

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

Delete

@@ -355,14 +355,15 @@ withTransfer dir action = do
asks (addTransferEnv dir)
>>= runReaderT action

withTransferFor :: MonadReader (CombinedEnv o d t r era) m => C.Hash C.PaymentKey -> ReaderT (CombinedEnv o d Identity r era) m a -> m a
withTransferFor = withTransfer . mkTransferLogicEnv
withTransferFor :: MonadReader (CombinedEnv o d t r era) m => C.PaymentCredential -> C.Hash C.PaymentKey -> ReaderT (CombinedEnv o d Identity r era) m a -> m a
Copy link
Collaborator

Choose a reason for hiding this comment

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

If you change the d parameter to Identity you could get the payment credential from DirectoryEnv.

];
extra-trusted-public-keys = [
"hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ="
"loony-tools:pr9m4BkM/5/eSTZlkQyRt57Jz7OMBxNSUiMC4FkcNfk="
Copy link
Collaborator

Choose a reason for hiding this comment

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

What do we need this for?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

My nix was refusing to take some stuff from cache without it.

@j-mueller
Copy link
Collaborator

Ok some of the tests fail with script errors now, maybe the tx building code needs to be adjusted?

Copy link
Collaborator

@j-mueller j-mueller left a comment

Choose a reason for hiding this comment

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

LGTM Thank you!

@j-mueller j-mueller merged commit 971f1c8 into main Jan 2, 2025
6 checks passed
@j-mueller j-mueller deleted the bug-fix-pr branch January 2, 2025 10:54
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