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

CIP-1694 make space for DRep certificates #5108

Merged
merged 3 commits into from
Apr 18, 2023

Conversation

newhoggy
Copy link
Contributor

@newhoggy newhoggy commented Apr 17, 2023

CIP-1694 introduces the idea of also delegating DReps in addition to stake pools.

The code currently use names that assume we can only delegate to stake pools from a stake-address.

This PR renames them to specifically refer to stake pools so that it is easier to add support for DReps later.

-- | A resource that identifies the delegation target. At the moment a delegation
-- target can only be a stake pool.
newtype DelegationTarget
= StakePoolDelegationTarget (VerificationKeyOrHashOrFile StakePoolKey)
Copy link
Contributor Author

@newhoggy newhoggy Apr 17, 2023

Choose a reason for hiding this comment

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

DelegationTarget is has one constructor StakePoolDelegationTarget which wraps VerificationKeyOrHashOrFile StakePoolKey.

Later on, another constructor will be added for DReps.

@@ -315,7 +315,7 @@ friendlyCertificate =
StakeAddressDeregistrationCertificate credential ->
"stake address deregistration"
.= object [friendlyStakeCredential credential]
StakeAddressDelegationCertificate credential poolId ->
StakeAddressPoolDelegationCertificate credential poolId ->
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Rename StakeAddressDelegationCertificate to StakeAddressPoolDelegationCertificate so that we can introduce StakeAddressDRepDelegationCertificate later.

@newhoggy newhoggy force-pushed the newhoggy/cip-1694-make-space-for-drep-certificates branch from f950861 to 2d221ff Compare April 17, 2023 07:04
@newhoggy newhoggy marked this pull request as ready for review April 17, 2023 07:05
…nCertificate. This will make space for CIP-1926 which will introduce the StakeAddressDRepDelegationCertificate.
@newhoggy newhoggy force-pushed the newhoggy/cip-1694-make-space-for-drep-certificates branch from 2d221ff to 1232c20 Compare April 17, 2023 07:06
Copy link
Contributor

@Jimbo4350 Jimbo4350 left a comment

Choose a reason for hiding this comment

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

LGTM!

@newhoggy newhoggy added this pull request to the merge queue Apr 18, 2023
Merged via the queue into master with commit 8faa631 Apr 18, 2023
@iohk-bors iohk-bors bot deleted the newhoggy/cip-1694-make-space-for-drep-certificates branch April 18, 2023 02:03
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.

4 participants