"error in $: key \"decentralization\" not found" when trying to reregister pool to update relay

Hello, I’m following CoinCashews guide here, I have created a new deleg.cert and pool.cert and am now preparing the transaction to update. When I run:

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

Which seems wrong, I want it to be zero as it’s updating an existing pool so I set the StakePoolDeposit value = 0

But when I am calculating the transaction, I run this and get the output at the end:
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}

Command failed: transaction calculate-min-fee Error: Error while decoding the protocol parameters at: “params.json” Error: "Error in $: key “decentralization” not found"

Looks like params.json is missing a value but I’m unaware of this value or it’s need. I’ve never manipulated this file.

Hi!

So what is the command which is failing?

after I run this I get the error. Should I just update my params.json file?

Can I run this safely and then re-run the transaction calculation steps?
cardano-cli query protocol-parameters
–mainnet
–out-file params.json

this is the actual protocol.json, so update it, if you have different one:

{
    "txFeePerByte": 44,
    "minUTxOValue": 1000000,
    "stakePoolDeposit": 500000000,
    "decentralization": 0,
    "poolRetireMaxEpoch": 18,
    "extraPraosEntropy": null,
    "stakePoolTargetNum": 500,
    "maxBlockBodySize": 65536,
    "maxTxSize": 16384,
    "treasuryCut": 0.2,
    "minPoolCost": 340000000,
    "maxBlockHeaderSize": 1100,
    "protocolVersion": {
        "minor": 0,
        "major": 4
    },
    "txFeeFixed": 155381,
    "stakeAddressDeposit": 2000000,
    "monetaryExpansion": 3.0e-3,
    "poolPledgeInfluence": 0.3
}

If that command writes out that message means that something is wrong in previous commands.
What is the output of the first command:

cardano-cli query utxo --address $(cat payment.addr) --mainnet

Thank you!!! the

echo Number of UTXOs: ${txcnt}
lists: 2
and then the
cardano-cli query utxo --address $(cat payment.addr) --mainnet
shows how much lovelace is there in two seperate transactions.

then, still not clear which command produce this error output…

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

if you open the protocol.json file do you have this field?

Thanks Laplasz, I did it was set at 0.1. Do the protocol.json or params.json need to be updated with the different releases?

sometimes it is needed, yes…
so working now?

it is! Thanks for you help. I have to update the cardano-cli on my cold machine but I’ll get that squared.

ahh so you updated the cardano executables?

correct, I’ve updated the cardano executables probably from 1.26.01, 1.26.03 and to 1.27.0 without making any updates/changes to the protocol or params json files.

1 Like

hmm, then maybe worth to mark this as solution!