Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use dependent types for PParams #678

Open
carlostome opened this issue Feb 4, 2025 · 0 comments
Open

Use dependent types for PParams #678

carlostome opened this issue Feb 4, 2025 · 0 comments

Comments

@carlostome
Copy link
Contributor

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

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant