From 0958620a26759050fc5b05693d335cea477c0ba7 Mon Sep 17 00:00:00 2001 From: Evgenii Akentev Date: Tue, 10 May 2022 14:04:36 +0400 Subject: [PATCH 1/3] SCP-3855: update node dep (#449) * Update Cardano node et al. dependencies for the Vasil HF * The Cardano node version will only work on a network with the Vasil release. * Solve some compile issues * wip: recovering instances for types from plutus-ledger-api * wip * plutus-ledger compiles * plutus-ledger-constraints compiles * Fixed warnings in Ledger.Tx.CardanoAPI for fields introduced by the Babbage era. Also adapted hashing functions for PlutusV1 scripts to work on PlutusV2 * Fixed warnings in Ledger.Tx.CardanoAPITemp and added implementation to undefined value * plutus-contract compiles * Added alonzoGenesisDefaults implementation (copied from cardano-node because it was deleted over there) to Ledger.Validation * plutus-chain-index-core compiles * Fixed compilation errors in playground-common and plutus-contract * Fix compile errors in plutus-example * Fix compile errors in plutus-pab * Fix compile errors in plutus-playground-server * WIP on plutus-use-cases * Split Tx.Orphans into multiple Orphans * Fix compilation errors on plutus-use-cases * fix compilation issues * Update nix * fix formatting * Remove wrongly commited files * Update purescript modules * Commented test on plutus-ledger temporarely until cardano-node is updated * Update cardano-wallet with fixes for haddock * Fix plutus-playground-client purescript imports * Fix warnings in plutus-example * Fix plutus-uniswap cabal * Try to turn-off haddock for cardano-wallet * [plutus-contract]: fix golden tests and commented test until cardano-node is updated * Add cardano-cli/.../genesis.alonzo.spec.json to fix plutus-example * Fix comment link to PR * Comment out the test properly * Update scripts/protocol-parameters with fresh plutusV1 cost parameters Co-authored-by: Konstantinos Lambrou-Latreille --- .../golden/alonzo/genesis.alonzo.spec.json | 194 ++++++++++++++++++ 1 file changed, 194 insertions(+) create mode 100644 cardano-cli/test/data/golden/alonzo/genesis.alonzo.spec.json diff --git a/cardano-cli/test/data/golden/alonzo/genesis.alonzo.spec.json b/cardano-cli/test/data/golden/alonzo/genesis.alonzo.spec.json new file mode 100644 index 0000000000..cf8e5ef324 --- /dev/null +++ b/cardano-cli/test/data/golden/alonzo/genesis.alonzo.spec.json @@ -0,0 +1,194 @@ +{ + "lovelacePerUTxOWord": 34482, + "executionPrices": { + "prSteps": { + "numerator": 721, + "denominator": 10000000 + }, + "prMem": { + "numerator": 577, + "denominator": 10000 + } + }, + "maxTxExUnits": { + "exUnitsMem": 10000000, + "exUnitsSteps": 10000000000 + }, + "maxBlockExUnits": { + "exUnitsMem": 50000000, + "exUnitsSteps": 40000000000 + }, + "maxValueSize": 5000, + "collateralPercentage": 150, + "maxCollateralInputs": 3, + "costModels": { + "PlutusV1": { + "sha2_256-memory-arguments": 4, + "equalsString-cpu-arguments-constant": 1000, + "cekDelayCost-exBudgetMemory": 100, + "lessThanEqualsByteString-cpu-arguments-intercept": 103599, + "divideInteger-memory-arguments-minimum": 1, + "appendByteString-cpu-arguments-slope": 621, + "blake2b-cpu-arguments-slope": 29175, + "iData-cpu-arguments": 150000, + "encodeUtf8-cpu-arguments-slope": 1000, + "unBData-cpu-arguments": 150000, + "multiplyInteger-cpu-arguments-intercept": 61516, + "cekConstCost-exBudgetMemory": 100, + "nullList-cpu-arguments": 150000, + "equalsString-cpu-arguments-intercept": 150000, + "trace-cpu-arguments": 150000, + "mkNilData-memory-arguments": 32, + "lengthOfByteString-cpu-arguments": 150000, + "cekBuiltinCost-exBudgetCPU": 29773, + "bData-cpu-arguments": 150000, + "subtractInteger-cpu-arguments-slope": 0, + "unIData-cpu-arguments": 150000, + "consByteString-memory-arguments-intercept": 0, + "divideInteger-memory-arguments-slope": 1, + "divideInteger-cpu-arguments-model-arguments-slope": 118, + "listData-cpu-arguments": 150000, + "headList-cpu-arguments": 150000, + "chooseData-memory-arguments": 32, + "equalsInteger-cpu-arguments-intercept": 136542, + "sha3_256-cpu-arguments-slope": 82363, + "sliceByteString-cpu-arguments-slope": 5000, + "unMapData-cpu-arguments": 150000, + "lessThanInteger-cpu-arguments-intercept": 179690, + "mkCons-cpu-arguments": 150000, + "appendString-memory-arguments-intercept": 0, + "modInteger-cpu-arguments-model-arguments-slope": 118, + "ifThenElse-cpu-arguments": 1, + "mkNilPairData-cpu-arguments": 150000, + "lessThanEqualsInteger-cpu-arguments-intercept": 145276, + "addInteger-memory-arguments-slope": 1, + "chooseList-memory-arguments": 32, + "constrData-memory-arguments": 32, + "decodeUtf8-cpu-arguments-intercept": 150000, + "equalsData-memory-arguments": 1, + "subtractInteger-memory-arguments-slope": 1, + "appendByteString-memory-arguments-intercept": 0, + "lengthOfByteString-memory-arguments": 4, + "headList-memory-arguments": 32, + "listData-memory-arguments": 32, + "consByteString-cpu-arguments-intercept": 150000, + "unIData-memory-arguments": 32, + "remainderInteger-memory-arguments-minimum": 1, + "bData-memory-arguments": 32, + "lessThanByteString-cpu-arguments-slope": 248, + "encodeUtf8-memory-arguments-intercept": 0, + "cekStartupCost-exBudgetCPU": 100, + "multiplyInteger-memory-arguments-intercept": 0, + "unListData-memory-arguments": 32, + "remainderInteger-cpu-arguments-model-arguments-slope": 118, + "cekVarCost-exBudgetCPU": 29773, + "remainderInteger-memory-arguments-slope": 1, + "cekForceCost-exBudgetCPU": 29773, + "sha2_256-cpu-arguments-slope": 29175, + "equalsInteger-memory-arguments": 1, + "indexByteString-memory-arguments": 1, + "addInteger-memory-arguments-intercept": 1, + "chooseUnit-cpu-arguments": 150000, + "sndPair-cpu-arguments": 150000, + "cekLamCost-exBudgetCPU": 29773, + "fstPair-cpu-arguments": 150000, + "quotientInteger-memory-arguments-minimum": 1, + "decodeUtf8-cpu-arguments-slope": 1000, + "lessThanInteger-memory-arguments": 1, + "lessThanEqualsInteger-cpu-arguments-slope": 1366, + "fstPair-memory-arguments": 32, + "modInteger-memory-arguments-intercept": 0, + "unConstrData-cpu-arguments": 150000, + "lessThanEqualsInteger-memory-arguments": 1, + "chooseUnit-memory-arguments": 32, + "sndPair-memory-arguments": 32, + "addInteger-cpu-arguments-intercept": 197209, + "decodeUtf8-memory-arguments-slope": 8, + "equalsData-cpu-arguments-intercept": 150000, + "mapData-cpu-arguments": 150000, + "mkPairData-cpu-arguments": 150000, + "quotientInteger-cpu-arguments-constant": 148000, + "consByteString-memory-arguments-slope": 1, + "cekVarCost-exBudgetMemory": 100, + "indexByteString-cpu-arguments": 150000, + "unListData-cpu-arguments": 150000, + "equalsInteger-cpu-arguments-slope": 1326, + "cekStartupCost-exBudgetMemory": 100, + "subtractInteger-cpu-arguments-intercept": 197209, + "divideInteger-cpu-arguments-model-arguments-intercept": 425507, + "divideInteger-memory-arguments-intercept": 0, + "cekForceCost-exBudgetMemory": 100, + "blake2b-cpu-arguments-intercept": 2477736, + "remainderInteger-cpu-arguments-constant": 148000, + "tailList-cpu-arguments": 150000, + "encodeUtf8-cpu-arguments-intercept": 150000, + "equalsString-cpu-arguments-slope": 1000, + "lessThanByteString-memory-arguments": 1, + "multiplyInteger-cpu-arguments-slope": 11218, + "appendByteString-cpu-arguments-intercept": 396231, + "lessThanEqualsByteString-cpu-arguments-slope": 248, + "modInteger-memory-arguments-slope": 1, + "addInteger-cpu-arguments-slope": 0, + "equalsData-cpu-arguments-slope": 10000, + "decodeUtf8-memory-arguments-intercept": 0, + "chooseList-cpu-arguments": 150000, + "constrData-cpu-arguments": 150000, + "equalsByteString-memory-arguments": 1, + "cekApplyCost-exBudgetCPU": 29773, + "quotientInteger-memory-arguments-slope": 1, + "verifySignature-cpu-arguments-intercept": 3345831, + "unMapData-memory-arguments": 32, + "mkCons-memory-arguments": 32, + "sliceByteString-memory-arguments-slope": 1, + "sha3_256-memory-arguments": 4, + "ifThenElse-memory-arguments": 1, + "mkNilPairData-memory-arguments": 32, + "equalsByteString-cpu-arguments-slope": 247, + "appendString-cpu-arguments-intercept": 150000, + "quotientInteger-cpu-arguments-model-arguments-slope": 118, + "cekApplyCost-exBudgetMemory": 100, + "equalsString-memory-arguments": 1, + "multiplyInteger-memory-arguments-slope": 1, + "cekBuiltinCost-exBudgetMemory": 100, + "remainderInteger-memory-arguments-intercept": 0, + "sha2_256-cpu-arguments-intercept": 2477736, + "remainderInteger-cpu-arguments-model-arguments-intercept": 425507, + "lessThanEqualsByteString-memory-arguments": 1, + "tailList-memory-arguments": 32, + "mkNilData-cpu-arguments": 150000, + "chooseData-cpu-arguments": 150000, + "unBData-memory-arguments": 32, + "blake2b-memory-arguments": 4, + "iData-memory-arguments": 32, + "nullList-memory-arguments": 32, + "cekDelayCost-exBudgetCPU": 29773, + "subtractInteger-memory-arguments-intercept": 1, + "lessThanByteString-cpu-arguments-intercept": 103599, + "consByteString-cpu-arguments-slope": 1000, + "appendByteString-memory-arguments-slope": 1, + "trace-memory-arguments": 32, + "divideInteger-cpu-arguments-constant": 148000, + "cekConstCost-exBudgetCPU": 29773, + "encodeUtf8-memory-arguments-slope": 8, + "quotientInteger-cpu-arguments-model-arguments-intercept": 425507, + "mapData-memory-arguments": 32, + "appendString-cpu-arguments-slope": 1000, + "modInteger-cpu-arguments-constant": 148000, + "verifySignature-cpu-arguments-slope": 1, + "unConstrData-memory-arguments": 32, + "quotientInteger-memory-arguments-intercept": 0, + "equalsByteString-cpu-arguments-constant": 150000, + "sliceByteString-memory-arguments-intercept": 0, + "mkPairData-memory-arguments": 32, + "equalsByteString-cpu-arguments-intercept": 112536, + "appendString-memory-arguments-slope": 1, + "lessThanInteger-cpu-arguments-slope": 497, + "modInteger-cpu-arguments-model-arguments-intercept": 425507, + "modInteger-memory-arguments-minimum": 1, + "sha3_256-cpu-arguments-intercept": 0, + "verifySignature-memory-arguments": 1, + "cekLamCost-exBudgetMemory": 100, + "sliceByteString-cpu-arguments-intercept": 150000 + } + } +} \ No newline at end of file From 5545ad172eb77b77f14e630352db1285e2ba402d Mon Sep 17 00:00:00 2001 From: Nicolas B Date: Tue, 11 Oct 2022 15:39:38 +0200 Subject: [PATCH 2/3] next-node is the new merge (ends PLT-558) (#745) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * SCP-3855: update node dep (#449) * Update Cardano node et al. dependencies for the Vasil HF * The Cardano node version will only work on a network with the Vasil release. * Solve some compile issues * wip: recovering instances for types from plutus-ledger-api * wip * plutus-ledger compiles * plutus-ledger-constraints compiles * Fixed warnings in Ledger.Tx.CardanoAPI for fields introduced by the Babbage era. Also adapted hashing functions for PlutusV1 scripts to work on PlutusV2 * Fixed warnings in Ledger.Tx.CardanoAPITemp and added implementation to undefined value * plutus-contract compiles * Added alonzoGenesisDefaults implementation (copied from cardano-node because it was deleted over there) to Ledger.Validation * plutus-chain-index-core compiles * Fixed compilation errors in playground-common and plutus-contract * Fix compile errors in plutus-example * Fix compile errors in plutus-pab * Fix compile errors in plutus-playground-server * WIP on plutus-use-cases * Split Tx.Orphans into multiple Orphans * Fix compilation errors on plutus-use-cases * fix compilation issues * Update nix * fix formatting * Remove wrongly commited files * Update purescript modules * Commented test on plutus-ledger temporarely until cardano-node is updated * Update cardano-wallet with fixes for haddock * Fix plutus-playground-client purescript imports * Fix warnings in plutus-example * Fix plutus-uniswap cabal * Try to turn-off haddock for cardano-wallet * [plutus-contract]: fix golden tests and commented test until cardano-node is updated * Add cardano-cli/.../genesis.alonzo.spec.json to fix plutus-example * Fix comment link to PR * Comment out the test properly * Update scripts/protocol-parameters with fresh plutusV1 cost parameters Co-authored-by: Konstantinos Lambrou-Latreille * [chain-index]: export all servant client functions (#492) * Fix playground client * Fix streaming * Fix purescript * Create separate directories for v1 and v2 plutus scripts (#486) * Reorganize the plutus-example library to distinguish clearly between V1 and V2 scripts. * plutus-example reorganization create v2 example script * Modify the ScriptContextChecker module to be more generic * Propagate the changes to the plutus-example apps and tests * Update required-redeemer.plutus to also check for an inline datum of 42 and to check for an inline datum of 42 in the reference inputs * Add PlutusV2 minting and staking scripts (#528) * [chain-index]: add inline datums support and update cardano-node (#488) * PLT-484 Upgraded cardano-node version to the official 1.35.0 release. (#551) * Also upgraded cardano-wallet, plutus et al. versions that work with v1.35.0 of the node. * Updated golden tests in plutus-use-cases and plutus-contract * Updated version of components to 1.0.0 with cardano-node (#560) * Updated the cardano-node bundled with plutus-apps to v1.35.0 * Updated version of all components in their respective cabal files to 1.0.0 * Update cardano-node dependency to 1.35.1 * Updated cardano-wallet, plutus and cardano-ledger to match the node version. * Add script equivalence context test for the V2 context. (#588) * Remove withIsCardanoEra workaround. (#607) * BlockInMode now carries a IsCardanoEra constraint * Increase the delay of awaiting in plutus-pab-executables tests (#565) Set slot's length to 1s for awaiting tx/out status tests to make them stable * [PLT-81] plutus-chain-index: support inline scripts when querying TxOut of a TxOutRef (#613) * Make plutus-ledger-api version explicit in Ledger.Tx * Make pattern match explicit * Reorder ScriptChainIndexTxOut fields To highlight they are the same as PublicKeyChainIndexTxOut. * Add datum to both branches of ChainIndexTxOut - Unfortunately we need to rename the fields because they have now different types. - In the PublicKeyChainIndexTxOut case, the output datum is optional and we can use plutus-ledger-api OutputDatum type. - In the ScriptChainIndexTxOut case, the output datum is required, nothing changes here but the name. * Add ReferenceScript to ChainIndexTxOut * Remove old comment * Rename _ciTxOutDatumPublicKey and _ciTxOutDatumScript into _ciTxOutPublicKeyDatum and _ciTxOutScriptDatum * Introduce fromReferenceScript * Add comments to ChainIndexTxOut * Add minting context equivalent test plutus script (#631) * Add missing record field `localTxMonitoringClient` (#617) * PLT-568: Switch to Babbage era (#614) * Make Babbage the default era for the emulator * Clean up * Accept changes in test output * Workaround for parseBabbageEraInCardanoModeTx * Fix minAda calculation * [next-node]: Bump wallet, plutus, ledger, node (#616) * Bump cardano-node to 1.35.2 and rest of dependencies based on cardano-wallet * Use '[TxIn]' instead of 'Set TxIn' in 'data Tx' (#623) * [plutus-ledger]: Use '[TxIn]' instead of 'Set TxIn' in 'data Tx'. * Add a property test to check Ord instances of TxIn. * Sort the inputs in fromOnChainTx * Sort the inputs in `Emulator.Wallet` * Fix the review notes and the problem with getInput in StateMachine tests * PLT-445 Add `mustReferencePubKeyOutput` in constraints library (#640) * PLT-445 Add mustReferencePubKeyOutput in constraints library * Added the mustReferencePubKeyOutput constraint in plutus-ledger-constraints * Added a test case for the mustReferencePubKeyOutput * Refactored Ledger.Tx.CardanoAPI to work with PlutusV2 alongside PlutusV1 scripts in the tx inputs. * Use existing unitRedeemer * Move TxIn and TxInType to Ledger.Tx * Add plutus version to ConsumeScriptAddress constructor * Add costModelParams for PlutusScriptV2 * Fix error codes. * Renamed mkTxInfo to mkPV1TxInfo, added test for plutus-tx-constraints without implementation and commented for now the off-chain validation in Ledger.Index * Implement reference inputs in makeTransactionBody' * Fixed failing test cases for Ledger.Constraints.mustReferencePubKeyOutput * Add MustUseOutputAsCollateral * Fix V2 tests. But issues with V1 tests. * Disable tests * WIP * Remove unused code * PR feedback * Remove unused code. * Clean up * Added additional info in TODO * Add Arbitrary instances * Convert plutus-ledger-constraint tests to PV2 * Fixed test in plutus-ledger-constraints * Fixed PS generator error in playground * Fix build * Fix PS * Fix PS * More support of plutus version in constraints libs * Default to PlutusV1 for now Co-authored-by: Sjoerd Visscher Co-authored-by: Sjoerd Visscher * Update cardano-node to 1.35.3-rc1 with deps (#647) * Upgraded to a cardano-wallet compatible with node 1.35.3-rc1 (#657) * Reorganized dependencies based on cardano-wallet's cabal.project * Added the new 'protocolParamUTxOCostPerByte' in 'Ledger.Params' which replaces 'protocolParamUTxOCostPerWord' * Fixed the `Plutus.Contract.Wallet.mkMintingRedeemers` which triggered an error if the redeemers in the tx contained spending redeemers. * Simplify MustReferencePubKeyOutput to MustReferenceOutput (#661) * Replace LedgerPlutusVersion with Language type (#662) * PLT-494: PlutusV2 TypedValidators (#666) * Move common code to Plutus.Script.Utils.Typed * Enable V2 TypedValidators * Enable and fix reference output tests * Update cardano-node 1.35.3-rc1 -> 1.35.3 (#669) * PLT-448: inline scripts in constraint libraries (#678) * Add inline script support to plutus-tx-constraints. * Add mustOutputInlineValidator and mustOutputInlineMintingPolicy * Add documentation * Check there's no inline script in V1 * Fix wrong minAdaTxOut use * Update renderGuess.txt * Naming * PLT-738: Include plutus language versions with scripts (#681) * Store Plutus language versions in chain-index * Introduce Versioned scripts Remove openapi3 as a dependency of plutus-script-utils * Add hashing for versioned scripts * PLT-454: mustUseOutputAsCollateral (#690) * Finish mustUseOutputAsCollateral implementation * Add testcase * Add documentation * Add missing fields to Ledger.Tx.Internal.Tx (#468) Add missing fields to Ledger.Tx.Internal.Tx. * Add certificates and withdrawals to Tx. * Move script witnesses to txScripts. * Modify TxIn type, rename to TxInput. * Put redeemers together with minting scripts. * Translate withdrawals in toCardanoTxBody. * Export redeemers for signing with wallet. * Add tests for mustIncludeDatum tx constraint (#700) * Add tests for mustIncludeDatum tx constraint (3 failing tests need fix) * run checks * Add tests for MustPayToPubKeyAddress tx constraint (#701) * Add tests for mustSpendScriptOutput and mustSpendScriptOutputWithMatchingDatumAndValue tx constraints (#706) * Add tests for mustSpendScriptOutput and mustSpendScriptOutputWithMatchingDatumAndValue tx constraints * Fixed the 'Ledger.Constraints.OffChain.typedValidatorLookups' lookup function so that it adds the validator inside the 'TypedValidator' in the 'slOtherScripts' lookup value. Co-authored-by: Konstantinos Lambrou-Latreille * plutus-contract emulator: Change the tx output representation of EmulatorTx to use Cardano.Api.TxOut (#698) * First draft done for plutus-ledger * plutus-ledger-constraints use Cardano.Tx * use C.Tx in plutus-tx-constraints * plutus-chain-index uses C.TxOut * Forgot to add file * Fixing my mess with CardanoAPI * encoding via plutus.TxOut (can't work, no NetworkId) * Fix code for the use cases * Fix a bug in balanceTx * Fix 0 ada outputs error * Dirty fix for the uniswap check * Use Cardano.Tx txId * fix uniswap test * Fix double satisfaction * Fix Marconi * Add TxOut typeclasses * Remove unused imports * Fix failing tests * Clean import * Fix pab * Fix golden values * Fix golden test * Fix more plutus packages * Rmove useless param from ChainIndex.Lib * Fik playground * Remove commented code * Include several fixes following Konstantinos' review * Add a Pretty TxOut and clean uniswap * Remove useless stuff in playground * error in generators display the original cause * Fix imports * prettier pretty * Fix golden tests * Fix uniswap * Fix golden tests * Restore deleted constraints * Integrate more Sjoerd's comments * Add tests for mustPayToOtherScript tx constraint (#710) * Add tests for mustPayToOtherScript tx constraint and 2 more for mustPayToPubKeyAddress * Fix failing test and reference two PLT tickets * Refactored MustMint tests to use minting policies and added tests for token burning (#719) * MustSpendScriptOutput and MustSpendScriptOutputWithMatchingDatumAndValue check the redeemer's presence (#723) * Add inline datum supports for mustPayToPubKey and mustPayToOtherScript (#721) * Incremental change for datum * Work but no inlining * First working inline datum with V2 * Add tests for inline datum * add smart constructors for inline datum * fix PAB * fixing tx-constraints * clean up tests * Address some of Konstantinos' comments * Separate test group for plutus v2 * Refactor tests in MustPayToPubKeyAddress to ease version handling * Code clean up * Code clean up * Fix unused imports * Add a way to switch to cardano constraints in MustPayToOtherAddress tests * more clean up * PR feedbacks * Remove dead code * Add refactoring for MustPayToOtherScript tests * typo * clean test suites * Clean up imports * Fix some false-positives MustSpendScriptOutput tests using versioned minting policies (#725) * Fix some false-positives MustSpendScriptOutput tests and refactor to use minting policies * Use Versioned MintingPolicy and add tests for V2 scripts for MustSpendScriptOutput * Further refactoring * Improve onchain check for MustSpendScriptOutput and MustSpendScriptOutputWithMatchingDatumAndValue constraints * tidy up onchain check * PLT-448: must spend script output with reference (#716) * Add ownAddress (singular) * Support reference scripts in TxIn * Add mustSpendScriptOutputWithReference * Test using reference scripts * Fix merge issues * Direct conversion from ChainIndexTxOut to the new TxOut * Push Versioned inside Either * Accept test outputs * Fix reference script support in ledger-constraints * Fix comments * Add ownAddress (singular) * Support reference scripts in TxIn * Add mustSpendScriptOutputWithReference * Test using reference scripts * Fix merge issues * Direct conversion from ChainIndexTxOut to the new TxOut * Push Versioned inside Either * Accept test outputs * Fix reference script support in ledger-constraints * Fix comments * PR feedback * More PR feedback * Fix merge issues * PLT-807 Change behavior of MustPayToPubKeyAddress and MustPayToOtherScript w.r.t datum in transaction body (#705) * Changed `MustPayToPubKeyAddress` and `MustPayToOtherScript` so that the user needs to explicitly specify if he wants: * the datum to only be included as a hash in the transaction output * the datum to be included as a hash in the transaction output as well as in the transaction body * the datum to be inlined in the transaction output * Changed the name of the constraint `MustIncludeDatum` to `MustIncludeDatumInTx` and `MustHashDatum` to `MustIncludeDatumInTxWithHash`. These constraint don't modify the transaction anymore, but simply check that the datum is part of the transaction body. * Added a note on the 'Plutus.Contract.Oracle' module explaining why it doesn't work in it's current form. * Commented out failing test cases in `plutus-use-cases` that use the 'Plutus.Contract.Oracle' module. * PLT-511: collateral output in chain index (#730) * Add collateral output support to chain index * Generate invalid transactions in tests too * PR feedback * PLT-990 Removed Plutus.Contract.Wallet.finalize as we instead set the validity range of a transaction directly in `plutus-ledger-constraints` (since we now have access to the `SlotConfig`) (#741) * Update the contributing guide (#729) Co-authored-by: Evgenii Akentev Co-authored-by: Konstantinos Lambrou-Latreille Co-authored-by: Jordan Millar Co-authored-by: Andrea Bedini Co-authored-by: Markus Läll Co-authored-by: Sjoerd Visscher Co-authored-by: Sjoerd Visscher Co-authored-by: Jamie Bertram Co-authored-by: Karol Ochman-Milarski <46135727+zmrocze@users.noreply.github.com> Co-authored-by: James <74595920+james-iohk@users.noreply.github.com> Co-authored-by: Ziyang Liu --- .../golden/alonzo/genesis.alonzo.spec.json | 194 ++++++++++++++++++ 1 file changed, 194 insertions(+) create mode 100644 cardano-cli/test/data/golden/alonzo/genesis.alonzo.spec.json diff --git a/cardano-cli/test/data/golden/alonzo/genesis.alonzo.spec.json b/cardano-cli/test/data/golden/alonzo/genesis.alonzo.spec.json new file mode 100644 index 0000000000..cf8e5ef324 --- /dev/null +++ b/cardano-cli/test/data/golden/alonzo/genesis.alonzo.spec.json @@ -0,0 +1,194 @@ +{ + "lovelacePerUTxOWord": 34482, + "executionPrices": { + "prSteps": { + "numerator": 721, + "denominator": 10000000 + }, + "prMem": { + "numerator": 577, + "denominator": 10000 + } + }, + "maxTxExUnits": { + "exUnitsMem": 10000000, + "exUnitsSteps": 10000000000 + }, + "maxBlockExUnits": { + "exUnitsMem": 50000000, + "exUnitsSteps": 40000000000 + }, + "maxValueSize": 5000, + "collateralPercentage": 150, + "maxCollateralInputs": 3, + "costModels": { + "PlutusV1": { + "sha2_256-memory-arguments": 4, + "equalsString-cpu-arguments-constant": 1000, + "cekDelayCost-exBudgetMemory": 100, + "lessThanEqualsByteString-cpu-arguments-intercept": 103599, + "divideInteger-memory-arguments-minimum": 1, + "appendByteString-cpu-arguments-slope": 621, + "blake2b-cpu-arguments-slope": 29175, + "iData-cpu-arguments": 150000, + "encodeUtf8-cpu-arguments-slope": 1000, + "unBData-cpu-arguments": 150000, + "multiplyInteger-cpu-arguments-intercept": 61516, + "cekConstCost-exBudgetMemory": 100, + "nullList-cpu-arguments": 150000, + "equalsString-cpu-arguments-intercept": 150000, + "trace-cpu-arguments": 150000, + "mkNilData-memory-arguments": 32, + "lengthOfByteString-cpu-arguments": 150000, + "cekBuiltinCost-exBudgetCPU": 29773, + "bData-cpu-arguments": 150000, + "subtractInteger-cpu-arguments-slope": 0, + "unIData-cpu-arguments": 150000, + "consByteString-memory-arguments-intercept": 0, + "divideInteger-memory-arguments-slope": 1, + "divideInteger-cpu-arguments-model-arguments-slope": 118, + "listData-cpu-arguments": 150000, + "headList-cpu-arguments": 150000, + "chooseData-memory-arguments": 32, + "equalsInteger-cpu-arguments-intercept": 136542, + "sha3_256-cpu-arguments-slope": 82363, + "sliceByteString-cpu-arguments-slope": 5000, + "unMapData-cpu-arguments": 150000, + "lessThanInteger-cpu-arguments-intercept": 179690, + "mkCons-cpu-arguments": 150000, + "appendString-memory-arguments-intercept": 0, + "modInteger-cpu-arguments-model-arguments-slope": 118, + "ifThenElse-cpu-arguments": 1, + "mkNilPairData-cpu-arguments": 150000, + "lessThanEqualsInteger-cpu-arguments-intercept": 145276, + "addInteger-memory-arguments-slope": 1, + "chooseList-memory-arguments": 32, + "constrData-memory-arguments": 32, + "decodeUtf8-cpu-arguments-intercept": 150000, + "equalsData-memory-arguments": 1, + "subtractInteger-memory-arguments-slope": 1, + "appendByteString-memory-arguments-intercept": 0, + "lengthOfByteString-memory-arguments": 4, + "headList-memory-arguments": 32, + "listData-memory-arguments": 32, + "consByteString-cpu-arguments-intercept": 150000, + "unIData-memory-arguments": 32, + "remainderInteger-memory-arguments-minimum": 1, + "bData-memory-arguments": 32, + "lessThanByteString-cpu-arguments-slope": 248, + "encodeUtf8-memory-arguments-intercept": 0, + "cekStartupCost-exBudgetCPU": 100, + "multiplyInteger-memory-arguments-intercept": 0, + "unListData-memory-arguments": 32, + "remainderInteger-cpu-arguments-model-arguments-slope": 118, + "cekVarCost-exBudgetCPU": 29773, + "remainderInteger-memory-arguments-slope": 1, + "cekForceCost-exBudgetCPU": 29773, + "sha2_256-cpu-arguments-slope": 29175, + "equalsInteger-memory-arguments": 1, + "indexByteString-memory-arguments": 1, + "addInteger-memory-arguments-intercept": 1, + "chooseUnit-cpu-arguments": 150000, + "sndPair-cpu-arguments": 150000, + "cekLamCost-exBudgetCPU": 29773, + "fstPair-cpu-arguments": 150000, + "quotientInteger-memory-arguments-minimum": 1, + "decodeUtf8-cpu-arguments-slope": 1000, + "lessThanInteger-memory-arguments": 1, + "lessThanEqualsInteger-cpu-arguments-slope": 1366, + "fstPair-memory-arguments": 32, + "modInteger-memory-arguments-intercept": 0, + "unConstrData-cpu-arguments": 150000, + "lessThanEqualsInteger-memory-arguments": 1, + "chooseUnit-memory-arguments": 32, + "sndPair-memory-arguments": 32, + "addInteger-cpu-arguments-intercept": 197209, + "decodeUtf8-memory-arguments-slope": 8, + "equalsData-cpu-arguments-intercept": 150000, + "mapData-cpu-arguments": 150000, + "mkPairData-cpu-arguments": 150000, + "quotientInteger-cpu-arguments-constant": 148000, + "consByteString-memory-arguments-slope": 1, + "cekVarCost-exBudgetMemory": 100, + "indexByteString-cpu-arguments": 150000, + "unListData-cpu-arguments": 150000, + "equalsInteger-cpu-arguments-slope": 1326, + "cekStartupCost-exBudgetMemory": 100, + "subtractInteger-cpu-arguments-intercept": 197209, + "divideInteger-cpu-arguments-model-arguments-intercept": 425507, + "divideInteger-memory-arguments-intercept": 0, + "cekForceCost-exBudgetMemory": 100, + "blake2b-cpu-arguments-intercept": 2477736, + "remainderInteger-cpu-arguments-constant": 148000, + "tailList-cpu-arguments": 150000, + "encodeUtf8-cpu-arguments-intercept": 150000, + "equalsString-cpu-arguments-slope": 1000, + "lessThanByteString-memory-arguments": 1, + "multiplyInteger-cpu-arguments-slope": 11218, + "appendByteString-cpu-arguments-intercept": 396231, + "lessThanEqualsByteString-cpu-arguments-slope": 248, + "modInteger-memory-arguments-slope": 1, + "addInteger-cpu-arguments-slope": 0, + "equalsData-cpu-arguments-slope": 10000, + "decodeUtf8-memory-arguments-intercept": 0, + "chooseList-cpu-arguments": 150000, + "constrData-cpu-arguments": 150000, + "equalsByteString-memory-arguments": 1, + "cekApplyCost-exBudgetCPU": 29773, + "quotientInteger-memory-arguments-slope": 1, + "verifySignature-cpu-arguments-intercept": 3345831, + "unMapData-memory-arguments": 32, + "mkCons-memory-arguments": 32, + "sliceByteString-memory-arguments-slope": 1, + "sha3_256-memory-arguments": 4, + "ifThenElse-memory-arguments": 1, + "mkNilPairData-memory-arguments": 32, + "equalsByteString-cpu-arguments-slope": 247, + "appendString-cpu-arguments-intercept": 150000, + "quotientInteger-cpu-arguments-model-arguments-slope": 118, + "cekApplyCost-exBudgetMemory": 100, + "equalsString-memory-arguments": 1, + "multiplyInteger-memory-arguments-slope": 1, + "cekBuiltinCost-exBudgetMemory": 100, + "remainderInteger-memory-arguments-intercept": 0, + "sha2_256-cpu-arguments-intercept": 2477736, + "remainderInteger-cpu-arguments-model-arguments-intercept": 425507, + "lessThanEqualsByteString-memory-arguments": 1, + "tailList-memory-arguments": 32, + "mkNilData-cpu-arguments": 150000, + "chooseData-cpu-arguments": 150000, + "unBData-memory-arguments": 32, + "blake2b-memory-arguments": 4, + "iData-memory-arguments": 32, + "nullList-memory-arguments": 32, + "cekDelayCost-exBudgetCPU": 29773, + "subtractInteger-memory-arguments-intercept": 1, + "lessThanByteString-cpu-arguments-intercept": 103599, + "consByteString-cpu-arguments-slope": 1000, + "appendByteString-memory-arguments-slope": 1, + "trace-memory-arguments": 32, + "divideInteger-cpu-arguments-constant": 148000, + "cekConstCost-exBudgetCPU": 29773, + "encodeUtf8-memory-arguments-slope": 8, + "quotientInteger-cpu-arguments-model-arguments-intercept": 425507, + "mapData-memory-arguments": 32, + "appendString-cpu-arguments-slope": 1000, + "modInteger-cpu-arguments-constant": 148000, + "verifySignature-cpu-arguments-slope": 1, + "unConstrData-memory-arguments": 32, + "quotientInteger-memory-arguments-intercept": 0, + "equalsByteString-cpu-arguments-constant": 150000, + "sliceByteString-memory-arguments-intercept": 0, + "mkPairData-memory-arguments": 32, + "equalsByteString-cpu-arguments-intercept": 112536, + "appendString-memory-arguments-slope": 1, + "lessThanInteger-cpu-arguments-slope": 497, + "modInteger-cpu-arguments-model-arguments-intercept": 425507, + "modInteger-memory-arguments-minimum": 1, + "sha3_256-cpu-arguments-intercept": 0, + "verifySignature-memory-arguments": 1, + "cekLamCost-exBudgetMemory": 100, + "sliceByteString-cpu-arguments-intercept": 150000 + } + } +} \ No newline at end of file From ed4733d1b0d980dfdc339b36418d57a90ee49342 Mon Sep 17 00:00:00 2001 From: Nicolas B Date: Tue, 11 Oct 2022 16:24:29 +0200 Subject: [PATCH 3/3] Revert "next-node is the new merge (ends PLT-558) (#745)" (#746) This reverts commit 5545ad172eb77b77f14e630352db1285e2ba402d. --- .../golden/alonzo/genesis.alonzo.spec.json | 194 ------------------ 1 file changed, 194 deletions(-) delete mode 100644 cardano-cli/test/data/golden/alonzo/genesis.alonzo.spec.json diff --git a/cardano-cli/test/data/golden/alonzo/genesis.alonzo.spec.json b/cardano-cli/test/data/golden/alonzo/genesis.alonzo.spec.json deleted file mode 100644 index cf8e5ef324..0000000000 --- a/cardano-cli/test/data/golden/alonzo/genesis.alonzo.spec.json +++ /dev/null @@ -1,194 +0,0 @@ -{ - "lovelacePerUTxOWord": 34482, - "executionPrices": { - "prSteps": { - "numerator": 721, - "denominator": 10000000 - }, - "prMem": { - "numerator": 577, - "denominator": 10000 - } - }, - "maxTxExUnits": { - "exUnitsMem": 10000000, - "exUnitsSteps": 10000000000 - }, - "maxBlockExUnits": { - "exUnitsMem": 50000000, - "exUnitsSteps": 40000000000 - }, - "maxValueSize": 5000, - "collateralPercentage": 150, - "maxCollateralInputs": 3, - "costModels": { - "PlutusV1": { - "sha2_256-memory-arguments": 4, - "equalsString-cpu-arguments-constant": 1000, - "cekDelayCost-exBudgetMemory": 100, - "lessThanEqualsByteString-cpu-arguments-intercept": 103599, - "divideInteger-memory-arguments-minimum": 1, - "appendByteString-cpu-arguments-slope": 621, - "blake2b-cpu-arguments-slope": 29175, - "iData-cpu-arguments": 150000, - "encodeUtf8-cpu-arguments-slope": 1000, - "unBData-cpu-arguments": 150000, - "multiplyInteger-cpu-arguments-intercept": 61516, - "cekConstCost-exBudgetMemory": 100, - "nullList-cpu-arguments": 150000, - "equalsString-cpu-arguments-intercept": 150000, - "trace-cpu-arguments": 150000, - "mkNilData-memory-arguments": 32, - "lengthOfByteString-cpu-arguments": 150000, - "cekBuiltinCost-exBudgetCPU": 29773, - "bData-cpu-arguments": 150000, - "subtractInteger-cpu-arguments-slope": 0, - "unIData-cpu-arguments": 150000, - "consByteString-memory-arguments-intercept": 0, - "divideInteger-memory-arguments-slope": 1, - "divideInteger-cpu-arguments-model-arguments-slope": 118, - "listData-cpu-arguments": 150000, - "headList-cpu-arguments": 150000, - "chooseData-memory-arguments": 32, - "equalsInteger-cpu-arguments-intercept": 136542, - "sha3_256-cpu-arguments-slope": 82363, - "sliceByteString-cpu-arguments-slope": 5000, - "unMapData-cpu-arguments": 150000, - "lessThanInteger-cpu-arguments-intercept": 179690, - "mkCons-cpu-arguments": 150000, - "appendString-memory-arguments-intercept": 0, - "modInteger-cpu-arguments-model-arguments-slope": 118, - "ifThenElse-cpu-arguments": 1, - "mkNilPairData-cpu-arguments": 150000, - "lessThanEqualsInteger-cpu-arguments-intercept": 145276, - "addInteger-memory-arguments-slope": 1, - "chooseList-memory-arguments": 32, - "constrData-memory-arguments": 32, - "decodeUtf8-cpu-arguments-intercept": 150000, - "equalsData-memory-arguments": 1, - "subtractInteger-memory-arguments-slope": 1, - "appendByteString-memory-arguments-intercept": 0, - "lengthOfByteString-memory-arguments": 4, - "headList-memory-arguments": 32, - "listData-memory-arguments": 32, - "consByteString-cpu-arguments-intercept": 150000, - "unIData-memory-arguments": 32, - "remainderInteger-memory-arguments-minimum": 1, - "bData-memory-arguments": 32, - "lessThanByteString-cpu-arguments-slope": 248, - "encodeUtf8-memory-arguments-intercept": 0, - "cekStartupCost-exBudgetCPU": 100, - "multiplyInteger-memory-arguments-intercept": 0, - "unListData-memory-arguments": 32, - "remainderInteger-cpu-arguments-model-arguments-slope": 118, - "cekVarCost-exBudgetCPU": 29773, - "remainderInteger-memory-arguments-slope": 1, - "cekForceCost-exBudgetCPU": 29773, - "sha2_256-cpu-arguments-slope": 29175, - "equalsInteger-memory-arguments": 1, - "indexByteString-memory-arguments": 1, - "addInteger-memory-arguments-intercept": 1, - "chooseUnit-cpu-arguments": 150000, - "sndPair-cpu-arguments": 150000, - "cekLamCost-exBudgetCPU": 29773, - "fstPair-cpu-arguments": 150000, - "quotientInteger-memory-arguments-minimum": 1, - "decodeUtf8-cpu-arguments-slope": 1000, - "lessThanInteger-memory-arguments": 1, - "lessThanEqualsInteger-cpu-arguments-slope": 1366, - "fstPair-memory-arguments": 32, - "modInteger-memory-arguments-intercept": 0, - "unConstrData-cpu-arguments": 150000, - "lessThanEqualsInteger-memory-arguments": 1, - "chooseUnit-memory-arguments": 32, - "sndPair-memory-arguments": 32, - "addInteger-cpu-arguments-intercept": 197209, - "decodeUtf8-memory-arguments-slope": 8, - "equalsData-cpu-arguments-intercept": 150000, - "mapData-cpu-arguments": 150000, - "mkPairData-cpu-arguments": 150000, - "quotientInteger-cpu-arguments-constant": 148000, - "consByteString-memory-arguments-slope": 1, - "cekVarCost-exBudgetMemory": 100, - "indexByteString-cpu-arguments": 150000, - "unListData-cpu-arguments": 150000, - "equalsInteger-cpu-arguments-slope": 1326, - "cekStartupCost-exBudgetMemory": 100, - "subtractInteger-cpu-arguments-intercept": 197209, - "divideInteger-cpu-arguments-model-arguments-intercept": 425507, - "divideInteger-memory-arguments-intercept": 0, - "cekForceCost-exBudgetMemory": 100, - "blake2b-cpu-arguments-intercept": 2477736, - "remainderInteger-cpu-arguments-constant": 148000, - "tailList-cpu-arguments": 150000, - "encodeUtf8-cpu-arguments-intercept": 150000, - "equalsString-cpu-arguments-slope": 1000, - "lessThanByteString-memory-arguments": 1, - "multiplyInteger-cpu-arguments-slope": 11218, - "appendByteString-cpu-arguments-intercept": 396231, - "lessThanEqualsByteString-cpu-arguments-slope": 248, - "modInteger-memory-arguments-slope": 1, - "addInteger-cpu-arguments-slope": 0, - "equalsData-cpu-arguments-slope": 10000, - "decodeUtf8-memory-arguments-intercept": 0, - "chooseList-cpu-arguments": 150000, - "constrData-cpu-arguments": 150000, - "equalsByteString-memory-arguments": 1, - "cekApplyCost-exBudgetCPU": 29773, - "quotientInteger-memory-arguments-slope": 1, - "verifySignature-cpu-arguments-intercept": 3345831, - "unMapData-memory-arguments": 32, - "mkCons-memory-arguments": 32, - "sliceByteString-memory-arguments-slope": 1, - "sha3_256-memory-arguments": 4, - "ifThenElse-memory-arguments": 1, - "mkNilPairData-memory-arguments": 32, - "equalsByteString-cpu-arguments-slope": 247, - "appendString-cpu-arguments-intercept": 150000, - "quotientInteger-cpu-arguments-model-arguments-slope": 118, - "cekApplyCost-exBudgetMemory": 100, - "equalsString-memory-arguments": 1, - "multiplyInteger-memory-arguments-slope": 1, - "cekBuiltinCost-exBudgetMemory": 100, - "remainderInteger-memory-arguments-intercept": 0, - "sha2_256-cpu-arguments-intercept": 2477736, - "remainderInteger-cpu-arguments-model-arguments-intercept": 425507, - "lessThanEqualsByteString-memory-arguments": 1, - "tailList-memory-arguments": 32, - "mkNilData-cpu-arguments": 150000, - "chooseData-cpu-arguments": 150000, - "unBData-memory-arguments": 32, - "blake2b-memory-arguments": 4, - "iData-memory-arguments": 32, - "nullList-memory-arguments": 32, - "cekDelayCost-exBudgetCPU": 29773, - "subtractInteger-memory-arguments-intercept": 1, - "lessThanByteString-cpu-arguments-intercept": 103599, - "consByteString-cpu-arguments-slope": 1000, - "appendByteString-memory-arguments-slope": 1, - "trace-memory-arguments": 32, - "divideInteger-cpu-arguments-constant": 148000, - "cekConstCost-exBudgetCPU": 29773, - "encodeUtf8-memory-arguments-slope": 8, - "quotientInteger-cpu-arguments-model-arguments-intercept": 425507, - "mapData-memory-arguments": 32, - "appendString-cpu-arguments-slope": 1000, - "modInteger-cpu-arguments-constant": 148000, - "verifySignature-cpu-arguments-slope": 1, - "unConstrData-memory-arguments": 32, - "quotientInteger-memory-arguments-intercept": 0, - "equalsByteString-cpu-arguments-constant": 150000, - "sliceByteString-memory-arguments-intercept": 0, - "mkPairData-memory-arguments": 32, - "equalsByteString-cpu-arguments-intercept": 112536, - "appendString-memory-arguments-slope": 1, - "lessThanInteger-cpu-arguments-slope": 497, - "modInteger-cpu-arguments-model-arguments-intercept": 425507, - "modInteger-memory-arguments-minimum": 1, - "sha3_256-cpu-arguments-intercept": 0, - "verifySignature-memory-arguments": 1, - "cekLamCost-exBudgetMemory": 100, - "sliceByteString-cpu-arguments-intercept": 150000 - } - } -} \ No newline at end of file