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

Refactor GOV from conformance #688

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

carlostome
Copy link
Contributor

@carlostome carlostome commented Feb 14, 2025

Description

Currently the GOV rules in Conformance are analogous (modulo CertState) to those in Ledger.

This PR aims to remove the redundancy.

This PR consists of two commits:

  1. Inline restrictions of the module Equivalence.Base where needed. This serves to break cyclic dependencies which occur in the next commit.
  2. Repurpose Ledger.Conway.Conformance.Gov as an interface for Ledger.Gov.

TBD

  • Check that conformance tests still pass (against 2ff5fa4e8c6b773748799981ef44ef6a62cd5c92)

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

@carlostome carlostome force-pushed the carlos/refactor-gov-conformance branch 3 times, most recently from 88d13eb to 235bdaf Compare February 18, 2025 14:58
@carlostome carlostome self-assigned this Feb 19, 2025
@carlostome carlostome force-pushed the carlos/refactor-gov-conformance branch from cd255b3 to 244bc92 Compare February 20, 2025 08:50
@carlostome carlostome force-pushed the carlos/refactor-gov-conformance branch from 5943b7b to 5ecd7ea Compare February 20, 2025 09:17
@carlostome carlostome force-pushed the carlos/refactor-gov-conformance branch from f42bd3d to d822d14 Compare February 20, 2025 11:03
@carlostome carlostome requested a review from Soupstraw February 20, 2025 12:26
@carlostome carlostome marked this pull request as ready for review February 20, 2025 12:26
@carlostome carlostome requested a review from WhatisRT February 20, 2025 13:35
Copy link
Collaborator

@WhatisRT WhatisRT left a comment

Choose a reason for hiding this comment

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

Looks good! Removing code is always great!

_⊢_⇀⦇_,GOV⦈_ = ReflexiveTransitiveClosureᵢ {sts = _⊢_⇀⦇_,GOV'⦈_}
_⊢_⇀⦇_,GOV⦈_ : GovEnv GovState List (GovVote ⊎ GovProposal) GovState Type
Γ ⊢ govSt ⇀⦇ gvps ,GOV⦈ govSt'
= ⟦ txid , epoch , pparams , ppolicy , enactState , conv certState , rewardCreds ⟧ L.⊢ govSt |ᵒ conv certState ⇀⦇ gvps ,GOV⦈ govSt'
Copy link
Collaborator

Choose a reason for hiding this comment

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

What's the reason you moved |ᵒ here from LEDGER?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If we called |ᵒ in Ledger then we would have to expose the conversion function as well. In this way, I think is more modular.

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.

2 participants