Skip to content

Commit

Permalink
Merge branch 'master' into 637-behavior-of-plutus-v3-scripts-without-…
Browse files Browse the repository at this point in the history
…datum
  • Loading branch information
williamdemeo committed Jan 27, 2025
2 parents 0c7517a + e32b210 commit d21c02f
Show file tree
Hide file tree
Showing 12 changed files with 42 additions and 5 deletions.
29 changes: 29 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ To install Agda locally and use that install with emacs, you can do the followin

`nix-shell` provides Agda complete with the correct dependencies. So you should be able to run your preferred editor within `nix-shell` and it should see the required `agda` executable.

For instructions _not using_ `nix-shell`, check [Setup without nix-shell](setup-without-nix-shell).

## Working on libraries

To work simultaneously on the ledger and one of its dependencies, the easiest way to do this is to remove the library from the ledger's `.agda-lib` file and add its path to the `include:` section. Then, when finished, push the changes to the library, then update `default.nix` to point to your new commit.
Expand Down Expand Up @@ -110,6 +112,33 @@ niv update nixpkgs -r 4e329926df7ee5fa49929a83d31ee7d541f8b45c
niv update nixpkgs -v 21.11.337905.902d91def1e
```

## Setup without nix-shell

- Install Agda version `2.7.0` (e.g. follow the instructions in <https://agda.readthedocs.io/en/latest/getting-started/installation.html#step-1-install-agda>).
- In a folder `LIB`, clone the dependencies
+ [agda-stdlib](https://github.com/agda/agda-stdlib)
+ [agda-stdlib-classes](https://github.com/agda/agda-stdlib-classes)
+ [agda-stdlib-meta](https://github.com/agda/agda-stdlib-meta)
+ [agda-sets](https://github.com/input-output-hk/agda-sets)
and checkout the commits/tags found in `default.nix` (e.g. `v2.1.1` for `agda-stdlib-meta`).
- Create a file `LIB/libraries` with the following content:
```
LIB/agda-stdlib/standard-library.agda-lib
LIB/agda-stdlib-classes/agda-stdlib-classes.agda-lib
LIB/agda-stdlib-meta/agda-stdlib-meta.agda-lib
LIB/agda-sets/abstract-set-theory.agda-lib
```
- Instead of `agda` use `agda --library-file LIB/libraries`. For example, to typecheck `Everything.agda`:
```
cd src/
agda --library-file LIB/libraries Everything.agda
```

To build targets from the Makefile (e.g. see [Building other artifacts](building-other-artifacts)), use:
```
AGDA="agda --library-file LIB/libraries" make html
```

## Maintainer

This repository is maintained by @WhatisRT.
Expand Down
1 change: 1 addition & 0 deletions src/Ledger/Conway/Conformance/Equivalence.agda
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{-# OPTIONS --safe #-}
-- Proof that the rules under Ledger.Conway.Conformance are equivalent
-- to the rules under Ledger.

Expand Down
1 change: 1 addition & 0 deletions src/Ledger/Conway/Conformance/Equivalence/Base.agda
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{-# OPTIONS --safe #-}

open import Ledger.Abstract
open import Ledger.Transaction using (TransactionStructure)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{-# OPTIONS --safe #-}

module Ledger.Conway.Conformance.Equivalence.Bisimilarity where

Expand Down
1 change: 1 addition & 0 deletions src/Ledger/Conway/Conformance/Equivalence/Certs.agda
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{-# OPTIONS --safe #-}

open import Ledger.Prelude
open import Ledger.Abstract
Expand Down
1 change: 1 addition & 0 deletions src/Ledger/Conway/Conformance/Equivalence/Convert.agda
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{-# OPTIONS --safe #-}

module Ledger.Conway.Conformance.Equivalence.Convert where

Expand Down
1 change: 1 addition & 0 deletions src/Ledger/Conway/Conformance/Equivalence/Deposits.agda
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{-# OPTIONS --safe #-}

open import Ledger.Prelude
open import Ledger.Abstract
Expand Down
2 changes: 2 additions & 0 deletions src/Ledger/Conway/Conformance/Equivalence/Gov.agda
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{-# OPTIONS --safe #-}

open import Ledger.Prelude
open import Ledger.Abstract
open import Ledger.Transaction using (TransactionStructure)
Expand Down
2 changes: 1 addition & 1 deletion src/Ledger/Conway/Conformance/Equivalence/Map.agda
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{-# OPTIONS --allow-unsolved-metas #-}
{-# OPTIONS --safe #-}

module Ledger.Conway.Conformance.Equivalence.Map where

Expand Down
1 change: 1 addition & 0 deletions src/Ledger/Conway/Conformance/Equivalence/Utxo.agda
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{-# OPTIONS --safe #-}

open import Ledger.Prelude
open import Ledger.Abstract
Expand Down
4 changes: 2 additions & 2 deletions src/Ledger/Enact.lagda
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Note that all other fields of \EnactState also contain a \GovActionID
since they are \HashProtected.

\begin{figure*}[h]
\begin{AgdaSuppressSpace}
\begin{AgdaMultiCode}
\begin{code}
record EnactEnv : Type where
\end{code}
Expand Down Expand Up @@ -90,7 +90,7 @@ data
\begin{code}
_⊢_⇀⦇_,ENACT⦈_ : EnactEnv → EnactState → GovAction → EnactState → Type
\end{code}
\end{AgdaSuppressSpace}
\end{AgdaMultiCode}
\caption{Types and function used for the ENACT transition system}
\label{fig:enact-defs}
\end{figure*}
Expand Down
3 changes: 1 addition & 2 deletions src/Ledger/Transaction.lagda
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ Ingredients of the transaction body introduced in the Conway era are the followi

\begin{figure*}[h]
\emph{Abstract types}
\begin{AgdaMultiCode}
\begin{code}
Ix TxId AuxiliaryData : Type
\end{code}
Expand Down Expand Up @@ -110,7 +109,6 @@ Ingredients of the transaction body introduced in the Conway era are the followi
open GovernanceActions hiding (Vote; yes; no; abstain) public

open import Ledger.Certs govStructure using (DCert)

\end{code}
\begin{NoConway}
\emph{Derived types}
Expand All @@ -126,6 +124,7 @@ Ingredients of the transaction body introduced in the Conway era are the followi
\end{code}
\end{NoConway}
\emph{Transaction types}
\begin{AgdaMultiCode}
\begin{code}
record TxBody : Type where
\end{code}
Expand Down

0 comments on commit d21c02f

Please sign in to comment.