IntersectMBO / IntersectMBO/formal-ledger-specifications

Use dependent types for PParams

Open
#678 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Agda
Stars
52
Forks
20
Avg merge
6d 14h
Merged PRs (30d)
7

Description

Change PParams to use dependent types in the spirit of the Shelley spec. For this, we replace the record by:

```agda
data PParamName : Type
maxBlockSize : PParamName

typeOfPParam : PParamName -> Type

PParams : Type
PParams = (ppn : PParamName) -> typeOfPParam ppn

PParamsUpdate : Type
PParamsUpdate = (ppn : PParamName) -> Maybe (typeOfPParam ppn)

PParamGroup : PParamName -> PParamGroup
```

This solves some awkwardness, for example, in that the current specification doesn't formally link parameter groups to parameters.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.