Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…to effectfully/test/add-do-notation-support-for-TestNested
  • Loading branch information
effectfully committed May 14, 2024
2 parents 75ab43c + 774616b commit 9637940
Show file tree
Hide file tree
Showing 479 changed files with 2,829 additions and 1,725 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/haddock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jobs:
name: github-pages
steps:
- uses: actions/checkout@v4
- uses: nixbuild/nix-quick-install-action@v27
- uses: nixbuild/nix-quick-install-action@v28
with:
nix_conf: |
experimental-features = nix-command flakes
accept-flake-config = true
- name: Build haddock site
- name: Build Haddock Site
run: |
nix build .#combined-haddock
mkdir dist
Expand Down
58 changes: 58 additions & 0 deletions .github/workflows/plutus-tx-template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# This workflows ensures that the plutus-tx-template repository stays working
# even if there are changes in plutus. It checks out both the current commit of
# plutus and the master branch of plutus-tx-template. Then, it creates a
# cabal.project.local for plutus-tx-template that adjusts the plutus version.
# Finally, it double-checks that everything still builds correctly using cabal
# inside the devx shell.

name: Plutus Tx Template

on:
pull_request:

jobs:
plutus-tx-template:
name: Build
runs-on: ubuntu-latest
steps:

- name: Checkout plutus-tx-template
uses: actions/checkout@v4.1.4
with:
repository: IntersectMBO/plutus-tx-template
path: plutus-tx-template

- name: Checkout plutus
uses: actions/checkout@v4.1.4
with:
path: plutus-tx-template/plutus

- name: Write cabal.project.local
uses: DamianReeves/write-file-action@v1.3
with:
path: plutus-tx-template/cabal.project.local
write-mode: overwrite
contents: |
packages:
plutus/plutus-tx
plutus/plutus-tx-plugin
plutus/plutus-core
plutus/plutus-ledger-api
plutus/prettyprinter-configurable
allow-newer:
plutus-tx
, plutus-tx-plugin
, plutus-core
, plutus-ledger-api
, prettyprinter-configurable
- name: Build Project With Docker
run: |
cd plutus-tx-template
ls -la
docker run \
-v ./.:/workspaces/plutus-tx-template \
-w /workspaces/plutus-tx-template \
-i ghcr.io/input-output-hk/devx-devcontainer:x86_64-linux.ghc96-iog \
bash -ic "cabal update && cabal run plutus-tx-template && test -e validator.uplc"
21 changes: 10 additions & 11 deletions CONTRIBUTING.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ If you _really_ cannot use Nix and still want to contribute to Plutus then xref:

=== Installing and setting up Nix

For instructions on how to install and configure nix (including how to enable access to our binary caches), refer to link:https://github.com/input-output-hk/iogx/blob/main/doc/nix-setup-guide.md[this document].
For instructions on how to install and configure nix (including how to enable access to our binary caches), refer to link:https://github.com/input-output-hk/iogx/blob/main/doc/nix-setup-guide.md[this document].

If you already have nix installed and setup, you may enter the development shell by running `nix develop`.

Expand Down Expand Up @@ -204,20 +204,20 @@ There are various tools for visualizing the resulting profile, e.g. https://hack
We have a set of supported GHC major versions, which are built in CI and which we commit to keeping working.

We also have a primary development version.
This is the version we use in the default dev shell, and the one we use day-to-day.
This is the version we use in the default dev shell, and the one we use day-to-day.
The primary development version should be whichever version the Cardano node is using (or migrating towards using).
Supported versions older than the primary development version are deprecated, and we can drop them as soon as the Cardano node has moved to a later GHC version.

At the moment, our supported GHC versions are:
- 8.10 (deprecated)
- 9.6 (primary)
- 9.8
- 9.8

=== Plugin support

Making `plutus-tx-plugin` work on multiple GHC versions can be painful, because it uses a lot of GHC internals.
Since the plugin is not in the dependency closure of the Cardano node, we don't _need_ to support all the GHC versions, which is helpful.
We mostly commit to supporting our primary development version, but we _may_ support other versions as well if it is easy.
We mostly commit to supporting our primary development version, but we _may_ support other versions as well if it is easy.

The plugin and its dependents should be marked as unbuildable with cabal conditionals on any non-supported major GHC versions.
This makes cabal behave reasonably well (it will ignore them and not try and fail to build them).
Expand Down Expand Up @@ -650,14 +650,13 @@ These perform some of the same checks as Hydra, but Github Actions is often more
== Project roles and responsibilities

- The regular contributors to the Haskell code, all of whom can review and merge PRs are:
- @michaelpj
- @ana-pantilie
- @bezirg
- @effectfully
- @kwxm
- @bezirg
- @thealmarty
- @Unisay
- @zliu41
- The maintainer of the documentation is @joseph-fajen.
- The maintainer of the Agda code is @jmchapman, @effectfully can help with small issues.
- If you have a technical dispute that you need help resolving, you can ask @michaelpj.
- For problems with the developer environment setup, builds, or CI, you can ask @zeme-iohk, @Pacman99, or @michaelpj.
- The regular contributors take turns releasing our software, but if you have a specific problem ask @zliu41 or @michaelpj.
- If you have a technical dispute that you need help resolving, you can ask @zliu41.
- For problems with the developer environment setup, builds, or CI, you can ask @zeme-iohk or @zliu41.
- The regular contributors take turns releasing our software, but if you have a specific problem ask @zliu41.
6 changes: 6 additions & 0 deletions RELEASE.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,12 @@ Another example is if a security audit is done on `rc1`, and the changes in `rc2
- Update the CHaP index state in `cabal.project`.
- Update the CHaP flake input with `nix flake update CHaP`. If you get "error: cannot find flake 'flake:CHaP' in the flake registries" your nix installation probably needs to be updated.

9. Make a PR to update the version used in `plutus-tx-template`
- Navigate to the https://github.com/IntersectMBO/plutus-tx-template/actions/workflows/bump-plutus-version.yml[Bump Plutus Version Action] on GitHub
- Click the `Run workflow` button on the right, enter the new release version and confirm
- This will automatically open a PR in `plutus-tx-template` with auto-merge enabled
- Ensure that CI is green and the PR gets merged

=== Patch Releases

Suppose we are releasing version `x.y.z.w`.
Expand Down
8 changes: 6 additions & 2 deletions nix/plutus-metatheory-site.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@ let
name = "plutus-metatheory-doc";
src = inputs.self + /plutus-metatheory;
buildInputs = [ repoRoot.nix.agda-with-stdlib ];

# Because of a quirk with jekyll, the _layouts folder must be in the same
# directory as the source folder.
buildPhase = ''
mkdir "$out"
mkdir $out
cp -R ${inputs.self + /plutus-metatheory/html/_layouts} $out
agda --html --html-highlight=auto --html-dir="$out" "src/index.lagda.md"
'';
dontInstall = true;
Expand All @@ -21,7 +25,7 @@ let
}
''
mkdir "$out"
# disable the disk cache otherwise it tries to write to the source
# Disable the disk cache otherwise it tries to write to the source
jekyll build \
--disable-disk-cache \
-s ${plutus-metatheory-agda-html} \
Expand Down
2 changes: 2 additions & 0 deletions nix/shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ in
pkgs.bzip2
pkgs.gawk
pkgs.scriv
pkgs.fswatch

# Needed to make building things work, not for commands
pkgs.zlib
Expand Down Expand Up @@ -79,6 +80,7 @@ in
group = "changelog";
};


shellHook = ''
${builtins.readFile certEnv}
'';
Expand Down
134 changes: 67 additions & 67 deletions plutus-benchmark/bls12-381-costs/test/9.6/bls12-381-costs.golden
Original file line number Diff line number Diff line change
Expand Up @@ -2,88 +2,88 @@ Hash n bytestrings onto G1 and add points

n Script size CPU usage Memory usage
----------------------------------------------------------------------
0 117 (0.7%) 17432189 (0.2%) 4518 (0.0%)
10 227 (1.4%) 694178079 (6.9%) 40878 (0.3%)
20 337 (2.1%) 1370923969 (13.7%) 77238 (0.6%)
30 447 (2.7%) 2047669859 (20.5%) 113598 (0.8%)
40 557 (3.4%) 2724415749 (27.2%) 149958 (1.1%)
50 667 (4.1%) 3401161639 (34.0%) 186318 (1.3%)
60 777 (4.7%) 4077907529 (40.8%) 222678 (1.6%)
70 887 (5.4%) 4754653419 (47.5%) 259038 (1.9%)
80 997 (6.1%) 5431399309 (54.3%) 295398 (2.1%)
90 1107 (6.8%) 6108145199 (61.1%) 331758 (2.4%)
100 1217 (7.4%) 6784891089 (67.8%) 368118 (2.6%)
110 1327 (8.1%) 7461636979 (74.6%) 404478 (2.9%)
120 1437 (8.8%) 8138382869 (81.4%) 440838 (3.1%)
130 1547 (9.4%) 8815128759 (88.2%) 477198 (3.4%)
140 1657 (10.1%) 9491874649 (94.9%) 513558 (3.7%)
150 1767 (10.8%) 10168620539 (101.7%) 549918 (3.9%)
0 115 (0.7%) 17294189 (0.2%) 3918 (0.0%)
10 224 (1.4%) 693350079 (6.9%) 37278 (0.3%)
20 334 (2.0%) 1369405969 (13.7%) 70638 (0.5%)
30 444 (2.7%) 2045461859 (20.5%) 103998 (0.7%)
40 554 (3.4%) 2721517749 (27.2%) 137358 (1.0%)
50 664 (4.1%) 3397573639 (34.0%) 170718 (1.2%)
60 774 (4.7%) 4073629529 (40.7%) 204078 (1.5%)
70 884 (5.4%) 4749685419 (47.5%) 237438 (1.7%)
80 994 (6.1%) 5425741309 (54.3%) 270798 (1.9%)
90 1104 (6.7%) 6101797199 (61.0%) 304158 (2.2%)
100 1214 (7.4%) 6777853089 (67.8%) 337518 (2.4%)
110 1324 (8.1%) 7453908979 (74.5%) 370878 (2.6%)
120 1434 (8.8%) 8129964869 (81.3%) 404238 (2.9%)
130 1544 (9.4%) 8806020759 (88.1%) 437598 (3.1%)
140 1654 (10.1%) 9482076649 (94.8%) 470958 (3.4%)
150 1764 (10.8%) 10158132539 (101.6%) 504318 (3.6%)


Hash n bytestrings onto G2 and add points

n Script size CPU usage Memory usage
----------------------------------------------------------------------
0 165 (1.0%) 34024964 (0.3%) 4536 (0.0%)
10 275 (1.7%) 2106368474 (21.1%) 41256 (0.3%)
20 385 (2.3%) 4178711984 (41.8%) 77976 (0.6%)
30 495 (3.0%) 6251055494 (62.5%) 114696 (0.8%)
40 605 (3.7%) 8323399004 (83.2%) 151416 (1.1%)
50 715 (4.4%) 10395742514 (104.0%) 188136 (1.3%)
60 825 (5.0%) 12468086024 (124.7%) 224856 (1.6%)
70 935 (5.7%) 14540429534 (145.4%) 261576 (1.9%)
80 1045 (6.4%) 16612773044 (166.1%) 298296 (2.1%)
90 1155 (7.0%) 18685116554 (186.9%) 335016 (2.4%)
100 1265 (7.7%) 20757460064 (207.6%) 371736 (2.7%)
110 1375 (8.4%) 22829803574 (228.3%) 408456 (2.9%)
120 1485 (9.1%) 24902147084 (249.0%) 445176 (3.2%)
130 1595 (9.7%) 26974490594 (269.7%) 481896 (3.4%)
140 1705 (10.4%) 29046834104 (290.5%) 518616 (3.7%)
150 1815 (11.1%) 31119177614 (311.2%) 555336 (4.0%)
0 163 (1.0%) 33886964 (0.3%) 3936 (0.0%)
10 272 (1.7%) 2105540474 (21.1%) 37656 (0.3%)
20 382 (2.3%) 4177193984 (41.8%) 71376 (0.5%)
30 492 (3.0%) 6248847494 (62.5%) 105096 (0.8%)
40 602 (3.7%) 8320501004 (83.2%) 138816 (1.0%)
50 712 (4.3%) 10392154514 (103.9%) 172536 (1.2%)
60 822 (5.0%) 12463808024 (124.6%) 206256 (1.5%)
70 932 (5.7%) 14535461534 (145.4%) 239976 (1.7%)
80 1042 (6.4%) 16607115044 (166.1%) 273696 (2.0%)
90 1152 (7.0%) 18678768554 (186.8%) 307416 (2.2%)
100 1262 (7.7%) 20750422064 (207.5%) 341136 (2.4%)
110 1372 (8.4%) 22822075574 (228.2%) 374856 (2.7%)
120 1482 (9.0%) 24893729084 (248.9%) 408576 (2.9%)
130 1592 (9.7%) 26965382594 (269.7%) 442296 (3.2%)
140 1702 (10.4%) 29037036104 (290.4%) 476016 (3.4%)
150 1812 (11.1%) 31108689614 (311.1%) 509736 (3.6%)


Uncompress n G1 points and add the results

n Script size CPU usage Memory usage
----------------------------------------------------------------------
0 114 (0.7%) 17432189 (0.2%) 4518 (0.0%)
10 664 (4.1%) 197781159 (2.0%) 38878 (0.3%)
20 1214 (7.4%) 378130129 (3.8%) 73238 (0.5%)
30 1764 (10.8%) 558479099 (5.6%) 107598 (0.8%)
40 2314 (14.1%) 738828069 (7.4%) 141958 (1.0%)
50 2864 (17.5%) 919177039 (9.2%) 176318 (1.3%)
60 3414 (20.8%) 1099526009 (11.0%) 210678 (1.5%)
70 3964 (24.2%) 1279874979 (12.8%) 245038 (1.8%)
80 4514 (27.6%) 1460223949 (14.6%) 279398 (2.0%)
90 5064 (30.9%) 1640572919 (16.4%) 313758 (2.2%)
100 5614 (34.3%) 1820921889 (18.2%) 348118 (2.5%)
110 6164 (37.6%) 2001270859 (20.0%) 382478 (2.7%)
120 6714 (41.0%) 2181619829 (21.8%) 416838 (3.0%)
130 7264 (44.3%) 2361968799 (23.6%) 451198 (3.2%)
140 7814 (47.7%) 2542317769 (25.4%) 485558 (3.5%)
150 8364 (51.0%) 2722666739 (27.2%) 519918 (3.7%)
0 112 (0.7%) 17294189 (0.2%) 3918 (0.0%)
10 661 (4.0%) 196953159 (2.0%) 35278 (0.3%)
20 1211 (7.4%) 376612129 (3.8%) 66638 (0.5%)
30 1761 (10.7%) 556271099 (5.6%) 97998 (0.7%)
40 2311 (14.1%) 735930069 (7.4%) 129358 (0.9%)
50 2861 (17.5%) 915589039 (9.2%) 160718 (1.1%)
60 3411 (20.8%) 1095248009 (11.0%) 192078 (1.4%)
70 3961 (24.2%) 1274906979 (12.7%) 223438 (1.6%)
80 4511 (27.5%) 1454565949 (14.5%) 254798 (1.8%)
90 5061 (30.9%) 1634224919 (16.3%) 286158 (2.0%)
100 5611 (34.2%) 1813883889 (18.1%) 317518 (2.3%)
110 6161 (37.6%) 1993542859 (19.9%) 348878 (2.5%)
120 6711 (41.0%) 2173201829 (21.7%) 380238 (2.7%)
130 7261 (44.3%) 2352860799 (23.5%) 411598 (2.9%)
140 7811 (47.7%) 2532519769 (25.3%) 442958 (3.2%)
150 8361 (51.0%) 2712178739 (27.1%) 474318 (3.4%)


Uncompress n G2 points and add the results

n Script size CPU usage Memory usage
----------------------------------------------------------------------
0 162 (1.0%) 34024964 (0.3%) 4536 (0.0%)
10 1192 (7.3%) 393431584 (3.9%) 39256 (0.3%)
20 2222 (13.6%) 752838204 (7.5%) 73976 (0.5%)
30 3252 (19.8%) 1112244824 (11.1%) 108696 (0.8%)
40 4282 (26.1%) 1471651444 (14.7%) 143416 (1.0%)
50 5312 (32.4%) 1831058064 (18.3%) 178136 (1.3%)
60 6342 (38.7%) 2190464684 (21.9%) 212856 (1.5%)
70 7372 (45.0%) 2549871304 (25.5%) 247576 (1.8%)
80 8402 (51.3%) 2909277924 (29.1%) 282296 (2.0%)
90 9432 (57.6%) 3268684544 (32.7%) 317016 (2.3%)
100 10462 (63.9%) 3628091164 (36.3%) 351736 (2.5%)
110 11492 (70.1%) 3987497784 (39.9%) 386456 (2.8%)
120 12522 (76.4%) 4346904404 (43.5%) 421176 (3.0%)
130 13552 (82.7%) 4706311024 (47.1%) 455896 (3.3%)
140 14582 (89.0%) 5065717644 (50.7%) 490616 (3.5%)
150 15612 (95.3%) 5425124264 (54.3%) 525336 (3.8%)
0 160 (1.0%) 33886964 (0.3%) 3936 (0.0%)
10 1189 (7.3%) 392603584 (3.9%) 35656 (0.3%)
20 2219 (13.5%) 751320204 (7.5%) 67376 (0.5%)
30 3249 (19.8%) 1110036824 (11.1%) 99096 (0.7%)
40 4279 (26.1%) 1468753444 (14.7%) 130816 (0.9%)
50 5309 (32.4%) 1827470064 (18.3%) 162536 (1.2%)
60 6339 (38.7%) 2186186684 (21.9%) 194256 (1.4%)
70 7369 (45.0%) 2544903304 (25.4%) 225976 (1.6%)
80 8399 (51.3%) 2903619924 (29.0%) 257696 (1.8%)
90 9429 (57.6%) 3262336544 (32.6%) 289416 (2.1%)
100 10459 (63.8%) 3621053164 (36.2%) 321136 (2.3%)
110 11489 (70.1%) 3979769784 (39.8%) 352856 (2.5%)
120 12519 (76.4%) 4338486404 (43.4%) 384576 (2.7%)
130 13549 (82.7%) 4697203024 (47.0%) 416296 (3.0%)
140 14579 (89.0%) 5055919644 (50.6%) 448016 (3.2%)
150 15609 (95.3%) 5414636264 (54.1%) 479736 (3.4%)


Apply pairing to two pairs of points in G1 x G2 and run finalVerify on the results
Expand All @@ -103,7 +103,7 @@ VRF example

n Script size CPU usage Memory usage
----------------------------------------------------------------------
- 712 (4.3%) 1303299563 (13.0%) 49149 (0.4%)
- 712 (4.3%) 1303023563 (13.0%) 47949 (0.3%)

G1 Verify

Expand All @@ -121,13 +121,13 @@ Aggregate Single Key

n Script size CPU usage Memory usage
----------------------------------------------------------------------
- 777 (4.7%) 3336910422 (33.4%) 71202 (0.5%)
- 777 (4.7%) 3336634422 (33.4%) 70002 (0.5%)

Aggregate Multi Key

n Script size CPU usage Memory usage
----------------------------------------------------------------------
- 1704 (10.4%) 3676891887 (36.8%) 430586 (3.1%)
- 1704 (10.4%) 3674821887 (36.7%) 421586 (3.0%)

Schnorr Signature G1

Expand Down
Loading

0 comments on commit 9637940

Please sign in to comment.