From 74eb5aab38ea9b92fb1a07651f2ef7fe5b8ad096 Mon Sep 17 00:00:00 2001 From: zeme Date: Mon, 24 Jun 2024 18:20:10 +0200 Subject: [PATCH 01/16] Add workflows to check broken links and deploy papers to GH Pages --- .github/workflows/broken-links.yml | 33 +++++++++++++++++ .github/workflows/papers-and-specs.yml | 36 +++++++++++++++++++ README.adoc | 16 ++++----- .../essential-concepts/plutus-foundation.md | 2 +- .../essential-concepts/plutus-platform.mdx | 2 +- doc/plutus-core-spec/README.md | 2 +- plutus-core/docs/BuiltinsOverview.md | 2 +- .../src/Type/RenamingSubstitution.lagda.md | 4 +-- scripts/check-broken-links.sh | 25 +++++++++++++ 9 files changed, 108 insertions(+), 14 deletions(-) create mode 100644 .github/workflows/broken-links.yml create mode 100644 .github/workflows/papers-and-specs.yml create mode 100755 scripts/check-broken-links.sh diff --git a/.github/workflows/broken-links.yml b/.github/workflows/broken-links.yml new file mode 100644 index 00000000000..2aa46dc9084 --- /dev/null +++ b/.github/workflows/broken-links.yml @@ -0,0 +1,33 @@ +# This job checks for broken links in the various non-source-code files. + +name: "🔗 Broken Links" + +on: + schedule: + - cron: 0 0 * * * # Daily at midnight + workflow_dispatch: # Or manually dispatch the job + pull_request: + paths: + - .github/ISSUE_TEMPLATE/bug_report.yml + - .github/ISSUE_TEMPLATE/feature_request.yml + - .github/PULL_REQUEST_TEMPLATE.md + - .github/SECURITY.md + - CODE_OF_CONDUCT.md + - CONTRIBUTING.adoc + - LICENSE + - NOTICE + - README.adoc + - RELEASE.adoc + - STYLEGUIDE.adoc + +jobs: + check: + name: Check + runs-on: [plutus-shared, self-hosted] + steps: + - name: Checkout + uses: actions/checkout@main + + - name: Run Linkchecker + run: | + nix develop --no-warn-dirty --accept-flake-config ./scripts/check-broken-links.sh \ No newline at end of file diff --git a/.github/workflows/papers-and-specs.yml b/.github/workflows/papers-and-specs.yml new file mode 100644 index 00000000000..4806e1b6728 --- /dev/null +++ b/.github/workflows/papers-and-specs.yml @@ -0,0 +1,36 @@ + +name: "📝 Papers & Specs" + +on: + pull_request: + +jobs: + deploy: + name: Deploy + runs-on: [self-hosted, plutus-shared] + permissions: + contents: write + environment: + name: github-pages + steps: + - name: Checkout + uses: actions/checkout@main + + - name: Build Site + run: | + mkdir -p _resources + cp -R $(nix build .#latex-documents.x86_64-linux.plutus-report) _resources + cp -R $(nix build .#latex-documents.x86_64-linux.plutus-core-spec) _resources + cp -R $(nix build .#latex-documents.x86_64-linux.extended-utxo-spec) _resources + cp -R $(nix build .#latex-documents.x86_64-linux.unraveling-recursion-paper) _resources + cp -R $(nix build .#latex-documents.x86_64-linux.system-f-in-agda-paper) _resources + cp -R $(nix build .#latex-documents.x86_64-linux.eutxo-paper) _resources + cp -R $(nix build .#latex-documents.x86_64-linux.utxoma-paper) _resources + cp -R $(nix build .#latex-documents.x86_64-linux.plutus-report) _resources + + - name: Deploy Site (latest) + uses: JamesIves/github-pages-deploy-action@v4.6.1 + with: + folder: _resources + target-folder: resources + single-commit: true \ No newline at end of file diff --git a/README.adoc b/README.adoc index 8f2d19e6df4..2f244db47b9 100644 --- a/README.adoc +++ b/README.adoc @@ -55,17 +55,17 @@ The documentation for the metatheory can be found https://intersectmbo.github.io === Specifications and design -- https://ci.iog.io/job/input-output-hk-plutus/master/x86_64-linux.packages.plutus-report/latest/download/1[Plutus Technical Report (draft)]: a technical report and design document for the project. -- https://ci.iog.io/job/input-output-hk-plutus/master/x86_64-linux.packages.plutus-core-spec/latest/download/1[Plutus Core Specification]: the formal specification of the core language. -- https://ci.iog.io/job/input-output-hk-plutus/master/x86_64-linux.packages.extended-utxo-spec/latest/download/1[Extended UTXO Model]: a design document for the core changes to the Cardano ledger. +- https://intersectmbo.github.io/plutus/resources/plutus-report.pdf[Plutus Technical Report (draft)]: a technical report and design document for the project. +- https://intersectmbo.github.io/plutus/resources/plutus-core-spec.pdf[Plutus Core Specification]: the formal specification of the core language. +- https://intersectmbo.github.io/plutus/resources/extended-utxo-spec.pdf[Extended UTXO Model]: a design document for the core changes to the Cardano ledger. === Academic papers -- https://ci.iog.io/job/input-output-hk-plutus/master/x86_64-linux.packages.unraveling-recursion-paper/latest/download/1[Unraveling Recursion]: a description of some of the compilation strategies used in Plutus IR (https://doi.org/10.1007/978-3-030-33636-3_15[published version]). -- https://ci.iog.io/job/input-output-hk-plutus/master/x86_64-linux.packages.system-f-in-agda-paper/latest/download/1[System F in Agda]: a formal model of System F in Agda (https://doi.org/10.1007/978-3-030-33636-3_10[published version]). -- https://ci.iog.io/job/input-output-hk-plutus/master/x86_64-linux.packages.eutxo-paper/latest/download/1[The Extended UTXO Model]: a full presentation of the EUTXO ledger extension (https://doi.org/10.1007/978-3-030-54455-3_37[published version]). -- https://ci.iog.io/job/input-output-hk-plutus/master/x86_64-linux.packages.utxoma-paper/latest/download/1[UTXOma: UTXO with Multi-Asset Support]: a full presentation of the multi-asset ledger extension (https://doi.org/10.1007/978-3-030-61467-6_8[published version]). -- https://ci.iog.io/job/input-output-hk-plutus/master/x86_64-linux.packages.eutxoma-paper/latest/download/1[Native Custom Tokens in the Extended UTXO Model]: a discussion of the interaction of the multi-asset support with EUTXO (https://doi.org/10.1007/978-3-030-61467-6_7[published version]). +- https://intersectmbo.github.io/plutus/resources/unraveling-recursion-paper.pdf[Unraveling Recursion]: a description of some of the compilation strategies used in Plutus IR (https://doi.org/10.1007/978-3-030-33636-3_15[published version]). +- https://intersectmbo.github.io/plutus/resources/system-f-in-agda-paper.pdf[System F in Agda]: a formal model of System F in Agda (https://doi.org/10.1007/978-3-030-33636-3_10[published version]). +- https://intersectmbo.github.io/plutus/resources/eutxo-paper.pdf[The Extended UTXO Model]: a full presentation of the EUTXO ledger extension (https://doi.org/10.1007/978-3-030-54455-3_37[published version]). +- https://intersectmbo.github.io/plutus/resources/utxoma-paper.pdf[UTXOma: UTXO with Multi-Asset Support]: a full presentation of the multi-asset ledger extension (https://doi.org/10.1007/978-3-030-61467-6_8[published version]). +- https://intersectmbo.github.io/plutus/resources/eutxoma-paper.pdf[Native Custom Tokens in the Extended UTXO Model]: a discussion of the interaction of the multi-asset support with EUTXO (https://doi.org/10.1007/978-3-030-61467-6_7[published version]). - https://arxiv.org/abs/2201.04919[Translation Certification for Smart Contracts]: a certifier of Plutus IR compiler passes written in Coq. == Licensing diff --git a/doc/docusaurus/docs/essential-concepts/plutus-foundation.md b/doc/docusaurus/docs/essential-concepts/plutus-foundation.md index 6e4e6f28fc1..b53ec64fffa 100644 --- a/doc/docusaurus/docs/essential-concepts/plutus-foundation.md +++ b/doc/docusaurus/docs/essential-concepts/plutus-foundation.md @@ -36,4 +36,4 @@ Supporting "mixed" code in this way enables libraries written with the Plutus Ha The formal details of Plutus Core are in its [specification](https://github.com/IntersectMBO/plutus#specifications-and-design). -The design is discussed in the [technical report](https://ci.iog.io/job/input-output-hk-plutus/master/x86_64-linux.packages.plutus-report/latest/download/1). +The design is discussed in the [technical report](https://intersectmbo.github.io/plutus/resources/plutus-report.pdf). diff --git a/doc/docusaurus/docs/essential-concepts/plutus-platform.mdx b/doc/docusaurus/docs/essential-concepts/plutus-platform.mdx index b32e2d5fb81..83591138697 100644 --- a/doc/docusaurus/docs/essential-concepts/plutus-platform.mdx +++ b/doc/docusaurus/docs/essential-concepts/plutus-platform.mdx @@ -87,5 +87,5 @@ Even simple applications must deal with this complexity, and for more advanced a - Michael Peyton-Jones and Jann Mueller introduce the Plutus platform in [this session](https://youtu.be/usMPt8KpBeI?si=4zkS3J7Bq8aFxWbU) from the Cardano 2020 event. -- The design of the platform is discussed in the [Plutus technical report](https://ci.iog.io/job/input-output-hk-plutus/master/x86_64-linux.packages.plutus-report/latest/download/1). +- The design of the platform is discussed in the [Plutus technical report](https://intersectmbo.github.io/plutus/resources/plutus-report.pdf). diff --git a/doc/plutus-core-spec/README.md b/doc/plutus-core-spec/README.md index 2437df9204e..85ec0985cc3 100644 --- a/doc/plutus-core-spec/README.md +++ b/doc/plutus-core-spec/README.md @@ -2,7 +2,7 @@ This directory contains a draft of a version of the Plutus Core specification updated so that the language is parametric over a collection of built-in types and functions. It also updates the specification to reflect the fact that built-in functions can now be partially applied. ~Click -[here](https://ci.iog.io/job/input-output-hk-plutus/master/x86_64-linux.packages.plutus-core-spec/latest/download/1) +[here](https://intersectmbo.github.io/plutus/resources/plutus-core-spec.pdf) to open a PDF of the most recent version of the specification in the main branch of this repository.~ The link given in the previous sentence currently appears to be broken: would-be readers should build the PDF themselves. On a Linux system, `make` in the main source directory should do this. diff --git a/plutus-core/docs/BuiltinsOverview.md b/plutus-core/docs/BuiltinsOverview.md index f83208afdf0..5a13d7d33b2 100644 --- a/plutus-core/docs/BuiltinsOverview.md +++ b/plutus-core/docs/BuiltinsOverview.md @@ -111,7 +111,7 @@ toBuiltinMeaning -> BuiltinMeaning val (CostingPart uni fun) ``` -i.e. in order to construct a `BuiltinMeaning` one needs not only a built-in function, but also a semantics variant (a "version") of the set of built-in functions. You can read more about versioning of builtins and everything else in [CIP-35](https://cips.cardano.org/cips/cip35) and in Chapter 4 of the Plutus Core [specification](https://ci.iog.io/build/834321/download/1/plutus-core-specification.pdf). +i.e. in order to construct a `BuiltinMeaning` one needs not only a built-in function, but also a semantics variant (a "version") of the set of built-in functions. You can read more about versioning of builtins and everything else in [CIP-35](https://cips.cardano.org/cips/cip35) and in Chapter 4 of the Plutus Core [specification](https://intersectmbo.github.io/plutus/resources/plutus-core-spec.pdf#page=8). We do not construct `BuiltinMeaning`s manually, because that would be extremely laborious. Instead, we use an auxiliary function that does the heavy lifting for us. Here's its type signature with a few lines of constraints omitted for clarity: diff --git a/plutus-metatheory/src/Type/RenamingSubstitution.lagda.md b/plutus-metatheory/src/Type/RenamingSubstitution.lagda.md index 82617c4796b..daa0616be68 100644 --- a/plutus-metatheory/src/Type/RenamingSubstitution.lagda.md +++ b/plutus-metatheory/src/Type/RenamingSubstitution.lagda.md @@ -53,7 +53,7 @@ variable As we are going to push renamings through types we need to be able to push them under a binder. To do this safely the newly bound variable should remain untouched and other renamings should be shifted by one to accommodate this. (Note: this is -called `lift⋆` in the [paper](https://ci.iog.io/build/1230848/download/1/paper.pdf#page=8) ). +called `lift⋆` in the [paper](https://intersectmbo.github.io/plutus/resources/plutus-core-spec.pdf#page=8) ). ``` ext : Ren Φ Ψ @@ -252,7 +252,7 @@ variable σ σ' : Sub Φ Ψ ``` -Extending a type substitution — used when going under a binder. (This is called `lifts` in the [paper](https://ci.iog.io/build/1230848/download/1/paper.pdf#page=8) ). +Extending a type substitution — used when going under a binder. (This is called `lifts` in the [paper](https://intersectmbo.github.io/plutus/resources/plutus-core-spec.pdf#page=8) ). ``` exts : Sub Φ Ψ diff --git a/scripts/check-broken-links.sh b/scripts/check-broken-links.sh new file mode 100755 index 00000000000..20cd5c06f50 --- /dev/null +++ b/scripts/check-broken-links.sh @@ -0,0 +1,25 @@ +TARGETS=( + .github/ISSUE_TEMPLATE/bug_report.yml + .github/ISSUE_TEMPLATE/feature_request.yml + .github/PULL_REQUEST_TEMPLATE.md + .github/SECURITY.md + CODE_OF_CONDUCT.md + CONTRIBUTING.adoc + LICENSE + NOTICE + README.adoc + RELEASE.adoc + STYLEGUIDE.adoc +) + +FAILED=0 + +for file in "${TARGETS[@]}"; do + grep -oE "\b(https?://|www\.)[^\[\(\)\"]+\b" "${file}" | linkchecker --no-warnings --recursion-level 0 --output failures --check-extern --stdin + if [ $? -ne 0 ]; then + echo "${file} has broken links, see output above" + FAILED=1 + fi +done + +exit "${FAILED}" From f691cb773e683722fa0deba3c35aef2b3efdef23 Mon Sep 17 00:00:00 2001 From: zeme Date: Mon, 24 Jun 2024 18:25:44 +0200 Subject: [PATCH 02/16] wip --- .github/workflows/broken-links.yml | 2 +- .github/workflows/papers-and-specs.yml | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/broken-links.yml b/.github/workflows/broken-links.yml index 2aa46dc9084..b3b1d329986 100644 --- a/.github/workflows/broken-links.yml +++ b/.github/workflows/broken-links.yml @@ -1,4 +1,4 @@ -# This job checks for broken links in the various non-source-code files. +# This job checks for broken links in the various files. name: "🔗 Broken Links" diff --git a/.github/workflows/papers-and-specs.yml b/.github/workflows/papers-and-specs.yml index 4806e1b6728..b947d92dc6f 100644 --- a/.github/workflows/papers-and-specs.yml +++ b/.github/workflows/papers-and-specs.yml @@ -1,8 +1,11 @@ +# This job builds various papers and deploys them to: +# https://intersectmbo.github.io/plutus/resources name: "📝 Papers & Specs" on: pull_request: + workflow_dispatch: jobs: deploy: @@ -27,7 +30,7 @@ jobs: cp -R $(nix build .#latex-documents.x86_64-linux.eutxo-paper) _resources cp -R $(nix build .#latex-documents.x86_64-linux.utxoma-paper) _resources cp -R $(nix build .#latex-documents.x86_64-linux.plutus-report) _resources - + - name: Deploy Site (latest) uses: JamesIves/github-pages-deploy-action@v4.6.1 with: From 39d5d29cd712a857bccbda07b30537d7217a23ca Mon Sep 17 00:00:00 2001 From: zeme Date: Mon, 24 Jun 2024 18:28:31 +0200 Subject: [PATCH 03/16] wip --- .github/workflows/papers-and-specs.yml | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/.github/workflows/papers-and-specs.yml b/.github/workflows/papers-and-specs.yml index b947d92dc6f..47a783a69bd 100644 --- a/.github/workflows/papers-and-specs.yml +++ b/.github/workflows/papers-and-specs.yml @@ -21,15 +21,21 @@ jobs: - name: Build Site run: | + TARGETS=( + plutus-report + plutus-core-spec + extended-utxo-spec + unraveling-recursion-paper + system-f-in-agda-paper + eutxo-paper + utxoma-paper + plutus-report + ) mkdir -p _resources - cp -R $(nix build .#latex-documents.x86_64-linux.plutus-report) _resources - cp -R $(nix build .#latex-documents.x86_64-linux.plutus-core-spec) _resources - cp -R $(nix build .#latex-documents.x86_64-linux.extended-utxo-spec) _resources - cp -R $(nix build .#latex-documents.x86_64-linux.unraveling-recursion-paper) _resources - cp -R $(nix build .#latex-documents.x86_64-linux.system-f-in-agda-paper) _resources - cp -R $(nix build .#latex-documents.x86_64-linux.eutxo-paper) _resources - cp -R $(nix build .#latex-documents.x86_64-linux.utxoma-paper) _resources - cp -R $(nix build .#latex-documents.x86_64-linux.plutus-report) _resources + for target in "${TARGETS[@]}"; do + nix build --no-warn-dirty --accept-flake-config .#latex-documents.x86_64-linux.${target} + cp ./result/* _resources + done - name: Deploy Site (latest) uses: JamesIves/github-pages-deploy-action@v4.6.1 From 70f26a8154ed772ead54b81f46a7b0c789a6ef12 Mon Sep 17 00:00:00 2001 From: zeme Date: Mon, 24 Jun 2024 18:29:57 +0200 Subject: [PATCH 04/16] wip --- .github/workflows/papers-and-specs.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/papers-and-specs.yml b/.github/workflows/papers-and-specs.yml index 47a783a69bd..9950bb55fd8 100644 --- a/.github/workflows/papers-and-specs.yml +++ b/.github/workflows/papers-and-specs.yml @@ -19,7 +19,7 @@ jobs: - name: Checkout uses: actions/checkout@main - - name: Build Site + - name: Build Papers run: | TARGETS=( plutus-report @@ -34,10 +34,10 @@ jobs: mkdir -p _resources for target in "${TARGETS[@]}"; do nix build --no-warn-dirty --accept-flake-config .#latex-documents.x86_64-linux.${target} - cp ./result/* _resources + cp ./result/*.pdf _resources done - - name: Deploy Site (latest) + - name: Publish Papers uses: JamesIves/github-pages-deploy-action@v4.6.1 with: folder: _resources From 84db784f9fee7c61ee3e8fa652cb2315023b501c Mon Sep 17 00:00:00 2001 From: zeme Date: Mon, 24 Jun 2024 18:42:48 +0200 Subject: [PATCH 05/16] wpi --- .github/workflows/papers-and-specs.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/papers-and-specs.yml b/.github/workflows/papers-and-specs.yml index 9950bb55fd8..86393a64f49 100644 --- a/.github/workflows/papers-and-specs.yml +++ b/.github/workflows/papers-and-specs.yml @@ -29,12 +29,11 @@ jobs: system-f-in-agda-paper eutxo-paper utxoma-paper - plutus-report ) mkdir -p _resources for target in "${TARGETS[@]}"; do - nix build --no-warn-dirty --accept-flake-config .#latex-documents.x86_64-linux.${target} - cp ./result/*.pdf _resources + nix build --no-warn-dirty --accept-flake-config .#latex-documents.x86_64-darwin.${target} + cp -fr ./result/*.pdf _resources done - name: Publish Papers From 544d4bf93efae3a53f54d9da1355bc38b5e8d3bd Mon Sep 17 00:00:00 2001 From: zeme Date: Mon, 24 Jun 2024 18:44:05 +0200 Subject: [PATCH 06/16] wpi --- .github/workflows/papers-and-specs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/papers-and-specs.yml b/.github/workflows/papers-and-specs.yml index 86393a64f49..eea14e5b382 100644 --- a/.github/workflows/papers-and-specs.yml +++ b/.github/workflows/papers-and-specs.yml @@ -32,7 +32,7 @@ jobs: ) mkdir -p _resources for target in "${TARGETS[@]}"; do - nix build --no-warn-dirty --accept-flake-config .#latex-documents.x86_64-darwin.${target} + nix build --no-warn-dirty --accept-flake-config .#latex-documents.x86_64-linux.${target} cp -fr ./result/*.pdf _resources done From 6b65944afb2793d52886819fd09ed589f3cbc46e Mon Sep 17 00:00:00 2001 From: zeme Date: Mon, 24 Jun 2024 18:46:55 +0200 Subject: [PATCH 07/16] wip --- scripts/check-broken-links.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/check-broken-links.sh b/scripts/check-broken-links.sh index 20cd5c06f50..e2ac8fe1486 100755 --- a/scripts/check-broken-links.sh +++ b/scripts/check-broken-links.sh @@ -16,6 +16,7 @@ FAILED=0 for file in "${TARGETS[@]}"; do grep -oE "\b(https?://|www\.)[^\[\(\)\"]+\b" "${file}" | linkchecker --no-warnings --recursion-level 0 --output failures --check-extern --stdin + echo "Checking ${file}" if [ $? -ne 0 ]; then echo "${file} has broken links, see output above" FAILED=1 From 9cca5b9c4ef653f8f35b5942ef7b52a83c367865 Mon Sep 17 00:00:00 2001 From: zeme Date: Mon, 24 Jun 2024 18:50:01 +0200 Subject: [PATCH 08/16] wip --- scripts/check-broken-links.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/check-broken-links.sh b/scripts/check-broken-links.sh index e2ac8fe1486..8580bea4559 100755 --- a/scripts/check-broken-links.sh +++ b/scripts/check-broken-links.sh @@ -15,8 +15,8 @@ TARGETS=( FAILED=0 for file in "${TARGETS[@]}"; do - grep -oE "\b(https?://|www\.)[^\[\(\)\"]+\b" "${file}" | linkchecker --no-warnings --recursion-level 0 --output failures --check-extern --stdin echo "Checking ${file}" + grep -oE "\b(https?://|www\.)[^\[\(\)\"]+\b" "${file}" | linkchecker --no-warnings --recursion-level 0 --output failures --check-extern --stdin if [ $? -ne 0 ]; then echo "${file} has broken links, see output above" FAILED=1 From 957ff769e75b5697c98985d41a65defb9102fa6e Mon Sep 17 00:00:00 2001 From: zeme Date: Mon, 24 Jun 2024 19:17:18 +0200 Subject: [PATCH 09/16] wip --- .github/workflows/cost-model-benchmarks.yml | 30 ++++++++++++ .github/workflows/papers-and-specs.yml | 2 +- .github/workflows/script-evaluation-test.yml | 50 ++++++++++++++++++++ 3 files changed, 81 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/cost-model-benchmarks.yml create mode 100644 .github/workflows/script-evaluation-test.yml diff --git a/.github/workflows/cost-model-benchmarks.yml b/.github/workflows/cost-model-benchmarks.yml new file mode 100644 index 00000000000..85e397ad5bd --- /dev/null +++ b/.github/workflows/cost-model-benchmarks.yml @@ -0,0 +1,30 @@ +# This workflow runs the cost model benchmark and uploads the results as a +# GitHub artifact. + +name: "💰 Cost Model Benchmark" + +on: + workflow_dispatch: + inputs: + entra-bench-args: + description: 'extra argument(s) to pass to the cost-model-budgeting-bench command' + default: '' + type: string + +jobs: + run: + name: Run + runs-on: [self-hosted, plutus-benchmark] + steps: + - name: Checkout + uses: actions/checkout@main + + - name: Run Benchmark + run: nix --accept-flake-config run .#cost-model-budgeting-bench -- --csv results.csv ${{ inputs.entra-bench-args }} + + - name: Upload Results + uses: actions/upload-artifact@main + with: + name: results + path: results.csv + if-no-files-found: error diff --git a/.github/workflows/papers-and-specs.yml b/.github/workflows/papers-and-specs.yml index eea14e5b382..03f64cc298b 100644 --- a/.github/workflows/papers-and-specs.yml +++ b/.github/workflows/papers-and-specs.yml @@ -33,7 +33,7 @@ jobs: mkdir -p _resources for target in "${TARGETS[@]}"; do nix build --no-warn-dirty --accept-flake-config .#latex-documents.x86_64-linux.${target} - cp -fr ./result/*.pdf _resources + cp -fr ./result/*.pdf _resources/${target}.pdf done - name: Publish Papers diff --git a/.github/workflows/script-evaluation-test.yml b/.github/workflows/script-evaluation-test.yml new file mode 100644 index 00000000000..02b636a5db1 --- /dev/null +++ b/.github/workflows/script-evaluation-test.yml @@ -0,0 +1,50 @@ +# A nightly job which downloads script evaluation dumps from S3 and runs a regression test. +name: ci +on: + # schedule: + # - cron: 30 3 * * * # 3:30am every day + workflow_dispatch: + +concurrency: + group: script-evaluation-test + # We only want at most one evaluation test running at a time + cancel-in-progress: true + +jobs: + script-evaluation-test: + name: 🪣 Script Evaluation Test + runs-on: [self-hosted, default] + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Quick Install Nix + uses: cachix/install-nix-action@V27 + with: + extra_nix_config: | + experimental-features = nix-command flakes + accept-flake-config = true + + - name: Download and Unzip Dump Files + if: always() + # NOTE: the S3 location s3://plutus/mainnet-script-dump/ must match that in + # plutus-apps/.github/script-evaluation-dump.yml + run: | + export LOCAL_DIR="$HOME/mainnet-script-dump-downloaded" + nix develop --no-warn-dirty --accept-flake-config --command \ + bash ./scripts/s3-sync-unzip.sh s3://plutus/mainnet-script-dump-1-35-4/ \*.event.bz2 + env: + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_DEFAULT_REGION: us-east-1 + AWS_ENDPOINT_URL: https://s3.devx.iog.io + + - name: Run + # Run the test cases sequentially. This ensures we don't need to simultaneously store + # multiple `ScriptEvaluationEvents`, which are large, in memory. Each test case + # contains many script evaluation events, and those are run in parallel based on + # the number of available processors. + run: | + export EVENT_DUMP_DIR="$HOME/mainnet-script-dump-downloaded" + nix run --no-warn-dirty --accept-flake-config .#evaluation-test -- --num-threads=1 From 77b131b5a82978b02901ba7c63fabbc22fc8da7b Mon Sep 17 00:00:00 2001 From: zeme Date: Mon, 24 Jun 2024 19:27:23 +0200 Subject: [PATCH 10/16] wip --- .github/workflows/cost-model-benchmarks.yml | 30 ------------ .github/workflows/script-evaluation-test.yml | 50 -------------------- 2 files changed, 80 deletions(-) delete mode 100644 .github/workflows/cost-model-benchmarks.yml delete mode 100644 .github/workflows/script-evaluation-test.yml diff --git a/.github/workflows/cost-model-benchmarks.yml b/.github/workflows/cost-model-benchmarks.yml deleted file mode 100644 index 85e397ad5bd..00000000000 --- a/.github/workflows/cost-model-benchmarks.yml +++ /dev/null @@ -1,30 +0,0 @@ -# This workflow runs the cost model benchmark and uploads the results as a -# GitHub artifact. - -name: "💰 Cost Model Benchmark" - -on: - workflow_dispatch: - inputs: - entra-bench-args: - description: 'extra argument(s) to pass to the cost-model-budgeting-bench command' - default: '' - type: string - -jobs: - run: - name: Run - runs-on: [self-hosted, plutus-benchmark] - steps: - - name: Checkout - uses: actions/checkout@main - - - name: Run Benchmark - run: nix --accept-flake-config run .#cost-model-budgeting-bench -- --csv results.csv ${{ inputs.entra-bench-args }} - - - name: Upload Results - uses: actions/upload-artifact@main - with: - name: results - path: results.csv - if-no-files-found: error diff --git a/.github/workflows/script-evaluation-test.yml b/.github/workflows/script-evaluation-test.yml deleted file mode 100644 index 02b636a5db1..00000000000 --- a/.github/workflows/script-evaluation-test.yml +++ /dev/null @@ -1,50 +0,0 @@ -# A nightly job which downloads script evaluation dumps from S3 and runs a regression test. -name: ci -on: - # schedule: - # - cron: 30 3 * * * # 3:30am every day - workflow_dispatch: - -concurrency: - group: script-evaluation-test - # We only want at most one evaluation test running at a time - cancel-in-progress: true - -jobs: - script-evaluation-test: - name: 🪣 Script Evaluation Test - runs-on: [self-hosted, default] - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Quick Install Nix - uses: cachix/install-nix-action@V27 - with: - extra_nix_config: | - experimental-features = nix-command flakes - accept-flake-config = true - - - name: Download and Unzip Dump Files - if: always() - # NOTE: the S3 location s3://plutus/mainnet-script-dump/ must match that in - # plutus-apps/.github/script-evaluation-dump.yml - run: | - export LOCAL_DIR="$HOME/mainnet-script-dump-downloaded" - nix develop --no-warn-dirty --accept-flake-config --command \ - bash ./scripts/s3-sync-unzip.sh s3://plutus/mainnet-script-dump-1-35-4/ \*.event.bz2 - env: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_DEFAULT_REGION: us-east-1 - AWS_ENDPOINT_URL: https://s3.devx.iog.io - - - name: Run - # Run the test cases sequentially. This ensures we don't need to simultaneously store - # multiple `ScriptEvaluationEvents`, which are large, in memory. Each test case - # contains many script evaluation events, and those are run in parallel based on - # the number of available processors. - run: | - export EVENT_DUMP_DIR="$HOME/mainnet-script-dump-downloaded" - nix run --no-warn-dirty --accept-flake-config .#evaluation-test -- --num-threads=1 From 440d3a0a4860c944b71c24d14c0dcba172f578cf Mon Sep 17 00:00:00 2001 From: zeme Date: Mon, 24 Jun 2024 19:28:03 +0200 Subject: [PATCH 11/16] wip --- README.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.adoc b/README.adoc index 2f244db47b9..066d8f0659a 100644 --- a/README.adoc +++ b/README.adoc @@ -46,7 +46,7 @@ The main documentation is located https://intersectmbo.github.io/plutus/docs/[he The haddock documentation is located https://intersectmbo.github.io/plutus/haddock/latest[here]. -The documentation for the metatheory can be found https://intersectmbo.github.io/plutus/metatheory/latest[here]. +The documentation for the metatheory can be found https://intersectmbo.github.io/plutus/metatheory/latsest[here]. === Talks @@ -62,7 +62,7 @@ The documentation for the metatheory can be found https://intersectmbo.github.io === Academic papers - https://intersectmbo.github.io/plutus/resources/unraveling-recursion-paper.pdf[Unraveling Recursion]: a description of some of the compilation strategies used in Plutus IR (https://doi.org/10.1007/978-3-030-33636-3_15[published version]). -- https://intersectmbo.github.io/plutus/resources/system-f-in-agda-paper.pdf[System F in Agda]: a formal model of System F in Agda (https://doi.org/10.1007/978-3-030-33636-3_10[published version]). +- https://intersectmbo.github.io/plutus/resources/system-f-in-agda-psaper.pdf[System F in Agda]: a formal model of System F in Agda (https://doi.org/10.1007/978-3-030-33636-3_10[published version]). - https://intersectmbo.github.io/plutus/resources/eutxo-paper.pdf[The Extended UTXO Model]: a full presentation of the EUTXO ledger extension (https://doi.org/10.1007/978-3-030-54455-3_37[published version]). - https://intersectmbo.github.io/plutus/resources/utxoma-paper.pdf[UTXOma: UTXO with Multi-Asset Support]: a full presentation of the multi-asset ledger extension (https://doi.org/10.1007/978-3-030-61467-6_8[published version]). - https://intersectmbo.github.io/plutus/resources/eutxoma-paper.pdf[Native Custom Tokens in the Extended UTXO Model]: a discussion of the interaction of the multi-asset support with EUTXO (https://doi.org/10.1007/978-3-030-61467-6_7[published version]). From 4e0840d792aaca95cf9a2d1f5e94d4d59849deb6 Mon Sep 17 00:00:00 2001 From: zeme Date: Mon, 24 Jun 2024 19:31:17 +0200 Subject: [PATCH 12/16] wip --- .github/workflows/broken-links.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/broken-links.yml b/.github/workflows/broken-links.yml index b3b1d329986..5fcf01ec61e 100644 --- a/.github/workflows/broken-links.yml +++ b/.github/workflows/broken-links.yml @@ -30,4 +30,4 @@ jobs: - name: Run Linkchecker run: | - nix develop --no-warn-dirty --accept-flake-config ./scripts/check-broken-links.sh \ No newline at end of file + nix develop --no-warn-dirty --accept-flake-config --command ./scripts/check-broken-links.sh \ No newline at end of file From b501f7f28efd51b2af3c42e31f7971f1f4da5851 Mon Sep 17 00:00:00 2001 From: zeme Date: Mon, 24 Jun 2024 19:37:58 +0200 Subject: [PATCH 13/16] wip --- .github/workflows/papers-and-specs.yml | 1 + README.adoc | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/papers-and-specs.yml b/.github/workflows/papers-and-specs.yml index 03f64cc298b..74b20866f80 100644 --- a/.github/workflows/papers-and-specs.yml +++ b/.github/workflows/papers-and-specs.yml @@ -29,6 +29,7 @@ jobs: system-f-in-agda-paper eutxo-paper utxoma-paper + eutxoma-paper ) mkdir -p _resources for target in "${TARGETS[@]}"; do diff --git a/README.adoc b/README.adoc index 066d8f0659a..2f244db47b9 100644 --- a/README.adoc +++ b/README.adoc @@ -46,7 +46,7 @@ The main documentation is located https://intersectmbo.github.io/plutus/docs/[he The haddock documentation is located https://intersectmbo.github.io/plutus/haddock/latest[here]. -The documentation for the metatheory can be found https://intersectmbo.github.io/plutus/metatheory/latsest[here]. +The documentation for the metatheory can be found https://intersectmbo.github.io/plutus/metatheory/latest[here]. === Talks @@ -62,7 +62,7 @@ The documentation for the metatheory can be found https://intersectmbo.github.io === Academic papers - https://intersectmbo.github.io/plutus/resources/unraveling-recursion-paper.pdf[Unraveling Recursion]: a description of some of the compilation strategies used in Plutus IR (https://doi.org/10.1007/978-3-030-33636-3_15[published version]). -- https://intersectmbo.github.io/plutus/resources/system-f-in-agda-psaper.pdf[System F in Agda]: a formal model of System F in Agda (https://doi.org/10.1007/978-3-030-33636-3_10[published version]). +- https://intersectmbo.github.io/plutus/resources/system-f-in-agda-paper.pdf[System F in Agda]: a formal model of System F in Agda (https://doi.org/10.1007/978-3-030-33636-3_10[published version]). - https://intersectmbo.github.io/plutus/resources/eutxo-paper.pdf[The Extended UTXO Model]: a full presentation of the EUTXO ledger extension (https://doi.org/10.1007/978-3-030-54455-3_37[published version]). - https://intersectmbo.github.io/plutus/resources/utxoma-paper.pdf[UTXOma: UTXO with Multi-Asset Support]: a full presentation of the multi-asset ledger extension (https://doi.org/10.1007/978-3-030-61467-6_8[published version]). - https://intersectmbo.github.io/plutus/resources/eutxoma-paper.pdf[Native Custom Tokens in the Extended UTXO Model]: a discussion of the interaction of the multi-asset support with EUTXO (https://doi.org/10.1007/978-3-030-61467-6_7[published version]). From 89b191e951880a14dfa407d1ad4e2d794da475a7 Mon Sep 17 00:00:00 2001 From: zeme Date: Mon, 24 Jun 2024 19:42:35 +0200 Subject: [PATCH 14/16] wip --- scripts/check-broken-links.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/check-broken-links.sh b/scripts/check-broken-links.sh index 8580bea4559..fb988abdd1f 100755 --- a/scripts/check-broken-links.sh +++ b/scripts/check-broken-links.sh @@ -16,7 +16,10 @@ FAILED=0 for file in "${TARGETS[@]}"; do echo "Checking ${file}" - grep -oE "\b(https?://|www\.)[^\[\(\)\"]+\b" "${file}" | linkchecker --no-warnings --recursion-level 0 --output failures --check-extern --stdin + grep -oE "\b(https?://|www\.)[^\[\(\)\"]+\b" "${file}" \ + | linkchecker --no-warnings --recursion-level 0 --output failures --check-extern --stdin \ + # For some reason linkchecker fails to check this URL though it is valid + --ignore-url https://img.shields.io/matrix/plutus-core%3Amatrix.org if [ $? -ne 0 ]; then echo "${file} has broken links, see output above" FAILED=1 From 564181583118f820d541ec3a9619506b8648ce3f Mon Sep 17 00:00:00 2001 From: zeme Date: Mon, 24 Jun 2024 19:44:21 +0200 Subject: [PATCH 15/16] wip --- scripts/check-broken-links.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/check-broken-links.sh b/scripts/check-broken-links.sh index fb988abdd1f..55787ef2ad9 100755 --- a/scripts/check-broken-links.sh +++ b/scripts/check-broken-links.sh @@ -18,8 +18,7 @@ for file in "${TARGETS[@]}"; do echo "Checking ${file}" grep -oE "\b(https?://|www\.)[^\[\(\)\"]+\b" "${file}" \ | linkchecker --no-warnings --recursion-level 0 --output failures --check-extern --stdin \ - # For some reason linkchecker fails to check this URL though it is valid - --ignore-url https://img.shields.io/matrix/plutus-core%3Amatrix.org + --ignore-url https://img.shields.io/matrix/plutus-core%3Amatrix.org # For some reason linkchecker fails to check this URL though it is valid if [ $? -ne 0 ]; then echo "${file} has broken links, see output above" FAILED=1 From d44e0679d106ab64154dd638fc54e2ea6f3dba1b Mon Sep 17 00:00:00 2001 From: zeme Date: Tue, 25 Jun 2024 12:36:14 +0200 Subject: [PATCH 16/16] wip --- .github/workflows/cost-model-benchmark.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cost-model-benchmark.yml b/.github/workflows/cost-model-benchmark.yml index 85e397ad5bd..aa23fc2ff90 100644 --- a/.github/workflows/cost-model-benchmark.yml +++ b/.github/workflows/cost-model-benchmark.yml @@ -15,6 +15,7 @@ jobs: run: name: Run runs-on: [self-hosted, plutus-benchmark] + timeout-minutes: 14400 steps: - name: Checkout uses: actions/checkout@main