Error while submitting stake pool registration transaction

I need help please, I’m banging my head for the last 5 hours trying to solve this problem.

I am at the last step of registering my staking pool (submit the signed txo) but I keep getting the following error:

Command failed: transaction submit Error: Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraAlonzo (ApplyTxError [UtxowFailure (WrappedShelleyEraFailure (UtxoFailure (FeeTooSmallUTxO (Coin 215441) (Coin 213109)))),DelegsFailure (DelplFailure (DelegFailure (StakeDelegationImpossibleDELEG (KeyHashObj (KeyHash “XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX”))))),DelegsFailure (DelplFailure (DelegFailure (StakeDelegationImpossibleDELEG (KeyHashObj (KeyHash “YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY”))))),DelegsFailure (DelplFailure (DelegFailure (StakeDelegationImpossibleDELEG (KeyHashObj (KeyHash “ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ”)))))])

I replaced the actual hashes with X, Y, Z
Correct me if I’m wrong but I think that I have 2 sets of errors here, the FeeTooSmall and the DelegsFailure.

I followed the CoinCashew guide but I changed it in order to have 3 owners in addition to the Stake Pool wallet which also set to be a fourth owner (it is also use as a payment address).

Here are the commands I passed:

OFFLINE

cardano-cli stake-pool registration-certificate
–cold-verification-key-file $HOME/cold-keys/node.vkey
–vrf-verification-key-file vrf.vkey
–pool-pledge 11000000000
–pool-cost 340000000
–pool-margin 0.01
–pool-reward-account-verification-key-file stake.vkey
–pool-owner-stake-verification-key-file stake.vkey
–pool-owner-stake-verification-key-file stake_owner1.vkey
–pool-owner-stake-verification-key-file stake_owner2.vkey
–pool-owner-stake-verification-key-file stake_owner3.vkey
–mainnet
–single-host-pool-relay relay1.mydomain.com
–pool-relay-port 6000
–metadata-url http://www.mydomain.com/poolMetaData.json
–metadata-hash $(cat poolMetaDataHash.txt)
–out-file pool.cert

OFFLINE

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

OFFLINE

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

OFFLINE

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

OFFLINE

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

currentSlot=$(cardano-cli query tip --mainnet | jq -r ‘.slot’)
echo Current Slot: $currentSlot

cardano-cli query utxo
–address $(cat payment.addr)
–mainnet > fullUtxo.out

tail -n +3 fullUtxo.out | sort -k3 -nr > balance.out

cat balance.out

tx_in=“”
total_balance=0
while read -r utxo; do
in_addr=$(awk ‘{ print $1 }’ <<< “${utxo}”)
idx=$(awk ‘{ print $2 }’ <<< “${utxo}”)
utxo_balance=$(awk ‘{ print $3 }’ <<< “${utxo}”)
total_balance=$((${total_balance}+${utxo_balance}))
echo TxHash: ${in_addr}#${idx}
echo ADA: ${utxo_balance}
tx_in=“${tx_in} --tx-in ${in_addr}#${idx}”
done < balance.out
txcnt=$(cat balance.out | wc -l)
echo Total ADA balance: ${total_balance}
echo Number of UTXOs: ${txcnt}

stakePoolDeposit=$(cat $NODE_HOME/params.json | jq -r ‘.stakePoolDeposit’)
echo stakePoolDeposit: $stakePoolDeposit

cardano-cli transaction build-raw
${tx_in}
–tx-out $(cat payment.addr)+$(( ${total_balance} - ${stakePoolDeposit}))
–invalid-hereafter $(( ${currentSlot} + 10000))
–fee 0
–certificate-file pool.cert
–certificate-file deleg.cert
–certificate-file deleg_owner1.cert
–certificate-file deleg_owner2.cert
–certificate-file deleg_owner3.cert
–out-file tx.tmp

fee=$(cardano-cli transaction calculate-min-fee
–tx-body-file tx.tmp
–tx-in-count ${txcnt}
–tx-out-count 1
–mainnet
–witness-count 3
–byron-witness-count 0
–protocol-params-file params.json | awk ‘{ print $1 }’)
echo fee: $fee

txOut=$((${total_balance}-${stakePoolDeposit}-${fee}))
echo txOut: ${txOut}

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

OFFLINE

cardano-cli transaction sign
–tx-body-file tx.raw
–signing-key-file payment.skey
–signing-key-file $HOME/cold-keys/node.skey
–signing-key-file stake.skey
–signing-key-file stake_owner1.skey
–signing-key-file stake_owner2.skey
–signing-key-file stake_owner3.skey
–mainnet
–out-file tx.signed

cardano-cli transaction submit
–tx-file tx.signed
–mainnet

I can confirm that the 3 hashes appearing in the error (XXX, YYY, ZZZ) belong to the delegation certificates of the 3 owners but the hash of the pool wallet’s certificate (deleg.cert) doesn’t appear in the error.
For the FeeTooSmal error, I tried repeating all the step up to the calculation of the fee then manually replaced the ${fee} variable with the higher value displayed in the error in the transaction build-raw command but without success

What am I missing? What am I doing wrong?

1 Like

I didn’t know that channel for support.
So you think they can help?
Is it a SPOs community or the people behind Yoroi?
Thanks

1 Like

Just ignore Rio33. He’s a spam bot.

Thanks Jeremy. He sounded fishy anyway.

This issue seems to relate to your fee too small error. But it didn’t get a resolution [BUG] - FeeTooSmallUTxO when using the fee provided by `calculate-min-fee` · Issue #1529 · input-output-hk/cardano-node · GitHub
[BUG] - FeeTooSmallUTxO when registering the pool · Issue #2335 · input-output-hk/cardano-node · GitHub

Yes I read that bug report but it wasn’t helpful.
I was hoping that someone from the community more savvy or who experienced the same issue could help me resolve my problem.

I believe the pool certificate must be witnessed too. The stake address for pools rewards does not need to get witnessed. Your fee calculation may work when you set the witness count to 4 instead of 3.

In any case, the error message tells you that you need to provide >= 215441 Lovelace for fees - if you use that number it’ll likely work.

PS: You realize that the rewards for all 3 owners will go to a single reward address? You need to have an off-chain agreement that deals with how has access to that address and how the rewards are divided up again.

Thanks Tom,
I have tried to manually set the fee to 215441 and increased the witness count to 4 but not at the same time. It wasn’t successful. The DelegsFailure errors remained though.
I’ll try both in the same command this evening and see what happens. Someone even advise to use a witness count of 5 in my case.

The error msg should tell you, how much lovelace is needed

Thanks guys, I successfully achieved what I wanted by using witness-count 5 (without manually setting the fee) but the most important issue was related to the DelegsFailure which had to be solved by registering the stake addresses of each owner wallet by making the pool wallet pay for their deposits and fees.
Expect me to publish a guide soon.

1 Like

Yes I’m aware of that. It’s exactly what we agreed on.

1 Like

Hello, so have you actually made a guide? Because we are facing the similar issue now.

HI Sidou,

Please guide us how you resolved the issue as we are facing the same issue at our testnet.

In order to register a stake pool, register the pledge wallet’s stake key and delegate it to the stake pool in one transaction, you need to create the transaction like this (replace the file names and paths with your correct values - the magic “1” is for the new preprod network):

NETWORK_WITH_MAGIC="--testnet-magic 1"
CARDANO_NODE_SOCKET_PATH=/opt/cardano-cnode/db/node.socket

ADDRESS=$(cat payment-0.addr)
TRANS=$(cardano-cli query utxo ${NETWORK_WITH_MAGIC} --address $ADDRESS | tail -n 1)
UTXO=$(echo ${TRANS} | awk '{print $1}')
ID=$(echo ${TRANS} | awk '{print $2}')
TXIN="${UTXO}#${ID}"

cardano-cli transaction build \
${NETWORK_WITH_MAGIC} \
--witness-override 3 \
--tx-in ${TXIN} \
--change-address ${ADDRESS} \
--certificate-file pool-registration.cert \
--certificate-file stake-registration.cert \
--certificate-file delegation.cert \
--out-file tx.raw

cardano-cli transaction sign \
--tx-body-file tx.raw \
--signing-key-file cold.skey \
--signing-key-file stake.skey \
--signing-key-file payment-0.skey \
${NETWORK_WITH_MAGIC} \
--out-file tx.signed

cardano-cli transaction submit \
--tx-file tx.signed \
${NETWORK_WITH_MAGIC}
1 Like

Thank you. This is what I was looking for.

NETWORK_WITH_MAGIC=“–testnet-magic 1”

1 Like