cardano_node_tests.tests.tests_plutus_v3 package
Submodules
cardano_node_tests.tests.tests_plutus_v3.conftest module
- cardano_node_tests.tests.tests_plutus_v3.conftest.cluster(cluster_manager: ClusterManager) ClusterLib [source]
Return instance of clusterlib.ClusterLib.
cardano_node_tests.tests.tests_plutus_v3.test_mint_build module
Tests for minting with Plutus using transaction build.
- class cardano_node_tests.tests.tests_plutus_v3.test_mint_build.TestPlutusBatch5V3Builtins[source]
Bases:
object
Tests for batch5 of Plutus Core built-in functions.
- fail_scripts = (PlutusScriptData(script_file=PosixPath('/home/martink/Source/repos/cardano-node-tests/cardano_node_tests/tests/data/plutus/v3/failingReadBitPolicyScriptV3_1.plutus'), script_type='plutus_v3', execution_cost=ExecutionCost(per_time=1000000, per_space=100000, fixed_cost=1234)), PlutusScriptData(script_file=PosixPath('/home/martink/Source/repos/cardano-node-tests/cardano_node_tests/tests/data/plutus/v3/failingReadBitPolicyScriptV3_2.plutus'), script_type='plutus_v3', execution_cost=ExecutionCost(per_time=1000000, per_space=100000, fixed_cost=1234)), PlutusScriptData(script_file=PosixPath('/home/martink/Source/repos/cardano-node-tests/cardano_node_tests/tests/data/plutus/v3/failingReadBitPolicyScriptV3_3.plutus'), script_type='plutus_v3', execution_cost=ExecutionCost(per_time=1000000, per_space=100000, fixed_cost=1234)), PlutusScriptData(script_file=PosixPath('/home/martink/Source/repos/cardano-node-tests/cardano_node_tests/tests/data/plutus/v3/failingReadBitPolicyScriptV3_4.plutus'), script_type='plutus_v3', execution_cost=ExecutionCost(per_time=1000000, per_space=100000, fixed_cost=1234)), PlutusScriptData(script_file=PosixPath('/home/martink/Source/repos/cardano-node-tests/cardano_node_tests/tests/data/plutus/v3/failingReadBitPolicyScriptV3_5.plutus'), script_type='plutus_v3', execution_cost=ExecutionCost(per_time=1000000, per_space=100000, fixed_cost=1234)), PlutusScriptData(script_file=PosixPath('/home/martink/Source/repos/cardano-node-tests/cardano_node_tests/tests/data/plutus/v3/failingReadBitPolicyScriptV3_6.plutus'), script_type='plutus_v3', execution_cost=ExecutionCost(per_time=1000000, per_space=100000, fixed_cost=1234)), PlutusScriptData(script_file=PosixPath('/home/martink/Source/repos/cardano-node-tests/cardano_node_tests/tests/data/plutus/v3/failingReadBitPolicyScriptV3_7.plutus'), script_type='plutus_v3', execution_cost=ExecutionCost(per_time=1000000, per_space=100000, fixed_cost=1234)), PlutusScriptData(script_file=PosixPath('/home/martink/Source/repos/cardano-node-tests/cardano_node_tests/tests/data/plutus/v3/failingReadBitPolicyScriptV3_8.plutus'), script_type='plutus_v3', execution_cost=ExecutionCost(per_time=1000000, per_space=100000, fixed_cost=1234)), PlutusScriptData(script_file=PosixPath('/home/martink/Source/repos/cardano-node-tests/cardano_node_tests/tests/data/plutus/v3/failingReadBitPolicyScriptV3_9.plutus'), script_type='plutus_v3', execution_cost=ExecutionCost(per_time=1000000, per_space=100000, fixed_cost=1234)), PlutusScriptData(script_file=PosixPath('/home/martink/Source/repos/cardano-node-tests/cardano_node_tests/tests/data/plutus/v3/failingReadBitPolicyScriptV3_10.plutus'), script_type='plutus_v3', execution_cost=ExecutionCost(per_time=1000000, per_space=100000, fixed_cost=1234)), PlutusScriptData(script_file=PosixPath('/home/martink/Source/repos/cardano-node-tests/cardano_node_tests/tests/data/plutus/v3/failingReadBitPolicyScriptV3_11.plutus'), script_type='plutus_v3', execution_cost=ExecutionCost(per_time=1000000, per_space=100000, fixed_cost=1234)), PlutusScriptData(script_file=PosixPath('/home/martink/Source/repos/cardano-node-tests/cardano_node_tests/tests/data/plutus/v3/failingReadBitPolicyScriptV3_12.plutus'), script_type='plutus_v3', execution_cost=ExecutionCost(per_time=1000000, per_space=100000, fixed_cost=1234)), PlutusScriptData(script_file=PosixPath('/home/martink/Source/repos/cardano-node-tests/cardano_node_tests/tests/data/plutus/v3/failingReadBitPolicyScriptV3_13.plutus'), script_type='plutus_v3', execution_cost=ExecutionCost(per_time=1000000, per_space=100000, fixed_cost=1234)), PlutusScriptData(script_file=PosixPath('/home/martink/Source/repos/cardano-node-tests/cardano_node_tests/tests/data/plutus/v3/failingReadBitPolicyScriptV3_14.plutus'), script_type='plutus_v3', execution_cost=ExecutionCost(per_time=1000000, per_space=100000, fixed_cost=1234)), PlutusScriptData(script_file=PosixPath('/home/martink/Source/repos/cardano-node-tests/cardano_node_tests/tests/data/plutus/v3/failingReplicateBytePolicyScriptV3_1.plutus'), script_type='plutus_v3', execution_cost=ExecutionCost(per_time=1000000, per_space=100000, fixed_cost=1234)), PlutusScriptData(script_file=PosixPath('/home/martink/Source/repos/cardano-node-tests/cardano_node_tests/tests/data/plutus/v3/failingReplicateBytePolicyScriptV3_2.plutus'), script_type='plutus_v3', execution_cost=ExecutionCost(per_time=1000000, per_space=100000, fixed_cost=1234)), PlutusScriptData(script_file=PosixPath('/home/martink/Source/repos/cardano-node-tests/cardano_node_tests/tests/data/plutus/v3/failingReplicateBytePolicyScriptV3_3.plutus'), script_type='plutus_v3', execution_cost=ExecutionCost(per_time=1000000, per_space=100000, fixed_cost=1234)), PlutusScriptData(script_file=PosixPath('/home/martink/Source/repos/cardano-node-tests/cardano_node_tests/tests/data/plutus/v3/failingReplicateBytePolicyScriptV3_4.plutus'), script_type='plutus_v3', execution_cost=ExecutionCost(per_time=1000000, per_space=100000, fixed_cost=1234)), PlutusScriptData(script_file=PosixPath('/home/martink/Source/repos/cardano-node-tests/cardano_node_tests/tests/data/plutus/v3/failingReplicateBytePolicyScriptV3_5.plutus'), script_type='plutus_v3', execution_cost=ExecutionCost(per_time=1000000, per_space=100000, fixed_cost=1234)), PlutusScriptData(script_file=PosixPath('/home/martink/Source/repos/cardano-node-tests/cardano_node_tests/tests/data/plutus/v3/failingReplicateBytePolicyScriptV3_6.plutus'), script_type='plutus_v3', execution_cost=ExecutionCost(per_time=1000000, per_space=100000, fixed_cost=1234)), PlutusScriptData(script_file=PosixPath('/home/martink/Source/repos/cardano-node-tests/cardano_node_tests/tests/data/plutus/v3/failingWriteBitsPolicyScriptV3_1.plutus'), script_type='plutus_v3', execution_cost=ExecutionCost(per_time=1000000, per_space=100000, fixed_cost=1234)), PlutusScriptData(script_file=PosixPath('/home/martink/Source/repos/cardano-node-tests/cardano_node_tests/tests/data/plutus/v3/failingWriteBitsPolicyScriptV3_2.plutus'), script_type='plutus_v3', execution_cost=ExecutionCost(per_time=1000000, per_space=100000, fixed_cost=1234)), PlutusScriptData(script_file=PosixPath('/home/martink/Source/repos/cardano-node-tests/cardano_node_tests/tests/data/plutus/v3/failingWriteBitsPolicyScriptV3_3.plutus'), script_type='plutus_v3', execution_cost=ExecutionCost(per_time=1000000, per_space=100000, fixed_cost=1234)), PlutusScriptData(script_file=PosixPath('/home/martink/Source/repos/cardano-node-tests/cardano_node_tests/tests/data/plutus/v3/failingWriteBitsPolicyScriptV3_4.plutus'), script_type='plutus_v3', execution_cost=ExecutionCost(per_time=1000000, per_space=100000, fixed_cost=1234)), PlutusScriptData(script_file=PosixPath('/home/martink/Source/repos/cardano-node-tests/cardano_node_tests/tests/data/plutus/v3/failingWriteBitsPolicyScriptV3_5.plutus'), script_type='plutus_v3', execution_cost=ExecutionCost(per_time=1000000, per_space=100000, fixed_cost=1234)), PlutusScriptData(script_file=PosixPath('/home/martink/Source/repos/cardano-node-tests/cardano_node_tests/tests/data/plutus/v3/failingWriteBitsPolicyScriptV3_6.plutus'), script_type='plutus_v3', execution_cost=ExecutionCost(per_time=1000000, per_space=100000, fixed_cost=1234)), PlutusScriptData(script_file=PosixPath('/home/martink/Source/repos/cardano-node-tests/cardano_node_tests/tests/data/plutus/v3/failingWriteBitsPolicyScriptV3_7.plutus'), script_type='plutus_v3', execution_cost=ExecutionCost(per_time=1000000, per_space=100000, fixed_cost=1234)), PlutusScriptData(script_file=PosixPath('/home/martink/Source/repos/cardano-node-tests/cardano_node_tests/tests/data/plutus/v3/failingWriteBitsPolicyScriptV3_8.plutus'), script_type='plutus_v3', execution_cost=ExecutionCost(per_time=1000000, per_space=100000, fixed_cost=1234)), PlutusScriptData(script_file=PosixPath('/home/martink/Source/repos/cardano-node-tests/cardano_node_tests/tests/data/plutus/v3/failingWriteBitsPolicyScriptV3_9.plutus'), script_type='plutus_v3', execution_cost=ExecutionCost(per_time=1000000, per_space=100000, fixed_cost=1234)), PlutusScriptData(script_file=PosixPath('/home/martink/Source/repos/cardano-node-tests/cardano_node_tests/tests/data/plutus/v3/failingWriteBitsPolicyScriptV3_10.plutus'), script_type='plutus_v3', execution_cost=ExecutionCost(per_time=1000000, per_space=100000, fixed_cost=1234)), PlutusScriptData(script_file=PosixPath('/home/martink/Source/repos/cardano-node-tests/cardano_node_tests/tests/data/plutus/v3/failingWriteBitsPolicyScriptV3_11.plutus'), script_type='plutus_v3', execution_cost=ExecutionCost(per_time=1000000, per_space=100000, fixed_cost=1234)), PlutusScriptData(script_file=PosixPath('/home/martink/Source/repos/cardano-node-tests/cardano_node_tests/tests/data/plutus/v3/failingWriteBitsPolicyScriptV3_12.plutus'), script_type='plutus_v3', execution_cost=ExecutionCost(per_time=1000000, per_space=100000, fixed_cost=1234)), PlutusScriptData(script_file=PosixPath('/home/martink/Source/repos/cardano-node-tests/cardano_node_tests/tests/data/plutus/v3/failingWriteBitsPolicyScriptV3_13.plutus'), script_type='plutus_v3', execution_cost=ExecutionCost(per_time=1000000, per_space=100000, fixed_cost=1234)), PlutusScriptData(script_file=PosixPath('/home/martink/Source/repos/cardano-node-tests/cardano_node_tests/tests/data/plutus/v3/failingWriteBitsPolicyScriptV3_14.plutus'), script_type='plutus_v3', execution_cost=ExecutionCost(per_time=1000000, per_space=100000, fixed_cost=1234)), PlutusScriptData(script_file=PosixPath('/home/martink/Source/repos/cardano-node-tests/cardano_node_tests/tests/data/plutus/v3/failingWriteBitsPolicyScriptV3_15.plutus'), script_type='plutus_v3', execution_cost=ExecutionCost(per_time=1000000, per_space=100000, fixed_cost=1234)), PlutusScriptData(script_file=PosixPath('/home/martink/Source/repos/cardano-node-tests/cardano_node_tests/tests/data/plutus/v3/failingWriteBitsPolicyScriptV3_16.plutus'), script_type='plutus_v3', execution_cost=ExecutionCost(per_time=1000000, per_space=100000, fixed_cost=1234)), PlutusScriptData(script_file=PosixPath('/home/martink/Source/repos/cardano-node-tests/cardano_node_tests/tests/data/plutus/v3/failingWriteBitsPolicyScriptV3_17.plutus'), script_type='plutus_v3', execution_cost=ExecutionCost(per_time=1000000, per_space=100000, fixed_cost=1234)), PlutusScriptData(script_file=PosixPath('/home/martink/Source/repos/cardano-node-tests/cardano_node_tests/tests/data/plutus/v3/failingWriteBitsPolicyScriptV3_18.plutus'), script_type='plutus_v3', execution_cost=ExecutionCost(per_time=1000000, per_space=100000, fixed_cost=1234)), PlutusScriptData(script_file=PosixPath('/home/martink/Source/repos/cardano-node-tests/cardano_node_tests/tests/data/plutus/v3/failingWriteBitsPolicyScriptV3_19.plutus'), script_type='plutus_v3', execution_cost=ExecutionCost(per_time=1000000, per_space=100000, fixed_cost=1234)))[source]
- payment_addrs(skip_bootstrap: None, cluster_manager: ClusterManager, cluster: ClusterLib) list[AddressRecord] [source]
Create new payment address.
- run_scenario(cluster_obj: ClusterLib, payment_addrs: list[AddressRecord], plutus_v_record: PlutusScriptData, success_expected: bool)[source]
Run an e2e test for a Plutus builtin.
- success_scripts = (PlutusScriptData(script_file=PosixPath('/home/martink/Source/repos/cardano-node-tests/cardano_node_tests/tests/data/plutus/v3/succeedingRipemd_160Policy.plutus'), script_type='plutus_v3', execution_cost=ExecutionCost(per_time=6598460, per_space=14710, fixed_cost=777777)), PlutusScriptData(script_file=PosixPath('/home/martink/Source/repos/cardano-node-tests/cardano_node_tests/tests/data/plutus/v3/succeedingAndByteStringPolicyScriptV3.plutus'), script_type='plutus_v3', execution_cost=ExecutionCost(per_time=19269680, per_space=102266, fixed_cost=777777)), PlutusScriptData(script_file=PosixPath('/home/martink/Source/repos/cardano-node-tests/cardano_node_tests/tests/data/plutus/v3/succeedingOrByteStringPolicyScriptV3.plutus'), script_type='plutus_v3', execution_cost=ExecutionCost(per_time=19269680, per_space=102266, fixed_cost=777777)), PlutusScriptData(script_file=PosixPath('/home/martink/Source/repos/cardano-node-tests/cardano_node_tests/tests/data/plutus/v3/succeedingXorByteStringPolicyScriptV3.plutus'), script_type='plutus_v3', execution_cost=ExecutionCost(per_time=19269680, per_space=102266, fixed_cost=777777)), PlutusScriptData(script_file=PosixPath('/home/martink/Source/repos/cardano-node-tests/cardano_node_tests/tests/data/plutus/v3/succeedingComplementByteStringPolicyScriptV3.plutus'), script_type='plutus_v3', execution_cost=ExecutionCost(per_time=5863431, per_space=30027, fixed_cost=777777)), PlutusScriptData(script_file=PosixPath('/home/martink/Source/repos/cardano-node-tests/cardano_node_tests/tests/data/plutus/v3/succeedingCountSetBitsPolicyScriptV3.plutus'), script_type='plutus_v3', execution_cost=ExecutionCost(per_time=9211420, per_space=45324, fixed_cost=777777)), PlutusScriptData(script_file=PosixPath('/home/martink/Source/repos/cardano-node-tests/cardano_node_tests/tests/data/plutus/v3/succeedingFindFirstSetBitPolicyScriptV3.plutus'), script_type='plutus_v3', execution_cost=ExecutionCost(per_time=8071583, per_space=40221, fixed_cost=777777)), PlutusScriptData(script_file=PosixPath('/home/martink/Source/repos/cardano-node-tests/cardano_node_tests/tests/data/plutus/v3/succeedingReadBitPolicyScriptV3.plutus'), script_type='plutus_v3', execution_cost=ExecutionCost(per_time=15272720, per_space=82724, fixed_cost=777777)), PlutusScriptData(script_file=PosixPath('/home/martink/Source/repos/cardano-node-tests/cardano_node_tests/tests/data/plutus/v3/succeedingReplicateBytePolicyScriptV3.plutus'), script_type='plutus_v3', execution_cost=ExecutionCost(per_time=4549650, per_space=22946, fixed_cost=777777)), PlutusScriptData(script_file=PosixPath('/home/martink/Source/repos/cardano-node-tests/cardano_node_tests/tests/data/plutus/v3/succeedingRotateByteStringPolicyScriptV3.plutus'), script_type='plutus_v3', execution_cost=ExecutionCost(per_time=22778618, per_space=109004, fixed_cost=777777)), PlutusScriptData(script_file=PosixPath('/home/martink/Source/repos/cardano-node-tests/cardano_node_tests/tests/data/plutus/v3/succeedingShiftByteStringPolicyScriptV3.plutus'), script_type='plutus_v3', execution_cost=ExecutionCost(per_time=17922844, per_space=85787, fixed_cost=777777)), PlutusScriptData(script_file=PosixPath('/home/martink/Source/repos/cardano-node-tests/cardano_node_tests/tests/data/plutus/v3/succeedingWriteBitsPolicyScriptV3.plutus'), script_type='plutus_v3', execution_cost=ExecutionCost(per_time=90646820, per_space=462457, fixed_cost=777777)))[source]
- test_plutus_fail(skip_bootstrap: None, cluster: ClusterLib, payment_addrs: list[AddressRecord], script: PlutusScriptData)[source]
Test scenarios that are supposed to fail.
- test_plutus_success(skip_bootstrap: None, cluster: ClusterLib, payment_addrs: list[AddressRecord], script: PlutusScriptData)[source]
Test scenarios that are supposed to succeed.
cardano_node_tests.tests.tests_plutus_v3.test_spend_build module
Tests for spending with Plutus using transaction build.
- class cardano_node_tests.tests.tests_plutus_v3.test_spend_build.TestBuildLocking[source]
Bases:
object
Tests for Tx output locking using Plutus smart contracts and transaction build.
- test_txout_locking_no_datum(cluster: ClusterLib, payment_addrs: list[AddressRecord])[source]
Test locking a Tx output with a Plutus script and spending the locked UTxO.
No datum is provided. Datum for spending scripts is optional in PlutusV3.
Uses cardano-cli transaction build command for building the transactions.
create a Tx output without a datum hash at the script address
check that the expected amount was locked at the script address
spend the locked UTxO without providing a datum
check that the expected amount was spent
check expected fees
check expected Plutus cost
(optional) check transactions in db-sync
- cardano_node_tests.tests.tests_plutus_v3.test_spend_build.payment_addrs(cluster_manager: ClusterManager, cluster: ClusterLib) list[AddressRecord] [source]
Create new payment addresses.