-
Notifications
You must be signed in to change notification settings - Fork 483
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
ripemd_160
builtin
#6378
Merged
Merged
ripemd_160
builtin
#6378
Changes from 17 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
0478059
Add ripemd-160 builtin with artificial cost model (copy of keccak_256)
paluh d7470ca
Add conformance tests
paluh 28e945c
Merge branch 'master' into ripemd-160
kwxm 5f03a7f
More merging
kwxm bae44bf
Merge branch 'master' into ripemd-160
kwxm e56be2e
Merge metatheory
kwxm 2cbf6b5
Remove ripemd_160 from V3 ParamNames
kwxm 442716b
Update plutus-tx-plugin-tests results
kwxm b32a76f
Update cardano-constitution-test results
kwxm 1b66f21
Add bench results and generate new model for RIPEMD-160
kwxm fb8508e
Update conformance results for new ripemd-160 costs
kwxm 06a41bf
Add changelog entries
kwxm d8d7ac8
Add changelog entries
kwxm 6d1eedc
Uncomment changleog entries
kwxm db206e1
Fix JSON file
kwxm 55a29ef
Update defaultCostModelParams.json
kwxm f4919da
Remove entry from sha256_map in project.nix
kwxm 45e8945
Merge branch 'master' into kwxm/paluh/ripemd-160
kwxm c52687c
"Fix" plutus-ledger-api tests
kwxm 47e5161
Remove comment about failing test
kwxm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
cardano-constitution/test/Cardano/Constitution/Validator/GoldenTests/sorted.cbor.size.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2132 | ||
2135 |
2 changes: 1 addition & 1 deletion
2
...o-constitution/test/Cardano/Constitution/Validator/GoldenTests/sorted.large.budget.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
ExBudget {exBudgetCPU = ExCPU 601476171, exBudgetMemory = ExMemory 2971818} | ||
ExBudget {exBudgetCPU = ExCPU 601524171, exBudgetMemory = ExMemory 2972118} |
9,616 changes: 4,808 additions & 4,808 deletions
9,616
cardano-constitution/test/Cardano/Constitution/Validator/GoldenTests/sorted.pir.golden
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...o-constitution/test/Cardano/Constitution/Validator/GoldenTests/sorted.small.budget.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
ExBudget {exBudgetCPU = ExCPU 91525157, exBudgetMemory = ExMemory 413605} | ||
ExBudget {exBudgetCPU = ExCPU 91573157, exBudgetMemory = ExMemory 413905} |
1,565 changes: 783 additions & 782 deletions
1,565
cardano-constitution/test/Cardano/Constitution/Validator/GoldenTests/sorted.uplc.golden
Large diffs are not rendered by default.
Oops, something went wrong.
9,552 changes: 4,776 additions & 4,776 deletions
9,552
cardano-constitution/test/Cardano/Constitution/Validator/GoldenTests/unsorted.pir.golden
Large diffs are not rendered by default.
Oops, something went wrong.
136 changes: 68 additions & 68 deletions
136
cardano-constitution/test/Cardano/Constitution/Validator/GoldenTests/unsorted.uplc.golden
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
...cases/uplc/evaluation/builtin/semantics/ripemd_160/ripemd_160-empty/ripemd_160-empty.uplc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
-- Test vector (0-bit input) for Ripemd_160. | ||
-- Output obtained using the online tool https://emn178.github.io/online-tools/ripemd_160.html | ||
(program 1.0.0 | ||
[ | ||
[ | ||
(builtin equalsByteString) | ||
[ | ||
(builtin ripemd_160) | ||
(con bytestring #) | ||
] | ||
] | ||
(con bytestring #9c1185a5c5e9fc54612808977ee8f548b2258d31) | ||
] | ||
) |
2 changes: 2 additions & 0 deletions
2
...ation/builtin/semantics/ripemd_160/ripemd_160-empty/ripemd_160-empty.uplc.budget.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
({cpu: 2130451 | ||
| mem: 804}) |
1 change: 1 addition & 0 deletions
1
...c/evaluation/builtin/semantics/ripemd_160/ripemd_160-empty/ripemd_160-empty.uplc.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
(program 1.0.0 (con bool True)) |
14 changes: 14 additions & 0 deletions
14
.../evaluation/builtin/semantics/ripemd_160/ripemd_160-length-200/ripemd_160-length-200.uplc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
-- Test vector (0-bit input) for Ripemd_160. | ||
-- Output obtained using the online tool https://emn178.github.io/online-tools/ripemd_160.html | ||
(program 1.0.0 | ||
[ | ||
[ | ||
(builtin equalsByteString) | ||
[ | ||
(builtin ripemd_160) | ||
(con bytestring #2e7ea84da4bc4d7cfb463e3f2c8647057afff3fbececa1d200) | ||
] | ||
] | ||
(con bytestring #f18921115370b049e99dfdd49fc92b371dd7c7e9) | ||
] | ||
) |
2 changes: 2 additions & 0 deletions
2
...tin/semantics/ripemd_160/ripemd_160-length-200/ripemd_160-length-200.uplc.budget.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
({cpu: 2204011 | ||
| mem: 804}) |
1 change: 1 addition & 0 deletions
1
...on/builtin/semantics/ripemd_160/ripemd_160-length-200/ripemd_160-length-200.uplc.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
(program 1.0.0 (con bool True)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
### Added | ||
|
||
- Builtin function `ripemd_160` implementing RIPEMD-160 hashing. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back 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.
VERY IMPORTANT!
This has 2 entries for RIPEMD (with different values actually), which is dangerous considering it is JSON: based on the specific implementation, a json library silently picks the first occurrence or the last occurence. Aeson I think picks the first one.
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. I hope that's fixed now. I added the new costing function but forgot to delete the preliminary one (which was a duplicate of the one for keccak_256). The old one was also in the wrong place, which might not have been so good.