Describe the bug
The following command fail with an error. Is there a transactionId needed when using an account input?
jcli transaction make-witness --genesis-block-hash 6dffe1c5355bdd29553ff429b46bbe5ba87a5f29d972f7cd5a25229e6dd1950e --type account --account-spending-counter 0 witness receiver_secret.key
**error**: Invalid value for '<transaction-id>': invalid hex encoding for digest value
Mandatory Information
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Successful creation of witness
Additional context
-
It is missing a step.
After step 5. finalize you need to get the data-for-witness (also known before as transaction-id).
Ex: if you have the transaction saved in a file named ex: file.tx you can retrieve that info by:
jcli transaction data-for-witness --staging file.tx
It will output smth like this:
260d1f43854062f558036da376196a35ecf482515dbe88ba4d8109bbdf34c52c
Then change your initial command to:
jcli transaction make-witness 260d1f43854062f558036da376196a35ecf482515dbe88ba4d8109bbdf34c52c --genesis-block-hash 6dffe1c5355bdd29553ff429b46bbe5ba87a5f29d972f7cd5a25229e6dd1950e --type account --account-spending-counter 0 witness receiver_secret.key
So the steps would be:
Can you point me to the source from where you got the information, so we can fix it? Thanks
Thank you rinor. Now it is working.
I was following the steps on:
https://input-output-hk.github.io/jormungandr/jcli/transaction.html
Also the faucet-send-money.sh is missing the data-for-witness step. Which leads to a DEPRECATED message output, because it is using the transactionID.
# Create the transaction
$CLI transaction new --staging ${STAGING_FILE}
$CLI transaction add-account "${FAUCET_ADDR}" "${ACCOUNT_AMOUNT}" --staging "${STAGING_FILE}"
$CLI transaction add-output "${DESTINATION_ADDRESS}" "${DESTINATION_AMOUNT}" --staging "${STAGING_FILE}"
$CLI transaction finalize --staging ${STAGING_FILE}
TRANSACTION_ID=$($CLI transaction id --staging ${STAGING_FILE})
# Create the witness for the 1 input (add-account) and add it
WITNESS_SECRET_FILE="witness.secret.$$"
WITNESS_OUTPUT_FILE="witness.out.$$"
printf "${FAUCET_SK}" > ${WITNESS_SECRET_FILE}
$CLI transaction make-witness ${TRANSACTION_ID} \
--genesis-block-hash ${BLOCK0_HASH} \
--type "account" --account-spending-counter "${FAUCET_COUNTER}" \
${WITNESS_OUTPUT_FILE} ${WITNESS_SECRET_FILE}
$CLI transaction add-witness ${WITNESS_OUTPUT_FILE} --staging "${STAGING_FILE}"
rm ${WITNESS_SECRET_FILE} ${WITNESS_OUTPUT_FILE}
# Finalize the transaction and send it
$CLI transaction seal --staging "${STAGING_FILE}"
$CLI transaction to-message --staging "${STAGING_FILE}" | $CLI rest v0 message post -h "${REST_URL}"
rm ${STAGING_FILE}
Thank you. Indeed the docs needs to be updated.
Regarding DEPRECATED message, right now both commands:
jcli transaction data-for-witness and jcli transaction id do the same thing.
It was changed from id to data-for-witness to reflect what it really does.
id was kept back with deprecated message just to not break the existings scripts around.
Please do not close this issue yet, until the docs are updated. Thank you.
When updating the docs, there is another spelling error here:
https://input-output-hk.github.io/jormungandr/stake_pool/delegating_stake.html
jcli certificate new owned-stake-delegation STAKE_POOL_ID > stake_delegation.cert
should be
owner-stake-delegation
Great job @rinor
Most helpful comment
When updating the docs, there is another spelling error here:
https://input-output-hk.github.io/jormungandr/stake_pool/delegating_stake.html
jcli certificate new owned-stake-delegation STAKE_POOL_ID > stake_delegation.certshould be
owner-stake-delegation