feat(submissions): add Scalus 0.16.0 HTLC submission by Unisay#173
Merged
feat(submissions): add Scalus 0.16.0 HTLC submission by Unisay#173
Conversation
25/25 cape tests pass. Script size: 1648 bytes. claim_well_before_timeout: cpu=34380491 mem=121955 refund_well_after_timeout: cpu=32424661 mem=116629 Two parser-compatibility workarounds vs plutus-core 1.45: - toUplc() instead of toUplcOptimized() to avoid case/constr syntax (upstream: IntersectMBO/plutus#7742) - post-processing renames NAME-NNNNrMMMM identifiers (Scalus refresh counter suffix) to NAME_NNNNrMMMM so Lex.decimal after hyphen doesn't split the name Closes #161
Contributor
🚀 PR Preview DeployedPreview URL: https://intersectmbo.github.io/UPLC-CAPE/pr-173/ The preview site is automatically updated on every push to this PR and will be removed when the PR is closed. |
Use toUplcOptimized() (CaseConstrApply + builtin-packing) with an AST-level alpha-rename pass that rewrites all generated names to short purely-alphabetic identifiers. Principled fix vs the toUplc()+regex approach: no hyphens or digit-letter patterns, guaranteed parser-safe. script_size: 1648 -> 1497 bytes (-9%) claim cpu: 34380491 -> 29068491 (-15%), mem: 121955 -> 88755 (-27%) refund cpu: 32424661 -> 27304661 (-16%), mem: 116629 -> 84629 (-27%) Source: Unisay/scalus-cape-submissions@07350ed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
submissions/htlc/Scalus_0.16.0_Unisay/with a Scalus 0.16.0 spending validator for the HTLC scenarioParser compatibility
The artifact uses
toUplcOptimized()(CaseConstrApply + builtin-packing) with an AST-level alpha-rename pass that rewrites all generated identifiers to short purely-alphabetic names (a, b, …, z, aa, …) before serialisation. This ensures compatibility with the plutus-core 1.45.0.0 textual parser without sacrificing optimised code size.Metrics
claim_well_before_timeoutrefund_well_after_timeoutCloses #161