-
Notifications
You must be signed in to change notification settings - Fork 64
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
PlutusV3 Feature Support #711
Conversation
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.
Only thing needed is a bunch of @since
s, as well as a major version bump (Plutus dep bump).
New primops are from
List of all primops can found here Implementations looks good to me, it can use little documentations and some tests, but that can be added later |
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.
Thank you. Looks good to me. Ideally we push some tests as well. I'll see if I can pull some time somewhere to work on it hopefully.
Here are a few tests I wrote for the new hashing primitives feel free to add it to the Plutarch test suite. module Testing.Crypto where
import Test.Tasty
import Test.Tasty.HUnit
import Test.Tasty.QuickCheck as QC
import Testing.Eval (psucceeds, passert, toHexString)
import Plutarch.Prelude
import PlutusCore.Crypto.Hash qualified as Hash
tests :: TestTree
tests = testGroup "PlutarchV3 Builtins"
[ testCase "keccak_256" $
passert $
(pkeccak_256 # (phexByteStr "4dd6d57ca8cb7ac8c3b219366754a392ba9e4e43b6b3ae59d89be3f878ba8fb6"))
#== phexByteStr "1994466d51e80d6dc32c8f41f142b47b2d03b4f5fa869aced6157c016b2b331d"
, testCase "pblake2b_224" $
passert $
(pblake2b_224 # (phexByteStr "4dd6d57ca8cb7ac8c3b219366754a392ba9e4e43b6b3ae59d89be3f878ba8fb6"))
#== pconstant (Hash.blake2b_224 $ toHexString "4dd6d57ca8cb7ac8c3b219366754a392ba9e4e43b6b3ae59d89be3f878ba8fb6")
, testCase "pripemd_160" $
passert $
(pripemd_160 # (phexByteStr "4dd6d57ca8cb7ac8c3b219366754a392ba9e4e43b6b3ae59d89be3f878ba8fb6"))
#== pconstant (Hash.ripemd_160 $ toHexString "4dd6d57ca8cb7ac8c3b219366754a392ba9e4e43b6b3ae59d89be3f878ba8fb6")
] |
Added
pripemd_160
,pkeccak_256
, andpblake2b_224
toPlutarch.Crypto
Plutarch.BLS
Plutarch.Bitwise
Changed
plutus-core
version to1.33.0.0
getArity
mapping to handle the new builtins inPlutarch.Internal
printScript
inPlutarch.Internal.Other
to new PlutusCore version.@peter-mlabs
@SeungheonOh
Review please.