Skip to content

Conversation

@williamdemeo
Copy link
Member

@williamdemeo williamdemeo commented Sep 19, 2025

Description

The first step is to revert CERTS to running CERTBASE last. Ultimately we will probably deprecate the "CERTBASE" rule and replace it with "preCerts" and "postCerts" functions that will run before and after the CERTS sts. Some of the things that currently happen in CERTBASE may be moved into the LEDGER rule.

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • Any semantic changes to the specifications are documented in CHANGELOG.md
  • Code is formatted according to CONTRIBUTING.md
  • Self-reviewed the diff

@williamdemeo williamdemeo linked an issue Sep 19, 2025 that may be closed by this pull request
@williamdemeo williamdemeo marked this pull request as ready for review September 28, 2025 21:15
@williamdemeo
Copy link
Member Author

The Haskell code generated from this branch (in dist/hs) now passes two CERTS-related conformance tests that were failing before.

Copy link
Collaborator

@carlostome carlostome left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work! I left some comments here and there.

CERT-base :
data _⊢_⇀⦇_,PRE-CERT⦈_ : CertEnv → CertState → ⊤ → CertState → Type where

CERT-init :
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe?

Suggested change
CERT-init :
CERT-pre :


data _⊢_⇀⦇_,POST-CERT⦈_ : CertEnv → CertState → ⊤ → CertState → Type where

CERT-last :
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
CERT-last :
CERT-post :

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest a consistent naming for the PRE-CERT and POST-CERT constructors (first-last e.g.). I did leave a suggestion.


The governance state used as input to `GOVS`{.AgdaDatatype} is filtered to
remove votes from `DRep`{.AgdaInductiveConstructor}s that are no longer
remove votes from DReps that are no longer
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been doing the opposite elsewhere. We should come to a consistent agreement about this.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we should be consistent about this. It's not clear to me that AgdaInductiveConstructor (or any other special Agda highlighting class) is what we want though... which is why I proposed no formatting at all.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After thinking about it, I suppose since DRep is a (constructor of a) GovRole, the AgdaInductiveConstructor class makes sense. Okay, let's adopt that convention (i.e., DRep{.AgdaInductiveConstructor}) throughout.

This is a first step to refactoring the CERTS rule.

Ultimately we will deprecate the "CERTBASE" rule and replace it
with "preCerts" and "postCerts" functions that will run before and after
the CERTS sts.  Some of the things that currently happen in CERTBASE may
be moved into the LEDGER rule.

revert CERTS rule in conformance version
Plus,

+ computational proofs for new pre-cert and post-cert rules

+ PoV proofs for new CERTS rule

+ Refactor equivalence proofs for new CERTS rule.

+ fix some formatting in Ledger module

Also, removed `AgdaInductiveConstructor` class from occurrences of
"DRep" in the text; this makes it easier to be consistent throughout the
document, but even if we do want to use Agda high-lighting for "DRep",
it's not clear to me that `AgdaInductiveConstructor` is the right class
to use.
and fix bug introduced by rebase
@williamdemeo williamdemeo merged commit 1ae6334 into master Oct 1, 2025
3 of 6 checks passed
@williamdemeo williamdemeo deleted the 726-fix-certbase branch October 1, 2025 02:12
@williamdemeo williamdemeo self-assigned this Nov 11, 2025
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

Successfully merging this pull request may close these issues.

Fix bug introduced by doing CERTBASE first

2 participants