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

Accept either a pool verification key hash or file in StakeKeyDelegationCert command #1460

Merged
merged 2 commits into from
Jul 15, 2020

Conversation

intricate
Copy link
Contributor

Closes #1377

Copy link
Contributor

@dcoutts dcoutts left a comment

Choose a reason for hiding this comment

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

Looks fine.

Suggestion for future enhancements below.

)
where
spvkHash :: String -> Maybe (Hash StakePoolKey)
spvkHash = deserialiseFromRawBytesHex (AsHash AsStakePoolKey) . BSC.pack
Copy link
Contributor

Choose a reason for hiding this comment

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

We can do better than this now! We can use the bech32 support.

Which reminds me, Matthias had the excellent suggestion that where we accept bech32 we should to ease transitions and for compatibility, accept either bech32 or raw hex. I think we can do this straightforwardly in the api since our bech32 class is built on top of our raw serialisation class, so we could make a function to accept either.

So yes this is fine for now, but this should be an easy enhancement to add in. We could support file or bech32 in many places actually, various keys or key hashes. This draft CIP has the current list
cardano-foundation/CIPs#6

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Gotcha. So I'll merge this and then revise it later.

@intricate
Copy link
Contributor Author

bors r+

iohk-bors bot added a commit that referenced this pull request Jul 15, 2020
1460: Accept either a pool verification key hash or file in StakeKeyDelegationCert command r=intricate a=intricate

Closes #1377 

Co-authored-by: Luke Nadur <19835357+intricate@users.noreply.github.com>
@intricate
Copy link
Contributor Author

bors r-

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Jul 15, 2020

Canceled

@intricate
Copy link
Contributor Author

bors r+

iohk-bors bot added a commit that referenced this pull request Jul 15, 2020
1460: Accept either a pool verification key hash or file in StakeKeyDelegationCert command r=intricate a=intricate

Closes #1377 

Co-authored-by: Luke Nadur <19835357+intricate@users.noreply.github.com>
@intricate
Copy link
Contributor Author

bors r-

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Jul 15, 2020

Canceled

@intricate
Copy link
Contributor Author

bors r+

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Jul 15, 2020

@iohk-bors iohk-bors bot merged commit 5776904 into master Jul 15, 2020
@iohk-bors iohk-bors bot deleted the intricate/1377-pool-hash branch July 15, 2020 03:11
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.

[FR] - Delegation to a pool should only require its pool hash, not the full vkey
2 participants