-
Notifications
You must be signed in to change notification settings - Fork 721
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
cardano-testnet | Add stake address registration/deregistration test #6017
cardano-testnet | Add stake address registration/deregistration test #6017
Conversation
4c3f082
to
c9906ef
Compare
31bebc9
to
da2f968
Compare
5f5bcf5
to
a849ea3
Compare
…eyGenesis instead of hardcoding it
a849ea3
to
a3bb676
Compare
a3bb676
to
6fa52d3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. A few comments that can be addressed in follow up PRs.
.../cardano-testnet-test/Cardano/Testnet/Test/Cli/Transaction/RegisterDeregisterStakeAddress.hs
Outdated
Show resolved
Hide resolved
do | ||
(_, stdout', stderr') <- execCliAny execConfig | ||
[ eraName, "query", "stake-address-info" | ||
, "--address", stakeAddress |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should confirm that this command succeeds with the expected output.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one was actually a leftover from debugging. It's removed in the final version. The query itself should be tested in Cardano.Testnet.Test.Cli.Query
, which currently is not (needs fixing).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added check in: #6026
] | ||
|
||
void $ execCli' execConfig | ||
[ eraName, "transaction", "submit" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again we should confirm that the stake address was actually unregistered.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added check in: #6026
@@ -52,10 +52,10 @@ checkStakePoolRegistered | |||
:: (MonadTest m, MonadCatch m, MonadIO m, HasCallStack) | |||
=> TmpAbsolutePath | |||
-> ExecConfig | |||
-> FilePath -- ^ Stake pool cold verification key file | |||
-> File (VKey StakeKey) In -- ^ Stake pool cold verification key file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be helpful to include the fact that this is a cold key in the type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, that's a typo. I've used StakePoolKey
type instead in #6026
@@ -91,15 +92,20 @@ instance MonoFunctor (KeyPair k) where | |||
deriving instance Show (KeyPair k) | |||
deriving instance Eq (KeyPair k) | |||
|
|||
instance {-# OVERLAPPING #-} Show (Some KeyPair) where |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is due to:
instance Show (Some f) where
showsPrec _ (Some v) = showsTypeRep (typeOf v)
I don't think it's used anywhere so lets remove it to avoid having to use OVERLAPPING
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, I think it will be better to provide specific show instances e.g. Show (Some Era
instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Follow-up pr: IntersectMBO/cardano-api#665
Description
Reproducer for: IntersectMBO/cardano-cli#942
Adds also a few refactors:
KeyPair k
type in more placesSomeKeyPair
withSome KeyPair
createStakeKeyDeregistrationCertificate
andcreateStakeKeyRegistrationCertificate
instead of manually building cardano-cli command.Checklist
See Runnings tests for more details
CHANGELOG.md
for affected package.cabal
files are updatedhlint
. See.github/workflows/check-hlint.yml
to get thehlint
versionstylish-haskell
. See.github/workflows/stylish-haskell.yml
to get thestylish-haskell
versionghc-8.10.7
andghc-9.2.7
Note on CI
If your PR is from a fork, the necessary CI jobs won't trigger automatically for security reasons.
You will need to get someone with write privileges. Please contact IOG node developers to do this
for you.