-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect script budget estimation when minting assets and autobalancing a transaction #614
Comments
This comment was marked as off-topic.
This comment was marked as off-topic.
Needs to be tested again after CLI release for node 8.10, since it changes fee calculation: #680 |
More reproduction examples from @perturbing https://github.com/perturbing/CIP-1694-gov-tool/blob/main/x509-cert-example/e2e.md |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
The error on node 8.9.0:
|
The issue is still reproducible on cardano-node 9.1.0, built from e9ab511272a7694196778007211991a9984557e8
|
Minimal script which can be used to reproduce an issue using #!/bin/bash
function cardano-cli() {
cabal exec cardano-cli -- "$@"
}
workdir=/home/mgalazyn/workspace/iohk/CIP-1694-gov-tool/x509-cert-example/orchestrator
orch_addr=$(cat $workdir/orchestrator.addr)
ROOT=/home/mgalazyn/workspace/iohk/CIP-1694-gov-tool/local-testnet/example
export CARDANO_NODE_SOCKET_PATH=${ROOT}/node-spo1/node.sock
cabal build cardano-cli
function mint_send() {
cardano-cli -- conway transaction build --testnet-magic 42 \
--tx-in "$(cardano-cli query utxo --address "$orch_addr" --testnet-magic 42 --out-file /dev/stdout | jq -r 'keys[0]')" \
--tx-in-collateral "$(cardano-cli query utxo --address "$orch_addr" --testnet-magic 42 --out-file /dev/stdout | jq -r 'keys[0]')" \
--mint "1 $(cat $workdir/coldAlwaysTrueMint.pol).4964656e74697479204e4654" \
--tx-out $(cat $workdir/coldLockScript.addr)+5000000"$2" \
--change-address $orch_addr \
--mint-script-file CIP-1694-gov-tool/assets/V3/coldAlwaysTrueMint.plutus --mint-redeemer-value {} \
--calculate-plutus-script-cost $1
# --tx-out-inline-datum-file CIP-1694-gov-tool/assets/datums/initColdLockScriptDatum.json \
}
# failing one
mint_send "cost.fail.json" "" &> fail.log
# succeeding one
mint_send "cost.succeeding.json" "+1 $(cat $workdir/coldAlwaysTrueMint.pol).4964656e74697479204e4654" &> success.log |
Description
Currently, the
build
command does not resolve the correct CPU/Mem budgets if a tx is minting an asset, but the asset is not explicitly added as an output in the build command.Steps to Reproduce
That is,
creates an invalid tx without failure (it fails upon sending it to the node with incorrect cpu/mem budget), while
does work.
Additional Context
I used node 8.8.0-pre. Furthermore, If I view the
tx.fails
The build command does add the asset as an output to the change address.
Possible Solution
Either log that explicit adding of the minted asset is required, or resolve the correct budget.
The text was updated successfully, but these errors were encountered: