Skip to content

Commit

Permalink
Merge branch 'master' into koz/logical
Browse files Browse the repository at this point in the history
  • Loading branch information
kozross committed Jun 6, 2024
2 parents 8dcebb5 + f1f2e9f commit f62c4de
Show file tree
Hide file tree
Showing 1,057 changed files with 37,246 additions and 3,143 deletions.
13 changes: 6 additions & 7 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ body:
A clear and specific description of what the bug is.
If applicable, add screenshots, config files and/or logs to help explain the problem.
validations:
required: true
required: false
- type: textarea
id: steps-to-reproduce
attributes:
Expand All @@ -28,27 +28,27 @@ body:
2. Click on '...'
3. Scroll down to '...'
validations:
required: true
required: false
- type: textarea
id: actual-result
attributes:
label: Actual Result
description: What is the reproducible outcome?
placeholder: See error...
validations:
required: true
required: false
- type: textarea
id: expected-result
attributes:
label: Expected Result
description: A clear and concise description of what you expected to happen.
placeholder: No errors observed.
validations:
required: true
required: false
- type: textarea
id: fix-it-yourself
attributes:
label: Describe the approach you would take to fix this
label: Describe the approach you would take to fix this
description: If you would like to work on this yourself (optional!), then let us know what approach you would take so we can advise you.
validations:
required: false
Expand All @@ -61,5 +61,4 @@ body:
Version: [e.g. 20.04]
Plutus: version or commit hash
validations:
required: true

required: false
5 changes: 2 additions & 3 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
name: Feature Request
description: Submit a feature request
#title: ""
labels: ["enhancement"]
#assignees:
# -
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this feature request.
Please check the existing issues, [Plutus Docs](https://plutus.readthedocs.io/en/latest/) and [Cardano Stack Exchange](https://cardano.stackexchange.com/) before raising.
Please check the existing issues and [Plutus Docs](https://plutus.readthedocs.io/en/latest/) before raising.
- type: textarea
id: description
attributes:
Expand All @@ -23,4 +22,4 @@ body:
label: Describe alternatives you've considered
description: A clear and concise description of any alternative solutions or features you've considered.
validations:
required: false
required: false
38 changes: 0 additions & 38 deletions .github/ISSUE_TEMPLATE/security_report.yml

This file was deleted.

49 changes: 42 additions & 7 deletions .github/workflows/add-triage-label.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
# Whenever a new issue is opened, this workflow adds the "status: needs triage"
# label, unless the issue already has one of the "Internal" labels.

name: Add Triage Label
on:
issues:
types:
- reopened
- opened

jobs:
add-triage-label:
runs-on: ubuntu-latest
Expand All @@ -13,10 +17,41 @@ jobs:
- name: Run
uses: actions/github-script@v7
with:
script: |
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ["status: needs triage"]
})
script: |
const INTERNAL_LABELS = ["Internal", "status: triaged"];
async function getIssueLabels() {
const { data: labels } = await github.rest.issues.listLabelsOnIssue({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number
});
return labels.map(label => label.name);
}
async function issueHasInternalLabels() {
const labels = await getIssueLabels();
return INTERNAL_LABELS.some(item => labels.includes(item));
}
async function addNeedsTriageLabelToIssue() {
await github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ["status: needs triage"]
});
}
try {
if (!await issueHasInternalLabels()) {
await addNeedsTriageLabelToIssue();
}
} catch (error) {
core.setFailed(`Error: ${error}`);
}
2 changes: 1 addition & 1 deletion .github/workflows/longitudinal-benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
run: git config core.hooksPath no-hooks

- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1.19.3
uses: benchmark-action/github-action-benchmark@v1.20.3
with:
name: Plutus Benchmarks
tool: 'customSmallerIsBetter'
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,32 @@ name: Nightly Test Suite
on:
schedule:
- cron: 0 0 * * * # daily at midnight

workflow_dispatch: # or manually dispatch the job
inputs:
hedgehog-tests:
description: Numer of tests to run (--hedgehog-tests XXXXX)
required: false
default: "100000"

env:
HEDGEHOG_TESTS: ${{ github.event.inputs.hedgehog-tests || 100000 }}

jobs:
nightly-test-suite:
runs-on: ubuntu-latest
runs-on: [self-hosted, plutus-benchmark]
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: plutus-core-nightly
if: always()
run: |
run: |
pushd plutus-core
nix run --no-warn-dirty --accept-flake-config .#plutus-core-test -- --hedgehog-tests 10000
nix run --no-warn-dirty --accept-flake-config .#plutus-core-test -- --hedgehog-tests $HEDGEHOG_TESTS
popd
- name: plutus-ir-nightly
if: always()
run: |
pushd plutus-core
nix run --no-warn-dirty --accept-flake-config .#plutus-ir-test -- --hedgehog-tests 10000
nix run --no-warn-dirty --accept-flake-config .#plutus-ir-test -- --hedgehog-tests $HEDGEHOG_TESTS
popd
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,20 @@ jobs:
nix build .#combined-haddock
mkdir dist
cp -RL ./result/share/doc/* ./dist/
- name: Build Docusaurus Site
working-directory: docusaurus
run: |
yarn
yarn build
- name: Copy Docusaurus Site to Dist
run: |
mkdir dist/docs
cp -RL docusaurus/build/* ./dist/docs/
- uses: JamesIves/github-pages-deploy-action@v4
with:
folder: dist
target-folder: ${{ github.ref_name }}
# We publish our haddock, which is non-trivially big.
# Publish Docusaurus and Haddock static builds to the same branch
# We publish our haddock, which is non-trivially big.
# So keeping the whole history is expensive, and anyway we don't need it.
single-commit: true
1 change: 1 addition & 0 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ packages: doc/read-the-docs-site
plutus-metatheory
plutus-tx
plutus-tx-plugin
plutus-tx-test-util
prettyprinter-configurable
stubs/plutus-ghc-stub

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ instance (Eq fun, Hashable fun, ToExMemory term) =>
Restricting resb ->
when (exceedsBudget resb newBudget) $
throwingWithCause _EvaluationError
(UserEvaluationError $ CekOutOfExError resb newBudget)
(OperationalEvaluationError $ CekOutOfExError resb newBudget)
Nothing -- No value available for error
```

Expand All @@ -96,7 +96,7 @@ to the current mode:
newBudget <- exBudgetStateBudget <%= (<> budget)
when (exceedsBudget resb newBudget) $
throwingWithCause _EvaluationError
(UserEvaluationError $ CekOutOfExError resb newBudget)
(OperationalEvaluationError $ CekOutOfExError resb newBudget)
Nothing
```

Expand All @@ -114,7 +114,7 @@ of memory very quickly. Changing the code to
Restricting resb ->
when (exceedsBudget resb newBudget) $
throwingWithCause _EvaluationError
(UserEvaluationError $ CekOutOfExError resb newBudget)
(OperationalEvaluationError $ CekOutOfExError resb newBudget)
Nothing
```

Expand Down
5 changes: 2 additions & 3 deletions doc/read-the-docs-site/howtos/Cip57Blueprint.hs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import GHC.Generics (Generic)
import PlutusLedgerApi.V3 (BuiltinData, ScriptContext, UnsafeFromData (..))
import PlutusTx.Blueprint.TH (makeIsDataSchemaIndexed)
import PlutusTx.Lift (makeLift)
import PlutusTx.Prelude (check)
import PlutusTx.Prelude (BuiltinUnit, check)

-- END imports
-- BEGIN MyParams annotations
Expand Down Expand Up @@ -88,7 +88,7 @@ typedValidator MkMyParams{..} datum redeemer _scriptContext =
R1 -> myBool
R2 -> myInteger == datum

untypedValidator :: MyParams -> BuiltinData -> BuiltinData -> BuiltinData -> ()
untypedValidator :: MyParams -> BuiltinData -> BuiltinData -> BuiltinData -> BuiltinUnit
untypedValidator params datum redeemer scriptContext =
check $ typedValidator params datum' redeemer' scriptContext'
where
Expand Down Expand Up @@ -162,4 +162,3 @@ writeBlueprintToFile :: FilePath -> IO ()
writeBlueprintToFile path = writeBlueprint path myContractBlueprint

-- END write blueprint to file

23 changes: 7 additions & 16 deletions doc/read-the-docs-site/plutus-doc.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,6 @@ source-repository head
type: git
location: https://github.com/IntersectMBO/plutus

flag defer-plugin-errors
description:
Defer errors from the plugin, useful for things like Haddock that can't handle it.

default: False
manual: True

common lang
default-language: Haskell2010
default-extensions:
Expand All @@ -47,8 +40,6 @@ common lang
-fobject-code -fno-ignore-interface-pragmas
-fno-omit-interface-pragmas

if flag(defer-plugin-errors)

common ghc-version-support
-- See the section on GHC versions in CONTRIBUTING
if (impl(ghc <9.6) || impl(ghc >=9.7))
Expand Down Expand Up @@ -78,9 +69,9 @@ executable doc-doctests
, containers
, flat ^>=0.6
, lens
, plutus-core ^>=1.28
, plutus-ledger-api ^>=1.28
, plutus-tx ^>=1.28
, plutus-core ^>=1.29
, plutus-ledger-api ^>=1.29
, plutus-tx ^>=1.29
, prettyprinter
, random
, serialise
Expand All @@ -105,10 +96,10 @@ executable quick-start
, base >=4.9 && <5
, base16-bytestring
, bytestring
, plutus-core ^>=1.28
, plutus-ledger-api ^>=1.28
, plutus-tx ^>=1.28
, plutus-tx-plugin ^>=1.28
, plutus-core ^>=1.29
, plutus-ledger-api ^>=1.29
, plutus-tx ^>=1.29
, plutus-tx-plugin ^>=1.29

if !(impl(ghcjs) || os(ghcjs))
build-depends: plutus-tx-plugin
9 changes: 7 additions & 2 deletions doc/read-the-docs-site/tutorials/AuctionValidator.hs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,12 @@ auctionTypedValidator params (AuctionDatum highestBid) redeemer ctx@(ScriptConte
Nothing -> PlutusTx.traceError ("Not found: Output paid to highest bidder")
-- BLOCK8
{-# INLINEABLE auctionUntypedValidator #-}
auctionUntypedValidator :: AuctionParams -> BuiltinData -> BuiltinData -> BuiltinData -> ()
auctionUntypedValidator ::
AuctionParams ->
BuiltinData ->
BuiltinData ->
BuiltinData ->
PlutusTx.BuiltinUnit
auctionUntypedValidator params datum redeemer ctx =
PlutusTx.check
( auctionTypedValidator
Expand All @@ -204,7 +209,7 @@ auctionUntypedValidator params datum redeemer ctx =

auctionValidatorScript ::
AuctionParams ->
CompiledCode (BuiltinData -> BuiltinData -> BuiltinData -> ())
CompiledCode (BuiltinData -> BuiltinData -> BuiltinData -> PlutusTx.BuiltinUnit)
auctionValidatorScript params =
$$(PlutusTx.compile [||auctionUntypedValidator||])
`PlutusTx.unsafeApplyCode` PlutusTx.liftCode plcVersion100 params
Expand Down
Loading

0 comments on commit f62c4de

Please sign in to comment.