When register for a pool, I have cold signing key in one machine (m1) and stake and payment signing key in other machine (m2), what I want is to form the transaction and sign with stake and payment keys in m2, then bring the raw hex string to m1 and sign with cold key, then submit it to blockchain.
I kept running into this message
Command failed: transaction submit Error: Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraBabbage (ApplyTxError [UtxowFailure (FromAlonzoUtxowFail (WrappedShelleyEraFailure (MissingVKeyWitnessesUTXOW (WitHashes (fromList [KeyHash “65919ce8029cd4ea6e5a1a530e8bd9a90c7a130b61918ad500714e73”,KeyHash “bff54c2d79f939497f03ea5b590bb291ef140ded78fe0403cf7d2fe3”]))))),UtxowFailure (UtxoFailure (FromAlonzoUtxoFail (OutsideValidityIntervalUTxO (ValidityInterval {invalidBefore = SNothing, invalidHereafter = SJust (SlotNo 200000)}) (SlotNo 65831671)))),DelegsFailure (DelplFailure (DelegFailure (StakeDelegationImpossibleDELEG (KeyHashObj (KeyHash “bff54c2d79f939497f03ea5b590bb291ef140ded78fe0403cf7d2fe3”)))))])
Can anyone help? Thank you very much
Instead of signing the tx, you’ll have to create a witness with each key (on the machine that holds the key(s)) and then you’ll need to assemble the tx with those witnesses before submitting. The sign command does this under the hood btw.
So on m1 you create a witness with your cold signing key and on m2 you create two witnesses, one with the stake signing key and one with the payment signing key. Then you assemble the the raw tx and the three witnesses into a signed tx you can submit.
To create the witnesses (copy tx.raw to m1 and m2):
# on machine m1
cardano-cli transaction witness \
--tx-body-file tx.raw \
--signing-key-file cold.skey \
--out-file tx.cold.witness \
--mainnet
# on machine m2
--tx-body-file tx.raw \
--signing-key-file payment.skey \
--out-file tx.payment.witness \
--mainnet
# on machine m2
--tx-body-file tx.raw \
--signing-key-file stake.skey \
--out-file tx.stake.witness \
--mainnet
The copy all the witnesses to your live node and assemble:
# on live node
cardano-cli transaction assemble \
--tx-body-file tx.raw \
--witness-file tx.cold.witness \
--witness-file tx.payment.witness \
--witness-file tx.stake.witness \
--out-file tx.signed
And then submit like normal.
1 Like
In addition to what @brouwerQ said, it also seems that the validity interval of your transaction is wrong. The validity interval should be put as an absolute slot number. You need a synced node to know what is the current slot height and add up an arbitrary number to it (here 200000 slots if you want).
1 Like