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
Update cli build command to calculate Plutus script cost #3589
Conversation
11138da
to
4865975
Compare
4865975
to
29fda4f
Compare
29fda4f
to
0a369ce
Compare
output the plutus script cost in execution units and Lovelace
0a369ce
to
6c8359c
Compare
bors r+ |
3587: Bump ledger and network dependencies r=denisshevchenko a=nc6 The changes here come from a few areas: - Refactoring of the ledger code to move the protocol concerns into their own package. - Some additional errors for Plutus scripts (not yet enabled). - Additional ledger events. - Remove ToJSON instances which have now migrated to the ledger codebase. - Change `TxIx` to be a `Word16`, which is its new bound in Shelley+ eras. This also incorporates `@bolt12's` changes from #3561. 3589: Update cli build command to calculate Plutus script cost r=Jimbo4350 a=Jimbo4350 Resolves: #3590 We introduce the following change: ``` cardano-cli transaction build ... (--out-file FILE | --calculate-plutus-script-cost FILE) ``` If you are only interested in the script cost, specify the `--calculate-plutus-script-cost` option. Example: ``` $CARDANO_CLI transaction build \ --alonzo-era \ --cardano-mode \ --testnet-magic "$TESTNET_MAGIC" \ --change-address "$utxoaddr" \ --tx-in "$plutusutxotxin" \ --tx-in-collateral "$txinCollateral" \ --tx-out "$dummyaddress+10000000" \ --tx-in-script-file "$plutusscriptinuse" \ --tx-in-datum-file "$datumfilepath" \ --protocol-params-file "$WORK/pparams.json" \ --tx-in-redeemer-file "$redeemerfilepath" \ --calculate-plutus-script-cost "$WORK/create-datum-output.scriptcost" > cat $WORK/create-datum-output.scriptcost [ { "executionUnits": { "memory": 1700, "steps": 476468 }, "lovelaceCost": 133, "scriptHash": "67f33146617a5e61936081db3b2117cbf59bd2123748f58ac9678656" } ] ``` Co-authored-by: Nicholas Clarke <nick@topos.org.uk> Co-authored-by: Armando Santos <armandoifsantos@gmail.com> Co-authored-by: Jordan Millar <jordan.millar@iohk.io>
This PR was included in a batch that was canceled, it will be automatically retried |
bors r+ |
Already running a review |
3589: Update cli build command to calculate Plutus script cost r=Jimbo4350 a=Jimbo4350 Resolves: #3590 We introduce the following change: ``` cardano-cli transaction build ... (--out-file FILE | --calculate-plutus-script-cost FILE) ``` If you are only interested in the script cost, specify the `--calculate-plutus-script-cost` option. Example: ``` $CARDANO_CLI transaction build \ --alonzo-era \ --cardano-mode \ --testnet-magic "$TESTNET_MAGIC" \ --change-address "$utxoaddr" \ --tx-in "$plutusutxotxin" \ --tx-in-collateral "$txinCollateral" \ --tx-out "$dummyaddress+10000000" \ --tx-in-script-file "$plutusscriptinuse" \ --tx-in-datum-file "$datumfilepath" \ --protocol-params-file "$WORK/pparams.json" \ --tx-in-redeemer-file "$redeemerfilepath" \ --calculate-plutus-script-cost "$WORK/create-datum-output.scriptcost" > cat $WORK/create-datum-output.scriptcost [ { "executionUnits": { "memory": 1700, "steps": 476468 }, "lovelaceCost": 133, "scriptHash": "67f33146617a5e61936081db3b2117cbf59bd2123748f58ac9678656" } ] ``` 3593: Update MissingScript error in evaluateTransactionExecutionUnits r=Jimbo4350 a=Jimbo4350 Co-authored-by: Jordan Millar <jordan.millar@iohk.io>
This PR was included in a batch that successfully built, but then failed to merge into master (it was a non-fast-forward update). It will be automatically retried. |
bors r+ |
Already running a review |
Build succeeded: |
Hi for some reason i am getting "Invalid option `--calculate-plutus-script-cost'" chakravarti@chakravarti-Latitude-7280:~/CrowdFundingCardanoPlutus/shell-scripts$ cardano-cli transaction build --babbage-era --cardano-mode --testnet-magic 2 \
Usage: cardano-cli |
Resolves: #3590
We introduce the following change:
If you are only interested in the script cost, specify the
--calculate-plutus-script-cost
option.Example: