-
Notifications
You must be signed in to change notification settings - Fork 479
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Move conversion code into Plutus Core * Documentation and notes on implementations * Wrap implementations into builtins * Properties as per CIP-0087 * CIP-0087 examples as tests * Add new builtins to PlutusTx * Document fromIntegral usage as a note * Changelogs for CIP-0087 primitives * Ensure conversions don't break on too-large arguments * Ensure that conversions are available in V3 * Remove unnecessary pragmata on tests * Fix overly-long test names, clarify test meaning in comments * CIP link consistency * Re-order integerToByteString arguments, avoid unnecessary padding * Better documentation for implementations * Correct properties for ByteStringToInteger * Address feedback
- Loading branch information
Showing
13 changed files
with
1,237 additions
and
3 deletions.
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
plutus-core/changelog.d/20231127_134852_koz.ross_cip_0087.md
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,41 @@ | ||
<!-- | ||
A new scriv changelog fragment. | ||
Uncomment the section that is right (remove the HTML comment wrapper). | ||
--> | ||
|
||
<!-- | ||
### Removed | ||
- A bullet item for the Removed category. | ||
--> | ||
### Added | ||
|
||
- Implementations for the primitive operations described in | ||
[CIP-0087](https://github.com/mlabs-haskell/CIPs/blob/koz/to-from-bytestring/CIP-0087/CIP-0087.md) | ||
|
||
<!-- | ||
### Changed | ||
- A bullet item for the Changed category. | ||
--> | ||
<!-- | ||
### Deprecated | ||
- A bullet item for the Deprecated category. | ||
--> | ||
<!-- | ||
### Fixed | ||
- A bullet item for the Fixed category. | ||
--> | ||
<!-- | ||
### Security | ||
- A bullet item for the Security category. | ||
--> |
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
504 changes: 504 additions & 0 deletions
504
plutus-core/plutus-core/src/PlutusCore/Builtin/Convert.hs
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
1 change: 1 addition & 0 deletions
1
plutus-core/plutus-core/test/TypeSynthesis/Golden/DefaultFun/ByteStringToInteger.plc.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 |
---|---|---|
@@ -0,0 +1 @@ | ||
bool -> bytestring -> integer |
1 change: 1 addition & 0 deletions
1
plutus-core/plutus-core/test/TypeSynthesis/Golden/DefaultFun/IntegerToByteString.plc.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 |
---|---|---|
@@ -0,0 +1 @@ | ||
bool -> integer -> integer -> bytestring |
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.
f734591
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.
Possible performance regression was detected for benchmark 'Plutus Benchmarks'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold
1.05
.validation-decode-future-increase-margin-2
333.2
μs306.3
μs1.09
validation-decode-future-increase-margin-3
339.1
μs305.4
μs1.11
validation-decode-future-pay-out-2
334.2
μs305.7
μs1.09
validation-decode-future-settle-early-2
321.7
μs305.2
μs1.05
validation-decode-future-settle-early-3
343.3
μs306.9
μs1.12
validation-decode-multisig-sm-1
592.8
μs554.4
μs1.07
validation-decode-multisig-sm-9
594.8
μs556
μs1.07
validation-decode-prism-2
544.2
μs496.2
μs1.10
validation-decode-stablecoin_1-1
874.4
μs822.4
μs1.06
validation-decode-stablecoin_2-3
867.4
μs819.8
μs1.06
This comment was automatically generated by workflow using github-action-benchmark.
CC: @input-output-hk/plutus-core