Updating pool informations with 2 owners (1 HW and 1 non-HW)

Hello everyone,

I’ve successfully secured my stakepool with a second owner which is a Hardware Wallet, 2 epochs ago.

Now i want to update my pool settings (Pledge change). Until now, i followed CoinCashew guide to update Stake Pool Infos.
But from now on, as far as i understand, i have to sign any change to the stakepool with both owners. So the process is a little bit different right ?

What i think i should do :

1- Create deleg cert for the HW Wallet

cardano-cli stake-address delegation-certificate
–stake-verification-key-file hw-stake.vkey
–cold-verification-key-file $HOME/cold-keys/node.vkey
–out-file hw-deleg.cert

2- Create the new Pool cert with updated pledge. with both owner’s key

cardano-cli stake-pool registration-certificate
–cold-verification-key-file $HOME/cold-keys/node.vkey
–vrf-verification-key-file vrf.vkey
–pool-pledge 10000000000
–pool-cost 340000000
–pool-margin 0.01
–pool-reward-account-verification-key-file hw-stake.vkey
–pool-owner-stake-verification-key-file stake.vkey
–pool-owner-stake-verification-key-file hw-stake.vkey
–mainnet
–single-host-pool-relay XXXXXXXXXXX
–pool-relay-port 6000
–metadata-url
–metadata-hash $(cat poolMetaDataHash.txt)
–out-file pool.cert

3- Usual fees calculations (this time with 4 witness)

4- Building the Transaction (with the hw-deleg certificate and —mary-era setting)

cardano-cli transaction build-raw
${tx_in}
–mary-era
–tx-out $(cat payment.addr)+${txOut}
–invalid-hereafter $((${currentSlot}+10000))
–fee ${fee}
–certificate-file pool.cert
–certificate-file deleg.cert
–certificate-file hw-deleg.cert
–out-file tx.raw

5- Create 4 witness including one with Hardware Wallet validation (stake.skey, payment.skey, hw-stake.hwsfile, node.skey)

6- Assemble the transaction with 4 witness

cardano-cli transaction assemble
–tx-body-file tx-pool.raw
–witness-file node.witness
–witness-file stake.witness
–witness-file payment.witness
–witness-file hw-stake.witness
–out-file tx-pool.multisign

7- Submit the transaction

Does that sound correct ?

2 Likes

Sounds about correct.

I don’t know why you are creating hw-deleg.cert again. If you already have secured with the hardware wallet, it should already exist, shouldn’t it?

Also, I don’t know why you are creating a --mary-era transaction. Is that necessary for pool registrations?

And I’m always a bit surprised that so many still use --build-raw with the manual fee calculation.

cardano-cli transaction build --mainnet \
${tx_in} \
--change-address $(cat payment.addr) \
--certificate-file pool.cert \
--certificate-file deleg.cert \
--certificate-file hw-deleg.cert \
--witness-override 4 \
--out-file tx.raw

seems simpler to me. Saves the building twice, the fee calculation, the protocol parameters stuff.

1 Like

Hello there o/

I followed coincashew guide to add HW wallet as a second pool owner. During the process there is no HW Wallet deleg cert created. That’s why i’m creating it now

–mary-era seems mandatory for the HW wallet transactions to be accepted, i’m not sure why ?

Thank you i will try that during my next transaction ! :slight_smile:

2 Likes

Ah, okay. Looking at it, I don’t even know why they include the delegation certificates at all if the delegation is not changed. … Sometimes, those guides give the impression that they just recorded some way that somehow worked for them, but didn’t cut it down to the required minimum.

Hmm, cardano-hw-cli themselves use --alonzo-era in https://github.com/vacuumlabs/cardano-hw-cli/blob/develop/docs/pool-registration.md.

I don’t have a pool, but I have done minting with cardano-hw-cli without giving an era at all in:

Sorry if it’s too much, but I always try to encourage to find out exactly what is needed and why.

4 Likes

You can take a look here:

It was tested by me with the latest versions of cardano-cli, cardano-node and cardano-hw-cli, with a Ledger wallet. The guide was written after what I did to add the hardware wallet as second owner.

4 Likes

Yes, that is the guide i used to add a hardware wallet as a second pool owner.

But now, i want to modify pool infos (pledge) :slight_smile:

1 Like

If you want to modify the pool pledge then you need to create a new registration-certificate with the updated pledge amount. See step 6 part 3 in the document that @georgem1976 attached above.

2 Likes

Yes i know. I did it already when my pool had only 1 owner :slight_smile:

My question was : now that i have 2 owners (including 1 Hardware Wallet), is the process any different ?

For example, do i need both Owner’s delegation certificates in my transactions ? (on coin cashew guide for updating pool informations with only 1 owner, you do provide its deleg certificate. But on coincashew guide for adding second owner with hardware wallet, there is no deleg certificate at all in the transaction).

As @HeptaSean said, why include deleg cert if the delegation is not changed.

1 Like

If both “owner” wallets are already delegated to the pool then you don’t need to re-delegate them. You just need to create the new registration-certificate with updated pledge value.

You will need to sign with both --pool-owner-stake-verification-key-file keys, node’s cold.skey and payment.skey (4 signatures).

Actually the easiest way to add another owner would be to just get them to delegate to your pool first. Then you just create a new registration-certificate with the updated pledge amount and added --pool-owner-stake-verification-key-file value.

3 Likes

That’s what i did to add a second pool owner. I first delegated it to the pool.

But indeed, this is the answer. Just simply redo the exact same new-registration certificate process that i did to add a HW wallet owner, but with an updated pledge.

There is still the --mary-era question. I found this thread about it :

1 Like

Seems to have been fixed since April: https://github.com/vacuumlabs/cardano-hw-cli/issues/89#issuecomment-1110152213

2 Likes

I updated my stake pool registration certificate a couple of week ago and didn’t use any --mary-era switch.

This is what I did at the build-raw stage:

cardano-cli transaction build-raw \
  --tx-in blahblahblah#0 \
  --tx-out addr1blahblahblah+0 \
  --invalid-hereafter 0 \
  --fee 0 \
  --out-file tx.draft \
  --certificate-file pool-registration.cert

And when I did the owner witness with my hardware token I did this:

cardano-hw-cli transaction witness \
  --tx-body-file tx.raw \
  --hw-signing-file hw-stake.hwsfile \
  --mainnet \
  --out-file hw-stake.witness

Combined the witnesses (in my case only 3) with:

cardano-cli transaction assemble \
  --tx-body-file tx.raw \
  --witness-file payment.witness \
  --witness-file pool.witness \
  --witness-file hw-stake.witness \
  --out-file tx.signed

And submitted with:

CARDANO_NODE_SOCKET_PATH="/run/cardano/mainnet-node.socket" cardano-cli transaction submit \
  --tx-file tx.signed \
  --mainnet
2 Likes

Is --invalid-hereafter needed? I only include it if there is a script requiring it (minting/burning/time-locked address).

And I avoid build-raw 99.9% of the time.

cardano-cli transaction build --mainnet \
  --tx-in blahblahblah#0 \
  --change-address addr1blahblahblah \
  --certificate-file pool-registration.cert \
  --witness-override 4 \
  --out-file tx.raw

should also be enough.

2 Likes

Yes, i just updated my Pledge for my Pool, and it worked :slight_smile:

Thank you !

1 Like

I saw you post something similar in another topic. Thank you. I have made some notes so that I can do it that way next time.

I assume the system knows whether to take out the pool registration deposit (500 Ada) or not depending on whether this is the first registration or just a certificate change?

I would like to know what is the default value if this is not included? I thought it would be better to have an “expiry” slot number in case of failure to truly know when there is no chance the transaction could proceed. What are your thoughts on that?

1 Like

It doesn’t seem to be documented anywhere. I tried to trace it down the Haskell source and to me it really looks like there is no default, meaning the transaction is probably valid forever if it is not set.

Happens rarely if ever that a successfully submitted transaction doesn’t go through for me.

If a transaction would seem submitted but stuck, I would probably try it again with the same UTxOs until it works. That way all stuck transactions are also guaranteed to fail, because the UTxOs are gone. But YMMV.

2 Likes

Oh, good question. I’d also assume so.

You can always check with cardano-cli transaction view --tx-file tx.raw.

But build-raw would also have to know it. Otherwise, it would give a ValueNotConservedError if you just have 500 ADA less in the outputs.

2 Likes

When you use cardano-cli transaction build, the command knows when you need to pay the 500 ADA for stake pool deposit (or not), or the 2 ADA for stake key deposit (or not).

3 Likes

I believe this is how it works:
It is the blockchain that knows after submission.

The ‘cardano-cli transaction build’ command can be run on an air-gap machine and doesn’t require protocol.json file containing current cost model. If you use build (as @HeptaSean recommended) then the cardano nodes do the calculations for you, when the transaction is executed, provided you had sufficient funds in your input UTxO(s). The nodes calculate the change and put it in your --change-address based on the current cost model.

Please correct me if I am wrong.

1 Like