-
Notifications
You must be signed in to change notification settings - Fork 9
Re-pin linear_vesting (mainnet and preview) to the bytestring-keyed assetAmount lookup #238
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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
71 changes: 43 additions & 28 deletions
71
submissions/linear_vesting/Plinth_1.65.0.0_Unisay/linear_vesting.uplc
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
18 changes: 12 additions & 6 deletions
18
submissions/linear_vesting/Plinth_1.65.0.0_Unisay/source/README.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,28 +1,34 @@ | ||
| # linear_vesting Plinth 1.65.0.0 source | ||
| # linear_vesting Plinth 1.65.0.0 (monadic) source | ||
|
|
||
| **Repository**: <https://github.com/Unisay/plinth-cape-submissions> | ||
|
|
||
| **Branch**: `main` | ||
|
|
||
| **Commit**: `f9ef6bdf4ed08ec16039600903d8af7e6c22046b` | ||
| **Commit**: `d078652f03d31ed728c1fb63f1d9f8824218494c` | ||
|
|
||
| **Path**: `lib/LinearVesting.hs` (+ `lib/Plinth/Validator.hs`, `lib/Plinth/Decoder/Named.hs`, `lib/Plinth/Decoder/Named/ScriptContext.hs`, `lib/Plinth/Encoded.hs`) | ||
|
|
||
| Linear vesting validator written in `do`-notation on `Plinth.Validator`, a zero-cost early-termination monad, together with the zero-cost typed decoding DSL `Plinth.Decoder.Named` (`V.do`/`N.do` via `QualifiedDo`; `IxDecoder`/`FieldAt` Peano-indexed cursor; `Plinth.Encoded` compare-without-decode). Re-optimised for CAPE metrics schema 2.0.0 (happy-path aggregates only): This round's structural change decodes the `VestingDatum` on the partial-unlock path in a single 7-field region. total_fee 173470 to 59048 lovelace (-66.0%), promoted to the default for this line. | ||
| The monadic linear vesting validator; see the submission `metadata.json` for the latest decoder change. This is the default artifact for the mainnet 1.65.0.0 line. | ||
|
|
||
| ## Reproducing the compilation | ||
|
|
||
| ```bash | ||
| git clone https://github.com/Unisay/plinth-cape-submissions | ||
| cd plinth-cape-submissions | ||
| git checkout f9ef6bdf4ed08ec16039600903d8af7e6c22046b | ||
| git checkout d078652f03d31ed728c1fb63f1d9f8824218494c | ||
| ``` | ||
|
|
||
| `CAPE_REPO` must point at the sibling UPLC-CAPE checkout (build aborts if unset); set it in `.envrc.local` (gitignored). Then: | ||
| `CAPE_REPO` must point at the sibling UPLC-CAPE checkout; the build aborts if the variable is unset. The recommended place is `.envrc.local` (gitignored), e.g.: | ||
|
|
||
| ```sh | ||
| export CAPE_REPO="$HOME/src/UPLC-CAPE" | ||
| ``` | ||
|
|
||
| Then enter the dev shell and run the generator: | ||
|
|
||
| ```bash | ||
| nix develop | ||
| cabal run plinth-submissions | ||
| ``` | ||
|
|
||
| The generator writes `$CAPE_REPO/submissions/linear_vesting/Plinth_1.65.0.0_Unisay/linear_vesting.uplc` (monadic is the default on `main`; the previous plain implementation is retained as `Plinth_1.65.0.0_Unisay_plain`). | ||
| The produced UPLC writes to `$CAPE_REPO/submissions/linear_vesting/Plinth_1.65.0.0_Unisay/linear_vesting.uplc` and matches the UPLC in this submission. | ||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.