├── .buildkite ├── db_sync_full_sync.yml ├── db_sync_snapshot_restoration.yml ├── node_sync_tests.sh └── node_sync_tests.yml ├── .editorconfig ├── .github ├── CODEOWNERS ├── cli_coverage.sh ├── create_results.sh ├── dependabot.yml ├── env_nightly ├── env_nightly_cli ├── env_nightly_dbsync ├── env_nightly_upgrade ├── env_regression ├── env_regression_dbsync ├── grep_errors.sh ├── nix_override_cardano_node.sh ├── node_upgrade.sh ├── node_upgrade_pytest.sh ├── regression.sh ├── reqs_coverage.sh ├── save_artifacts.sh ├── setup_venv.sh ├── source_cardano_cli.sh ├── source_dbsync.sh ├── source_plutus_apps.sh ├── stop_cluster_instances.sh └── workflows │ ├── codeql.yml │ ├── db_sync_docker_sync_test.yaml │ ├── db_sync_full_sync.yaml │ ├── db_sync_snapshot_restoration.yaml │ ├── nightly.yaml │ ├── nightly_cli.yaml │ ├── nightly_dbsync.yaml │ ├── nightly_upgrade.yaml │ ├── nix_smoke.yaml │ ├── node_mainnet_tx_count_per_epoch.yaml │ ├── node_sync_test.yaml │ ├── regression-dbsync.yaml │ ├── regression.yaml │ ├── regression_reusable.yaml │ ├── repo_tests.yaml │ ├── smash_tests.yaml │ └── upgrade_reusable.yaml ├── .gitignore ├── .markdownlint.yaml ├── .pre-commit-config.yaml ├── .rstcheck.cfg ├── CODE-OF-CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── Makefile ├── README.md ├── SECURITY.md ├── cabal_build_tests ├── fedora │ └── Dockerfile ├── install-node.sh ├── readme.md ├── run-fedora.sh ├── run-ubuntu.sh └── ubuntu │ └── Dockerfile ├── cardano_node_tests ├── __init__.py ├── cardano_cli_coverage.py ├── chang_us_coverage.py ├── cluster_management │ ├── __init__.py │ ├── cache.py │ ├── cluster_getter.py │ ├── cluster_management.py │ ├── common.py │ ├── manager.py │ ├── netstat_tools.py │ ├── resources.py │ ├── resources_management.py │ └── status_files.py ├── cluster_scripts │ ├── common │ │ ├── common.sh │ │ ├── start-cluster-fast │ │ └── stop-cluster │ ├── conway_fast │ │ ├── byron-params.json │ │ ├── cardano-node-bft1 │ │ ├── dbsync-config.yaml │ │ ├── genesis.alonzo.spec.json │ │ ├── genesis.conway.spec.json │ │ ├── genesis.conway.spec.pv9.json │ │ ├── genesis.spec.json │ │ ├── postgres-setup.sh │ │ ├── run-cardano-dbsync │ │ ├── run-cardano-smash │ │ ├── run-cardano-submit-api │ │ ├── start-cluster │ │ ├── submit-api-config.json │ │ ├── template-cardano-node-pool │ │ ├── template-config.json │ │ └── testnet.json │ ├── conway_slow │ │ ├── byron-params.json │ │ ├── cardano-node-bft1 │ │ ├── dbsync-config.yaml │ │ ├── genesis.alonzo.spec.json │ │ ├── genesis.conway.spec.json │ │ ├── genesis.conway.spec.pv9.json │ │ ├── genesis.spec.json │ │ ├── postgres-setup.sh │ │ ├── run-cardano-dbsync │ │ ├── run-cardano-smash │ │ ├── run-cardano-submit-api │ │ ├── start-cluster │ │ ├── submit-api-config.json │ │ ├── template-cardano-node-pool │ │ ├── template-config.json │ │ └── testnet.json │ ├── mainnet_fast │ │ ├── byron-params.json │ │ ├── cardano-node-bft1 │ │ ├── dbsync-config.yaml │ │ ├── genesis.alonzo.spec.json │ │ ├── genesis.conway.spec.json │ │ ├── genesis.conway.spec.pv9.json │ │ ├── genesis.spec.json │ │ ├── postgres-setup.sh │ │ ├── run-cardano-dbsync │ │ ├── run-cardano-smash │ │ ├── run-cardano-submit-api │ │ ├── start-cluster │ │ ├── submit-api-config.json │ │ ├── template-cardano-node-pool │ │ ├── template-config.json │ │ └── testnet.json │ └── testnets │ │ ├── cardano-node-relay1 │ │ ├── dbsync_block_no.sh │ │ ├── run-cardano-dbsync │ │ ├── run-cardano-submit-api │ │ ├── start-cluster │ │ ├── supervisor.conf │ │ └── testnet.json ├── defragment_utxos.py ├── dump_requirements_coverage.py ├── prepare_cluster_scripts.py ├── pytest_plugins │ ├── __init__.py │ └── xdist_scheduler.py ├── split_topology.py ├── testnet_cleanup.py ├── testnet_cleanup_info.py ├── tests │ ├── __init__.py │ ├── common.py │ ├── conftest.py │ ├── data │ │ ├── cost_models_dict.json │ │ ├── cost_models_list_185_v2_v3.json │ │ ├── cost_models_list_v3.json │ │ ├── cost_models_pv10.json │ │ ├── defaultConstitution.json │ │ ├── drep_metadata_ipfs.json │ │ ├── drep_metadata_url.json │ │ ├── golden_extended.skey │ │ ├── golden_normal.skey │ │ ├── golden_payment.vkey │ │ ├── golden_sig.script │ │ ├── golden_stake.vkey │ │ ├── governance_action_anchor.json │ │ ├── plutus │ │ │ ├── 42.datum │ │ │ ├── 42.datum.cbor │ │ │ ├── 42.redeemer │ │ │ ├── 42.redeemer.cbor │ │ │ ├── big.datum │ │ │ ├── lobster │ │ │ │ ├── lobster.plutus │ │ │ │ ├── nft-mint-policy.plutus │ │ │ │ └── other-mint-policy.plutus │ │ │ ├── sepc256k1_ecdsa │ │ │ │ ├── invalid_message.redeemer │ │ │ │ ├── invalid_pubkey.redeemer │ │ │ │ ├── invalid_sig.redeemer │ │ │ │ ├── loop_script.redeemer │ │ │ │ ├── no_msg.redeemer │ │ │ │ ├── no_pubkey.redeemer │ │ │ │ ├── no_sig.redeemer │ │ │ │ └── positive.redeemer │ │ │ ├── sepc256k1_schnorr │ │ │ │ ├── invalid_pubkey.redeemer │ │ │ │ ├── invalid_sig.redeemer │ │ │ │ ├── loop_script.redeemer │ │ │ │ ├── no_msg.redeemer │ │ │ │ ├── no_pubkey.redeemer │ │ │ │ ├── no_sig.redeemer │ │ │ │ └── positive.redeemer │ │ │ ├── typed-42.datum │ │ │ ├── typed-42.datum.cbor │ │ │ ├── typed-42.redeemer │ │ │ ├── typed-42.redeemer.cbor │ │ │ ├── typed-43.datum │ │ │ ├── typed-43.redeemer │ │ │ ├── typed-finite.datum.cbor │ │ │ ├── v1 │ │ │ │ ├── always-fails.plutus │ │ │ │ ├── always-succeeds-spending.plutus │ │ │ │ ├── anyone-can-mint.plutus │ │ │ │ ├── context-equivalence-test.plutus │ │ │ │ ├── custom-guess-42-datum-42.plutus │ │ │ │ ├── guess-42-datum-42-txin.plutus │ │ │ │ ├── guess-42-stake.plutus │ │ │ │ ├── mint-tokenname.plutus │ │ │ │ ├── minting-context-equivalence-test.plutus │ │ │ │ ├── time_range.plutus │ │ │ │ └── witness-redeemer.plutus │ │ │ ├── v2 │ │ │ │ ├── always-fails.plutus │ │ │ │ ├── always-succeeds-spending.plutus │ │ │ │ ├── anyone-can-mint.plutus │ │ │ │ ├── byteStringToIntegerRoundtripPolicyV2.plutus │ │ │ │ ├── check-mint-datum-hash.plutus │ │ │ │ ├── check-mint-inline-datum.plutus │ │ │ │ ├── check-mint-with-reference-inputs.plutus │ │ │ │ ├── check-mint-with-reference-scripts.plutus │ │ │ │ ├── custom-guess-42-datum-42.plutus │ │ │ │ ├── ecdsa-secp256k1-loop.plutus │ │ │ │ ├── guess-42-datum-42-txin.plutus │ │ │ │ ├── schnorr-secp256k1-loop.plutus │ │ │ │ ├── secp256k1-ecdsa-policy.plutus │ │ │ │ ├── secp256k1-schnorr-policy.plutus │ │ │ │ └── stake-script.plutus │ │ │ ├── v3 │ │ │ │ ├── alwaysFailsPolicyScriptV3.plutus │ │ │ │ ├── alwaysSucceedPolicyScriptV3.plutus │ │ │ │ ├── blsMint.plutus │ │ │ │ ├── blsSpend.plutus │ │ │ │ ├── constitutionScriptV3.plutus │ │ │ │ ├── failingReadBitPolicyScriptV3_1.plutus │ │ │ │ ├── failingReadBitPolicyScriptV3_10.plutus │ │ │ │ ├── failingReadBitPolicyScriptV3_11.plutus │ │ │ │ ├── failingReadBitPolicyScriptV3_12.plutus │ │ │ │ ├── failingReadBitPolicyScriptV3_13.plutus │ │ │ │ ├── failingReadBitPolicyScriptV3_14.plutus │ │ │ │ ├── failingReadBitPolicyScriptV3_2.plutus │ │ │ │ ├── failingReadBitPolicyScriptV3_3.plutus │ │ │ │ ├── failingReadBitPolicyScriptV3_4.plutus │ │ │ │ ├── failingReadBitPolicyScriptV3_5.plutus │ │ │ │ ├── failingReadBitPolicyScriptV3_6.plutus │ │ │ │ ├── failingReadBitPolicyScriptV3_7.plutus │ │ │ │ ├── failingReadBitPolicyScriptV3_8.plutus │ │ │ │ ├── failingReadBitPolicyScriptV3_9.plutus │ │ │ │ ├── failingReplicateBytePolicyScriptV3_1.plutus │ │ │ │ ├── failingReplicateBytePolicyScriptV3_2.plutus │ │ │ │ ├── failingReplicateBytePolicyScriptV3_3.plutus │ │ │ │ ├── failingReplicateBytePolicyScriptV3_4.plutus │ │ │ │ ├── failingReplicateBytePolicyScriptV3_5.plutus │ │ │ │ ├── failingReplicateBytePolicyScriptV3_6.plutus │ │ │ │ ├── failingWriteBitsPolicyScriptV3_1.plutus │ │ │ │ ├── failingWriteBitsPolicyScriptV3_10.plutus │ │ │ │ ├── failingWriteBitsPolicyScriptV3_11.plutus │ │ │ │ ├── failingWriteBitsPolicyScriptV3_12.plutus │ │ │ │ ├── failingWriteBitsPolicyScriptV3_13.plutus │ │ │ │ ├── failingWriteBitsPolicyScriptV3_14.plutus │ │ │ │ ├── failingWriteBitsPolicyScriptV3_15.plutus │ │ │ │ ├── failingWriteBitsPolicyScriptV3_16.plutus │ │ │ │ ├── failingWriteBitsPolicyScriptV3_17.plutus │ │ │ │ ├── failingWriteBitsPolicyScriptV3_18.plutus │ │ │ │ ├── failingWriteBitsPolicyScriptV3_19.plutus │ │ │ │ ├── failingWriteBitsPolicyScriptV3_2.plutus │ │ │ │ ├── failingWriteBitsPolicyScriptV3_3.plutus │ │ │ │ ├── failingWriteBitsPolicyScriptV3_4.plutus │ │ │ │ ├── failingWriteBitsPolicyScriptV3_5.plutus │ │ │ │ ├── failingWriteBitsPolicyScriptV3_6.plutus │ │ │ │ ├── failingWriteBitsPolicyScriptV3_7.plutus │ │ │ │ ├── failingWriteBitsPolicyScriptV3_8.plutus │ │ │ │ ├── failingWriteBitsPolicyScriptV3_9.plutus │ │ │ │ ├── mintTokenNamePolicyScriptV3.plutus │ │ │ │ ├── succeedingAndByteStringPolicyScriptV3.plutus │ │ │ │ ├── succeedingComplementByteStringPolicyScriptV3.plutus │ │ │ │ ├── succeedingCountSetBitsPolicyScriptV3.plutus │ │ │ │ ├── succeedingFindFirstSetBitPolicyScriptV3.plutus │ │ │ │ ├── succeedingOrByteStringPolicyScriptV3.plutus │ │ │ │ ├── succeedingReadBitPolicyScriptV3.plutus │ │ │ │ ├── succeedingReplicateBytePolicyScriptV3.plutus │ │ │ │ ├── succeedingRipemd_160Policy.plutus │ │ │ │ ├── succeedingRotateByteStringPolicyScriptV3.plutus │ │ │ │ ├── succeedingShiftByteStringPolicyScriptV3.plutus │ │ │ │ ├── succeedingWriteBitsPolicyScriptV3.plutus │ │ │ │ ├── succeedingXorByteStringPolicyScriptV3.plutus │ │ │ │ ├── timeRangePolicyScriptV3.plutus │ │ │ │ ├── verifyEcdsaPolicyScriptV3.plutus │ │ │ │ ├── verifySchnorrPolicyScriptV3.plutus │ │ │ │ └── witnessRedeemerPolicyScriptV3.plutus │ │ │ ├── witness_golden_extended.datum │ │ │ └── witness_golden_normal.datum │ │ ├── pool_metadata.json │ │ ├── stake.evkey │ │ ├── test_tx_metadata_both_tx.body │ │ ├── test_tx_metadata_both_tx.signed │ │ ├── test_tx_metadata_both_tx_body_json.out │ │ ├── test_tx_metadata_both_tx_conway.body │ │ ├── test_tx_metadata_both_tx_json.out │ │ ├── tx_metadata.cbor │ │ ├── tx_metadata.json │ │ ├── tx_metadata_duplicate_keys1.json │ │ ├── tx_metadata_duplicate_keys2.json │ │ ├── tx_metadata_invalid.json │ │ ├── tx_metadata_long.json │ │ ├── tx_metadata_wrong.json │ │ └── unwitnessed.tx │ ├── delegation.py │ ├── issues.py │ ├── kes.py │ ├── plutus_common.py │ ├── reqs_conway.py │ ├── test_addr_registration.py │ ├── test_blocks.py │ ├── test_chain_transactions.py │ ├── test_cli.py │ ├── test_configuration.py │ ├── test_dbsync.py │ ├── test_dbsync_config.py │ ├── test_delegation.py │ ├── test_env_network_id.py │ ├── test_kes.py │ ├── test_ledger_state.py │ ├── test_metrics.py │ ├── test_mir_certs.py │ ├── test_native_tokens.py │ ├── test_node_upgrade.py │ ├── test_pool_saturation.py │ ├── test_pools.py │ ├── test_protocol.py │ ├── test_reconnect.py │ ├── test_rollback.py │ ├── test_scripts.py │ ├── test_smash.py │ ├── test_socket_path.py │ ├── test_staking_no_rewards.py │ ├── test_staking_rewards.py │ ├── test_tx_basic.py │ ├── test_tx_fees.py │ ├── test_tx_many_utxos.py │ ├── test_tx_mempool.py │ ├── test_tx_metadata.py │ ├── test_tx_negative.py │ ├── test_tx_unbalanced.py │ ├── test_xdist_helper.py │ ├── tests_conway │ │ ├── __init__.py │ │ ├── conftest.py │ │ ├── conway_common.py │ │ ├── test_committee.py │ │ ├── test_constitution.py │ │ ├── test_conway.py │ │ ├── test_drep.py │ │ ├── test_guardrails.py │ │ ├── test_hardfork.py │ │ ├── test_info.py │ │ ├── test_no_confidence.py │ │ ├── test_pparam_update.py │ │ ├── test_treasury_donation.py │ │ ├── test_treasury_withdrawals.py │ │ └── test_update_plutusv2_builtins.py │ ├── tests_plutus │ │ ├── __init__.py │ │ ├── conftest.py │ │ ├── mint_build.py │ │ ├── mint_raw.py │ │ ├── spend_build.py │ │ ├── spend_raw.py │ │ ├── test_delegation.py │ │ ├── test_lobster.py │ │ ├── test_mint_build.py │ │ ├── test_mint_negative_build.py │ │ ├── test_mint_negative_raw.py │ │ ├── test_mint_raw.py │ │ ├── test_spend_build.py │ │ ├── test_spend_compat_build.py │ │ ├── test_spend_compat_raw.py │ │ ├── test_spend_datum_build.py │ │ ├── test_spend_datum_raw.py │ │ ├── test_spend_negative_build.py │ │ ├── test_spend_negative_raw.py │ │ └── test_spend_raw.py │ ├── tests_plutus_v2 │ │ ├── __init__.py │ │ ├── conftest.py │ │ ├── mint_build.py │ │ ├── mint_raw.py │ │ ├── spend_build.py │ │ ├── spend_raw.py │ │ ├── test_mint_build.py │ │ ├── test_mint_negative_build.py │ │ ├── test_mint_negative_raw.py │ │ ├── test_mint_raw.py │ │ ├── test_mint_secp256k1_build.py │ │ ├── test_mint_secp256k1_raw.py │ │ ├── test_spend_build.py │ │ ├── test_spend_collateral_build.py │ │ ├── test_spend_collateral_raw.py │ │ ├── test_spend_compat_build.py │ │ ├── test_spend_compat_raw.py │ │ ├── test_spend_datum_build.py │ │ ├── test_spend_datum_raw.py │ │ ├── test_spend_raw.py │ │ ├── test_spend_ref_inputs_build.py │ │ ├── test_spend_ref_inputs_raw.py │ │ ├── test_spend_ref_scripts_build.py │ │ ├── test_spend_ref_scripts_raw.py │ │ ├── test_spend_secp256k1_build.py │ │ └── test_spend_secp256k1_raw.py │ ├── tests_plutus_v3 │ │ ├── __init__.py │ │ ├── conftest.py │ │ ├── test_mint_build.py │ │ └── test_spend_build.py │ └── tx_common.py └── utils │ ├── __init__.py │ ├── artifacts.py │ ├── blockers.py │ ├── cluster_nodes.py │ ├── cluster_scripts.py │ ├── clusterlib_utils.py │ ├── configuration.py │ ├── custom_clusterlib.py │ ├── dbsync_check_tx.py │ ├── dbsync_conn.py │ ├── dbsync_queries.py │ ├── dbsync_service_manager.py │ ├── dbsync_types.py │ ├── dbsync_utils.py │ ├── defragment_utxos.py │ ├── faucet.py │ ├── framework_log.py │ ├── gh_issue.py │ ├── governance_setup.py │ ├── governance_utils.py │ ├── helpers.py │ ├── http_client.py │ ├── locking.py │ ├── logfiles.py │ ├── model_ekg.py │ ├── pytest_utils.py │ ├── requirements.py │ ├── smash_utils.py │ ├── submit_api.py │ ├── submit_utils.py │ ├── temptools.py │ ├── testnet_cleanup.py │ ├── tx_view.py │ ├── types.py │ ├── versions.py │ └── web.py ├── doc ├── mir_cert_test_example_manual_steps.md ├── plutus.md ├── quality_control_strategy.md ├── running_local_cluster.md ├── smash │ ├── smash_faq.md │ └── smash_tests_and_debugging_examples.md ├── stake_credential_history_tool.md ├── test_types.md └── uat_strategy.md ├── flake.lock ├── flake.nix ├── framework_tests ├── __init__.py ├── conftest.py ├── mocks │ ├── cardano-cli │ └── cardano-node ├── test_resources_management.py ├── test_resources_naming.py └── test_subtests.py ├── garnix.yaml ├── poetry.lock ├── poetry_update_deps.sh ├── prepare_test_env.sh ├── pyproject.toml ├── scripts ├── check_dev_env.sh ├── deploy_doc.sh ├── postgres-start.sh ├── restart_dev_cluster.sh ├── setup_dev_venv.sh ├── test_block_production.sh ├── test_node_ipc_shutdown.sh ├── test_node_reconnect.sh └── test_rollbacks.sh ├── src_docs ├── Makefile ├── chang_user_stories_template.rst ├── requirements_mapping.json └── source │ ├── CNAME │ ├── _static │ ├── css │ │ ├── copyright.css │ │ ├── override-width.css │ │ └── tables.css │ └── images │ │ ├── Cardano-Crypto-Logo-128.png │ │ └── qa_process.png │ ├── conf.py │ ├── contribute │ └── contributing.rst │ ├── how-tos.rst │ ├── how-tos │ ├── 350_mir_cert_test_example_manual_steps.rst │ ├── 380_stake_credential_history_tool.rst │ ├── 500_smash_faq.rst │ └── 520_smash_tests_and_debugging_examples.rst │ ├── index.rst │ ├── mocks │ └── cardano-node │ ├── modules.rst │ ├── process.rst │ ├── process │ ├── 100_test_types.rst │ ├── 200_quality_control_strategy.rst │ ├── 300_uat_strategy.rst │ ├── 400_plutus.rst │ └── 400_system_level_tag_testing.rst │ ├── readme.rst │ ├── test-plans │ └── 100_conway_governance.rst │ ├── test_plans.rst │ ├── test_results.rst │ └── test_results │ ├── chang_user_stories.rst │ ├── nightly_system_tests.rst │ ├── node │ ├── tag_10_1_1.rst │ ├── tag_10_1_2.rst │ ├── tag_10_2_1.rst │ ├── tag_10_3_1.rst │ ├── tag_10_4_1.rst │ ├── tag_1_35_3.rst │ ├── tag_1_35_4_rc1.rst │ ├── tag_1_35_5.rst │ ├── tag_1_35_6.rst │ ├── tag_1_35_7.rst │ ├── tag_8_0_0.rst │ ├── tag_8_11_0.rst │ ├── tag_8_1_1.rst │ ├── tag_8_6_0_pre.rst │ ├── tag_8_7_2.rst │ ├── tag_8_7_3.rst │ ├── tag_8_8_0.rst │ ├── tag_8_9_0.rst │ ├── tag_8_9_1.rst │ ├── tag_8_9_3.rst │ ├── tag_9_0_0.rst │ └── utxo_hd_9_1_1.rst │ ├── requirements │ ├── chang_user_stories_system_tests.rst │ └── plutusV3_user_stories_system_tests.rst │ ├── sync_tests.rst │ └── tag_tests.rst └── testnets_bootstrap_template ├── README.md ├── config-relay1.json ├── dbsync-config.yaml ├── faucet_setup.sh ├── genesis-alonzo.json ├── genesis-byron.json ├── genesis-conway.json ├── genesis-shelley.json ├── postgres-setup.sh ├── run-cardano-dbsync ├── run_relay1.sh ├── submit-api-config.json └── topology-relay1.json /.buildkite/db_sync_full_sync.yml: -------------------------------------------------------------------------------- 1 | steps: 2 | - label: ':drum_with_drumsticks: Full sync test :drum_with_drumsticks:' 3 | commands: 4 | - df -h 5 | - git checkout origin/db_sync_tests 6 | - git pull origin db_sync_tests 7 | - cd db_sync_tests 8 | - nix develop --accept-flake-config ..#python --command python ./tests/full_sync_from_clean_state.py -npr "${node_pr}" -nbr "${node_branch}" -nv "${node_version}" -dbr "${db_sync_branch}" -dv "${db_sync_version}" -dsa "${db_sync_start_arguments}" -e "${environment}" 9 | - nix develop --accept-flake-config ..#python --command python ./tests/snapshot_creation.py -dpr "${db_sync_pr}" -dbr "${db_sync_branch}" -dv "${db_sync_version}" -e "${environment}" -rosc "${run_only_sync_test}" 10 | - nix develop --accept-flake-config ..#python --command python ./tests/local_snapshot_restoration.py -npr "${node_pr}" -nbr "${node_branch}" -nv "${node_version}" -dbr "${db_sync_branch}" -dv "${db_sync_version}" -dsa "${db_sync_start_arguments}" -e "${environment}" -rosc "${run_only_sync_test}" 11 | timeout_in_minutes: 43200 12 | agents: 13 | system: x86_64-linux 14 | queue: core-tech-bench 15 | -------------------------------------------------------------------------------- /.buildkite/db_sync_snapshot_restoration.yml: -------------------------------------------------------------------------------- 1 | steps: 2 | - label: ':drum_with_drumsticks: Snapshot restoration test :drum_with_drumsticks:' 3 | commands: 4 | - df -h 5 | - git checkout origin/db_sync_tests 6 | - git pull origin db_sync_tests 7 | - cd db_sync_tests 8 | - nix develop --accept-flake-config ..#python --command python ./tests/iohk_snapshot_restoration.py -npr "${node_pr}" -nbr "${node_branch}" -nv "${node_version}" -dbr "${db_sync_branch}" -dv "${db_sync_version}" -surl "${snapshot_url}" -e "${environment}" 9 | timeout_in_minutes: 14400 10 | agents: 11 | system: x86_64-linux 12 | queue: core-tech-bench 13 | -------------------------------------------------------------------------------- /.buildkite/node_sync_tests.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env -S nix develop --accept-flake-config .#python -c bash 2 | # shellcheck shell=bash 3 | 4 | pip install blockfrost-python 5 | 6 | tag_no1=$1 7 | tag_no2=$2 8 | hydra_eval_no1=$3 9 | hydra_eval_no2=$4 10 | 11 | python ./sync_tests/node_sync_test.py -t1 "$tag_no1" -t2 "$tag_no2" -e "mainnet" -e1 "$hydra_eval_no1" -e2 "$hydra_eval_no2" 12 | python ./sync_tests/node_write_sync_values_to_db.py -e "mainnet" 13 | -------------------------------------------------------------------------------- /.buildkite/node_sync_tests.yml: -------------------------------------------------------------------------------- 1 | steps: 2 | - label: 'run the cardano node sync test on Mainnet using a Linux machine' 3 | commands: 4 | - './.buildkite/node_sync_tests.sh $tag_no1 $tag_no2 $hydra_eval_no1 $hydra_eval_no2' 5 | branches: "sync_tests" 6 | timeout_in_minutes: 5000 7 | agents: 8 | system: x86_64-linux 9 | queue: core-tech-bench 10 | artifact_paths: 11 | - 'logfile.log' 12 | - 'sync_results.json' 13 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | end_of_line = lf 5 | charset = utf-8 6 | trim_trailing_whitespace = true 7 | insert_final_newline = true 8 | 9 | [*.py] 10 | indent_style = space 11 | indent_size = 4 12 | max_line_length = 100 13 | 14 | [*.sh] 15 | indent_style = space 16 | indent_size = 2 17 | max_line_length = 120 18 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | # Note: later rules override earlier rules. 2 | 3 | # Default 4 | # Martin Sara 5 | * @mkoura @saratomaz 6 | 7 | # Cardano Node Testing Team 8 | 9 | doc @mkoura @saratomaz @ArturWieczorek 10 | src_docs @mkoura @saratomaz @ArturWieczorek 11 | cabal_build_tests @ArturWieczorek 12 | cardano_node_tests/utils/dbsync_* @mkoura @saratomaz @ArturWieczorek 13 | 14 | 15 | # CICD 16 | 17 | .github/workflows/db_sync_* @ArturWieczorek 18 | .github/workflows/node_sync_* @ArturWieczorek 19 | .github/workflows/smash_* @ArturWieczorek 20 | 21 | .buildkite/db_sync_* @ArturWieczorek 22 | .buildkite/node_sync_* @ArturWieczorek 23 | -------------------------------------------------------------------------------- /.github/cli_coverage.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | tests_repo="$(readlink -m "${0%/*}/..")" 6 | 7 | get_coverage() { 8 | if [ "$(echo "$tests_repo"/.cli_coverage/*)" = "$tests_repo/.cli_coverage/*" ] || ! command -v cardano-cli >/dev/null 2>&1; then 9 | return 1 10 | fi 11 | oldpwd="$PWD" 12 | cd "$tests_repo" 13 | retval=0 14 | PYTHONPATH="$PWD:$PYTHONPATH" cardano_node_tests/cardano_cli_coverage.py \ 15 | -i .cli_coverage/cli_coverage_* -o "$1" || retval=1 16 | cd "$oldpwd" 17 | return "$retval" 18 | } 19 | 20 | echo "Generating CLI coverage report to $tests_repo/cli_coverage.json" 21 | get_coverage "$tests_repo/cli_coverage.json" || : > "$tests_repo/cli_coverage.json" 22 | -------------------------------------------------------------------------------- /.github/create_results.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | tests_repo="$(readlink -m "${0%/*}/..")" 6 | reports_dir="$tests_repo/.reports" 7 | if [ "$(echo "$reports_dir"/*.json)" = "$reports_dir/*.json" ]; then 8 | echo "No reports found in $reports_dir" >&2 9 | exit 1 10 | fi 11 | 12 | results_tar="$tests_repo/allure-results.tar.xz" 13 | allure_results_dir="$tests_repo/allure-results" 14 | 15 | rm -rf "${allure_results_dir:?}" 16 | mkdir -p "$allure_results_dir" 17 | mv "$reports_dir"/*.json "$allure_results_dir" 18 | mv "$reports_dir"/*.txt "$allure_results_dir" 2>/dev/null || : 19 | mv "$reports_dir"/*.properties "$allure_results_dir" 2>/dev/null || : 20 | 21 | echo "Creating results archive $results_tar" 22 | rm -f "$results_tar" 23 | tar -C "$tests_repo" -cJf "$results_tar" allure-results 24 | rm -rf "${allure_results_dir:?}" 25 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # Set update schedule for GitHub Actions 2 | 3 | version: 2 4 | updates: 5 | 6 | - package-ecosystem: "github-actions" 7 | directory: "/" 8 | schedule: 9 | # Check for updates to GitHub Actions every day 10 | interval: "daily" 11 | -------------------------------------------------------------------------------- /.github/env_nightly: -------------------------------------------------------------------------------- 1 | CLUSTER_ERA=conway 2 | COMMAND_ERA=conway 3 | -------------------------------------------------------------------------------- /.github/env_nightly_cli: -------------------------------------------------------------------------------- 1 | CLUSTER_ERA=conway 2 | COMMAND_ERA=conway 3 | CARDANO_CLI_REV=master 4 | -------------------------------------------------------------------------------- /.github/env_nightly_dbsync: -------------------------------------------------------------------------------- 1 | CLUSTER_ERA=conway 2 | COMMAND_ERA=conway 3 | MARKEXPR=dbsync or smash 4 | DBSYNC_REV=13.6.0.4 5 | DBSYNC_TAR_URL=https://github.com/IntersectMBO/cardano-db-sync/releases/download/13.6.0.4/cardano-db-sync-13.6.0.4-linux.tar.gz 6 | SMASH=true 7 | DBSYNC_SKIP_INDEXES=true 8 | -------------------------------------------------------------------------------- /.github/env_nightly_upgrade: -------------------------------------------------------------------------------- 1 | BASE_TAR_URL=https://github.com/IntersectMBO/cardano-node/releases/download/10.4.1/cardano-node-10.4.1-linux.tar.gz 2 | CI_BYRON_CLUSTER=true 3 | -------------------------------------------------------------------------------- /.github/env_regression: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IntersectMBO/cardano-node-tests/d66004d326efc160e76c71e99f774b138fc3ec3c/.github/env_regression -------------------------------------------------------------------------------- /.github/env_regression_dbsync: -------------------------------------------------------------------------------- 1 | DBSYNC_SKIP_INDEXES=true 2 | -------------------------------------------------------------------------------- /.github/grep_errors.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ARTIFACTS_DIR="${ARTIFACTS_DIR:-".artifacts"}" 4 | ERR_LOGFILE="${PWD}/errors_all.log" 5 | 6 | cd "$ARTIFACTS_DIR" || { echo "Cannot switch to $ARTIFACTS_DIR" >&2; exit 1; } 7 | grep -r --include "*.stdout" --include "*.stderr" -Ei ":error:|failed|failure" . > "$ERR_LOGFILE" || : 8 | -------------------------------------------------------------------------------- /.github/nix_override_cardano_node.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | node_override() { 4 | local ref 5 | # if argument is provided: 6 | if [ -n "${1:-""}" ]; then 7 | ref="/$1" 8 | # else use specified branch and/or revision: 9 | elif [ -n "${NODE_REV:-""}" ]; then 10 | ref="/$NODE_REV" 11 | else 12 | # otherwise update to latest from default branch 13 | ref="" 14 | fi 15 | 16 | echo --override-input cardano-node "github:IntersectMBO/cardano-node$ref" 17 | } 18 | -------------------------------------------------------------------------------- /.github/reqs_coverage.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | ARTIFACTS_DIR="${ARTIFACTS_DIR:-".artifacts"}" 6 | 7 | tests_repo="$(readlink -m "${0%/*}/..")" 8 | 9 | get_coverage() { 10 | if [ ! -e "$ARTIFACTS_DIR" ]; then 11 | return 1 12 | fi 13 | oldpwd="$PWD" 14 | cd "$tests_repo" 15 | retval=0 16 | PYTHONPATH="$PWD:${PYTHONPATH:-""}" cardano_node_tests/dump_requirements_coverage.py \ 17 | -a "$ARTIFACTS_DIR" -m "src_docs/requirements_mapping.json" -o "$1" || retval=1 18 | cd "$oldpwd" 19 | return "$retval" 20 | } 21 | 22 | echo "Generating requirements coverage report to $tests_repo/requirements_coverage.json" 23 | get_coverage "$tests_repo/requirements_coverage.json" || : > "$tests_repo/requirements_coverage.json" 24 | -------------------------------------------------------------------------------- /.github/save_artifacts.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | ARTIFACTS_TAR="${PWD}/testing_artifacts.tar.xz" 6 | ARTIFACTS_DIR="${ARTIFACTS_DIR:-".artifacts"}" 7 | if [ "$(echo "$ARTIFACTS_DIR"/*)" = "$ARTIFACTS_DIR/*" ]; then 8 | echo "No artifacts found in $ARTIFACTS_DIR" >&2 9 | exit 1 10 | fi 11 | 12 | NEW_DIR="artifacts_$(date +%Y%m%d%H%M%S)" 13 | mv "$ARTIFACTS_DIR" "$NEW_DIR" || { echo "Cannot move $ARTIFACTS_DIR to $NEW_DIR" >&2; exit 1; } 14 | 15 | echo "Creating artifacts archive $ARTIFACTS_TAR" 16 | rm -f "$ARTIFACTS_TAR" 17 | tar -cJf "$ARTIFACTS_TAR" "$NEW_DIR" 18 | -------------------------------------------------------------------------------- /.github/setup_venv.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -euo pipefail 4 | 5 | _VENV_DIR="${_VENV_DIR:-"$WORKDIR/.venv"}" 6 | 7 | if [ "${1:-""}" = "clean" ]; then 8 | rm -rf "$_VENV_DIR" 9 | fi 10 | 11 | _REQS_INSTALLED="true" 12 | if [ ! -e "$_VENV_DIR" ]; then 13 | _REQS_INSTALLED="" 14 | python3 -m venv "$_VENV_DIR" 15 | fi 16 | 17 | # shellcheck disable=SC1090,SC1091 18 | . "$_VENV_DIR/bin/activate" 19 | 20 | PYTHONPATH="$(echo "$VIRTUAL_ENV"/lib/python3*/site-packages):$PYTHONPATH" 21 | export PYTHONPATH 22 | 23 | if [ -z "$_REQS_INSTALLED" ]; then 24 | poetry install -n 25 | fi 26 | 27 | unset _VENV_DIR _REQS_INSTALLED 28 | -------------------------------------------------------------------------------- /.github/source_cardano_cli.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | _origpwd="$PWD" 4 | cd "$WORKDIR" || exit 1 5 | 6 | if [ -z "${CARDANO_CLI_REV:-""}" ]; then 7 | echo "The value for CARDANO_CLI_REV cannot be empty" >&2 8 | exit 1 9 | fi 10 | 11 | # Build `cardano-cli` 12 | nix build \ 13 | --accept-flake-config \ 14 | --no-write-lock-file \ 15 | "github://github.com/IntersectMBO/cardano-cli?ref=${CARDANO_CLI_REV}#cardano-cli" \ 16 | -o cardano-cli-build || exit 1 17 | [ -e cardano-cli-build/bin/cardano-cli ] || exit 1 18 | 19 | # Add `cardano-cli` to PATH_APPEND 20 | PATH_APPEND="${PATH_APPEND:+"${PATH_APPEND}:"}$(readlink -m cardano-cli-build/bin)" 21 | export PATH_APPEND 22 | 23 | cd "$_origpwd" || exit 1 24 | unset _origpwd 25 | -------------------------------------------------------------------------------- /.github/source_plutus_apps.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | _origpwd="$PWD" 4 | cd "$WORKDIR" || exit 1 5 | 6 | if [ -z "${PLUTUS_APPS_REV:-""}" ]; then 7 | echo "The value for PLUTUS_APPS_REV cannot be empty" >&2 8 | exit 1 9 | fi 10 | 11 | # Build `create-script-context` 12 | nix build \ 13 | --accept-flake-config \ 14 | --no-write-lock-file \ 15 | "github://github.com/IntersectMBO/plutus-apps?ref=${PLUTUS_APPS_REV}#create-script-context" \ 16 | -o create-script-context-build || exit 1 17 | [ -e create-script-context-build/bin/create-script-context ] || exit 1 18 | 19 | # Add `create-script-context` to PATH_APPEND 20 | PATH_APPEND="${PATH_APPEND:+"${PATH_APPEND}:"}$(readlink -m create-script-context-build/bin)" 21 | export PATH_APPEND 22 | 23 | cd "$_origpwd" || exit 1 24 | unset _origpwd 25 | -------------------------------------------------------------------------------- /.github/stop_cluster_instances.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | stop_instances() { 4 | echo "Stopping all running cluster instances" 5 | 6 | local workdir="${1:?}" 7 | for sc in "$workdir"/state-cluster*; do 8 | [ -d "$sc" ] || continue 9 | "$sc/stop-cluster" 2>/dev/null || : 10 | done 11 | } 12 | -------------------------------------------------------------------------------- /.github/workflows/codeql.yml: -------------------------------------------------------------------------------- 1 | name: "CodeQL" 2 | 3 | on: 4 | pull_request: 5 | branches: [ "master" ] 6 | paths: 7 | - '**.py' 8 | schedule: 9 | - cron: '16 0 * * 4' 10 | 11 | jobs: 12 | analyze: 13 | name: Analyze 14 | runs-on: ubuntu-latest 15 | permissions: 16 | actions: read 17 | contents: read 18 | security-events: write 19 | 20 | strategy: 21 | fail-fast: false 22 | matrix: 23 | language: [ 'python' ] 24 | # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] 25 | # Use only 'java' to analyze code written in Java, Kotlin or both 26 | # Use only 'javascript' to analyze code written in JavaScript, TypeScript or both 27 | # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support 28 | 29 | steps: 30 | - name: Checkout repository 31 | uses: actions/checkout@v4 32 | 33 | # Initializes the CodeQL tools for scanning. 34 | - name: Initialize CodeQL 35 | uses: github/codeql-action/init@v3 36 | with: 37 | languages: ${{ matrix.language }} 38 | # If you wish to specify custom queries, you can do so here or in a config file. 39 | # By default, queries listed here will override any specified in a config file. 40 | # Prefix the list here with "+" to use these queries and those in the config file. 41 | 42 | # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs 43 | # queries: security-extended,security-and-quality 44 | 45 | - name: Perform CodeQL Analysis 46 | uses: github/codeql-action/analyze@v3 47 | with: 48 | category: "/language:${{matrix.language}}" 49 | -------------------------------------------------------------------------------- /.github/workflows/nightly.yaml: -------------------------------------------------------------------------------- 1 | name: Nightly tests 2 | 3 | on: 4 | schedule: 5 | - cron: '15 23 * * *' 6 | workflow_dispatch: 7 | 8 | jobs: 9 | nightly_job: 10 | if: github.repository_owner == 'IntersectMBO' || github.event_name != 'schedule' 11 | # reusable workflow from local repo and same branch as this config 12 | uses: ./.github/workflows/regression_reusable.yaml 13 | with: 14 | env-path: .github/env_nightly 15 | secrets: 16 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} 17 | CI_FAIL_MAILS: ${{ secrets.NIGHTLY_FAIL_MAILS }} 18 | GMAIL_USERNAME: ${{ secrets.GMAIL_USERNAME }} 19 | GMAIL_PASSWORD: ${{ secrets.GMAIL_PASSWORD }} 20 | -------------------------------------------------------------------------------- /.github/workflows/nightly_cli.yaml: -------------------------------------------------------------------------------- 1 | name: Nightly tests CLI 2 | 3 | on: 4 | schedule: 5 | - cron: '15 03 * * *' 6 | workflow_dispatch: 7 | 8 | jobs: 9 | nightly_job: 10 | if: github.repository_owner == 'IntersectMBO' || github.event_name != 'schedule' 11 | # reusable workflow from local repo and same branch as this config 12 | uses: ./.github/workflows/regression_reusable.yaml 13 | with: 14 | env-path: .github/env_nightly_cli 15 | secrets: 16 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} 17 | CI_FAIL_MAILS: ${{ secrets.NIGHTLY_FAIL_MAILS }} 18 | GMAIL_USERNAME: ${{ secrets.GMAIL_USERNAME }} 19 | GMAIL_PASSWORD: ${{ secrets.GMAIL_PASSWORD }} 20 | -------------------------------------------------------------------------------- /.github/workflows/nightly_dbsync.yaml: -------------------------------------------------------------------------------- 1 | name: Nightly tests dbsync 2 | 3 | on: 4 | schedule: 5 | - cron: '15 01 * * *' 6 | workflow_dispatch: 7 | 8 | jobs: 9 | nightly_job: 10 | if: github.repository_owner == 'IntersectMBO' || github.event_name != 'schedule' 11 | # reusable workflow from local repo and same branch as this config 12 | uses: ./.github/workflows/regression_reusable.yaml 13 | with: 14 | env-path: .github/env_nightly_dbsync 15 | secrets: 16 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} 17 | CI_FAIL_MAILS: ${{ secrets.NIGHTLY_FAIL_MAILS }} 18 | GMAIL_USERNAME: ${{ secrets.GMAIL_USERNAME }} 19 | GMAIL_PASSWORD: ${{ secrets.GMAIL_PASSWORD }} 20 | -------------------------------------------------------------------------------- /.github/workflows/nightly_upgrade.yaml: -------------------------------------------------------------------------------- 1 | name: Nightly tests upgrade 2 | 3 | on: 4 | schedule: 5 | - cron: '15 04 * * *' 6 | workflow_dispatch: 7 | 8 | jobs: 9 | nightly_job: 10 | if: github.repository_owner == 'IntersectMBO' || github.event_name != 'schedule' 11 | # reusable workflow from local repo and same branch as this config 12 | uses: ./.github/workflows/upgrade_reusable.yaml 13 | with: 14 | env-path: .github/env_nightly_upgrade 15 | secrets: 16 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} 17 | CI_FAIL_MAILS: ${{ secrets.NIGHTLY_FAIL_MAILS }} 18 | GMAIL_USERNAME: ${{ secrets.GMAIL_USERNAME }} 19 | GMAIL_PASSWORD: ${{ secrets.GMAIL_PASSWORD }} 20 | -------------------------------------------------------------------------------- /.github/workflows/nix_smoke.yaml: -------------------------------------------------------------------------------- 1 | name: "Nix smoke test" 2 | 3 | on: 4 | pull_request: 5 | branches: [ "master" ] 6 | paths: 7 | - 'flake.lock' 8 | - 'poetry.lock' 9 | - '**.nix' 10 | - '.github/workflows/nix_smoke.yaml' 11 | workflow_dispatch: 12 | 13 | jobs: 14 | nix_smoke: 15 | runs-on: ubuntu-latest 16 | steps: 17 | - name: Checkout code 18 | uses: actions/checkout@v4 19 | - name: Install Nix 20 | uses: cachix/install-nix-action@v31 21 | with: 22 | extra_nix_config: | 23 | access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} 24 | trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= iohk.cachix.org-1:DpRUyj7h7V830dp/i6Nti+NEO2/nhblbov/8MW7Rqoo= 25 | substituters = https://cache.nixos.org https://cache.iog.io https://iohk.cachix.org 26 | allow-import-from-derivation = true 27 | - name: ▶️ Run pytest in Nix 28 | run: | 29 | # env 30 | echo "::group::Script setup" 31 | PY_COLORS=1 TEST_THREADS=0 PYTEST_ARGS="-k test_cli.py --skipall" ./.github/regression.sh 32 | echo "::endgroup::" 33 | -------------------------------------------------------------------------------- /.github/workflows/node_mainnet_tx_count_per_epoch.yaml: -------------------------------------------------------------------------------- 1 | name: mainnet_tx_count_per_epoch 2 | 3 | on: 4 | schedule: 5 | - cron: '0 8 * * *' 6 | workflow_dispatch: 7 | branches: 8 | - sync_tests 9 | 10 | jobs: 11 | mainnet_tx_count_per_epoch: 12 | if: github.repository_owner == 'IntersectMBO' 13 | runs-on: ubuntu-latest 14 | steps: 15 | - name: checkout cardano-node-tests repo 16 | uses: actions/checkout@v4 17 | with: 18 | path: cardano_node_tests 19 | ref: sync_tests 20 | - name: setup Python 21 | uses: actions/setup-python@v5 22 | with: 23 | python-version: 3.8 24 | - name: install dependencies 25 | run: | 26 | pip install requests 27 | pip install psutil 28 | pip install pandas 29 | pip install pymysql 30 | pip install blockfrost-python 31 | - name: checkout sync_tests repo 32 | run: | 33 | echo $PWD 34 | echo "current branch: $(git branch --show-current)" 35 | cd cardano_node_tests 36 | git config --global user.name "sync_tests" 37 | git config --global user.email "action@github.com" 38 | echo "current branch1: $(git branch --show-current)" 39 | 40 | git checkout sync_tests 41 | echo "current branch2: $(git branch --show-current)" 42 | - name: get the automated tests results 43 | env: 44 | BUILDKITE_API_ACCESS_TOKEN: ${{ secrets.BUILDKITE_API_ACCESS_TOKEN }} 45 | AWS_DB_USERNAME: ${{ secrets.AWS_DB_USERNAME }} 46 | AWS_DB_PASS: ${{ secrets.AWS_DB_PASS }} 47 | AWS_DB_NAME: ${{ secrets.AWS_DB_NAME }} 48 | AWS_DB_HOSTNAME: ${{ secrets.AWS_DB_HOSTNAME }} 49 | BLOCKFROST_API_KEY: ${{ secrets.BLOCKFROST_API_KEY }} 50 | run: | 51 | cd cardano_node_tests 52 | echo "current branch2: $(git branch --show-current)" 53 | python sync_tests/node_write_mainnet_tx_count_per_epoch.py 54 | -------------------------------------------------------------------------------- /.github/workflows/repo_tests.yaml: -------------------------------------------------------------------------------- 1 | name: repo_tests 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - master 7 | 8 | env: 9 | PY_COLORS: "1" 10 | 11 | jobs: 12 | tests: 13 | runs-on: ubuntu-latest 14 | steps: 15 | - name: Check out repository 16 | uses: actions/checkout@v4 17 | - name: Set up python 18 | id: setup-python 19 | uses: actions/setup-python@v5 20 | with: 21 | python-version: '3.11' 22 | - name: Install Poetry 23 | uses: snok/install-poetry@v1 24 | with: 25 | virtualenvs-create: true 26 | virtualenvs-in-project: true 27 | installer-parallel: true 28 | - name: Load cached venv 29 | id: cached-poetry-dependencies 30 | uses: actions/cache@v4 31 | with: 32 | path: .venv 33 | key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('poetry.lock') }} 34 | - name: Install project 35 | run: SETUPTOOLS_ENABLE_FEATURES="legacy-editable" poetry install --no-interaction --with dev 36 | - name: Load cached pre-commit env 37 | id: cached-pre-commit 38 | uses: actions/cache@v4 39 | with: 40 | path: ~/.cache/pre-commit 41 | key: pre-commit-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('.pre-commit-config.yaml') }} 42 | - name: Install pre-commit hooks 43 | run: | 44 | mkdir -p ~/.cache/pre-commit 45 | true > ~/.cache/pre-commit/pre-commit.log 46 | poetry run pre-commit install-hooks --color=always 47 | retval="$?" 48 | if [ "$retval" -ne 0 ]; then 49 | cat ~/.cache/pre-commit/pre-commit.log 50 | fi 51 | exit "$retval" 52 | - name: Run pre-commit linters 53 | run: poetry run pre-commit run -a --show-diff-on-failure --color=always 54 | - name: Run framework tests 55 | run: poetry run pytest --doctest-modules framework_tests cardano_node_tests/utils/ 56 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Testing artifacts 2 | /.artifacts/ 3 | /.cli_coverage/ 4 | /.reports/ 5 | 6 | # Workdir for running tests 7 | /run_workdir/ 8 | /dev_workdir/ 9 | 10 | # Local files 11 | /tmp*/ 12 | /.bin*/ 13 | /.patches/ 14 | 15 | # Byte-compiled / optimized / DLL files 16 | __pycache__/ 17 | *.py[cod] 18 | *$py.class 19 | 20 | # mypy 21 | .mypy_cache/ 22 | .dmypy.json 23 | 24 | # Exuberant Ctags tag file 25 | /tags 26 | 27 | # Env variables 28 | /.source* 29 | 30 | # Distribution / packaging 31 | .Python 32 | env/ 33 | build/ 34 | develop-eggs/ 35 | dist/ 36 | downloads/ 37 | eggs/ 38 | .eggs/ 39 | lib/ 40 | lib64/ 41 | parts/ 42 | sdist/ 43 | var/ 44 | wheels/ 45 | *.egg-info/ 46 | .installed.cfg 47 | *.egg 48 | 49 | # PyInstaller 50 | # Usually these files are written by a python script from a template 51 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 52 | *.manifest 53 | *.spec 54 | 55 | # Installer logs 56 | pip-log.txt 57 | pip-delete-this-directory.txt 58 | 59 | # Unit test / coverage reports 60 | htmlcov/ 61 | .tox/ 62 | .coverage 63 | .coverage.* 64 | .cache 65 | 66 | .pytest_cache 67 | nosetests.xml 68 | coverage.xml 69 | *,cover 70 | .hypothesis/ 71 | 72 | # Translations 73 | *.mo 74 | *.pot 75 | 76 | # Sphinx documentation 77 | /src_docs/_build/ 78 | # files generated by sphinx-apidoc 79 | /src_docs/source/cardano_node_tests*.rst 80 | 81 | # PyBuilder 82 | target/ 83 | 84 | # Jupyter Notebook 85 | .ipynb_checkpoints 86 | 87 | # pyenv 88 | .python-version 89 | 90 | # dotenv 91 | .env 92 | 93 | # virtualenv 94 | .venv 95 | venv/ 96 | ENV/ 97 | 98 | # Rope project settings 99 | .ropeproject 100 | 101 | # mkdocs documentation 102 | /site 103 | -------------------------------------------------------------------------------- /.markdownlint.yaml: -------------------------------------------------------------------------------- 1 | # Default state for all rules 2 | default: true 3 | 4 | # MD012/no-multiple-blanks - Multiple consecutive blank lines 5 | MD012: 6 | # Consecutive blank lines 7 | maximum: 2 8 | 9 | # MD013/line-length - Line length 10 | MD013: 11 | # Number of characters 12 | line_length: 1000 13 | # Number of characters for headings 14 | heading_line_length: 128 15 | # Include code blocks 16 | code_blocks: false 17 | # Include tables 18 | tables: true 19 | # Include headings 20 | headings: true 21 | # Include headings 22 | headers: true 23 | # Strict length checking 24 | strict: false 25 | # Stern length checking 26 | stern: false 27 | 28 | # MD024/no-duplicate-heading/no-duplicate-header - Multiple headings with the same content 29 | MD024: 30 | allow_different_nesting: true 31 | siblings_only: true 32 | -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | exclude: ^sync_tests/ 2 | repos: 3 | - repo: https://github.com/pre-commit/pre-commit-hooks 4 | rev: v5.0.0 5 | hooks: 6 | - id: trailing-whitespace 7 | language_version: python3 8 | exclude_types: [html] 9 | - id: end-of-file-fixer 10 | language_version: python3 11 | exclude_types: [html] 12 | - id: check-yaml 13 | language_version: python3 14 | - id: debug-statements 15 | language_version: python3 16 | - repo: https://github.com/charliermarsh/ruff-pre-commit 17 | rev: v0.9.2 18 | hooks: 19 | - id: ruff 20 | args: [ --fix ] 21 | - id: ruff-format 22 | - repo: https://github.com/shellcheck-py/shellcheck-py 23 | rev: v0.10.0.1 24 | hooks: 25 | - id: shellcheck 26 | - repo: https://github.com/igorshubovych/markdownlint-cli 27 | rev: v0.43.0 28 | hooks: 29 | - id: markdownlint 30 | - repo: https://github.com/rstcheck/rstcheck 31 | rev: v6.2.4 32 | hooks: 33 | - id: rstcheck 34 | additional_dependencies: [sphinx, toml] 35 | - repo: local 36 | hooks: 37 | - id: pyrefly 38 | name: pyrefly 39 | entry: pyrefly 40 | args: [ check, --remove-unused-ignores ] 41 | pass_filenames: false 42 | language: system 43 | types: [python] 44 | - id: mypy 45 | name: mypy 46 | entry: mypy 47 | language: system 48 | types: [python] 49 | - repo: https://github.com/python-poetry/poetry 50 | rev: 2.0.1 51 | hooks: 52 | - id: poetry-check 53 | -------------------------------------------------------------------------------- /.rstcheck.cfg: -------------------------------------------------------------------------------- 1 | [rstcheck] 2 | ignore_directives = automodule, mdinclude 3 | ignore_messages = (Undefined substitution referenced: \":) 4 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Reporting a Vulnerability 4 | 5 | Please report (suspected) security vulnerabilities to [security@intersectmbo.org](mailto:security@intersectmbo.org). You will receive a 6 | response from us within 48 hours. If the issue is confirmed, we will release a patch as soon 7 | as possible. 8 | 9 | Please provide a clear and concise description of the vulnerability, including: 10 | 11 | * the affected version(s) of Open-Source-Office, 12 | * steps that can be followed to exercise the vulnerability, 13 | * any workarounds or mitigations 14 | 15 | If you have developed any code or utilities that can help demonstrate the suspected 16 | vulnerability, please mention them in your email but ***DO NOT*** attempt to include them as 17 | attachments as this may cause your Email to be blocked by spam filters. 18 | See the security file in the [Cardano engineering handbook](https://github.com/input-output-hk/cardano-engineering-handbook/blob/main/SECURITY.md). 19 | -------------------------------------------------------------------------------- /cabal_build_tests/fedora/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM fedora:latest 2 | 3 | # workaround for timezone manual intervention 4 | ENV TZ=Europe/London 5 | RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone 6 | 7 | ENV TAGGED_VERSION '' 8 | COPY install-node.sh / 9 | RUN yum update -y && \ 10 | yum install git diffutils gcc gcc-c++ awk tmux gmp-devel make tar xz wget zlib-devel libtool autoconf -y && \ 11 | chmod +x /install-node.sh 12 | 13 | CMD ./install-node.sh $TAGGED_VERSION 14 | -------------------------------------------------------------------------------- /cabal_build_tests/readme.md: -------------------------------------------------------------------------------- 1 | # README for Dockerized cardano-node Cabal build tests 2 | 3 | ## Prerequisites 4 | 5 | Podman or Docker are installed on the system. 6 | 7 | When using Docker: 8 | 9 | - Docker Engine is installed 10 | - User is in group 'docker' 11 | 12 | ## Run tests 13 | 14 | In the following description, "tag" means tagged release (e.g. "8.0.0"), not an arbitrary git tag. 15 | 16 | The "commit" can be any type of reference, like commit hash, tag or branch name. 17 | 18 | ### To test cardano-node Cabal build on Ubuntu 19 | 20 | `./run-ubuntu.sh -t tag -o ` 21 | 22 | `./run-ubuntu.sh -t commit -o ` 23 | 24 | ### To test cardano-node Cabal build on Fedora 25 | 26 | `./run-fedora.sh -t tag -o ` 27 | 28 | `./run-fedora.sh -t commit -o ` 29 | 30 | If "Success" is shown at the end and the command exits with code 0, then build has completed successfully. 31 | -------------------------------------------------------------------------------- /cabal_build_tests/run-fedora.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | if command -v podman > /dev/null; then 4 | container_manager="podman" 5 | elif command -v docker > /dev/null; then 6 | container_manager="docker" 7 | else 8 | echo "Neither podman nor docker are installed. Please install one of them and try again." >&2 9 | exit 1 10 | fi 11 | 12 | GIT_OBJECT_TYPE="" 13 | GIT_OBJECT="" 14 | 15 | while getopts t:o: flag; do 16 | case "${flag}" in 17 | t) GIT_OBJECT_TYPE=${OPTARG};; 18 | o) GIT_OBJECT=${OPTARG};; 19 | *) echo "Error in command line parsing" >&2 20 | exit 1 21 | esac 22 | done 23 | 24 | $container_manager build . -f fedora/Dockerfile -t cardano-node-fedora || exit 1 25 | $container_manager run \ 26 | --security-opt label=disable \ 27 | -it \ 28 | -e GIT_OBJECT_TYPE="$GIT_OBJECT_TYPE" \ 29 | -e GIT_OBJECT="$GIT_OBJECT" \ 30 | cardano-node-fedora 31 | -------------------------------------------------------------------------------- /cabal_build_tests/run-ubuntu.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | if command -v podman > /dev/null; then 4 | container_manager="podman" 5 | elif command -v docker > /dev/null; then 6 | container_manager="docker" 7 | else 8 | echo "Neither podman nor docker are installed. Please install one of them and try again." >&2 9 | exit 1 10 | fi 11 | 12 | GIT_OBJECT_TYPE="" 13 | GIT_OBJECT="" 14 | 15 | while getopts t:o: flag; do 16 | case "${flag}" in 17 | t) GIT_OBJECT_TYPE=${OPTARG};; 18 | o) GIT_OBJECT=${OPTARG};; 19 | *) echo "Error in command line parsing" >&2 20 | exit 1 21 | ;; 22 | esac 23 | done 24 | 25 | $container_manager build . -f ubuntu/Dockerfile -t cardano-node-ubuntu || exit 1 26 | $container_manager run \ 27 | --security-opt label=disable \ 28 | -it \ 29 | -e GIT_OBJECT_TYPE="$GIT_OBJECT_TYPE" \ 30 | -e GIT_OBJECT="$GIT_OBJECT" \ 31 | cardano-node-ubuntu 32 | -------------------------------------------------------------------------------- /cabal_build_tests/ubuntu/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:latest 2 | 3 | # workaround for timezone manual intervention 4 | ENV TZ=Europe/London 5 | RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone 6 | 7 | ENV TAGGED_VERSION '' 8 | COPY install-node.sh / 9 | RUN chmod +x /install-node.sh 10 | 11 | ENTRYPOINT ./install-node.sh $TAGGED_VERSION 12 | -------------------------------------------------------------------------------- /cardano_node_tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IntersectMBO/cardano-node-tests/d66004d326efc160e76c71e99f774b138fc3ec3c/cardano_node_tests/__init__.py -------------------------------------------------------------------------------- /cardano_node_tests/cluster_management/__init__.py: -------------------------------------------------------------------------------- 1 | """Functionality for parallel execution of tests on multiple cluster instances.""" 2 | -------------------------------------------------------------------------------- /cardano_node_tests/cluster_management/cache.py: -------------------------------------------------------------------------------- 1 | import dataclasses 2 | import typing as tp 3 | 4 | from cardano_clusterlib import clusterlib 5 | 6 | 7 | @dataclasses.dataclass 8 | class ClusterManagerCache: 9 | """Cache for a single cluster instance. 10 | 11 | Here goes only data that makes sense to reuse in multiple tests. 12 | """ 13 | 14 | # Single `ClusterLib` instance can be used in multiple tests executed on the same worker 15 | cluster_obj: clusterlib.ClusterLib | None = None 16 | # Data for initialized cluster instance 17 | test_data: dict = dataclasses.field(default_factory=dict) 18 | addrs_data: dict = dataclasses.field(default_factory=dict) 19 | last_checksum: str = "" 20 | 21 | 22 | class CacheManager: 23 | """Set of cache management methods.""" 24 | 25 | # Every pytest worker has its own cache, i.e. this cache is local to single worker 26 | cache: tp.ClassVar[dict[int, ClusterManagerCache]] = {} 27 | 28 | @classmethod 29 | def get_cache(cls) -> dict[int, ClusterManagerCache]: 30 | return cls.cache 31 | 32 | @classmethod 33 | def get_instance_cache(cls, instance_num: int) -> ClusterManagerCache: 34 | instance_cache = cls.cache.get(instance_num) 35 | if not instance_cache: 36 | instance_cache = ClusterManagerCache() 37 | cls.cache[instance_num] = instance_cache 38 | return instance_cache 39 | -------------------------------------------------------------------------------- /cardano_node_tests/cluster_management/cluster_management.py: -------------------------------------------------------------------------------- 1 | """Module for exposing useful components of cluster management.""" 2 | 3 | # flake8: noqa 4 | from cardano_node_tests.cluster_management.common import CLUSTER_LOCK 5 | from cardano_node_tests.cluster_management.manager import ClusterManager 6 | from cardano_node_tests.cluster_management.manager import FixtureCache 7 | from cardano_node_tests.cluster_management.resources import Resources 8 | -------------------------------------------------------------------------------- /cardano_node_tests/cluster_management/common.py: -------------------------------------------------------------------------------- 1 | from cardano_node_tests.utils import temptools 2 | 3 | CLUSTER_LOCK = ".cluster.lock" 4 | LOG_LOCK = ".manager_log.lock" 5 | START_CLUSTER_LOG = "start-cluster.log" 6 | ADDRS_DATA_DIRNAME = "addrs_data" 7 | 8 | 9 | def get_cluster_lock_file() -> str: 10 | pytest_tmp_dir = temptools.get_pytest_root_tmp() 11 | cluster_lock = f"{pytest_tmp_dir}/{CLUSTER_LOCK}" 12 | return cluster_lock 13 | -------------------------------------------------------------------------------- /cardano_node_tests/cluster_management/resources.py: -------------------------------------------------------------------------------- 1 | import re 2 | import typing as tp 3 | 4 | from cardano_node_tests.utils import configuration 5 | 6 | 7 | class Resources: 8 | """Resources that can be used for `lock_resources` or `use_resources`.""" 9 | 10 | # Whole cluster instance - this resource is used by every test. 11 | # It can be locked, so only single test will run. 12 | CLUSTER: tp.Final[str] = "cluster" 13 | POOL1: tp.Final[str] = "node-pool1" 14 | POOL2: tp.Final[str] = "node-pool2" 15 | POOL3: tp.Final[str] = "node-pool3" 16 | ALL_POOLS: tp.Final[tuple[str, ...]] = tuple( 17 | f"node-pool{i}" for i in range(1, configuration.NUM_POOLS + 1) 18 | ) 19 | # Reserve one pool for all tests where the pool will stop producing blocks 20 | POOL_FOR_OFFLINE: tp.Final[str] = POOL2 21 | PLUTUS: tp.Final[str] = "plutus" 22 | RESERVES: tp.Final[str] = "reserves" 23 | TREASURY: tp.Final[str] = "treasury" 24 | REWARDS: tp.Final[str] = "rewards" 25 | POTS: tp.Final[tuple[str, ...]] = (RESERVES, TREASURY, REWARDS) 26 | PERF: tp.Final[str] = "performance" 27 | DREPS: tp.Final[str] = "dreps" 28 | COMMITTEE: tp.Final[str] = "committee" 29 | 30 | 31 | _SANITIZE_RE = re.compile("[^a-zA-Z0-9_-]+") 32 | 33 | 34 | def sanitize_res_name(s: str) -> str: 35 | """Sanitize resource name to expected format.""" 36 | sanitized = _SANITIZE_RE.sub("_", s).strip()[0:20] 37 | return sanitized 38 | 39 | 40 | def get_unsanitized(ls: tp.Iterable[str]) -> list[str]: 41 | """Return unsanitized resource names from the list.""" 42 | return [s for s in ls if s != sanitize_res_name(s)] 43 | -------------------------------------------------------------------------------- /cardano_node_tests/cluster_scripts/common/stop-cluster: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -uo pipefail 4 | 5 | SOCKET_PATH="$(readlink -m "$CARDANO_NODE_SOCKET_PATH")" 6 | STATE_CLUSTER="${SOCKET_PATH%/*}" 7 | PID_FILE="${STATE_CLUSTER}/supervisord.pid" 8 | SUPERVISORD_SOCKET_PATH="${STATE_CLUSTER}/supervisord.sock" 9 | 10 | INSTANCE_NUM="%%INSTANCE_NUM%%" 11 | if [[ "$SOCKET_PATH" != *"/state-cluster${INSTANCE_NUM}/"* ]]; then 12 | echo "CARDANO_NODE_SOCKET_PATH must be set to a path containing 'state-cluster${INSTANCE_NUM}', line $LINENO" >&2 13 | exit 1 14 | fi 15 | 16 | if [ -e "$SUPERVISORD_SOCKET_PATH" ]; then 17 | supervisorctl -s "unix:///${SUPERVISORD_SOCKET_PATH}" stop all 18 | fi 19 | 20 | if [ ! -f "$PID_FILE" ]; then 21 | echo "Cluster is not running!" 22 | exit 0 23 | fi 24 | 25 | PID="$(<"$PID_FILE")" 26 | for _ in {1..5}; do 27 | if ! kill "$PID"; then 28 | break 29 | fi 30 | sleep 1 31 | if [ ! -f "$PID_FILE" ]; then 32 | break 33 | fi 34 | done 35 | 36 | rm -f "$PID_FILE" 37 | echo "Cluster terminated!" 38 | -------------------------------------------------------------------------------- /cardano_node_tests/cluster_scripts/conway_fast/byron-params.json: -------------------------------------------------------------------------------- 1 | { 2 | "heavyDelThd": "300000000000", 3 | "maxBlockSize": "2000000", 4 | "maxTxSize": "4096", 5 | "maxHeaderSize": "2000000", 6 | "maxProposalSize": "700", 7 | "mpcThd": "20000000000000", 8 | "scriptVersion": 0, 9 | "slotDuration": "2000", 10 | "softforkRule": { 11 | "initThd": "900000000000000", 12 | "minThd": "600000000000000", 13 | "thdDecrement": "50000000000000" 14 | }, 15 | "txFeePolicy": { 16 | "multiplier": "43946000000", 17 | "summand": "155381000000000" 18 | }, 19 | "unlockStakeEpoch": "18446744073709551615", 20 | "updateImplicit": "10000", 21 | "updateProposalThd": "100000000000000", 22 | "updateVoteThd": "1000000000000" 23 | } 24 | -------------------------------------------------------------------------------- /cardano_node_tests/cluster_scripts/conway_fast/cardano-node-bft1: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | echo "Starting cardano-node run with PID $$: cardano-node run" 4 | echo "--config ./state-cluster%%INSTANCE_NUM%%/config-bft1.json" 5 | echo "--database-path ./state-cluster%%INSTANCE_NUM%%/db-bft1" 6 | echo "--topology ./state-cluster%%INSTANCE_NUM%%/topology-bft1.json" 7 | echo "--host-addr 127.0.0.1" 8 | echo "--port %%NODE_PORT_BASE%%" 9 | echo "--socket-path ./state-cluster%%INSTANCE_NUM%%/bft1.socket $*" 10 | 11 | echo "..or, once again, in a single line:" 12 | echo "cardano-node run --config ./state-cluster%%INSTANCE_NUM%%/config-bft1.json --database-path ./state-cluster%%INSTANCE_NUM%%/db-bft1 --topology ./state-cluster%%INSTANCE_NUM%%/topology-bft1.json --host-addr 127.0.0.1 --port %%NODE_PORT_BASE%% --socket-path ./state-cluster%%INSTANCE_NUM%%/bft1.socket $*" 13 | 14 | 15 | exec cardano-node run --config ./state-cluster%%INSTANCE_NUM%%/config-bft1.json --database-path ./state-cluster%%INSTANCE_NUM%%/db-bft1 --topology ./state-cluster%%INSTANCE_NUM%%/topology-bft1.json --host-addr 127.0.0.1 --port %%NODE_PORT_BASE%% --socket-path ./state-cluster%%INSTANCE_NUM%%/bft1.socket "$@" 16 | -------------------------------------------------------------------------------- /cardano_node_tests/cluster_scripts/conway_fast/genesis.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "activeSlotsCoeff": 0.1, 3 | "protocolParams": { 4 | "poolDeposit": 500000000, 5 | "protocolVersion": { 6 | "minor": 0, 7 | "major": 9 8 | }, 9 | "minUTxOValue": 1, 10 | "decentralisationParam": 0.8, 11 | "maxTxSize": 16384, 12 | "minPoolCost": 0, 13 | "minFeeA": 44, 14 | "maxBlockBodySize": 65536, 15 | "minFeeB": 155381, 16 | "eMax": 18, 17 | "extraEntropy": { 18 | "tag": "NeutralNonce" 19 | }, 20 | "maxBlockHeaderSize": 1100, 21 | "keyDeposit": 400000, 22 | "nOpt": 500, 23 | "rho": 0.0022, 24 | "tau": 0.05, 25 | "a0": 0.3 26 | }, 27 | "protocolMagicId": 42, 28 | "genDelegs": {}, 29 | "updateQuorum": 1, 30 | "networkId": "Testnet", 31 | "initialFunds": {}, 32 | "maxLovelaceSupply": 45000000000000000, 33 | "networkMagic": 42, 34 | "epochLength": 1000, 35 | "staking": { 36 | "pools": {}, 37 | "stake": {} 38 | }, 39 | "systemStart": "2020-07-08T02:39:16.033076859Z", 40 | "slotsPerKESPeriod": 129600, 41 | "slotLength": 0.2, 42 | "maxKESEvolutions": 64, 43 | "securityParam": 10 44 | } 45 | -------------------------------------------------------------------------------- /cardano_node_tests/cluster_scripts/conway_fast/postgres-setup.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env -S nix develop --accept-flake-config github:IntersectMBO/cardano-node-tests#postgres -i -k CARDANO_NODE_SOCKET_PATH -k PGHOST -k PGPORT -k PGUSER --no-write-lock-file -c bash 2 | # shellcheck shell=bash 3 | 4 | set -euo pipefail 5 | 6 | SOCKET_PATH="$(readlink -m "$CARDANO_NODE_SOCKET_PATH")" 7 | STATE_CLUSTER="${SOCKET_PATH%/*}" 8 | INSTANCE_NUM="${STATE_CLUSTER#*state-cluster}" 9 | DATABASE_NAME="dbsync${INSTANCE_NUM}" 10 | 11 | PGPASSFILE="$STATE_CLUSTER/pgpass" 12 | export PGHOST="${PGHOST:-localhost}" 13 | export PGPORT="${PGPORT:-5432}" 14 | export PGUSER="${PGUSER:-postgres}" 15 | 16 | echo "Deleting db $DATABASE_NAME" 17 | psql -d "$DATABASE_NAME" -c "SELECT pg_terminate_backend(pg_stat_activity.pid) FROM pg_stat_activity WHERE datname = current_database() AND pid <> pg_backend_pid();" > /dev/null 2>&1 || : 18 | dropdb --if-exists "$DATABASE_NAME" > /dev/null 19 | echo "Setting up db $DATABASE_NAME" 20 | createdb -T template0 --owner="$PGUSER" --encoding=UTF8 "$DATABASE_NAME" 21 | 22 | echo "${PGHOST}:${PGPORT}:${DATABASE_NAME}:${PGUSER}:secret" > "$PGPASSFILE" 23 | chmod 600 "$PGPASSFILE" 24 | -------------------------------------------------------------------------------- /cardano_node_tests/cluster_scripts/conway_fast/run-cardano-dbsync: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -uo pipefail 4 | 5 | SOCKET_PATH="$(readlink -m "$CARDANO_NODE_SOCKET_PATH")" 6 | STATE_CLUSTER="${SOCKET_PATH%/*}" 7 | STATE_CLUSTER_NAME="${STATE_CLUSTER##*/}" 8 | 9 | export PGPASSFILE="$STATE_CLUSTER/pgpass" 10 | export PGHOST="${PGHOST:-localhost}" 11 | export PGPORT="${PGPORT:-5432}" 12 | export PGUSER="${PGUSER:-postgres}" 13 | 14 | exec "$DBSYNC_REPO/db-sync-node/bin/cardano-db-sync" --config "./$STATE_CLUSTER_NAME/dbsync-config.yaml" --socket-path "$CARDANO_NODE_SOCKET_PATH" --state-dir "./$STATE_CLUSTER_NAME/db-sync" --schema-dir "$DBSYNC_REPO/schema" 15 | -------------------------------------------------------------------------------- /cardano_node_tests/cluster_scripts/conway_fast/run-cardano-smash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -uo pipefail 4 | 5 | SOCKET_PATH="$(readlink -m "$CARDANO_NODE_SOCKET_PATH")" 6 | STATE_CLUSTER="${SOCKET_PATH%/*}" 7 | STATE_CLUSTER_NAME="${STATE_CLUSTER##*/}" 8 | 9 | export PGPASSFILE="$STATE_CLUSTER/pgpass" 10 | export SMASH_ADMIN="${SMASH_ADMIN:-admin}" 11 | export SMASH_PASSWORD="${SMASH_PASSWORD:-password}" 12 | export SMASH_ADMINS_FILE="$STATE_CLUSTER/admins.txt" 13 | 14 | echo "${SMASH_ADMIN}, ${SMASH_PASSWORD}" > "$SMASH_ADMINS_FILE" 15 | 16 | exec "$DBSYNC_REPO/smash-server/bin/cardano-smash-server" --config "./$STATE_CLUSTER_NAME/dbsync-config.yaml" --port %%SMASH_PORT%% --admins "$SMASH_ADMINS_FILE" 17 | -------------------------------------------------------------------------------- /cardano_node_tests/cluster_scripts/conway_fast/run-cardano-submit-api: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | testnet_magic="$(<./state-cluster%%INSTANCE_NUM%%/db-bft1/protocolMagicId)" 4 | 5 | echo "Starting cardano-submit-api with PID $$: cardano-submit-api" 6 | echo "--config ./state-cluster%%INSTANCE_NUM%%/submit-api-config.json" 7 | echo "--socket-path ./state-cluster%%INSTANCE_NUM%%/bft1.socket" 8 | echo "--listen-address 127.0.0.1" 9 | echo "--port %%SUBMIT_API_PORT%%" 10 | echo "--metrics-port %%METRICS_SUBMIT_API_PORT%%" 11 | echo --testnet-magic "$testnet_magic" 12 | echo "..or, once again, in a single line:" 13 | echo cardano-submit-api --config ./state-cluster%%INSTANCE_NUM%%/submit-api-config.json --socket-path ./state-cluster%%INSTANCE_NUM%%/bft1.socket --listen-address 127.0.0.1 --port %%SUBMIT_API_PORT%% --metrics-port %%METRICS_SUBMIT_API_PORT%% --testnet-magic "$testnet_magic" 14 | 15 | # shellcheck disable=SC2086 16 | exec cardano-submit-api --config ./state-cluster%%INSTANCE_NUM%%/submit-api-config.json --socket-path ./state-cluster%%INSTANCE_NUM%%/bft1.socket --listen-address 127.0.0.1 --port %%SUBMIT_API_PORT%% --metrics-port %%METRICS_SUBMIT_API_PORT%% --testnet-magic "$testnet_magic" 17 | -------------------------------------------------------------------------------- /cardano_node_tests/cluster_scripts/conway_fast/start-cluster: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | SCRIPT_DIR="$(readlink -m "${0%/*}")" 4 | # shellcheck disable=SC1091 5 | source "${SCRIPT_DIR}/start-cluster-fast" 6 | -------------------------------------------------------------------------------- /cardano_node_tests/cluster_scripts/conway_fast/template-cardano-node-pool: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | echo "Starting cardano-node run with PID $$: cardano-node run" 4 | echo "--config ./state-cluster%%INSTANCE_NUM%%/config-pool%%POOL_NUM%%.json" 5 | echo "--database-path ./state-cluster%%INSTANCE_NUM%%/db-pool%%POOL_NUM%%" 6 | echo "--topology ./state-cluster%%INSTANCE_NUM%%/topology-pool%%POOL_NUM%%.json" 7 | echo "--host-addr 127.0.0.1" 8 | echo "--port %%NODE_PORT%%" 9 | echo "--socket-path ./state-cluster%%INSTANCE_NUM%%/pool%%POOL_NUM%%.socket" 10 | echo "--shelley-vrf-key ./state-cluster%%INSTANCE_NUM%%/nodes/node-pool%%POOL_NUM%%/vrf.skey" 11 | echo "--shelley-kes-key ./state-cluster%%INSTANCE_NUM%%/nodes/node-pool%%POOL_NUM%%/kes.skey" 12 | echo "--shelley-operational-certificate ./state-cluster%%INSTANCE_NUM%%/nodes/node-pool%%POOL_NUM%%/op.cert $*" 13 | 14 | echo "..or, once again, in a single line:" 15 | echo "cardano-node run --config ./state-cluster%%INSTANCE_NUM%%/config-pool%%POOL_NUM%%.json --database-path ./state-cluster%%INSTANCE_NUM%%/db-pool%%POOL_NUM%% --topology ./state-cluster%%INSTANCE_NUM%%/topology-pool%%POOL_NUM%%.json --host-addr 127.0.0.1 --port %%NODE_PORT%% --socket-path ./state-cluster%%INSTANCE_NUM%%/pool%%POOL_NUM%%.socket --shelley-vrf-key ./state-cluster%%INSTANCE_NUM%%/nodes/node-pool%%POOL_NUM%%/vrf.skey --shelley-kes-key ./state-cluster%%INSTANCE_NUM%%/nodes/node-pool%%POOL_NUM%%/kes.skey --shelley-operational-certificate ./state-cluster%%INSTANCE_NUM%%/nodes/node-pool%%POOL_NUM%%/op.cert $*" 16 | 17 | 18 | exec cardano-node run --config ./state-cluster%%INSTANCE_NUM%%/config-pool%%POOL_NUM%%.json --database-path ./state-cluster%%INSTANCE_NUM%%/db-pool%%POOL_NUM%% --topology ./state-cluster%%INSTANCE_NUM%%/topology-pool%%POOL_NUM%%.json --host-addr 127.0.0.1 --port %%NODE_PORT%% --socket-path ./state-cluster%%INSTANCE_NUM%%/pool%%POOL_NUM%%.socket --shelley-vrf-key ./state-cluster%%INSTANCE_NUM%%/nodes/node-pool%%POOL_NUM%%/vrf.skey --shelley-kes-key ./state-cluster%%INSTANCE_NUM%%/nodes/node-pool%%POOL_NUM%%/kes.skey --shelley-operational-certificate ./state-cluster%%INSTANCE_NUM%%/nodes/node-pool%%POOL_NUM%%/op.cert "$@" 19 | -------------------------------------------------------------------------------- /cardano_node_tests/cluster_scripts/conway_fast/testnet.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "conway_fast", 3 | "description": "Local testnet that starts directly in Conway era.", 4 | "control_env": { 5 | "DBSYNC_REPO": "will start and configure db-sync if the value is path to db-sync repository", 6 | "SMASH": "if set, will start and configure smash", 7 | "ENABLE_LEGACY": "if set, local cluster will use legacy networking", 8 | "MIXED_P2P": "if set, local cluster will use P2P for some nodes and legacy topology for others", 9 | "UTXO_BACKEND": "'mem' or 'disk', default is 'mem' (or legacy) if unset", 10 | "NO_CC": "if set, will not create committee", 11 | "PV9": "if set, will use protocol version 9", 12 | "DRY_RUN": "if set, will not start the cluster" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /cardano_node_tests/cluster_scripts/conway_slow/byron-params.json: -------------------------------------------------------------------------------- 1 | { 2 | "heavyDelThd": "300000000000", 3 | "maxBlockSize": "2000000", 4 | "maxTxSize": "4096", 5 | "maxHeaderSize": "2000000", 6 | "maxProposalSize": "700", 7 | "mpcThd": "20000000000000", 8 | "scriptVersion": 0, 9 | "slotDuration": "2000", 10 | "softforkRule": { 11 | "initThd": "900000000000000", 12 | "minThd": "600000000000000", 13 | "thdDecrement": "50000000000000" 14 | }, 15 | "txFeePolicy": { 16 | "multiplier": "43946000000", 17 | "summand": "155381000000000" 18 | }, 19 | "unlockStakeEpoch": "18446744073709551615", 20 | "updateImplicit": "10000", 21 | "updateProposalThd": "100000000000000", 22 | "updateVoteThd": "1000000000000" 23 | } 24 | -------------------------------------------------------------------------------- /cardano_node_tests/cluster_scripts/conway_slow/cardano-node-bft1: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | echo "Starting cardano-node run with PID $$: cardano-node run" 4 | echo "--config ./state-cluster%%INSTANCE_NUM%%/config-bft1.json" 5 | echo "--database-path ./state-cluster%%INSTANCE_NUM%%/db-bft1" 6 | echo "--topology ./state-cluster%%INSTANCE_NUM%%/topology-bft1.json" 7 | echo "--host-addr 127.0.0.1" 8 | echo "--port %%NODE_PORT_BASE%%" 9 | echo "--socket-path ./state-cluster%%INSTANCE_NUM%%/bft1.socket" 10 | echo "--signing-key ./state-cluster%%INSTANCE_NUM%%/nodes/node-bft1/byron-deleg.key" 11 | echo "--delegation-certificate ./state-cluster%%INSTANCE_NUM%%/nodes/node-bft1/byron-deleg.json" 12 | echo "--shelley-vrf-key ./state-cluster%%INSTANCE_NUM%%/nodes/node-bft1/vrf.skey" 13 | echo "--shelley-kes-key ./state-cluster%%INSTANCE_NUM%%/nodes/node-bft1/kes.skey" 14 | echo "--shelley-operational-certificate ./state-cluster%%INSTANCE_NUM%%/nodes/node-bft1/op.cert $*" 15 | 16 | echo "..or, once again, in a single line:" 17 | echo "cardano-node run --config ./state-cluster%%INSTANCE_NUM%%/config-bft1.json --database-path ./state-cluster%%INSTANCE_NUM%%/db-bft1 --topology ./state-cluster%%INSTANCE_NUM%%/topology-bft1.json --host-addr 127.0.0.1 --port %%NODE_PORT_BASE%% --socket-path ./state-cluster%%INSTANCE_NUM%%/bft1.socket --signing-key ./state-cluster%%INSTANCE_NUM%%/nodes/node-bft1/byron-deleg.key --delegation-certificate ./state-cluster%%INSTANCE_NUM%%/nodes/node-bft1/byron-deleg.json --shelley-vrf-key ./state-cluster%%INSTANCE_NUM%%/nodes/node-bft1/vrf.skey --shelley-kes-key ./state-cluster%%INSTANCE_NUM%%/nodes/node-bft1/kes.skey --shelley-operational-certificate ./state-cluster%%INSTANCE_NUM%%/nodes/node-bft1/op.cert $*" 18 | 19 | 20 | exec cardano-node run --config ./state-cluster%%INSTANCE_NUM%%/config-bft1.json --database-path ./state-cluster%%INSTANCE_NUM%%/db-bft1 --topology ./state-cluster%%INSTANCE_NUM%%/topology-bft1.json --host-addr 127.0.0.1 --port %%NODE_PORT_BASE%% --socket-path ./state-cluster%%INSTANCE_NUM%%/bft1.socket --signing-key ./state-cluster%%INSTANCE_NUM%%/nodes/node-bft1/byron-deleg.key --delegation-certificate ./state-cluster%%INSTANCE_NUM%%/nodes/node-bft1/byron-deleg.json --shelley-vrf-key ./state-cluster%%INSTANCE_NUM%%/nodes/node-bft1/vrf.skey --shelley-kes-key ./state-cluster%%INSTANCE_NUM%%/nodes/node-bft1/kes.skey --shelley-operational-certificate ./state-cluster%%INSTANCE_NUM%%/nodes/node-bft1/op.cert "$@" 21 | -------------------------------------------------------------------------------- /cardano_node_tests/cluster_scripts/conway_slow/genesis.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "activeSlotsCoeff": 0.1, 3 | "protocolParams": { 4 | "poolDeposit": 500000000, 5 | "protocolVersion": { 6 | "minor": 0, 7 | "major": 2 8 | }, 9 | "minUTxOValue": 1, 10 | "decentralisationParam": 0.8, 11 | "maxTxSize": 16384, 12 | "minPoolCost": 0, 13 | "minFeeA": 44, 14 | "maxBlockBodySize": 65536, 15 | "minFeeB": 155381, 16 | "eMax": 18, 17 | "extraEntropy": { 18 | "tag": "NeutralNonce" 19 | }, 20 | "maxBlockHeaderSize": 1100, 21 | "keyDeposit": 400000, 22 | "nOpt": 500, 23 | "rho": 0.0022, 24 | "tau": 0.05, 25 | "a0": 0.3 26 | }, 27 | "protocolMagicId": 42, 28 | "genDelegs": {}, 29 | "updateQuorum": 1, 30 | "networkId": "Testnet", 31 | "initialFunds": {}, 32 | "maxLovelaceSupply": 45000000000000000, 33 | "networkMagic": 42, 34 | "epochLength": 1000, 35 | "staking": { 36 | "pools": {}, 37 | "stake": {} 38 | }, 39 | "systemStart": "2020-07-08T02:39:16.033076859Z", 40 | "slotsPerKESPeriod": 129600, 41 | "slotLength": 0.2, 42 | "maxKESEvolutions": 64, 43 | "securityParam": 10 44 | } 45 | -------------------------------------------------------------------------------- /cardano_node_tests/cluster_scripts/conway_slow/postgres-setup.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env -S nix develop --accept-flake-config github:IntersectMBO/cardano-node-tests#postgres -i -k CARDANO_NODE_SOCKET_PATH -k PGHOST -k PGPORT -k PGUSER --no-write-lock-file -c bash 2 | # shellcheck shell=bash 3 | 4 | set -euo pipefail 5 | 6 | SOCKET_PATH="$(readlink -m "$CARDANO_NODE_SOCKET_PATH")" 7 | STATE_CLUSTER="${SOCKET_PATH%/*}" 8 | INSTANCE_NUM="${STATE_CLUSTER#*state-cluster}" 9 | DATABASE_NAME="dbsync${INSTANCE_NUM}" 10 | 11 | PGPASSFILE="$STATE_CLUSTER/pgpass" 12 | export PGHOST="${PGHOST:-localhost}" 13 | export PGPORT="${PGPORT:-5432}" 14 | export PGUSER="${PGUSER:-postgres}" 15 | 16 | echo "Deleting db $DATABASE_NAME" 17 | psql -d "$DATABASE_NAME" -c "SELECT pg_terminate_backend(pg_stat_activity.pid) FROM pg_stat_activity WHERE datname = current_database() AND pid <> pg_backend_pid();" > /dev/null 2>&1 || : 18 | dropdb --if-exists "$DATABASE_NAME" > /dev/null 19 | echo "Setting up db $DATABASE_NAME" 20 | createdb -T template0 --owner="$PGUSER" --encoding=UTF8 "$DATABASE_NAME" 21 | 22 | echo "${PGHOST}:${PGPORT}:${DATABASE_NAME}:${PGUSER}:secret" > "$PGPASSFILE" 23 | chmod 600 "$PGPASSFILE" 24 | -------------------------------------------------------------------------------- /cardano_node_tests/cluster_scripts/conway_slow/run-cardano-dbsync: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -uo pipefail 4 | 5 | SOCKET_PATH="$(readlink -m "$CARDANO_NODE_SOCKET_PATH")" 6 | STATE_CLUSTER="${SOCKET_PATH%/*}" 7 | STATE_CLUSTER_NAME="${STATE_CLUSTER##*/}" 8 | 9 | export PGPASSFILE="$STATE_CLUSTER/pgpass" 10 | export PGHOST="${PGHOST:-localhost}" 11 | export PGPORT="${PGPORT:-5432}" 12 | export PGUSER="${PGUSER:-postgres}" 13 | 14 | exec "$DBSYNC_REPO/db-sync-node/bin/cardano-db-sync" --config "./$STATE_CLUSTER_NAME/dbsync-config.yaml" --socket-path "$CARDANO_NODE_SOCKET_PATH" --state-dir "./$STATE_CLUSTER_NAME/db-sync" --schema-dir "$DBSYNC_REPO/schema" 15 | -------------------------------------------------------------------------------- /cardano_node_tests/cluster_scripts/conway_slow/run-cardano-smash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -uo pipefail 4 | 5 | SOCKET_PATH="$(readlink -m "$CARDANO_NODE_SOCKET_PATH")" 6 | STATE_CLUSTER="${SOCKET_PATH%/*}" 7 | STATE_CLUSTER_NAME="${STATE_CLUSTER##*/}" 8 | 9 | export PGPASSFILE="$STATE_CLUSTER/pgpass" 10 | export SMASH_ADMIN="${SMASH_ADMIN:-admin}" 11 | export SMASH_PASSWORD="${SMASH_PASSWORD:-password}" 12 | export SMASH_ADMINS_FILE="$STATE_CLUSTER/admins.txt" 13 | 14 | echo "${SMASH_ADMIN}, ${SMASH_PASSWORD}" > "$SMASH_ADMINS_FILE" 15 | 16 | exec "$DBSYNC_REPO/smash-server/bin/cardano-smash-server" --config "./$STATE_CLUSTER_NAME/dbsync-config.yaml" --port %%SMASH_PORT%% --admins "$SMASH_ADMINS_FILE" 17 | -------------------------------------------------------------------------------- /cardano_node_tests/cluster_scripts/conway_slow/run-cardano-submit-api: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | testnet_magic="$(<./state-cluster%%INSTANCE_NUM%%/db-bft1/protocolMagicId)" 4 | 5 | echo "Starting cardano-submit-api with PID $$: cardano-submit-api" 6 | echo "--config ./state-cluster%%INSTANCE_NUM%%/submit-api-config.json" 7 | echo "--socket-path ./state-cluster%%INSTANCE_NUM%%/bft1.socket" 8 | echo "--listen-address 127.0.0.1" 9 | echo "--port %%SUBMIT_API_PORT%%" 10 | echo "--metrics-port %%METRICS_SUBMIT_API_PORT%%" 11 | echo --testnet-magic "$testnet_magic" 12 | echo "..or, once again, in a single line:" 13 | echo cardano-submit-api --config ./state-cluster%%INSTANCE_NUM%%/submit-api-config.json --socket-path ./state-cluster%%INSTANCE_NUM%%/bft1.socket --listen-address 127.0.0.1 --port %%SUBMIT_API_PORT%% --metrics-port %%METRICS_SUBMIT_API_PORT%% --testnet-magic "$testnet_magic" 14 | 15 | # shellcheck disable=SC2086 16 | exec cardano-submit-api --config ./state-cluster%%INSTANCE_NUM%%/submit-api-config.json --socket-path ./state-cluster%%INSTANCE_NUM%%/bft1.socket --listen-address 127.0.0.1 --port %%SUBMIT_API_PORT%% --metrics-port %%METRICS_SUBMIT_API_PORT%% --testnet-magic "$testnet_magic" 17 | -------------------------------------------------------------------------------- /cardano_node_tests/cluster_scripts/conway_slow/template-cardano-node-pool: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | echo "Starting cardano-node run with PID $$: cardano-node run" 4 | echo "--config ./state-cluster%%INSTANCE_NUM%%/config-pool%%POOL_NUM%%.json" 5 | echo "--database-path ./state-cluster%%INSTANCE_NUM%%/db-pool%%POOL_NUM%%" 6 | echo "--topology ./state-cluster%%INSTANCE_NUM%%/topology-pool%%POOL_NUM%%.json" 7 | echo "--host-addr 127.0.0.1" 8 | echo "--port %%NODE_PORT%%" 9 | echo "--socket-path ./state-cluster%%INSTANCE_NUM%%/pool%%POOL_NUM%%.socket" 10 | echo "--shelley-vrf-key ./state-cluster%%INSTANCE_NUM%%/nodes/node-pool%%POOL_NUM%%/vrf.skey" 11 | echo "--shelley-kes-key ./state-cluster%%INSTANCE_NUM%%/nodes/node-pool%%POOL_NUM%%/kes.skey" 12 | echo "--shelley-operational-certificate ./state-cluster%%INSTANCE_NUM%%/nodes/node-pool%%POOL_NUM%%/op.cert $*" 13 | 14 | echo "..or, once again, in a single line:" 15 | echo "cardano-node run --config ./state-cluster%%INSTANCE_NUM%%/config-pool%%POOL_NUM%%.json --database-path ./state-cluster%%INSTANCE_NUM%%/db-pool%%POOL_NUM%% --topology ./state-cluster%%INSTANCE_NUM%%/topology-pool%%POOL_NUM%%.json --host-addr 127.0.0.1 --port %%NODE_PORT%% --socket-path ./state-cluster%%INSTANCE_NUM%%/pool%%POOL_NUM%%.socket --shelley-vrf-key ./state-cluster%%INSTANCE_NUM%%/nodes/node-pool%%POOL_NUM%%/vrf.skey --shelley-kes-key ./state-cluster%%INSTANCE_NUM%%/nodes/node-pool%%POOL_NUM%%/kes.skey --shelley-operational-certificate ./state-cluster%%INSTANCE_NUM%%/nodes/node-pool%%POOL_NUM%%/op.cert $*" 16 | 17 | 18 | exec cardano-node run --config ./state-cluster%%INSTANCE_NUM%%/config-pool%%POOL_NUM%%.json --database-path ./state-cluster%%INSTANCE_NUM%%/db-pool%%POOL_NUM%% --topology ./state-cluster%%INSTANCE_NUM%%/topology-pool%%POOL_NUM%%.json --host-addr 127.0.0.1 --port %%NODE_PORT%% --socket-path ./state-cluster%%INSTANCE_NUM%%/pool%%POOL_NUM%%.socket --shelley-vrf-key ./state-cluster%%INSTANCE_NUM%%/nodes/node-pool%%POOL_NUM%%/vrf.skey --shelley-kes-key ./state-cluster%%INSTANCE_NUM%%/nodes/node-pool%%POOL_NUM%%/kes.skey --shelley-operational-certificate ./state-cluster%%INSTANCE_NUM%%/nodes/node-pool%%POOL_NUM%%/op.cert "$@" 19 | -------------------------------------------------------------------------------- /cardano_node_tests/cluster_scripts/conway_slow/testnet.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "conway_slow", 3 | "description": "Local testnet that starts in Byron era and hard-forks through all the protocol versions until it gets to Conway.", 4 | "control_env": { 5 | "DBSYNC_REPO": "will start and configure db-sync if the value is path to db-sync repository", 6 | "SMASH": "if set, will start and configure smash", 7 | "ENABLE_LEGACY": "if set, local cluster will use legacy networking", 8 | "MIXED_P2P": "if set, local cluster will use P2P for some nodes and legacy topology for others", 9 | "UTXO_BACKEND": "'mem' or 'disk', default is 'mem' (or legacy) if unset", 10 | "NO_CC": "if set, will not create committee", 11 | "PV9": "if set, will use protocol version 9", 12 | "DRY_RUN": "if set, will not start the cluster" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /cardano_node_tests/cluster_scripts/mainnet_fast/byron-params.json: -------------------------------------------------------------------------------- 1 | { 2 | "heavyDelThd": "300000000000", 3 | "maxBlockSize": "2000000", 4 | "maxTxSize": "4096", 5 | "maxHeaderSize": "2000000", 6 | "maxProposalSize": "700", 7 | "mpcThd": "20000000000000", 8 | "scriptVersion": 0, 9 | "slotDuration": "20000", 10 | "softforkRule": { 11 | "initThd": "900000000000000", 12 | "minThd": "600000000000000", 13 | "thdDecrement": "50000000000000" 14 | }, 15 | "txFeePolicy": { 16 | "summand": "155381000000000", 17 | "multiplier": "43946000000" 18 | }, 19 | "unlockStakeEpoch": "18446744073709551615", 20 | "updateImplicit": "10000", 21 | "updateProposalThd": "100000000000000", 22 | "updateVoteThd": "1000000000000" 23 | } 24 | -------------------------------------------------------------------------------- /cardano_node_tests/cluster_scripts/mainnet_fast/cardano-node-bft1: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | echo "Starting cardano-node run with PID $$: cardano-node run" 4 | echo "--config ./state-cluster%%INSTANCE_NUM%%/config-bft1.json" 5 | echo "--database-path ./state-cluster%%INSTANCE_NUM%%/db-bft1" 6 | echo "--topology ./state-cluster%%INSTANCE_NUM%%/topology-bft1.json" 7 | echo "--host-addr 127.0.0.1" 8 | echo "--port %%NODE_PORT_BASE%%" 9 | echo "--socket-path ./state-cluster%%INSTANCE_NUM%%/bft1.socket $*" 10 | 11 | echo "..or, once again, in a single line:" 12 | echo "cardano-node run --config ./state-cluster%%INSTANCE_NUM%%/config-bft1.json --database-path ./state-cluster%%INSTANCE_NUM%%/db-bft1 --topology ./state-cluster%%INSTANCE_NUM%%/topology-bft1.json --host-addr 127.0.0.1 --port %%NODE_PORT_BASE%% --socket-path ./state-cluster%%INSTANCE_NUM%%/bft1.socket $*" 13 | 14 | 15 | exec cardano-node run --config ./state-cluster%%INSTANCE_NUM%%/config-bft1.json --database-path ./state-cluster%%INSTANCE_NUM%%/db-bft1 --topology ./state-cluster%%INSTANCE_NUM%%/topology-bft1.json --host-addr 127.0.0.1 --port %%NODE_PORT_BASE%% --socket-path ./state-cluster%%INSTANCE_NUM%%/bft1.socket "$@" 16 | -------------------------------------------------------------------------------- /cardano_node_tests/cluster_scripts/mainnet_fast/genesis.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "activeSlotsCoeff": 0.05, 3 | "epochLength": 432000, 4 | "genDelegs": {}, 5 | "initialFunds": {}, 6 | "maxKESEvolutions": 62, 7 | "maxLovelaceSupply": 45000000000000000, 8 | "networkId": "Testnet", 9 | "networkMagic": 42, 10 | "protocolParams": { 11 | "protocolVersion": { 12 | "minor": 0, 13 | "major": 9 14 | }, 15 | "decentralisationParam": 1, 16 | "eMax": 18, 17 | "extraEntropy": { 18 | "tag": "NeutralNonce" 19 | }, 20 | "maxTxSize": 16384, 21 | "maxBlockBodySize": 65536, 22 | "maxBlockHeaderSize": 1100, 23 | "minFeeA": 44, 24 | "minFeeB": 155381, 25 | "minUTxOValue": 1000000, 26 | "poolDeposit": 500000000, 27 | "minPoolCost": 340000000, 28 | "keyDeposit": 2000000, 29 | "nOpt": 150, 30 | "rho": 0.003, 31 | "tau": 0.2, 32 | "a0": 0.3 33 | }, 34 | "securityParam": 2160, 35 | "slotLength": 1, 36 | "slotsPerKESPeriod": 129600, 37 | "staking": { 38 | "pools": {}, 39 | "stake": {} 40 | }, 41 | "systemStart": "2020-07-08T02:39:16.033076859Z", 42 | "updateQuorum": 1, 43 | "protocolMagicId": 42 44 | } 45 | -------------------------------------------------------------------------------- /cardano_node_tests/cluster_scripts/mainnet_fast/postgres-setup.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env -S nix develop --accept-flake-config github:IntersectMBO/cardano-node-tests#postgres -i -k CARDANO_NODE_SOCKET_PATH -k PGHOST -k PGPORT -k PGUSER --no-write-lock-file -c bash 2 | # shellcheck shell=bash 3 | 4 | set -euo pipefail 5 | 6 | SOCKET_PATH="$(readlink -m "$CARDANO_NODE_SOCKET_PATH")" 7 | STATE_CLUSTER="${SOCKET_PATH%/*}" 8 | INSTANCE_NUM="${STATE_CLUSTER#*state-cluster}" 9 | DATABASE_NAME="dbsync${INSTANCE_NUM}" 10 | 11 | PGPASSFILE="$STATE_CLUSTER/pgpass" 12 | export PGHOST="${PGHOST:-localhost}" 13 | export PGPORT="${PGPORT:-5432}" 14 | export PGUSER="${PGUSER:-postgres}" 15 | 16 | echo "Deleting db $DATABASE_NAME" 17 | psql -d "$DATABASE_NAME" -c "SELECT pg_terminate_backend(pg_stat_activity.pid) FROM pg_stat_activity WHERE datname = current_database() AND pid <> pg_backend_pid();" > /dev/null 2>&1 || : 18 | dropdb --if-exists "$DATABASE_NAME" > /dev/null 19 | echo "Setting up db $DATABASE_NAME" 20 | createdb -T template0 --owner="$PGUSER" --encoding=UTF8 "$DATABASE_NAME" 21 | 22 | echo "${PGHOST}:${PGPORT}:${DATABASE_NAME}:${PGUSER}:secret" > "$PGPASSFILE" 23 | chmod 600 "$PGPASSFILE" 24 | -------------------------------------------------------------------------------- /cardano_node_tests/cluster_scripts/mainnet_fast/run-cardano-dbsync: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -uo pipefail 4 | 5 | SOCKET_PATH="$(readlink -m "$CARDANO_NODE_SOCKET_PATH")" 6 | STATE_CLUSTER="${SOCKET_PATH%/*}" 7 | STATE_CLUSTER_NAME="${STATE_CLUSTER##*/}" 8 | 9 | export PGPASSFILE="$STATE_CLUSTER/pgpass" 10 | export PGHOST="${PGHOST:-localhost}" 11 | export PGPORT="${PGPORT:-5432}" 12 | export PGUSER="${PGUSER:-postgres}" 13 | 14 | exec "$DBSYNC_REPO/db-sync-node/bin/cardano-db-sync" --config "./$STATE_CLUSTER_NAME/dbsync-config.yaml" --socket-path "$CARDANO_NODE_SOCKET_PATH" --state-dir "./$STATE_CLUSTER_NAME/db-sync" --schema-dir "$DBSYNC_REPO/schema" 15 | -------------------------------------------------------------------------------- /cardano_node_tests/cluster_scripts/mainnet_fast/run-cardano-smash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -uo pipefail 4 | 5 | SOCKET_PATH="$(readlink -m "$CARDANO_NODE_SOCKET_PATH")" 6 | STATE_CLUSTER="${SOCKET_PATH%/*}" 7 | STATE_CLUSTER_NAME="${STATE_CLUSTER##*/}" 8 | 9 | export PGPASSFILE="$STATE_CLUSTER/pgpass" 10 | export SMASH_ADMIN="${SMASH_ADMIN:-admin}" 11 | export SMASH_PASSWORD="${SMASH_PASSWORD:-password}" 12 | export SMASH_ADMINS_FILE="$STATE_CLUSTER/admins.txt" 13 | 14 | echo "${SMASH_ADMIN}, ${SMASH_PASSWORD}" > "$SMASH_ADMINS_FILE" 15 | 16 | exec "$DBSYNC_REPO/smash-server/bin/cardano-smash-server" --config "./$STATE_CLUSTER_NAME/dbsync-config.yaml" --port %%SMASH_PORT%% --admins "$SMASH_ADMINS_FILE" 17 | -------------------------------------------------------------------------------- /cardano_node_tests/cluster_scripts/mainnet_fast/run-cardano-submit-api: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | testnet_magic="$(<./state-cluster%%INSTANCE_NUM%%/db-bft1/protocolMagicId)" 4 | 5 | echo "Starting cardano-submit-api with PID $$: cardano-submit-api" 6 | echo "--config ./state-cluster%%INSTANCE_NUM%%/submit-api-config.json" 7 | echo "--socket-path ./state-cluster%%INSTANCE_NUM%%/bft1.socket" 8 | echo "--listen-address 127.0.0.1" 9 | echo "--port %%SUBMIT_API_PORT%%" 10 | echo "--metrics-port %%METRICS_SUBMIT_API_PORT%%" 11 | echo --testnet-magic "$testnet_magic" 12 | echo "..or, once again, in a single line:" 13 | echo cardano-submit-api --config ./state-cluster%%INSTANCE_NUM%%/submit-api-config.json --socket-path ./state-cluster%%INSTANCE_NUM%%/bft1.socket --listen-address 127.0.0.1 --port %%SUBMIT_API_PORT%% --metrics-port %%METRICS_SUBMIT_API_PORT%% --testnet-magic "$testnet_magic" 14 | 15 | # shellcheck disable=SC2086 16 | exec cardano-submit-api --config ./state-cluster%%INSTANCE_NUM%%/submit-api-config.json --socket-path ./state-cluster%%INSTANCE_NUM%%/bft1.socket --listen-address 127.0.0.1 --port %%SUBMIT_API_PORT%% --metrics-port %%METRICS_SUBMIT_API_PORT%% --testnet-magic "$testnet_magic" 17 | -------------------------------------------------------------------------------- /cardano_node_tests/cluster_scripts/mainnet_fast/start-cluster: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | SCRIPT_DIR="$(readlink -m "${0%/*}")" 4 | # shellcheck disable=SC1091 5 | source "${SCRIPT_DIR}/start-cluster-fast" 6 | -------------------------------------------------------------------------------- /cardano_node_tests/cluster_scripts/mainnet_fast/template-cardano-node-pool: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | echo "Starting cardano-node run with PID $$: cardano-node run" 4 | echo "--config ./state-cluster%%INSTANCE_NUM%%/config-pool%%POOL_NUM%%.json" 5 | echo "--database-path ./state-cluster%%INSTANCE_NUM%%/db-pool%%POOL_NUM%%" 6 | echo "--topology ./state-cluster%%INSTANCE_NUM%%/topology-pool%%POOL_NUM%%.json" 7 | echo "--host-addr 127.0.0.1" 8 | echo "--port %%NODE_PORT%%" 9 | echo "--socket-path ./state-cluster%%INSTANCE_NUM%%/pool%%POOL_NUM%%.socket" 10 | echo "--shelley-vrf-key ./state-cluster%%INSTANCE_NUM%%/nodes/node-pool%%POOL_NUM%%/vrf.skey" 11 | echo "--shelley-kes-key ./state-cluster%%INSTANCE_NUM%%/nodes/node-pool%%POOL_NUM%%/kes.skey" 12 | echo "--shelley-operational-certificate ./state-cluster%%INSTANCE_NUM%%/nodes/node-pool%%POOL_NUM%%/op.cert $*" 13 | 14 | echo "..or, once again, in a single line:" 15 | echo "cardano-node run --config ./state-cluster%%INSTANCE_NUM%%/config-pool%%POOL_NUM%%.json --database-path ./state-cluster%%INSTANCE_NUM%%/db-pool%%POOL_NUM%% --topology ./state-cluster%%INSTANCE_NUM%%/topology-pool%%POOL_NUM%%.json --host-addr 127.0.0.1 --port %%NODE_PORT%% --socket-path ./state-cluster%%INSTANCE_NUM%%/pool%%POOL_NUM%%.socket --shelley-vrf-key ./state-cluster%%INSTANCE_NUM%%/nodes/node-pool%%POOL_NUM%%/vrf.skey --shelley-kes-key ./state-cluster%%INSTANCE_NUM%%/nodes/node-pool%%POOL_NUM%%/kes.skey --shelley-operational-certificate ./state-cluster%%INSTANCE_NUM%%/nodes/node-pool%%POOL_NUM%%/op.cert $*" 16 | 17 | 18 | exec cardano-node run --config ./state-cluster%%INSTANCE_NUM%%/config-pool%%POOL_NUM%%.json --database-path ./state-cluster%%INSTANCE_NUM%%/db-pool%%POOL_NUM%% --topology ./state-cluster%%INSTANCE_NUM%%/topology-pool%%POOL_NUM%%.json --host-addr 127.0.0.1 --port %%NODE_PORT%% --socket-path ./state-cluster%%INSTANCE_NUM%%/pool%%POOL_NUM%%.socket --shelley-vrf-key ./state-cluster%%INSTANCE_NUM%%/nodes/node-pool%%POOL_NUM%%/vrf.skey --shelley-kes-key ./state-cluster%%INSTANCE_NUM%%/nodes/node-pool%%POOL_NUM%%/kes.skey --shelley-operational-certificate ./state-cluster%%INSTANCE_NUM%%/nodes/node-pool%%POOL_NUM%%/op.cert "$@" 19 | -------------------------------------------------------------------------------- /cardano_node_tests/cluster_scripts/mainnet_fast/testnet.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mainnet_fast", 3 | "description": "Local testnet that starts directly in Conway era and has the same epoch length as Mainnet.", 4 | "control_env": { 5 | "DBSYNC_REPO": "will start and configure db-sync if the value is path to db-sync repository", 6 | "SMASH": "if set, will start and configure smash", 7 | "ENABLE_LEGACY": "if set, local cluster will use legacy networking", 8 | "MIXED_P2P": "if set, local cluster will use P2P for some nodes and legacy topology for others", 9 | "UTXO_BACKEND": "'mem' or 'disk', default is 'mem' (or legacy) if unset", 10 | "NO_CC": "if set, will not create committee", 11 | "PV9": "if set, will use protocol version 9", 12 | "DRY_RUN": "if set, will not start the cluster" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /cardano_node_tests/cluster_scripts/testnets/cardano-node-relay1: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | echo "Starting cardano-node run: cardano-node run" 4 | echo "--config ./state-cluster%%INSTANCE_NUM%%/config-relay1.json" 5 | echo "--database-path ./state-cluster%%INSTANCE_NUM%%/db-relay1" 6 | echo "--topology ./state-cluster%%INSTANCE_NUM%%/topology-relay1.json" 7 | echo "--port %%NODE_PORT_RELAY1%%" 8 | echo "--socket-path ./state-cluster%%INSTANCE_NUM%%/relay1.socket $*" 9 | echo "..or, once again, in a single line:" 10 | echo "cardano-node run --config ./state-cluster%%INSTANCE_NUM%%/config-relay1.json --database-path ./state-cluster%%INSTANCE_NUM%%/db-relay1 --topology ./state-cluster%%INSTANCE_NUM%%/topology-relay1.json --port %%NODE_PORT_RELAY1%% --socket-path ./state-cluster%%INSTANCE_NUM%%/relay1.socket $*" 11 | 12 | 13 | exec cardano-node run --config ./state-cluster%%INSTANCE_NUM%%/config-relay1.json --database-path ./state-cluster%%INSTANCE_NUM%%/db-relay1 --topology ./state-cluster%%INSTANCE_NUM%%/topology-relay1.json --port %%NODE_PORT_RELAY1%% --socket-path ./state-cluster%%INSTANCE_NUM%%/relay1.socket "$@" 14 | -------------------------------------------------------------------------------- /cardano_node_tests/cluster_scripts/testnets/dbsync_block_no.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env -S nix develop --accept-flake-config github:IntersectMBO/cardano-node-tests#postgres -i -k CARDANO_NODE_SOCKET_PATH -k PGHOST -k PGPORT -k PGUSER -c bash 2 | # shellcheck shell=bash 3 | 4 | set -euo pipefail 5 | 6 | SOCKET_PATH="$(readlink -m "$CARDANO_NODE_SOCKET_PATH")" 7 | STATE_CLUSTER="${SOCKET_PATH%/*}" 8 | INSTANCE_NUM="${STATE_CLUSTER#*state-cluster}" 9 | DATABASE_NAME="dbsync${INSTANCE_NUM}" 10 | 11 | export PGHOST="${PGHOST:-localhost}" 12 | export PGPORT="${PGPORT:-5432}" 13 | export PGUSER="${PGUSER:-postgres}" 14 | 15 | psql -A -t -d "$DATABASE_NAME" -c "SELECT block_no FROM block ORDER BY ID DESC LIMIT 1;" 16 | -------------------------------------------------------------------------------- /cardano_node_tests/cluster_scripts/testnets/run-cardano-dbsync: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -uo pipefail 4 | 5 | SOCKET_PATH="$(readlink -m "$CARDANO_NODE_SOCKET_PATH")" 6 | STATE_CLUSTER="${SOCKET_PATH%/*}" 7 | STATE_CLUSTER_NAME="${STATE_CLUSTER##*/}" 8 | INSTANCE_NUM="${STATE_CLUSTER#*state-cluster}" 9 | DATABASE_NAME="dbsync${INSTANCE_NUM}" 10 | 11 | export PGHOST="${PGHOST:-localhost}" 12 | export PGPORT="${PGPORT:-5432}" 13 | export PGUSER="${PGUSER:-postgres}" 14 | 15 | export PGPASSFILE="$STATE_CLUSTER/pgpass" 16 | echo "${PGHOST}:${PGPORT}:${DATABASE_NAME}:${PGUSER}:secret" > "$PGPASSFILE" 17 | chmod 600 "$PGPASSFILE" 18 | 19 | exec "$DBSYNC_REPO/db-sync-node/bin/cardano-db-sync" --config "./$STATE_CLUSTER_NAME/dbsync-config.yaml" --socket-path "$CARDANO_NODE_SOCKET_PATH" --state-dir "./$STATE_CLUSTER_NAME/db-sync" --schema-dir "$DBSYNC_REPO/schema" 20 | -------------------------------------------------------------------------------- /cardano_node_tests/cluster_scripts/testnets/run-cardano-submit-api: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | testnet_magic="$(<./state-cluster%%INSTANCE_NUM%%/db-relay1/protocolMagicId)" 4 | 5 | # TODO: `--metrics-port` is not available in older cardano-node releases, see node issue #4280 6 | metrics_port="$(cardano-submit-api --metrics-port 8081 2>&1 | { read -r i; if [[ "$i" == *Invalid* ]]; then echo ""; else echo "--metrics-port %%METRICS_SUBMIT_API_PORT%%"; fi; })" 7 | 8 | echo "Starting cardano-submit-api: cardano-submit-api" 9 | echo "--config ./state-cluster%%INSTANCE_NUM%%/submit-api-config.json" 10 | echo "--socket-path ./state-cluster%%INSTANCE_NUM%%/relay1.socket" 11 | echo "--listen-address 127.0.0.1" 12 | echo "--port %%SUBMIT_API_PORT%%" 13 | echo "$metrics_port" 14 | echo --testnet-magic "$testnet_magic" 15 | echo "..or, once again, in a single line:" 16 | echo cardano-submit-api --config ./state-cluster%%INSTANCE_NUM%%/submit-api-config.json --socket-path ./state-cluster%%INSTANCE_NUM%%/relay1.socket --listen-address 127.0.0.1 --port %%SUBMIT_API_PORT%% "$metrics_port" --testnet-magic "$testnet_magic" 17 | 18 | # shellcheck disable=SC2086 19 | exec cardano-submit-api --config ./state-cluster%%INSTANCE_NUM%%/submit-api-config.json --socket-path ./state-cluster%%INSTANCE_NUM%%/relay1.socket --listen-address 127.0.0.1 --port %%SUBMIT_API_PORT%% $metrics_port --testnet-magic "$testnet_magic" 20 | -------------------------------------------------------------------------------- /cardano_node_tests/cluster_scripts/testnets/supervisor.conf: -------------------------------------------------------------------------------- 1 | # [inet_http_server] 2 | # port=127.0.0.1:%%SUPERVISOR_PORT%% 3 | 4 | [program:relay1] 5 | command=./state-cluster%%INSTANCE_NUM%%/cardano-node-relay1 6 | stderr_logfile=./state-cluster%%INSTANCE_NUM%%/relay1.stderr 7 | stdout_logfile=./state-cluster%%INSTANCE_NUM%%/relay1.stdout 8 | startsecs=5 9 | 10 | [program:webserver] 11 | command=python -m http.server --bind 127.0.0.1 %%WEBSERVER_PORT%% 12 | directory=./state-cluster%%INSTANCE_NUM%%/webserver 13 | 14 | [rpcinterface:supervisor] 15 | supervisor.rpcinterface_factory=supervisor.rpcinterface:make_main_rpcinterface 16 | 17 | [supervisorctl] 18 | 19 | [supervisord] 20 | logfile=./state-cluster%%INSTANCE_NUM%%/supervisord.log 21 | pidfile=./state-cluster%%INSTANCE_NUM%%/supervisord.pid 22 | -------------------------------------------------------------------------------- /cardano_node_tests/cluster_scripts/testnets/testnet.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "testnets", 3 | "description": "Setup for long-running testnets like Preview.", 4 | "control_env": { 5 | "DBSYNC_REPO": "will start and configure db-sync if the value is path to db-sync repository" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /cardano_node_tests/defragment_utxos.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | """Defragment address UTxOs.""" 3 | 4 | import argparse 5 | import logging 6 | import os 7 | import pathlib as pl 8 | import sys 9 | 10 | from cardano_clusterlib import clusterlib 11 | 12 | from cardano_node_tests.utils import defragment_utxos 13 | from cardano_node_tests.utils import helpers 14 | 15 | LOGGER = logging.getLogger(__name__) 16 | 17 | 18 | def get_args() -> argparse.Namespace: 19 | """Get command line arguments.""" 20 | parser = argparse.ArgumentParser(description=__doc__.split("\n", maxsplit=1)[0]) 21 | parser.add_argument( 22 | "-a", 23 | "--address", 24 | required=True, 25 | help="Address", 26 | ) 27 | parser.add_argument( 28 | "-s", 29 | "--skey-file", 30 | required=True, 31 | type=helpers.check_file_arg, 32 | help="Path to skey file", 33 | ) 34 | return parser.parse_args() 35 | 36 | 37 | def main() -> int: 38 | logging.basicConfig(format="%(levelname)s:%(message)s", level=logging.INFO) 39 | args = get_args() 40 | 41 | socket_env = os.environ.get("CARDANO_NODE_SOCKET_PATH") 42 | if not socket_env: 43 | LOGGER.error("The `CARDANO_NODE_SOCKET_PATH` environment variable is not set.") 44 | return 1 45 | 46 | state_dir = pl.Path(socket_env).parent 47 | cluster_obj = clusterlib.ClusterLib(state_dir=state_dir) 48 | defragment_utxos.defragment( 49 | cluster_obj=cluster_obj, address=args.address, skey_file=args.skey_file 50 | ) 51 | 52 | return 0 53 | 54 | 55 | if __name__ == "__main__": 56 | sys.exit(main()) 57 | -------------------------------------------------------------------------------- /cardano_node_tests/pytest_plugins/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IntersectMBO/cardano-node-tests/d66004d326efc160e76c71e99f774b138fc3ec3c/cardano_node_tests/pytest_plugins/__init__.py -------------------------------------------------------------------------------- /cardano_node_tests/split_topology.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | """Generate topology files for split cluster. 3 | 4 | For settings it uses the same env variables as when running the tests. 5 | """ 6 | 7 | import argparse 8 | import logging 9 | import pathlib as pl 10 | import sys 11 | 12 | from cardano_node_tests.utils import cluster_nodes 13 | 14 | LOGGER = logging.getLogger(__name__) 15 | 16 | 17 | def get_args() -> argparse.Namespace: 18 | """Get command line arguments.""" 19 | parser = argparse.ArgumentParser(description=__doc__.split("\n", maxsplit=1)[0]) 20 | parser.add_argument( 21 | "-d", 22 | "--dest-dir", 23 | required=True, 24 | help="Path to destination directory", 25 | ) 26 | parser.add_argument( 27 | "-i", 28 | "--instance-num", 29 | required=False, 30 | type=int, 31 | default=0, 32 | help="Instance number in the sequence of cluster instances (default: 0)", 33 | ) 34 | parser.add_argument( 35 | "-o", 36 | "--offset", 37 | required=False, 38 | type=int, 39 | default=0, 40 | help="Difference in number of nodes in cluster 1 vs cluster 2 (default: 0)", 41 | ) 42 | return parser.parse_args() 43 | 44 | 45 | def main() -> int: 46 | logging.basicConfig(format="%(levelname)s:%(message)s", level=logging.INFO) 47 | args = get_args() 48 | 49 | destdir = pl.Path(args.dest_dir) 50 | destdir.mkdir(parents=True, exist_ok=True) 51 | 52 | try: 53 | cluster_nodes.get_cluster_type().cluster_scripts.gen_split_topology_files( 54 | destdir=destdir, 55 | instance_num=args.instance_num, 56 | offset=args.offset, 57 | ) 58 | except Exception: 59 | LOGGER.exception("Failure") 60 | return 1 61 | 62 | return 0 63 | 64 | 65 | if __name__ == "__main__": 66 | sys.exit(main()) 67 | -------------------------------------------------------------------------------- /cardano_node_tests/testnet_cleanup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | """Cleanup a testnet with the help of testing artifacts. 3 | 4 | * withdraw rewards 5 | * deregister stake addresses 6 | * retire DReps 7 | * return funds to faucet 8 | """ 9 | 10 | import argparse 11 | import logging 12 | import os 13 | import pathlib as pl 14 | import sys 15 | 16 | from cardano_clusterlib import clusterlib 17 | 18 | from cardano_node_tests.utils import helpers 19 | from cardano_node_tests.utils import testnet_cleanup 20 | 21 | LOGGER = logging.getLogger(__name__) 22 | 23 | 24 | def get_args() -> argparse.Namespace: 25 | """Get command line arguments.""" 26 | parser = argparse.ArgumentParser(description=__doc__.split("\n", maxsplit=1)[0]) 27 | parser.add_argument( 28 | "-a", 29 | "--artifacts-base-dir", 30 | required=True, 31 | type=helpers.check_dir_arg, 32 | help="Path to a directory with testing artifacts", 33 | ) 34 | parser.add_argument( 35 | "-f", 36 | "--address", 37 | help="Faucet address", 38 | ) 39 | parser.add_argument( 40 | "-s", 41 | "--skey-file", 42 | type=helpers.check_file_arg, 43 | help="Path to faucet skey file", 44 | ) 45 | return parser.parse_args() 46 | 47 | 48 | def main() -> int: 49 | logging.basicConfig(format="%(levelname)s:%(message)s", level=logging.INFO) 50 | args = get_args() 51 | 52 | socket_env = os.environ.get("CARDANO_NODE_SOCKET_PATH") 53 | if not socket_env: 54 | LOGGER.error("The `CARDANO_NODE_SOCKET_PATH` environment variable is not set.") 55 | return 1 56 | if bool(args.address) ^ bool(args.skey_file): 57 | LOGGER.error( 58 | "Both address and skey file must be provided, or neither of them should be provided." 59 | ) 60 | return 1 61 | if not (args.address or os.environ.get("BOOTSTRAP_DIR")): 62 | LOGGER.error( 63 | "The address must be provided, or `BOOTSTRAP_DIR` environment variable must be set." 64 | ) 65 | return 1 66 | 67 | state_dir = pl.Path(socket_env).parent 68 | cluster_obj = clusterlib.ClusterLib(state_dir=state_dir) 69 | testnet_cleanup.cleanup( 70 | cluster_obj=cluster_obj, 71 | location=args.artifacts_base_dir, 72 | faucet_address=args.address, 73 | faucet_skey_file=args.skey_file, 74 | ) 75 | 76 | return 0 77 | 78 | 79 | if __name__ == "__main__": 80 | sys.exit(main()) 81 | -------------------------------------------------------------------------------- /cardano_node_tests/testnet_cleanup_info.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | """Print the Lovelace balance and rewards of all addresses in the given location.""" 3 | 4 | import argparse 5 | import logging 6 | import os 7 | import pathlib as pl 8 | import sys 9 | 10 | from cardano_clusterlib import clusterlib 11 | 12 | from cardano_node_tests.utils import helpers 13 | from cardano_node_tests.utils import testnet_cleanup 14 | 15 | LOGGER = logging.getLogger(__name__) 16 | 17 | 18 | def get_args() -> argparse.Namespace: 19 | """Get command line arguments.""" 20 | parser = argparse.ArgumentParser(description=__doc__.split("\n", maxsplit=1)[0]) 21 | parser.add_argument( 22 | "-a", 23 | "--artifacts-base-dir", 24 | required=True, 25 | type=helpers.check_dir_arg_keep, 26 | help="Path to a directory with testing artifacts", 27 | ) 28 | parser.add_argument( 29 | "-f", 30 | "--fee", 31 | action="store_true", 32 | required=False, 33 | help="Print total fees of signed transactions", 34 | ) 35 | return parser.parse_args() 36 | 37 | 38 | def main() -> int: 39 | logging.basicConfig(format="%(message)s", level=logging.INFO) 40 | args = get_args() 41 | 42 | socket_env = os.environ.get("CARDANO_NODE_SOCKET_PATH") 43 | if not socket_env: 44 | LOGGER.error("The `CARDANO_NODE_SOCKET_PATH` environment variable is not set.") 45 | return 1 46 | 47 | state_dir = pl.Path(socket_env).parent 48 | cluster_obj = clusterlib.ClusterLib(state_dir=state_dir) 49 | location = args.artifacts_base_dir 50 | 51 | if args.fee: 52 | fees = testnet_cleanup.fees_info(cluster_obj=cluster_obj, location=location) 53 | LOGGER.info(f"Total fees: {fees} Lovelace ({fees / 1_000_000} ADA)") 54 | else: 55 | balance, rewards = testnet_cleanup.addresses_info( 56 | cluster_obj=cluster_obj, location=location 57 | ) 58 | LOGGER.info(f"Uncleaned balance: {balance} Lovelace ({balance / 1_000_000} ADA)") 59 | LOGGER.info(f"Uncleaned rewards: {rewards} Lovelace ({rewards / 1_000_000} ADA)") 60 | 61 | return 0 62 | 63 | 64 | if __name__ == "__main__": 65 | sys.exit(main()) 66 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IntersectMBO/cardano-node-tests/d66004d326efc160e76c71e99f774b138fc3ec3c/cardano_node_tests/tests/__init__.py -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/drep_metadata_url.json: -------------------------------------------------------------------------------- 1 | { 2 | "hashAlgorithm": "blake2b-256", 3 | "body": { 4 | "paymentAddress": "addr1q86dnpkva4mm859c8ur7tjxn57zgsu6vg8pdetkdve3fsacnq7twy06u2ev5759vutpjgzfryx0ud8hzedhzerava35qwh3x34", 5 | "givenName": "Ryan Williams", 6 | "image": { 7 | "@type": "ImageObject", 8 | "contentUrl": "https://avatars.githubusercontent.com/u/44342099?v=4", 9 | "sha256": "2a21e4f7b20c8c72f573707b068fb8fc6d8c64d5035c4e18ecae287947fe2b2e" 10 | }, 11 | "objectives": "Buy myself an island.", 12 | "motivations": "I really would like to own an island.", 13 | "qualifications": "I have my 100m swimming badge, so I would be qualified to be able to swim around island.", 14 | "references": [ 15 | { 16 | "@type": "Other", 17 | "label": "A cool island for Ryan", 18 | "uri": "https://www.google.com/maps/place/World's+only+5th+order+recursive+island/@62.6511465,-97.7946829,15.75z/data=!4m14!1m7!3m6!1s0x5216a167810cee39:0x11431abdfe4c7421!2sWorld's+only+5th+order+recursive+island!8m2!3d62.651114!4d-97.7872244!16s%2Fg%2F11spwk2b6n!3m5!1s0x5216a167810cee39:0x11431abdfe4c7421!8m2!3d62.651114!4d-97.7872244!16s%2Fg%2F11spwk2b6n?authuser=0&entry=ttu" 19 | }, 20 | { 21 | "@type": "Link", 22 | "label": "Ryan's Twitter", 23 | "uri": "https://twitter.com/Ryun1_" 24 | } 25 | ] 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/golden_extended.skey: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PaymentExtendedSigningKeyShelley_ed25519_bip32", 3 | "description": "Payment Signing Key", 4 | "cborHex": "5880d831066e077fd7c40d1918fd3452d875a80d1df82c00a8e0ee16cbfb24fb3d5a5d3ec4b707ce1bf396c140b7bd712b63cc3dc89e4294b4a1add0d850ef78c19bdc0f2a0f5186b1b9700766bcec7f455f8a94eb07d8552a1e0bb6cc9fae21ad3d589ad5c48d079ba1fd7bc334e4cea080025d5f70f68a3af78a3e1dcdfc097ac3" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/golden_normal.skey: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PaymentSigningKeyShelley_ed25519", 3 | "description": "Payment Signing Key", 4 | "cborHex": "58208547281266bc5467a10f2f50ddf10e2d0c05ebf780785ebee40c1869b08c1c35" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/golden_payment.vkey: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PaymentVerificationKeyShelley_ed25519", 3 | "description": "Payment Verification Key", 4 | "cborHex": "58201f78453da13a79e1226e2f61bcdd14a4e27f96750cbc66171f31d8de109f7217" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/golden_sig.script: -------------------------------------------------------------------------------- 1 | { 2 | "type": "sig", 3 | "keyHash": "0dc8e171258165131d45451bf9e2a1be44a97d684ce2f775b7734263" 4 | } 5 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/golden_stake.vkey: -------------------------------------------------------------------------------- 1 | { 2 | "type": "StakeVerificationKeyShelley_ed25519", 3 | "description": "Stake Verification Key", 4 | "cborHex": "58203dbff8c7b4c72f1aee3aca2baf135b3fecbfd21e1bc4445a314ce6cff510e2d0" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/42.datum: -------------------------------------------------------------------------------- 1 | {"int":42} 2 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/42.datum.cbor: -------------------------------------------------------------------------------- 1 | * -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/42.redeemer: -------------------------------------------------------------------------------- 1 | {"int":42} 2 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/42.redeemer.cbor: -------------------------------------------------------------------------------- 1 | * -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/big.datum: -------------------------------------------------------------------------------- 1 | {"constructor":0,"fields":[{"constructor":0,"fields":[{"constructor":0,"fields":[{"bytes":"2b1a7a149c1a3574f5d0c5afda47a4fef7c03df69a41551465503ffb6eddc996"}]},{"int":2}]},{"constructor":2,"fields":[{"bytes":"636865636b5f7265665f696e70757473"}]},{"constructor":2,"fields":[]}]} 2 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/sepc256k1_ecdsa/invalid_message.redeemer: -------------------------------------------------------------------------------- 1 | {"constructor":0,"fields":[{"bytes":"0331dd90ec8d042a8b5e8c9f0e544bad7239176f038e685cde5d3933f7c5c76f31"},{"bytes":"1c4fd9e92aa036c"},{"bytes":"8a5e7e26b833536594476fa036f95aa81edfa1513ad039027093adc56ffe160911c4fd9e92aa036ca3faebed0116fdadfa14b26cf342da72f3cacaf396c61101"}]} 2 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/sepc256k1_ecdsa/invalid_pubkey.redeemer: -------------------------------------------------------------------------------- 1 | {"constructor":0,"fields":[{"bytes":"0231dd90ec8d042a8b5e8c9f0e544bad7239176f038e685cde5d3933f7c5c76f31"},{"bytes":"36a61686c221ed09b88f487d54b25bdfaadea95acc82e5c47813d2c4086f04d1"},{"bytes":"8a5e7e26b833536594476fa036f95aa81edfa1513ad039027093adc56ffe160911c4fd9e92aa036ca3faebed0116fdadfa14b26cf342da72f3cacaf396c61101"}]} 2 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/sepc256k1_ecdsa/invalid_sig.redeemer: -------------------------------------------------------------------------------- 1 | {"constructor":0,"fields":[{"bytes":"0331dd90ec8d042a8b5e8c9f0e544bad7239176f038e685cde5d3933f7c5c76f31"},{"bytes":"36a61686c221ed09b88f487d54b25bdfaadea95acc82e5c47813d2c4086f04d1"},{"bytes":"8a5e7e26b833536594476fa036f95aa81edfa1513ad039027193adc56ffe160911c4fd9e92aa036ca3faebed0116fdadfa14b26cf342da72f3cacaf396c61101"}]} 2 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/sepc256k1_ecdsa/loop_script.redeemer: -------------------------------------------------------------------------------- 1 | {"constructor":0,"fields":[{"int":1000010},{"bytes":"0392d7b94bc6a11c335a043ee1ff326b6eacee6230d3685861cd62bce350a172e0"},{"bytes":"16e0bf1f85594a11e75030981c0b670370b3ad83a43f49ae58a2fd6f6513cde9"},{"bytes":"5fb12954b28be6456feb080cfb8467b6f5677f62eb9ad231de7a575f4b6857512754fb5ef7e0e60e270832e7bb0e2f0dc271012fa9c46c02504aa0e798be6295"}]} 2 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/sepc256k1_ecdsa/no_msg.redeemer: -------------------------------------------------------------------------------- 1 | {"constructor":0,"fields":[{"bytes":"0331dd90ec8d042a8b5e8c9f0e544bad7239176f038e685cde5d3933f7c5c76f31"},{"bytes":""},{"bytes":"8a5e7e26b833536594476fa036f95aa81edfa1513ad039027093adc56ffe160911c4fd9e92aa036ca3faebed0116fdadfa14b26cf342da72f3cacaf396c61101"}]} 2 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/sepc256k1_ecdsa/no_pubkey.redeemer: -------------------------------------------------------------------------------- 1 | {"constructor":0,"fields":[{"bytes":""},{"bytes":"36a61686c221ed09b88f487d54b25bdfaadea95acc82e5c47813d2c4086f04d1"},{"bytes":"8a5e7e26b833536594476fa036f95aa81edfa1513ad039027093adc56ffe160911c4fd9e92aa036ca3faebed0116fdadfa14b26cf342da72f3cacaf396c61101"}]} 2 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/sepc256k1_ecdsa/no_sig.redeemer: -------------------------------------------------------------------------------- 1 | {"constructor":0,"fields":[{"bytes":"0331dd90ec8d042a8b5e8c9f0e544bad7239176f038e685cde5d3933f7c5c76f31"},{"bytes":"36a61686c221ed09b88f487d54b25bdfaadea95acc82e5c47813d2c4086f04d1"},{"bytes":""}]} 2 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/sepc256k1_ecdsa/positive.redeemer: -------------------------------------------------------------------------------- 1 | {"constructor":0,"fields":[{"bytes":"0331dd90ec8d042a8b5e8c9f0e544bad7239176f038e685cde5d3933f7c5c76f31"},{"bytes":"36a61686c221ed09b88f487d54b25bdfaadea95acc82e5c47813d2c4086f04d1"},{"bytes":"8a5e7e26b833536594476fa036f95aa81edfa1513ad039027093adc56ffe160911c4fd9e92aa036ca3faebed0116fdadfa14b26cf342da72f3cacaf396c61101"}]} 2 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/sepc256k1_schnorr/invalid_pubkey.redeemer: -------------------------------------------------------------------------------- 1 | {"constructor":0,"fields":[{"bytes":"d0601fd322565c31a2ee911c441653ae39baa615d35758b19fbb834d5d241633"},{"bytes":"57ee663d0141de74d970b3d28a7a983bdd2a227c050255ecaa927830e402d3d7eecd6e9e902d57fcf8b353ad2383612e27d0cf6617b128021d4a94a7b24d507c"},{"bytes":"cfd23c18ef463fe1880b19845797be99a91d34a0ff91bfbbd42356e5afbac4b502716e8a8732a1b93e3e4569db376b0c90fcab4986402cb2fa35b615093229ab"}]} 2 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/sepc256k1_schnorr/invalid_sig.redeemer: -------------------------------------------------------------------------------- 1 | {"constructor":0,"fields":[{"bytes":"d0601fd322565c31a2ee911c441653ae39baa615d35758b19fbb834d5d241632"},{"bytes":"57ee663d0141de74d970b3d28a7a983bdd2a227c050255ecaa927830e402d3d7eecd6e9e902d57fcf8b353ad2383612e27d0cf6617b128021d4a94a7b24d507c"},{"bytes":"cfd23c18ef463fe1880b19845797be99a91d34a0ff91bfbbd42356e5afbac4b502716e8a8732a1b93e3e4569db376b0c90fcab4986402cb2fa35b615093229ac"}]} 2 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/sepc256k1_schnorr/loop_script.redeemer: -------------------------------------------------------------------------------- 1 | {"constructor":0,"fields":[{"int":1000010},{"bytes":"599de3e582e2a3779208a210dfeae8f330b9af00a47a7fb22e9bb8ef596f301b"},{"bytes":"30303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030"},{"bytes":"5a56da88e6fd8419181dec4d3dd6997bab953d2fc71ab65e23cfc9e7e3d1a310613454a60f6703819a39fdac2a410a094442afd1fc083354443e8d8bb4461a9b"}]} 2 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/sepc256k1_schnorr/no_msg.redeemer: -------------------------------------------------------------------------------- 1 | {"constructor":0,"fields":[{"bytes":"d0601fd322565c31a2ee911c441653ae39baa615d35758b19fbb834d5d241632"},{"bytes":""},{"bytes":"cfd23c18ef463fe1880b19845797be99a91d34a0ff91bfbbd42356e5afbac4b502716e8a8732a1b93e3e4569db376b0c90fcab4986402cb2fa35b615093229ab"}]} 2 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/sepc256k1_schnorr/no_pubkey.redeemer: -------------------------------------------------------------------------------- 1 | {"constructor":0,"fields":[{"bytes":""},{"bytes":"57ee663d0141de74d970b3d28a7a983bdd2a227c050255ecaa927830e402d3d7eecd6e9e902d57fcf8b353ad2383612e27d0cf6617b128021d4a94a7b24d507c"},{"bytes":"cfd23c18ef463fe1880b19845797be99a91d34a0ff91bfbbd42356e5afbac4b502716e8a8732a1b93e3e4569db376b0c90fcab4986402cb2fa35b615093229ab"}]} 2 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/sepc256k1_schnorr/no_sig.redeemer: -------------------------------------------------------------------------------- 1 | {"constructor":0,"fields":[{"bytes":"d0601fd322565c31a2ee911c441653ae39baa615d35758b19fbb834d5d241632"},{"bytes":"57ee663d0141de74d970b3d28a7a983bdd2a227c050255ecaa927830e402d3d7eecd6e9e902d57fcf8b353ad2383612e27d0cf6617b128021d4a94a7b24d507c"},{"bytes":""}]} 2 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/sepc256k1_schnorr/positive.redeemer: -------------------------------------------------------------------------------- 1 | {"constructor":0,"fields":[{"bytes":"d0601fd322565c31a2ee911c441653ae39baa615d35758b19fbb834d5d241632"},{"bytes":"57ee663d0141de74d970b3d28a7a983bdd2a227c050255ecaa927830e402d3d7eecd6e9e902d57fcf8b353ad2383612e27d0cf6617b128021d4a94a7b24d507c"},{"bytes":"cfd23c18ef463fe1880b19845797be99a91d34a0ff91bfbbd42356e5afbac4b502716e8a8732a1b93e3e4569db376b0c90fcab4986402cb2fa35b615093229ab"}]} 2 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/typed-42.datum: -------------------------------------------------------------------------------- 1 | {"constructor":0,"fields":[{"int":42}]} 2 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/typed-42.datum.cbor: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IntersectMBO/cardano-node-tests/d66004d326efc160e76c71e99f774b138fc3ec3c/cardano_node_tests/tests/data/plutus/typed-42.datum.cbor -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/typed-42.redeemer: -------------------------------------------------------------------------------- 1 | {"constructor":0,"fields":[{"int":42}]} 2 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/typed-42.redeemer.cbor: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IntersectMBO/cardano-node-tests/d66004d326efc160e76c71e99f774b138fc3ec3c/cardano_node_tests/tests/data/plutus/typed-42.redeemer.cbor -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/typed-43.datum: -------------------------------------------------------------------------------- 1 | {"constructor":0,"fields":[{"int":43}]} 2 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/typed-43.redeemer: -------------------------------------------------------------------------------- 1 | {"constructor":0,"fields":[{"int":43}]} 2 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/typed-finite.datum.cbor: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IntersectMBO/cardano-node-tests/d66004d326efc160e76c71e99f774b138fc3ec3c/cardano_node_tests/tests/data/plutus/typed-finite.datum.cbor -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v1/always-fails.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV1", 3 | "description": "", 4 | "cborHex": "581e581c01000033223232222350040071235002353003001498498480048005" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v1/always-succeeds-spending.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV1", 3 | "description": "", 4 | "cborHex": "4e4d01000033222220051200120011" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v1/guess-42-datum-42-txin.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV1", 3 | "description": "", 4 | "cborHex": "58775875010000323232322225335323253350021001100933320015007003332001500648150ccc8005401800ccc80054015205410041326353357389211d496e636f727265637420646174756d2e2045787065637465642034322e000044984800448dd4000891199ab9a3375e0040022440040062440021" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v1/guess-42-stake.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV1", 3 | "description": "", 4 | "cborHex": "587a58780100003233322232323233223232225335300a333500900800233500700d4815040184d400d2411d496e636f727265637420646174756d2e2045787065637465642034322e001235002353003335738002008930930900090008900091199ab9a3375e00400200c00a24002244004244002400246ea00041" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v2/always-fails.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV2", 3 | "description": "", 4 | "cborHex": "4746010000222601" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v2/always-succeeds-spending.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV2", 3 | "description": "", 4 | "cborHex": "49480100002221200101" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v2/byteStringToIntegerRoundtripPolicyV2.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV2", 3 | "description": "", 4 | "cborHex": "5822582001000022325333573466e1ccde5251333792945200000100111200116375a005" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v2/ecdsa-secp256k1-loop.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV2", 3 | "description": "", 4 | "cborHex": "5901f25901ef0100003232323322323322322225335332001323232232323232323333333574800c46666ae68cdc39aab9d5006480008cccd55cfa8031280891999aab9f500625012233335573ea00c4a02646666aae7d4018940508cccd55cf9aba250072533532333333357480024a02e4a02e4a02e46a0306eb40089405c074d5d0a80590a99a98089aba1500b215335301135742a01642a66a60226ae85402c84d406848cccc00401401000c008540605405c54058540549405406c06806406005c940400549403c9403c9403c9403c0544d5d1280089aba25001135744a00226aae7940044dd5000a8032802a802001109a8009111299a999ab9a33710008904044bd00700689a807a4811572656465656d6572206973203c2031303030303030001333300c00400300200113500a49011d5472616365206572726f723a20496e76616c69642072656465656d65720012333333357480024a0064a0064a0064a00646a0086eb800802448488c00800c4488004c8004c8c00400488c88894cd4ccd5cd19b870054820225e802001c402c54cd4ccd5cd199bb4003002001008007133330043370200a900100180100089a804a481245472616365206572726f723a2045434453412076616c69646174696f6e206661696c65640030020021220021220011232632003335738002006930900081" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v2/guess-42-datum-42-txin.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV2", 3 | "description": "", 4 | "cborHex": "58775875010000323232322225335323253350021001100933320015007003332001500648150ccc8005401800ccc8005401520541004132632498cd5ce2491d496e636f727265637420646174756d2e2045787065637465642034322e0000412001123750002244666ae68cdd780100089100100189100081" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v2/schnorr-secp256k1-loop.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV2", 3 | "description": "", 4 | "cborHex": "5901f45901f10100003232323322323322322225335332001323232232323232323333333574800c46666ae68cdc39aab9d5006480008cccd55cfa8031280891999aab9f500625012233335573ea00c4a02646666aae7d4018940508cccd55cf9aba250072533532333333357480024a02e4a02e4a02e46a0306eb40089405c074d5d0a80590a99a98089aba1500b215335301135742a01642a66a60226ae85402c84d406848cccc00401401000c008540605405c54058540549405406c06806406005c940400549403c9403c9403c9403c0544d5d1280089aba25001135744a00226aae7940044dd5000a8032802a802001109a8009111299a999ab9a33710008904044bd00700689a807a4811572656465656d6572206973203c2031303030303030001333300c00400300200113500a49011d5472616365206572726f723a20496e76616c69642072656465656d65720012333333357480024a0064a0064a0064a00646a0086eb800802448488c00800c4488004c8004c8c00400488c88894cd4ccd5cd19b870054820225e802001c402c54cd4ccd5cd199bb5003002001008007133330043370200a900100180100089a804a481265472616365206572726f723a205363686e6f72722076616c69646174696f6e206661696c65640030020021220021220011232632003335738002006930900081" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v2/secp256k1-ecdsa-policy.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV2", 3 | "description": "", 4 | "cborHex": "59015059014d0100003322323232322253353320013232322323232323333333574800a46666ae68cdc39aab9d5005480008cccd55cfa8029280911999aab9f500525013233335573ea00a4a02846666aae7cd5d128031299a98071aba15009215335300e35742a01242a66a601c6ae85402484d406448ccc00401000c0085405c54058540549405404c04804404094044034940409404094040940400384d5d1280089aba25001135573ca00226ea8005401d4019401400884d40048894cd4ccd5cd199bb4003002001122002122001100a1350074901245472616365206572726f723a2045434453412076616c69646174696f6e206661696c65640013500349011d5472616365206572726f723a20496e76616c69642072656465656d657200123263200333573800200893091999999aba400125004250042500425004235005375c004004240022424460040062244003" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v2/secp256k1-schnorr-policy.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV2", 3 | "description": "", 4 | "cborHex": "59015259014f0100003322323232322253353320013232322323232323333333574800a46666ae68cdc39aab9d5005480008cccd55cfa8029280911999aab9f500525013233335573ea00a4a02846666aae7cd5d128031299a98071aba15009215335300e35742a01242a66a601c6ae85402484d406448ccc00401000c0085405c54058540549405404c04804404094044034940409404094040940400384d5d1280089aba25001135573ca00226ea8005401d4019401400884d40048894cd4ccd5cd199bb5003002001122002122001100a1350074901265472616365206572726f723a205363686e6f72722076616c69646174696f6e206661696c65640013500349011d5472616365206572726f723a20496e76616c69642072656465656d657200123263200333573800200893091999999aba400125004250042500425004235005375c004004240022424460040062244003" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v3/alwaysFailsPolicyScriptV3.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV3", 3 | "description": "", 4 | "cborHex": "565501010025968a4d1326335738920103505435008001" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v3/alwaysSucceedPolicyScriptV3.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV3", 3 | "description": "", 4 | "cborHex": "46450101002499" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v3/failingReadBitPolicyScriptV3_1.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV3", 3 | "description": "", 4 | "cborHex": "5880587e0101003322230030023230010012322590018a4d22190029112a999ab9a3379e00600422b2003130070048b045640062d130070040466004004002666a2444666a244466a24466a00e66600491010048000011402088a002007002800884a400a0028004008848a400e0050010c00048a006005001090914801c00a00201" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v3/failingReadBitPolicyScriptV3_10.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV3", 3 | "description": "", 4 | "cborHex": "58ad58ab0101003322230030023230010012322590018a4d22190029112a999ab9a3379e00600422b2003130070048b045640062d130070040466004004002666a2444666a244466a24466a00e66600491012b33c2f0d68584803b9dc05b3b0b9cbd6683edc0ce742bb09957613e44150205679d3f61a467b25cc758a3b000482c014011402088a002007002800884a400a0028004008848a400e0050010c00048a006005001090914801c00a00201" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v3/failingReadBitPolicyScriptV3_11.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV3", 3 | "description": "", 4 | "cborHex": "58b558b30101003322230030023230010012322590018a4d22190029112a999ab9a3379e00600422b2003130070048b045640062d130070040466004004002666a2444666a244466a24466a00e66600491012b33c2f0d68584803b9dc05b3b0b9cbd6683edc0ce742bb09957613e44150205679d3f61a467b25cc758a3b000483fbfffffffffffffffc04011402088a002007002800884a400a0028004008848a400e0050010c00048a006005001090914801c00a00201" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v3/failingReadBitPolicyScriptV3_12.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV3", 3 | "description": "", 4 | "cborHex": "58b558b30101003322230030023230010012322590018a4d22190029112a999ab9a3379e00600422b2003130070048b045640062d130070040466004004002666a2444666a244466a24466a00e66600491012b33c2f0d68584803b9dc05b3b0b9cbd6683edc0ce742bb09957613e44150205679d3f61a467b25cc758a3b00048202020202020202020008011402088a002007002800884a400a0028004008848a400e0050010c00048a006005001090914801c00a00201" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v3/failingReadBitPolicyScriptV3_13.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV3", 3 | "description": "", 4 | "cborHex": "58b558b30101003322230030023230010012322590018a4d22190029112a999ab9a3379e00600422b2003130070048b045640062d130070040466004004002666a2444666a244466a24466a00e66600491012b33c2f0d68584803b9dc05b3b0b9cbd6683edc0ce742bb09957613e44150205679d3f61a467b25cc758a3b000483fffffffffffffffffc04011402088a002007002800884a400a0028004008848a400e0050010c00048a006005001090914801c00a00201" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v3/failingReadBitPolicyScriptV3_14.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV3", 3 | "description": "", 4 | "cborHex": "58b558b30101003322230030023230010012322590018a4d22190029112a999ab9a3379e00600422b2003130070048b045640062d130070040466004004002666a2444666a244466a24466a00e66600491012b33c2f0d68584803b9dc05b3b0b9cbd6683edc0ce742bb09957613e44150205679d3f61a467b25cc758a3b00048206020202020202020008011402088a002007002800884a400a0028004008848a400e0050010c00048a006005001090914801c00a00201" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v3/failingReadBitPolicyScriptV3_2.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV3", 3 | "description": "", 4 | "cborHex": "5881587f0101003322230030023230010012322590018a4d22190029112a999ab9a3379e00600422b2003130070048b045640062d130070040466004004002666a2444666a244466a24466a00e666004910100482c814011402088a002007002800884a400a0028004008848a400e0050010c00048a006005001090914801c00a00201" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v3/failingReadBitPolicyScriptV3_3.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV3", 3 | "description": "", 4 | "cborHex": "5880587e0101003322230030023230010012322590018a4d22190029112a999ab9a3379e00600422b2003130070048b045640062d130070040466004004002666a2444666a244466a24466a00e66600491010048004011402088a002007002800884a400a0028004008848a400e0050010c00048a006005001090914801c00a00201" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v3/failingReadBitPolicyScriptV3_4.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV3", 3 | "description": "", 4 | "cborHex": "588258800101003322230030023230010012322590018a4d22190029112a999ab9a3379e00600422b2003130070048b045640062d130070040466004004002666a2444666a244466a24466a00e666004910101ff0048004011402088a002007002800884a400a0028004008848a400e0050010c00048a006005001090914801c00a00201" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v3/failingReadBitPolicyScriptV3_5.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV3", 3 | "description": "", 4 | "cborHex": "588258800101003322230030023230010012322590018a4d22190029112a999ab9a3379e00600422b2003130070048b045640062d130070040466004004002666a2444666a244466a24466a00e666004910101ff0048004011402088a002007002800884a400a0028004008848a400e0050010c00048a006005001090914801c00a00201" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v3/failingReadBitPolicyScriptV3_6.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV3", 3 | "description": "", 4 | "cborHex": "588258800101003322230030023230010012322590018a4d22190029112a999ab9a3379e00600422b2003130070048b045640062d130070040466004004002666a2444666a244466a24466a00e666004910101ff0048004011402088a002007002800884a400a0028004008848a400e0050010c00048a006005001090914801c00a00201" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v3/failingReadBitPolicyScriptV3_7.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV3", 3 | "description": "", 4 | "cborHex": "588258800101003322230030023230010012322590018a4d22190029112a999ab9a3379e00600422b2003130070048b045640062d130070040466004004002666a2444666a244466a24466a00e666004910101f40048030011402088a002007002800884a400a0028004008848a400e0050010c00048a006005001090914801c00a00201" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v3/failingReadBitPolicyScriptV3_8.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV3", 3 | "description": "", 4 | "cborHex": "588358810101003322230030023230010012322590018a4d22190029112a999ab9a3379e00600422b2003130070048b045640062d130070040466004004002666a2444666a244466a24466a00e666004910102fff40048080011402088a002007002800884a400a0028004008848a400e0050010c00048a006005001090914801c00a00201" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v3/failingReadBitPolicyScriptV3_9.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV3", 3 | "description": "", 4 | "cborHex": "58ad58ab0101003322230030023230010012322590018a4d22190029112a999ab9a3379e00600422b2003130070048b045640062d130070040466004004002666a2444666a244466a24466a00e66600491012b33c2f0d68584803b9dc05b3b0b9cbd6683edc0ce742bb09957613e44150205679d3f61a467b25cc758a3b000482c014011402088a002007002800884a400a0028004008848a400e0050010c00048a006005001090914801c00a00201" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v3/failingReplicateBytePolicyScriptV3_1.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV3", 3 | "description": "", 4 | "cborHex": "5864586201010033222300300232300100122590018a4d22190029112a999ab9a3371e66f4400c00800444cc01c01c01045833351222335122335004333002480052000489005005222800801c00a00221290028008600024500300280084848a400e0050011" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v3/failingReplicateBytePolicyScriptV3_2.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV3", 3 | "description": "", 4 | "cborHex": "5864586201010033222300300232300100122590018a4d22190029112a999ab9a3371e66f4400c00800444cc01c01c01045833351222335122335004333002480052006489005005222800801c00a00221290028008600024500300280084848a400e0050011" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v3/failingReplicateBytePolicyScriptV3_3.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV3", 3 | "description": "", 4 | "cborHex": "5864586201010033222300300232300100122590018a4d22190029112a999ab9a3371e66f4400c00800444cc01c01c01045833351222335122335004333002480092001489005005222800801c00a00221290028008600024500300280084848a400e0050011" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v3/failingReplicateBytePolicyScriptV3_4.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV3", 3 | "description": "", 4 | "cborHex": "5864586201010033222300300232300100122590018a4d22190029112a999ab9a3371e66f4400c00800444cc01c01c01045833351222335122335004333002480212001489005005222800801c00a00221290028008600024500300280084848a400e0050011" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v3/failingReplicateBytePolicyScriptV3_5.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV3", 3 | "description": "", 4 | "cborHex": "5865586301010033222300300232300100122590018a4d22190029112a999ab9a3371e66f4400c00800444cc01c01c0104583335122233512233500433300248021208004489005005222800801c00a00221290028008600024500300280084848a400e0050011" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v3/failingReplicateBytePolicyScriptV3_6.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV3", 3 | "description": "", 4 | "cborHex": "5867586501010033222300300232300100122590018a4d22190029112a999ab9a3371e66f4400c00800444cc01c01c010458333512223351223350043330024820a0005209a02489005005222800801c00a00221290028008600024500300280084848a400e0050011" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v3/failingWriteBitsPolicyScriptV3_1.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV3", 3 | "description": "", 4 | "cborHex": "58a358a10101003323232223003002300222590018a4d221900291112a999ab9a3371e666f40010c02400d6400a2946294000222601000a22c1800914800d2f5812233574000460080022323001001230022330020020013335122233351222335122335004333300248810033500448001401401d22010050052222800802400e0050011094801400430001228018014004242452007002800a0010022122900380140041" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v3/failingWriteBitsPolicyScriptV3_10.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV3", 3 | "description": "", 4 | "cborHex": "58aa58a80101003323232223003002300222590018a4d221900291112a999ab9a3371e666f40010c02400d6400a2946294000222601000a22c1800914800d2f58122335740004600800223230010012300223300200200133351222333512223351223350043333002488101ff0033500448040cd40112002500500748810050052222800802400e0050011094801400430001228018014004242452007002800a0010022122900380140041" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v3/failingWriteBitsPolicyScriptV3_11.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV3", 3 | "description": "", 4 | "cborHex": "58a558a30101003323232223003002300222590018a4d221900291112a999ab9a3371e666f40010c02400d6400a2946294000222601000a22c1800914800d2f58122335740004600800223230010012300223300200200133351222333512223351223350043333002488101000033500448005401402122010050052222800802400e0050011094801400430001228018014004242452007002800a0010022122900380140041" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v3/failingWriteBitsPolicyScriptV3_12.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV3", 3 | "description": "", 4 | "cborHex": "58a558a30101003323232223003002300222590018a4d221900291112a999ab9a3371e666f40010c02400d6400a2946294000222601000a22c1800914800d2f58122335740004600800223230010012300223300200200133351222333512223351223350043333002488101000033500448041401402122010050052222800802400e0050011094801400430001228018014004242452007002800a0010022122900380140041" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v3/failingWriteBitsPolicyScriptV3_13.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV3", 3 | "description": "", 4 | "cborHex": "58dc58da0101003323232223003002300222590018a4d221900291112a999ab9a3371e666f40010c02400d6400a2946294000222601000a22c1800914800d2f5812233574000460080022323001001230022330020020013335122233351222335122335004333300248812b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000335004482a014cd401120ac05335004482c01540140212210050052222800802400e0050011094801400430001228018014004242452007002800a0010022122900380140041" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v3/failingWriteBitsPolicyScriptV3_14.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV3", 3 | "description": "", 4 | "cborHex": "58dd58db0101003323232223003002300222590018a4d221900291112a999ab9a3371e666f40010c02400d6400a2946294000222601000a22c1800914800d2f5812233574000460080022323001001230022330020020013335122233351222335122335004333300248812b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000335004482a014cd401120ac053350044820225e940140212210050052222800802400e0050011094801400430001228018014004242452007002800a0010022122900380140041" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v3/failingWriteBitsPolicyScriptV3_15.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV3", 3 | "description": "", 4 | "cborHex": "58d858d60101003323232223003002300222590018a4d221900291112a999ab9a3371e666f40010c02400d6400a2946294000222601000a22c1800914800d2f5812233574000460080022323001001230022330020020013335122233351222335122335004333300248812b33c2f0d68584803b9dc05b3b0b9cbd6683edc0ce742bb09957613e44150205679d3f61a467b25cc758a3b000335004483fbfffffffffffffffc05401402122010050052222800802400e0050011094801400430001228018014004242452007002800a0010022122900380140041" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v3/failingWriteBitsPolicyScriptV3_16.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV3", 3 | "description": "", 4 | "cborHex": "58d858d60101003323232223003002300222590018a4d221900291112a999ab9a3371e666f40010c02400d6400a2946294000222601000a22c1800914800d2f5812233574000460080022323001001230022330020020013335122233351222335122335004333300248812b33c2f0d68584803b9dc05b3b0b9cbd6683edc0ce742bb09957613e44150205679d3f61a467b25cc758a3b00033500448202020202020202020009401402122010050052222800802400e0050011094801400430001228018014004242452007002800a0010022122900380140041" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v3/failingWriteBitsPolicyScriptV3_17.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV3", 3 | "description": "", 4 | "cborHex": "58d858d60101003323232223003002300222590018a4d221900291112a999ab9a3371e666f40010c02400d6400a2946294000222601000a22c1800914800d2f5812233574000460080022323001001230022330020020013335122233351222335122335004333300248812b33c2f0d68584803b9dc05b3b0b9cbd6683edc0ce742bb09957613e44150205679d3f61a467b25cc758a3b000335004483fffffffffffffffffc05401402122010050052222800802400e0050011094801400430001228018014004242452007002800a0010022122900380140041" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v3/failingWriteBitsPolicyScriptV3_18.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV3", 3 | "description": "", 4 | "cborHex": "58d858d60101003323232223003002300222590018a4d221900291112a999ab9a3371e666f40010c02400d6400a2946294000222601000a22c1800914800d2f5812233574000460080022323001001230022330020020013335122233351222335122335004333300248812b33c2f0d68584803b9dc05b3b0b9cbd6683edc0ce742bb09957613e44150205679d3f61a467b25cc758a3b00033500448206020202020202020009401402122010050052222800802400e0050011094801400430001228018014004242452007002800a0010022122900380140041" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v3/failingWriteBitsPolicyScriptV3_19.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV3", 3 | "description": "", 4 | "cborHex": "58d858d60101003323232223003002300222590018a4d221900291112a999ab9a3371e666f40010c02400d6400a2946294000222601000a22c1800914800d2f5812233574000460080022323001001230022330020020013335122233351222335122335004333300248812b33c2f0d68584803b9dc05b3b0b9cbd6683edc0ce742bb09957613e44150205679d3f61a467b25cc758a3b00033500448202020202020202020011401402122010050052222800802400e0050011094801400430001228018014004242452007002800a0010022122900380140041" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v3/failingWriteBitsPolicyScriptV3_2.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV3", 3 | "description": "", 4 | "cborHex": "58a358a10101003323232223003002300222590018a4d221900291112a999ab9a3371e666f40010c02400d6400a2946294000222601000a22c1800914800d2f5812233574000460080022323001001230022330020020013335122233351222335122335004333300248810033500448079401401d22010050052222800802400e0050011094801400430001228018014004242452007002800a0010022122900380140041" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v3/failingWriteBitsPolicyScriptV3_3.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV3", 3 | "description": "", 4 | "cborHex": "58a358a10101003323232223003002300222590018a4d221900291112a999ab9a3371e666f40010c02400d6400a2946294000222601000a22c1800914800d2f5812233574000460080022323001001230022330020020013335122233351222335122335004333300248810033500448001401402122010050052222800802400e0050011094801400430001228018014004242452007002800a0010022122900380140041" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v3/failingWriteBitsPolicyScriptV3_4.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV3", 3 | "description": "", 4 | "cborHex": "58a858a60101003323232223003002300222590018a4d221900291112a999ab9a3371e666f40010c02400d6400a2946294000222601000a22c1800914800d2f5812233574000460080022323001001230022330020020013335122233351222335122335004333300248810033500448000cd40112002500500748810050052222800802400e0050011094801400430001228018014004242452007002800a0010022122900380140041" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v3/failingWriteBitsPolicyScriptV3_5.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV3", 3 | "description": "", 4 | "cborHex": "58a558a30101003323232223003002300222590018a4d221900291112a999ab9a3371e666f40010c02400d6400a2946294000222601000a22c1800914800d2f58122335740004600800223230010012300223300200200133351222333512223351223350043333002488101ff0033500448005401401d22010050052222800802400e0050011094801400430001228018014004242452007002800a0010022122900380140041" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v3/failingWriteBitsPolicyScriptV3_6.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV3", 3 | "description": "", 4 | "cborHex": "58aa58a80101003323232223003002300222590018a4d221900291112a999ab9a3371e666f40010c02400d6400a2946294000222601000a22c1800914800d2f58122335740004600800223230010012300223300200200133351222333512223351223350043333002488101ff0033500448000cd40112001500500748810050052222800802400e0050011094801400430001228018014004242452007002800a0010022122900380140041" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v3/failingWriteBitsPolicyScriptV3_7.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV3", 3 | "description": "", 4 | "cborHex": "58aa58a80101003323232223003002300222590018a4d221900291112a999ab9a3371e666f40010c02400d6400a2946294000222601000a22c1800914800d2f58122335740004600800223230010012300223300200200133351222333512223351223350043333002488101ff0033500448004cd40112000500500748810050052222800802400e0050011094801400430001228018014004242452007002800a0010022122900380140041" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v3/failingWriteBitsPolicyScriptV3_8.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV3", 3 | "description": "", 4 | "cborHex": "58a558a30101003323232223003002300222590018a4d221900291112a999ab9a3371e666f40010c02400d6400a2946294000222601000a22c1800914800d2f58122335740004600800223230010012300223300200200133351222333512223351223350043333002488101ff0033500448041401401d22010050052222800802400e0050011094801400430001228018014004242452007002800a0010022122900380140041" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v3/failingWriteBitsPolicyScriptV3_9.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV3", 3 | "description": "", 4 | "cborHex": "58aa58a80101003323232223003002300222590018a4d221900291112a999ab9a3371e666f40010c02400d6400a2946294000222601000a22c1800914800d2f58122335740004600800223230010012300223300200200133351222333512223351223350043333002488101ff0033500448008cd40112010500500748810050052222800802400e0050011094801400430001228018014004242452007002800a0010022122900380140041" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v3/succeedingAndByteStringPolicyScriptV3.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV3", 3 | "description": "", 4 | "cborHex": "5903cb5903c801010033222300300232300100122590018a4d221900291112a999ab9a3371e666f2d6401229462940006004002226601001000a22c199a8911199a891119a89119a803999980100224500488101ff004881003350073333002004488101ff004881004881003350073333002004488101ff004881010000488101000033500733330020044881010000488101ff00488101000033500733330020044881024f0000488101f40048810144003350073333002005488100488101ff00488101ff003350073333002005488101ff00488100488101ff003350073333002005488101ff004881010000488101000033500733330020054881010000488101ff00488101000033500733330020054881024f0000488101f400488102440000335007333300200448812b33c2f0d68584803b9dc05b3b0b9cbd6683edc0ce742bb09957613e44150205679d3f61a467b25cc758a3b000488132db9c861c98a3d19cb928c22a32aaae0a4f740113dc48734d3c001657cb8fd2b9497faf16a40c1ecdd7d6581b55b625553af30048812b13808014808080189900422a0288ac0203640002540830091400164401020021093f210424001cc550821000335007333300200548812b33c2f0d68584803b9dc05b3b0b9cbd6683edc0ce742bb09957613e44150205679d3f61a467b25cc758a3b000488132db9c861c98a3d19cb928c22a32aaae0a4f740113dc48734d3c001657cb8fd2b9497faf16a40c1ecdd7d6581b55b625553af30048813213808014808080189900422a0288ac0203640002540830091400164401020021093f210424001cc55082101b55b625553af3003350073333002004488132db9c861c98a3d19cb928c22a32aaae0a4f740113dc48734d3c001657cb8fd2b9497faf16a40c1ecdd7d6581b55b625553af30048812b33c2f0d68584803b9dc05b3b0b9cbd6683edc0ce742bb09957613e44150205679d3f61a467b25cc758a3b00048812b13808014808080189900422a0288ac0203640002540830091400164401020021093f210424001cc5508210003350073333002005488132db9c861c98a3d19cb928c22a32aaae0a4f740113dc48734d3c001657cb8fd2b9497faf16a40c1ecdd7d6581b55b625553af30048812b33c2f0d68584803b9dc05b3b0b9cbd6683edc0ce742bb09957613e44150205679d3f61a467b25cc758a3b00048813213808014808080189900422a0288ac0203640002540830091400164401020021093f210424001cc55082101b55b625553af30050082222800802400e0050011094801400500080110914801c00a0021800091400c00a00212122900380140041" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v3/succeedingComplementByteStringPolicyScriptV3.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV3", 3 | "description": "", 4 | "cborHex": "59016159015e01010033222300300232300100122590018a4d2219002912a999ab9a3371e6f3800800444cc01801800c458333512223351223350043300248810048810033500433002489010f00488101f0003350043300248902b00b004881024ff4003350043300248932db9c861c98a3d19cb928c22a32aaae0a4f740113dc48734d3c001657cb8fd2b9497faf16a40c1ecdd7d6581b55b625553af300488132246379e3675c2e6346d73dd5cd5551f5b08bfeec23b78cb2c3ffe9a834702d46b68050e95bf3e1322829a7e4aa49daaac50c003350043300248932246379e3675c2e6346d73dd5cd5551f5b08bfeec23b78cb2c3ffe9a834702d46b68050e95bf3e1322829a7e4aa49daaac50c00488132db9c861c98a3d19cb928c22a32aaae0a4f740113dc48734d3c001657cb8fd2b9497faf16a40c1ecdd7d6581b55b625553af300500522800801400442520050010c00048a006005001090914801c00a0021" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v3/succeedingCountSetBitsPolicyScriptV3.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV3", 3 | "description": "", 4 | "cborHex": "59016659016301010033222300300232300100122590018a4d2219002912a999ab9a3370e6f5000800444cc01801800c458333512223351223350043300248810048000cd4010cc00922010200000048000cd4010cc00922010201000048008cd4010cc00922010200010048008cd4010cc00922012b33c2f0d68584803b9dc05b3b0b9cbd6683edc0ce742bb09957613e44150205679d3f61a467b25cc758a3b0004831808cd4010cc00922012b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000048000cd4010cc00922012b000000000000001000000000000000000000000000000000000000000000000000000000000000000000000048008cd4010cc00922012bffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00482c01540148a00200500110948014004300012280180140042424520070028009" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v3/succeedingFindFirstSetBitPolicyScriptV3.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV3", 3 | "description": "", 4 | "cborHex": "59012e59012b01010033222300300232300100122590018a4d2219002912a999ab9a3370e6f5400800444cc01801800c458333512223351223350043300248810048004cd4010cc00922010200000048004cd4010cc00922010200020048008cd4010cc009220102fff20048008cd4010cc00922012b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000048004cd4010cc00922012b000000000000000000000000000000000000000000000000000000000000000000000000000000000000010048000cd4010cc00922012b5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000482a01540148a00200500110948014004300012280180140042424520070028009" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v3/succeedingOrByteStringPolicyScriptV3.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV3", 3 | "description": "", 4 | "cborHex": "5903cb5903c801010033222300300232300100122590018a4d221900291112a999ab9a3371e666f316401229462940006004002226601001000a22c199a8911199a891119a89119a803999980100224500488101ff004881003350073333002004488101ff004881004881003350073333002004488101ff004881010000488101ff0033500733330020044881010000488101ff00488101ff0033500733330020044881024f0000488101f400488101ff003350073333002005488100488101ff00488101ff003350073333002005488101ff00488100488101ff003350073333002005488101ff004881010000488101ff0033500733330020054881010000488101ff00488101ff0033500733330020054881024f0000488101f400488102ff0000335007333300200448812b33c2f0d68584803b9dc05b3b0b9cbd6683edc0ce742bb09957613e44150205679d3f61a467b25cc758a3b000488132db9c861c98a3d19cb928c22a32aaae0a4f740113dc48734d3c001657cb8fd2b9497faf16a40c1ecdd7d6581b55b625553af30048812bfbdef6de9da7d1bfbde8db3b3bbebf6ecffdc1dffc6bf3dd7f613e57df8fd7ffdd7fefb6e7be5ecfdff7f800335007333300200548812b33c2f0d68584803b9dc05b3b0b9cbd6683edc0ce742bb09957613e44150205679d3f61a467b25cc758a3b000488132db9c861c98a3d19cb928c22a32aaae0a4f740113dc48734d3c001657cb8fd2b9497faf16a40c1ecdd7d6581b55b625553af300488132fbdef6de9da7d1bfbde8db3b3bbebf6ecffdc1dffc6bf3dd7f613e57df8fd7ffdd7fefb6e7be5ecfdff7f81b55b625553af3003350073333002004488132db9c861c98a3d19cb928c22a32aaae0a4f740113dc48734d3c001657cb8fd2b9497faf16a40c1ecdd7d6581b55b625553af30048812b33c2f0d68584803b9dc05b3b0b9cbd6683edc0ce742bb09957613e44150205679d3f61a467b25cc758a3b00048812bfbdef6de9da7d1bfbde8db3b3bbebf6ecffdc1dffc6bf3dd7f613e57df8fd7ffdd7fefb6e7be5ecfdff7f8003350073333002005488132db9c861c98a3d19cb928c22a32aaae0a4f740113dc48734d3c001657cb8fd2b9497faf16a40c1ecdd7d6581b55b625553af30048812b33c2f0d68584803b9dc05b3b0b9cbd6683edc0ce742bb09957613e44150205679d3f61a467b25cc758a3b000488132fbdef6de9da7d1bfbde8db3b3bbebf6ecffdc1dffc6bf3dd7f613e57df8fd7ffdd7fefb6e7be5ecfdff7f81b55b625553af30050082222800802400e0050011094801400500080110914801c00a0021800091400c00a00212122900380140041" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v3/succeedingReadBitPolicyScriptV3.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV3", 3 | "description": "", 4 | "cborHex": "5901a95901a60101003322230030023230010012322590018a4d22190029112a999ab9a3379e00600422b2003130070048b045640062d130070040466004004002666a2444666a244466a24466a00e666004910101f40048000010cd401cccc009220101f40048008010cd401cccc009220101f40048010014cd401cccc009220101f40048018010cd401cccc009220101f40048020014cd401cccc009220101f40048028014cd401cccc009220101f40048030014cd401cccc009220101f40048038014cd401cccc009220102f4ff0048050014cd401cccc00922012b33c2f0d68584803b9dc05b3b0b9cbd6683edc0ce742bb09957613e44150205679d3f61a467b25cc758a3b00048000010cd401cccc00922012b33c2f0d68584803b9dc05b3b0b9cbd6683edc0ce742bb09957613e44150205679d3f61a467b25cc758a3b000482a814014cd401cccc00922012b33c2f0d68584803b9dc05b3b0b9cbd6683edc0ce742bb09957613e44150205679d3f61a467b25cc758a3b000482b814011402088a002007002800884a400a0028004008848a400e0050010c00048a006005001090914801c00a00201" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v3/succeedingRipemd_160Policy.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV3", 3 | "description": "", 4 | "cborHex": "58ad58ab01010033222300300232300100122590018a4d2219002912a999ab9a3371e6f5800800444cc01801800c45833351222335122335004330024881004881149c1185a5c5e9fc54612808977ee8f548b2258d310033500433002489192e7ea84da4bc4d7cfb463e3f2c8647057afff3fbececa1d20000488114f18921115370b049e99dfdd49fc92b371dd7c7e900500522800801400442520050010c00048a006005001090914801c00a0021" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v3/succeedingShiftByteStringPolicyScriptV3.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV3", 3 | "description": "", 4 | "cborHex": "59046e59046b01010033222300300232300100122590018a4d22190029112a999ab9a3371e66f4800c00800444cc01c01c0104583335122233512233500433300248810048019221003350043330024881004801522100335004333002488102ebfc0048029221027f8000335004333002488102ebfc004802522102075f00335004333002488102ebfc00480812210200000033500433300248812b33c2f0d68584803b9dc05b3b0b9cbd6683edc0ce742bb09957613e44150205679d3f61a467b25cc758a3b000480012212b33c2f0d68584803b9dc05b3b0b9cbd6683edc0ce742bb09957613e44150205679d3f61a467b25cc758a3b00033500433300248812b33c2f0d68584803b9dc05b3b0b9cbd6683edc0ce742bb09957613e44150205679d3f61a467b25cc758a3b000480b92212b6b42c2401dcee02d9d85ce5eb341f6e0673a15d84cabb09f220a8102b3ce9fb0d233d92e63ac51d80000000033500433300248812b33c2f0d68584803b9dc05b3b0b9cbd6683edc0ce742bb09957613e44150205679d3f61a467b25cc758a3b000480b52212b0000006785e1ad0b0900773b80b67617397acd07db819ce8576132aec27c882a040acf3a7ec348cf64b98e0033500433300248812b33c2f0d68584803b9dc05b3b0b9cbd6683edc0ce742bb09957613e44150205679d3f61a467b25cc758a3b0004820225e92212b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000033500433300248812b33c2f0d68584803b9dc05b3b0b9cbd6683edc0ce742bb09957613e44150205679d3f61a467b25cc758a3b000483fe21e92212b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000033500433300248812b33c2f0d68584803b9dc05b3b0b9cbd6683edc0ce742bb09957613e44150205679d3f61a467b25cc758a3b000483fbfffffffffffffffc052212b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000033500433300248812b33c2f0d68584803b9dc05b3b0b9cbd6683edc0ce742bb09957613e44150205679d3f61a467b25cc758a3b000482020202020202020200092212b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000033500433300248812b33c2f0d68584803b9dc05b3b0b9cbd6683edc0ce742bb09957613e44150205679d3f61a467b25cc758a3b000483fffffffffffffffffc052212b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000033500433300248812b33c2f0d68584803b9dc05b3b0b9cbd6683edc0ce742bb09957613e44150205679d3f61a467b25cc758a3b000482060202020202020200092212b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000005005222800801c00a00221290028008600024500300280084848a400e0050011" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v3/succeedingXorByteStringPolicyScriptV3.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV3", 3 | "description": "", 4 | "cborHex": "5903cb5903c801010033222300300232300100122590018a4d221900291112a999ab9a3371e666f356401229462940006004002226601001000a22c199a8911199a891119a89119a803999980100224500488101ff004881003350073333002004488101ff004881004881003350073333002004488101ff004881010000488101ff0033500733330020044881010000488101ff00488101ff0033500733330020044881024f0000488101f400488101bb003350073333002005488100488101ff00488101ff003350073333002005488101ff00488100488101ff003350073333002005488101ff004881010000488101ff0033500733330020054881010000488101ff00488101ff0033500733330020054881024f0000488101f400488102bb0000335007333300200448812b33c2f0d68584803b9dc05b3b0b9cbd6683edc0ce742bb09957613e44150205679d3f61a467b25cc758a3b000488132db9c861c98a3d19cb928c22a32aaae0a4f740113dc48734d3c001657cb8fd2b9497faf16a40c1ecdd7d6581b55b625553af30048812be85e76ca1d2751a724e899113936136ccc99c1dda863c3d46b612813de8dd7ded440ceb2c3be420a8f75e800335007333300200548812b33c2f0d68584803b9dc05b3b0b9cbd6683edc0ce742bb09957613e44150205679d3f61a467b25cc758a3b000488132db9c861c98a3d19cb928c22a32aaae0a4f740113dc48734d3c001657cb8fd2b9497faf16a40c1ecdd7d6581b55b625553af300488132e85e76ca1d2751a724e899113936136ccc99c1dda863c3d46b612813de8dd7ded440ceb2c3be420a8f75e81b55b625553af3003350073333002004488132db9c861c98a3d19cb928c22a32aaae0a4f740113dc48734d3c001657cb8fd2b9497faf16a40c1ecdd7d6581b55b625553af30048812b33c2f0d68584803b9dc05b3b0b9cbd6683edc0ce742bb09957613e44150205679d3f61a467b25cc758a3b00048812be85e76ca1d2751a724e899113936136ccc99c1dda863c3d46b612813de8dd7ded440ceb2c3be420a8f75e8003350073333002005488132db9c861c98a3d19cb928c22a32aaae0a4f740113dc48734d3c001657cb8fd2b9497faf16a40c1ecdd7d6581b55b625553af30048812b33c2f0d68584803b9dc05b3b0b9cbd6683edc0ce742bb09957613e44150205679d3f61a467b25cc758a3b000488132e85e76ca1d2751a724e899113936136ccc99c1dda863c3d46b612813de8dd7ded440ceb2c3be420a8f75e81b55b625553af30050082222800802400e0050011094801400500080110914801c00a0021800091400c00a00212122900380140041" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v3/verifyEcdsaPolicyScriptV3.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV3", 3 | "description": "", 4 | "cborHex": "58555853010100293232325333573466e1d20000021328009bae35742005375c6ae840066eb8d5d09aba20011aba20011635573c0046aae74004dd51aba1357446aae78dd5000c8894ccd5cd199bb40030020011498581" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/v3/verifySchnorrPolicyScriptV3.plutus: -------------------------------------------------------------------------------- 1 | { 2 | "type": "PlutusScriptV3", 3 | "description": "", 4 | "cborHex": "58555853010100293232325333573466e1d20000021328009bae35742005375c6ae840066eb8d5d09aba20011aba20011635573c0046aae74004dd51aba1357446aae78dd5000c8894ccd5cd199bb50030020011498581" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/witness_golden_extended.datum: -------------------------------------------------------------------------------- 1 | {"bytes": "5ffd632484fae2d10bfeb1ec9b827bc57c3672da7eb8a0dd374245a9"} 2 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/plutus/witness_golden_normal.datum: -------------------------------------------------------------------------------- 1 | {"bytes": "520719ebd328d3bd3a403a29dadaf6981bbddb5e8ff4e47d3f767f26"} 2 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/pool_metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "test_stake_pool_metadata", 3 | "description": "cardano-node-tests E2E tests", 4 | "ticker": "IOG1", 5 | "homepage": "https://github.com/input-output-hk/cardano-node-tests" 6 | } 7 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/stake.evkey: -------------------------------------------------------------------------------- 1 | { 2 | "type": "StakeExtendedVerificationKeyShelley_ed25519_bip32", 3 | "description": "", 4 | "cborHex": "5840e8c6d9d007728300fefa9022c2f677a8f9d1217b9c6314ee77012df3ecdda4611618391a0d1556cb0e8aab5b4ff13ae9b7ea09c196e05fe4819163cfc5203a8f" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/test_tx_metadata_both_tx.body: -------------------------------------------------------------------------------- 1 | { 2 | "type": "Unwitnessed Tx BabbageEra", 3 | "description": "Ledger Cddl Format", 4 | "cborHex": "84a40081825820dd104594a4931043f7ef36013f242d4970b9a29fc6b830287da8d76672aa94f700018182581d60074ed88f9b967cb8af9f417c1f3f79933d928664f2316de353b482af1a3b97e2b9021a0002e74707582083f9c606d3db46759c0ffb0b1f12fc8fd03460de7a4099f9ee797cdbb790beafa0f5d90103a100a50163666f6f0263626172036362617a056763617264616e6f066572756c6573" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/test_tx_metadata_both_tx.signed: -------------------------------------------------------------------------------- 1 | { 2 | "type": "Witnessed Tx BabbageEra", 3 | "description": "Ledger Cddl Format", 4 | "cborHex": "84a40081825820dd104594a4931043f7ef36013f242d4970b9a29fc6b830287da8d76672aa94f700018182581d60074ed88f9b967cb8af9f417c1f3f79933d928664f2316de353b482af1a3b97e2b9021a0002e74707582083f9c606d3db46759c0ffb0b1f12fc8fd03460de7a4099f9ee797cdbb790beafa10081825820c1e17fce61b04af4db756abc51c5079c1fe2ebeeb6b8aeb7d0f5befbd95dc5975840c4e90ada7bdd904ce91eb529a1c2047c88b54c0dd7d72afd3d452d065eca4bb3f66d3338cd23a4cf34954e6247812b2220c0a7828e9cf8492b9d71a4f39e3a0bf5d90103a100a50163666f6f0263626172036362617a056763617264616e6f066572756c6573" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/test_tx_metadata_both_tx_body_json.out: -------------------------------------------------------------------------------- 1 | { 2 | "auxiliary scripts": null, 3 | "certificates": null, 4 | "collateral inputs": [], 5 | "datums": [], 6 | "era": "Babbage", 7 | "fee": "190279 Lovelace", 8 | "inputs": [ 9 | "dd104594a4931043f7ef36013f242d4970b9a29fc6b830287da8d76672aa94f7#0" 10 | ], 11 | "metadata": { 12 | "1": "foo", 13 | "2": "bar", 14 | "3": "baz", 15 | "5": "cardano", 16 | "6": "rules" 17 | }, 18 | "mint": null, 19 | "outputs": [ 20 | { 21 | "address": "addr_test1vqr5aky0nwt8ew90naqhc8el0xfnmy5xvnerzm0r2w6g9tcsug7hk", 22 | "address era": "Shelley", 23 | "amount": { 24 | "lovelace": 999809721 25 | }, 26 | "network": "Testnet", 27 | "payment credential key hash": "074ed88f9b967cb8af9f417c1f3f79933d928664f2316de353b482af", 28 | "reference script": null, 29 | "stake reference": null 30 | } 31 | ], 32 | "redeemers": [], 33 | "reference inputs": [], 34 | "required signers (payment key hashes needed for scripts)": null, 35 | "return collateral": null, 36 | "scripts": [], 37 | "total collateral": null, 38 | "update proposal": null, 39 | "validity range": { 40 | "lower bound": null, 41 | "upper bound": null 42 | }, 43 | "withdrawals": null 44 | } 45 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/test_tx_metadata_both_tx_conway.body: -------------------------------------------------------------------------------- 1 | { 2 | "type": "Tx ConwayEra", 3 | "description": "Ledger Cddl Format", 4 | "cborHex": "84a400d901028182582009dc7193a34e99ec75abb398ce6dad49d6a5d403bead3bc5bafdc03a364859f800018182581d60928faa7ebf79cb8ccdcf618ca631c4653a6e35bb02b792e98efa07cd1a08ee035f021a0002ce2107582083f9c606d3db46759c0ffb0b1f12fc8fd03460de7a4099f9ee797cdbb790beafa0f5d90103a100a50163666f6f0263626172036362617a056763617264616e6f066572756c6573" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/test_tx_metadata_both_tx_json.out: -------------------------------------------------------------------------------- 1 | { 2 | "auxiliary scripts": null, 3 | "certificates": null, 4 | "collateral inputs": [], 5 | "datums": [], 6 | "era": "Babbage", 7 | "fee": "190279 Lovelace", 8 | "inputs": [ 9 | "dd104594a4931043f7ef36013f242d4970b9a29fc6b830287da8d76672aa94f7#0" 10 | ], 11 | "metadata": { 12 | "1": "foo", 13 | "2": "bar", 14 | "3": "baz", 15 | "5": "cardano", 16 | "6": "rules" 17 | }, 18 | "mint": null, 19 | "outputs": [ 20 | { 21 | "address": "addr_test1vqr5aky0nwt8ew90naqhc8el0xfnmy5xvnerzm0r2w6g9tcsug7hk", 22 | "address era": "Shelley", 23 | "amount": { 24 | "lovelace": 999809721 25 | }, 26 | "network": "Testnet", 27 | "payment credential key hash": "074ed88f9b967cb8af9f417c1f3f79933d928664f2316de353b482af", 28 | "reference script": null, 29 | "stake reference": null 30 | } 31 | ], 32 | "redeemers": [], 33 | "reference inputs": [], 34 | "required signers (payment key hashes needed for scripts)": null, 35 | "return collateral": null, 36 | "scripts": [], 37 | "total collateral": null, 38 | "update proposal": null, 39 | "validity range": { 40 | "lower bound": null, 41 | "upper bound": null 42 | }, 43 | "withdrawals": null, 44 | "witnesses": [ 45 | { 46 | "key": "VKey (VerKeyEd25519DSIGN \"c1e17fce61b04af4db756abc51c5079c1fe2ebeeb6b8aeb7d0f5befbd95dc597\")", 47 | "signature": "SignedDSIGN (SigEd25519DSIGN \"c4e90ada7bdd904ce91eb529a1c2047c88b54c0dd7d72afd3d452d065eca4bb3f66d3338cd23a4cf34954e6247812b2220c0a7828e9cf8492b9d71a4f39e3a0b\")" 48 | } 49 | ] 50 | } 51 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/tx_metadata.cbor: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IntersectMBO/cardano-node-tests/d66004d326efc160e76c71e99f774b138fc3ec3c/cardano_node_tests/tests/data/tx_metadata.cbor -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/tx_metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "1": "foo", 3 | "2": "bar", 4 | "3": "baz" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/tx_metadata_duplicate_keys1.json: -------------------------------------------------------------------------------- 1 | { 2 | "1": "foo1", 3 | "2": "bar1", 4 | "5": "baz1", 5 | "5": "baz2" 6 | } 7 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/tx_metadata_duplicate_keys2.json: -------------------------------------------------------------------------------- 1 | { 2 | "1": "foo2", 3 | "2": "bar2", 4 | "4": "baz2" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/tx_metadata_invalid.json: -------------------------------------------------------------------------------- 1 | { 2 | 1: "foo" 3 | } 4 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/tx_metadata_long.json: -------------------------------------------------------------------------------- 1 | { "1": "abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz" } 2 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/tx_metadata_wrong.json: -------------------------------------------------------------------------------- 1 | { 2 | "cardano-cli": { 3 | "shelley": { 4 | "-h,--help": 0 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/data/unwitnessed.tx: -------------------------------------------------------------------------------- 1 | { 2 | "type": "Unwitnessed Tx BabbageEra", 3 | "description": "Ledger Cddl Format", 4 | "cborHex": "84a30081825820f4bced376da2a0e20e1c287e09e44514d27080df60dbcf922204dce7a9b5470d000182a200581d60b3667a69a1f0a0108d97d10996085d95352025795fcde6dbba11029c011a001e8480a200581d60284545cfe513bbb61cbc00b51bac486dc3e7c5cc702eaa31e1bc99f8011a00960f27021a00028759a0f5f6" 5 | } 6 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/test_xdist_helper.py: -------------------------------------------------------------------------------- 1 | """Dummy test that helps with `pytest-xdist` scheduling. 2 | 3 | The `pytest-xdist` plugin needs to schedule two tests per worker in initial batch. This dummy test 4 | gets scheduled as first not long-running test on every pytest worker so the other test can be 5 | an actual long-running test. 6 | """ 7 | 8 | import os 9 | 10 | import pytest 11 | 12 | PYTEST_XDIST_WORKER_COUNT = int(os.environ.get("PYTEST_XDIST_WORKER_COUNT") or 0) 13 | 14 | pytestmark = pytest.mark.skipif( 15 | PYTEST_XDIST_WORKER_COUNT == 0, reason="helper test is not needed when running without xdist" 16 | ) 17 | 18 | 19 | @pytest.mark.order(1) 20 | @pytest.mark.parametrize("for_worker", tuple(range(PYTEST_XDIST_WORKER_COUNT))) 21 | def test_dummy( 22 | for_worker: int, # noqa: ARG001 23 | ) -> None: 24 | pytest.skip("Dummy helper for `pytest-xdist` scheduling") 25 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/tests_conway/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IntersectMBO/cardano-node-tests/d66004d326efc160e76c71e99f774b138fc3ec3c/cardano_node_tests/tests/tests_conway/__init__.py -------------------------------------------------------------------------------- /cardano_node_tests/tests/tests_plutus/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IntersectMBO/cardano-node-tests/d66004d326efc160e76c71e99f774b138fc3ec3c/cardano_node_tests/tests/tests_plutus/__init__.py -------------------------------------------------------------------------------- /cardano_node_tests/tests/tests_plutus/conftest.py: -------------------------------------------------------------------------------- 1 | import logging 2 | 3 | import pytest 4 | from cardano_clusterlib import clusterlib 5 | 6 | from cardano_node_tests.cluster_management import cluster_management 7 | 8 | LOGGER = logging.getLogger(__name__) 9 | 10 | 11 | @pytest.fixture 12 | def cluster( 13 | cluster_manager: cluster_management.ClusterManager, 14 | ) -> clusterlib.ClusterLib: 15 | """Return instance of `clusterlib.ClusterLib`.""" 16 | return cluster_manager.get(use_resources=[cluster_management.Resources.PLUTUS]) 17 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/tests_plutus_v2/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IntersectMBO/cardano-node-tests/d66004d326efc160e76c71e99f774b138fc3ec3c/cardano_node_tests/tests/tests_plutus_v2/__init__.py -------------------------------------------------------------------------------- /cardano_node_tests/tests/tests_plutus_v2/conftest.py: -------------------------------------------------------------------------------- 1 | import logging 2 | 3 | import pytest 4 | from cardano_clusterlib import clusterlib 5 | 6 | from cardano_node_tests.cluster_management import cluster_management 7 | 8 | LOGGER = logging.getLogger(__name__) 9 | 10 | 11 | @pytest.fixture 12 | def cluster( 13 | cluster_manager: cluster_management.ClusterManager, 14 | ) -> clusterlib.ClusterLib: 15 | """Return instance of `clusterlib.ClusterLib`.""" 16 | return cluster_manager.get(use_resources=[cluster_management.Resources.PLUTUS]) 17 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/tests_plutus_v3/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IntersectMBO/cardano-node-tests/d66004d326efc160e76c71e99f774b138fc3ec3c/cardano_node_tests/tests/tests_plutus_v3/__init__.py -------------------------------------------------------------------------------- /cardano_node_tests/tests/tests_plutus_v3/conftest.py: -------------------------------------------------------------------------------- 1 | import logging 2 | 3 | import pytest 4 | from cardano_clusterlib import clusterlib 5 | 6 | from cardano_node_tests.cluster_management import cluster_management 7 | 8 | LOGGER = logging.getLogger(__name__) 9 | 10 | 11 | @pytest.fixture 12 | def cluster( 13 | cluster_manager: cluster_management.ClusterManager, 14 | ) -> clusterlib.ClusterLib: 15 | """Return instance of `clusterlib.ClusterLib`.""" 16 | return cluster_manager.get(use_resources=[cluster_management.Resources.PLUTUS]) 17 | -------------------------------------------------------------------------------- /cardano_node_tests/tests/tx_common.py: -------------------------------------------------------------------------------- 1 | import logging 2 | import pathlib as pl 3 | 4 | from cardano_clusterlib import clusterlib 5 | 6 | from cardano_node_tests.utils import helpers 7 | 8 | LOGGER = logging.getLogger(__name__) 9 | 10 | # Old value, new fixed value 11 | # See https://github.com/IntersectMBO/cardano-node/issues/4061 12 | MIN_UTXO_VALUE = (857_690, 849_070) 13 | 14 | 15 | def get_raw_tx_values( 16 | cluster_obj: clusterlib.ClusterLib, 17 | tx_name: str, 18 | src_record: clusterlib.AddressRecord, 19 | dst_record: clusterlib.AddressRecord, 20 | for_build_command: bool = False, 21 | ) -> clusterlib.TxRawOutput: 22 | """Get values for manually building Tx using `transaction build` or `transaction build-raw`.""" 23 | src_address = src_record.address 24 | dst_address = dst_record.address 25 | 26 | tx_files = clusterlib.TxFiles(signing_key_files=[src_record.skey_file]) 27 | ttl = cluster_obj.g_transaction.calculate_tx_ttl() 28 | 29 | if for_build_command: 30 | fee = 0 31 | min_change = 1_500_000 32 | else: 33 | fee = cluster_obj.g_transaction.calculate_tx_fee( 34 | src_address=src_address, 35 | tx_name=tx_name, 36 | dst_addresses=[dst_address], 37 | tx_files=tx_files, 38 | ttl=ttl, 39 | ) 40 | min_change = 0 41 | 42 | src_addr_highest_utxo = cluster_obj.g_query.get_utxo_with_highest_amount(src_address) 43 | 44 | # Use only the UTxO with the highest amount 45 | txins = [src_addr_highest_utxo] 46 | txouts = [ 47 | clusterlib.TxOut( 48 | address=dst_address, amount=src_addr_highest_utxo.amount - fee - min_change 49 | ), 50 | ] 51 | out_file = pl.Path(f"{helpers.get_timestamped_rand_str()}_tx.body") 52 | 53 | return clusterlib.TxRawOutput( 54 | txins=txins, 55 | txouts=txouts, 56 | txouts_count=1, 57 | tx_files=tx_files, 58 | out_file=out_file, 59 | fee=fee, 60 | build_args=[], 61 | invalid_hereafter=ttl, 62 | ) 63 | 64 | 65 | def get_txins_txouts( 66 | txins: list[clusterlib.UTXOData], txouts: list[clusterlib.TxOut] 67 | ) -> tuple[list[str], list[str]]: 68 | txins_combined = [f"{x.utxo_hash}#{x.utxo_ix}" for x in txins] 69 | txouts_combined = [f"{x.address}+{x.amount}" for x in txouts] 70 | return txins_combined, txouts_combined 71 | -------------------------------------------------------------------------------- /cardano_node_tests/utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IntersectMBO/cardano-node-tests/d66004d326efc160e76c71e99f774b138fc3ec3c/cardano_node_tests/utils/__init__.py -------------------------------------------------------------------------------- /cardano_node_tests/utils/dbsync_conn.py: -------------------------------------------------------------------------------- 1 | """Functionality for interacting with db-sync database in postgres.""" 2 | 3 | import logging 4 | import typing as tp 5 | 6 | import psycopg2 7 | 8 | from cardano_node_tests.utils import cluster_nodes 9 | from cardano_node_tests.utils import configuration 10 | from cardano_node_tests.utils import helpers 11 | 12 | LOGGER = logging.getLogger(__name__) 13 | 14 | 15 | class DBSyncCache: 16 | """Cache connection to db-sync database for each cluster instance.""" 17 | 18 | conns: tp.ClassVar[dict[int, psycopg2.extensions.connection | None]] = {0: None} 19 | 20 | 21 | def _conn(instance_num: int) -> psycopg2.extensions.connection: 22 | # Call `psycopg2.connect` with an empty string so it uses PG* env variables. 23 | # Temporarily set PGDATABASE env var to the database corresponding to `instance_num`. 24 | with helpers.environ({"PGDATABASE": f"{configuration.DBSYNC_DB}{instance_num}"}): 25 | conn = psycopg2.connect("") 26 | DBSyncCache.conns[instance_num] = conn 27 | return conn 28 | 29 | 30 | def _close(instance_num: int, conn: psycopg2.extensions.connection | None) -> None: 31 | if conn is None or conn.closed == 1: 32 | return 33 | 34 | LOGGER.info(f"Closing connection to db-sync database {configuration.DBSYNC_DB}{instance_num}.") 35 | try: 36 | conn.close() 37 | except psycopg2.Error as err: 38 | LOGGER.warning( 39 | "Unable to close connection to db-sync database " 40 | f"{configuration.DBSYNC_DB}{instance_num}: {err}" 41 | ) 42 | 43 | 44 | def conn() -> psycopg2.extensions.connection: 45 | instance_num = cluster_nodes.get_instance_num() 46 | conn = DBSyncCache.conns.get(instance_num) 47 | 48 | if conn is None or conn.closed == 1: 49 | return _conn(instance_num=instance_num) 50 | 51 | return conn 52 | 53 | 54 | def reconn() -> psycopg2.extensions.connection: 55 | instance_num = cluster_nodes.get_instance_num() 56 | conn = DBSyncCache.conns.get(instance_num) 57 | _close(instance_num=instance_num, conn=conn) 58 | conn = _conn(instance_num=instance_num) 59 | return conn 60 | 61 | 62 | def close_all() -> None: 63 | for instance_num, conn in DBSyncCache.conns.items(): 64 | _close(instance_num=instance_num, conn=conn) 65 | -------------------------------------------------------------------------------- /cardano_node_tests/utils/defragment_utxos.py: -------------------------------------------------------------------------------- 1 | """Defragment address UTxOs.""" 2 | 3 | import logging 4 | import pathlib as pl 5 | 6 | from cardano_clusterlib import clusterlib 7 | 8 | LOGGER = logging.getLogger(__name__) 9 | 10 | 11 | def defragment(cluster_obj: clusterlib.ClusterLib, address: str, skey_file: pl.Path) -> None: 12 | """Defragment address UTxOs.""" 13 | new_blocks = 3 14 | 15 | loop = 1 16 | utxos_len = -1 17 | while True: 18 | # Select UTxOs that are not locked and that contain only Lovelace 19 | utxos_all = cluster_obj.g_query.get_utxo(address=address) 20 | utxos_ids_excluded = { 21 | f"{u.utxo_hash}#{u.utxo_ix}" 22 | for u in utxos_all 23 | if u.coin != clusterlib.DEFAULT_COIN or u.datum_hash 24 | } 25 | utxos = [u for u in utxos_all if f"{u.utxo_hash}#{u.utxo_ix}" not in utxos_ids_excluded] 26 | 27 | prev_utxos_len, utxos_len = utxos_len, len(utxos) 28 | if prev_utxos_len <= utxos_len and loop >= 2: 29 | LOGGER.info("No more UTxOs to defragment.") 30 | break 31 | if utxos_len <= 10: 32 | break 33 | 34 | batch_size = min(100, utxos_len) 35 | batch_num = 1 36 | for b in range(0, utxos_len, batch_size): 37 | LOGGER.info(f"Defragmenting UTxOs: Running loop {loop}, batch {batch_num}") 38 | batch = utxos[b : b + batch_size] 39 | tx_name = f"defrag_loop{loop}_batch{batch_num}" 40 | 41 | tx_output = cluster_obj.g_transaction.build_tx( 42 | src_address=address, 43 | tx_name=tx_name, 44 | txins=batch, 45 | change_address=address, 46 | ) 47 | tx_signed_file = cluster_obj.g_transaction.sign_tx( 48 | tx_body_file=tx_output.out_file, 49 | tx_name=tx_name, 50 | signing_key_files=[skey_file], 51 | ) 52 | cluster_obj.g_transaction.submit_tx_bare(tx_file=tx_signed_file) 53 | batch_num += 1 54 | 55 | LOGGER.info(f"Defragmenting UTxOs: Waiting for {new_blocks} new blocks after loop {loop}") 56 | cluster_obj.wait_for_new_block(new_blocks=new_blocks) 57 | loop += 1 58 | -------------------------------------------------------------------------------- /cardano_node_tests/utils/framework_log.py: -------------------------------------------------------------------------------- 1 | import functools 2 | import logging 3 | import pathlib as pl 4 | import time 5 | 6 | from cardano_node_tests.utils import temptools 7 | 8 | 9 | @functools.cache 10 | def get_framework_log_path() -> pl.Path: 11 | return temptools.get_pytest_worker_tmp() / "framework.log" 12 | 13 | 14 | @functools.cache 15 | def framework_logger() -> logging.Logger: 16 | """Get logger for the `framework.log` file. 17 | 18 | The logger is configured per worker. It can be used for logging (and later reporting) events 19 | like a failure to start a cluster instance. 20 | """ 21 | 22 | class UTCFormatter(logging.Formatter): 23 | converter = time.gmtime 24 | 25 | formatter = UTCFormatter("%(asctime)s %(levelname)s %(message)s") 26 | handler = logging.FileHandler(get_framework_log_path()) 27 | handler.setFormatter(formatter) 28 | 29 | logger = logging.getLogger("framework") 30 | logger.setLevel(logging.INFO) 31 | logger.addHandler(handler) 32 | 33 | return logger 34 | -------------------------------------------------------------------------------- /cardano_node_tests/utils/http_client.py: -------------------------------------------------------------------------------- 1 | """Global HTTP client.""" 2 | 3 | import requests 4 | 5 | _session = None 6 | 7 | 8 | def get_session() -> requests.Session: 9 | """Get a session object.""" 10 | global _session # noqa: PLW0603 11 | 12 | if _session is None: 13 | _session = requests.Session() 14 | return _session 15 | -------------------------------------------------------------------------------- /cardano_node_tests/utils/locking.py: -------------------------------------------------------------------------------- 1 | import contextlib 2 | import logging 3 | import typing as tp 4 | 5 | from cardano_node_tests.utils import configuration 6 | 7 | # Use dummy locking if not executing with multiple workers. 8 | # When running with multiple workers, operations with shared resources (like faucet addresses) 9 | # need to be locked to single worker (otherwise e.g. balances would not check). 10 | if configuration.IS_XDIST: 11 | from filelock import FileLock 12 | 13 | # Suppress messages from filelock 14 | logging.getLogger("filelock").setLevel(logging.WARNING) 15 | 16 | FileLockIfXdist: tp.Any = FileLock 17 | else: 18 | FileLockIfXdist = contextlib.nullcontext 19 | -------------------------------------------------------------------------------- /cardano_node_tests/utils/pytest_utils.py: -------------------------------------------------------------------------------- 1 | import dataclasses 2 | import logging 3 | import os 4 | import pathlib as pl 5 | import re 6 | 7 | LOGGER = logging.getLogger(__name__) 8 | 9 | 10 | @dataclasses.dataclass(frozen=True, order=True) 11 | class PytestTest: 12 | test_function: str 13 | test_file: pl.Path 14 | full: str 15 | test_class: str = "" 16 | test_params: str = "" 17 | stage: str = "" 18 | 19 | def __bool__(self) -> bool: 20 | return bool(self.test_function) 21 | 22 | 23 | def get_current_test() -> PytestTest: 24 | """Get components (test file, test name, etc.) of current pytest test.""" 25 | curr_test = os.environ.get("PYTEST_CURRENT_TEST") or "" 26 | if not curr_test: 27 | return PytestTest(test_function="", test_file=pl.Path("/nonexistent"), full="") 28 | 29 | reg = re.search( 30 | r"(^.*/test_\w+\.py)(?:::)?(Test\w+)?::(test_\w+)(\[.+\])? *\(?(\w+)?", curr_test 31 | ) 32 | if not reg: 33 | msg = f"Failed to match '{curr_test}'" 34 | raise AssertionError(msg) 35 | 36 | return PytestTest( 37 | test_function=reg.group(3), 38 | test_file=pl.Path(reg.group(1)), 39 | full=curr_test, 40 | test_class=reg.group(2) or "", 41 | test_params=reg.group(4) or "", 42 | stage=reg.group(5) or "", 43 | ) 44 | -------------------------------------------------------------------------------- /cardano_node_tests/utils/submit_utils.py: -------------------------------------------------------------------------------- 1 | import shutil 2 | import typing as tp 3 | 4 | import pytest 5 | from cardano_clusterlib import clusterlib 6 | 7 | from cardano_node_tests.utils import submit_api 8 | 9 | 10 | class SubmitMethods: 11 | API: tp.Final[str] = "api" 12 | CLI: tp.Final[str] = "cli" 13 | 14 | 15 | # The "submit_method" is a fixtrue defined in `conftest.py`. 16 | PARAM_SUBMIT_METHOD = pytest.mark.parametrize( 17 | "submit_method", 18 | ( 19 | SubmitMethods.CLI, 20 | pytest.param( 21 | SubmitMethods.API, 22 | marks=pytest.mark.skipif( 23 | not shutil.which("cardano-submit-api"), 24 | reason="`cardano-submit-api` is not available", 25 | ), 26 | ), 27 | ), 28 | ids=("submit_cli", "submit_api"), 29 | indirect=True, 30 | ) 31 | 32 | 33 | def is_submit_api_available() -> bool: 34 | """Check if `cardano-submit-api` is available.""" 35 | return bool(shutil.which("cardano-submit-api") and submit_api.is_running()) 36 | 37 | 38 | def submit_tx( 39 | submit_method: str, 40 | cluster_obj: clusterlib.ClusterLib, 41 | tx_file: clusterlib.FileType, 42 | txins: list[clusterlib.UTXOData], 43 | wait_blocks: int = 2, 44 | ) -> None: 45 | """Submit a transaction using the selected method. 46 | 47 | Args: 48 | submit_method: A method to use for submitting the transaction. 49 | cluster_obj: An instance of `clusterlib.ClusterLib`. 50 | tx_file: A path to signed transaction file. 51 | txins: An iterable of `clusterlib.UTXOData`, specifying input UTxOs. 52 | wait_blocks: A number of new blocks to wait for (default = 2). 53 | """ 54 | if submit_method == SubmitMethods.CLI: 55 | cluster_obj.g_transaction.submit_tx(tx_file=tx_file, txins=txins, wait_blocks=wait_blocks) 56 | elif submit_method == SubmitMethods.API: 57 | submit_api.submit_tx( 58 | cluster_obj=cluster_obj, tx_file=tx_file, txins=txins, wait_blocks=wait_blocks 59 | ) 60 | else: 61 | msg = f"Unknown submit method: {submit_method}" 62 | raise ValueError(msg) 63 | -------------------------------------------------------------------------------- /cardano_node_tests/utils/types.py: -------------------------------------------------------------------------------- 1 | import pathlib as pl 2 | 3 | FileType = str | pl.Path 4 | FileTypeList = list[FileType] | list[str] | list[pl.Path] 5 | # List of `FileType`s, empty list, or empty tuple 6 | OptionalFiles = FileTypeList | tuple[()] 7 | -------------------------------------------------------------------------------- /doc/uat_strategy.md: -------------------------------------------------------------------------------- 1 | # User acceptance test strategy 2 | 3 | User acceptance testing (UAT) takes place after all IOG testing is done and all the tests have passed. This includes unit, component, integration, feature, sync, system, regression testing, and benchmarking. 4 | 5 | You can find testing results for the latest node tag [here](https://tests.cardano.intersectmbo.org/test_results/tag_tests.html). 6 | 7 | IOG test suites are robust and cover most of the use cases and test types. However, as Cardano grows and more DApps and other decentralized solutions start running on it, the community help in discovering and testing edge cases will become more important than ever. 8 | 9 | Finally, what matters most is to have confirmation from our users that we 10 | developed the right functionality in the right way. 11 | 12 | TBD: for each new tag, define a plan to involve the community in defining the UAT. 13 | -------------------------------------------------------------------------------- /flake.nix: -------------------------------------------------------------------------------- 1 | { 2 | description = "Functional tests for cardano-node"; 3 | 4 | inputs = { 5 | nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; 6 | cardano-node = { 7 | url = "github:IntersectMBO/cardano-node"; 8 | }; 9 | flake-utils = { 10 | url = "github:numtide/flake-utils"; 11 | }; 12 | }; 13 | 14 | outputs = { self, nixpkgs, flake-utils, cardano-node }: 15 | flake-utils.lib.eachDefaultSystem 16 | (system: 17 | let 18 | pkgs = nixpkgs.legacyPackages.${system}; 19 | nodePkgs = cardano-node.packages.${system}; 20 | py3Pkgs = pkgs.python311Packages; 21 | py3Full = pkgs.python311Full; 22 | in 23 | { 24 | devShells = rec { 25 | base = pkgs.mkShell { 26 | nativeBuildInputs = with pkgs; [ bash coreutils curl git gnugrep gnumake gnutar jq xz ]; 27 | }; 28 | postgres = pkgs.mkShell { 29 | nativeBuildInputs = with pkgs; [ glibcLocales postgresql lsof procps ]; 30 | }; 31 | venv = pkgs.mkShell { 32 | nativeBuildInputs = base.nativeBuildInputs ++ postgres.nativeBuildInputs ++ [ 33 | nodePkgs.cardano-cli 34 | nodePkgs.cardano-node 35 | nodePkgs.cardano-submit-api 36 | nodePkgs.bech32 37 | pkgs.poetry 38 | py3Full 39 | py3Pkgs.virtualenv 40 | ]; 41 | }; 42 | # Use 'venv' directly as 'default' and 'dev' 43 | default = venv; 44 | dev = venv; 45 | }; 46 | }); 47 | 48 | # --- Flake Local Nix Configuration ---------------------------- 49 | nixConfig = { 50 | # Sets the flake to use the IOG nix cache. 51 | extra-substituters = [ "https://cache.iog.io" ]; 52 | extra-trusted-public-keys = [ "hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=" ]; 53 | allow-import-from-derivation = "true"; 54 | }; 55 | } 56 | -------------------------------------------------------------------------------- /framework_tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IntersectMBO/cardano-node-tests/d66004d326efc160e76c71e99f774b138fc3ec3c/framework_tests/__init__.py -------------------------------------------------------------------------------- /framework_tests/conftest.py: -------------------------------------------------------------------------------- 1 | import os 2 | import pathlib as pl 3 | 4 | if not os.environ.get("CARDANO_NODE_SOCKET_PATH"): 5 | os.environ["CARDANO_NODE_SOCKET_PATH"] = "/nonexistent/state-cluster/relay1.socket" 6 | mockdir = pl.Path(__file__).parent / "mocks" 7 | os.environ["PATH"] = f"{mockdir}:{os.environ['PATH']}" 8 | -------------------------------------------------------------------------------- /framework_tests/mocks/cardano-cli: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | printf "cardano-node 1.36.0 - linux-x86_64 - ghc-8.10\ngit rev 420c4eb5d6efa4a6bf5fabc23d66080bdaa30353\n" 4 | -------------------------------------------------------------------------------- /framework_tests/mocks/cardano-node: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | printf "cardano-cli 8.20.3.0 - linux-x86_64 - ghc-8.10\ngit rev 424983fa186786397f5a99539f51710abf62c37b\n" 4 | -------------------------------------------------------------------------------- /framework_tests/test_resources_management.py: -------------------------------------------------------------------------------- 1 | from cardano_node_tests.cluster_management import resources_management 2 | 3 | ALL_POOLS = {"pool1", "pool2", "pool3", "pool4", "pool5"} 4 | 5 | 6 | def test_get_lockable(): 7 | resources_to_lock = [resources_management.OneOf(ALL_POOLS)] 8 | resources_locked = ["pool1", "pool2"] 9 | resources_used = ["pool3", "pool4"] 10 | selected = resources_management.get_resources( 11 | resources=resources_to_lock, 12 | unavailable=[*resources_locked, *resources_used], 13 | ) 14 | assert selected == ["pool5"] 15 | 16 | 17 | def test_get_usable(): 18 | resources_to_use = [resources_management.OneOf(ALL_POOLS)] 19 | resources_locked = ["pool1", "pool2"] 20 | selected = resources_management.get_resources( 21 | resources=resources_to_use, unavailable=resources_locked 22 | ) 23 | usable_expected = ALL_POOLS - set(resources_locked) 24 | assert len(selected) == 1 25 | assert selected[0] in usable_expected 26 | 27 | 28 | def test_get_oneof_multi(): 29 | resources_to_use = [ 30 | "pool2", 31 | resources_management.OneOf(ALL_POOLS), 32 | resources_management.OneOf(ALL_POOLS), 33 | ] 34 | resources_locked = ["pool1"] 35 | selected = resources_management.get_resources( 36 | resources=resources_to_use, unavailable=resources_locked 37 | ) 38 | usable_expected = ALL_POOLS - set(resources_locked) 39 | 40 | assert len(selected) == 3 41 | assert "pool2" in selected 42 | 43 | oneof_selected = set(selected) - {"pool2"} 44 | assert set(oneof_selected).intersection(usable_expected) 45 | 46 | 47 | def test_oneof_empty(): 48 | resources_locked = ALL_POOLS 49 | resources_to_use = [resources_management.OneOf(ALL_POOLS)] 50 | selected = resources_management.get_resources( 51 | resources=resources_to_use, unavailable=resources_locked 52 | ) 53 | assert len(selected) == 0 54 | -------------------------------------------------------------------------------- /framework_tests/test_resources_naming.py: -------------------------------------------------------------------------------- 1 | from cardano_node_tests.cluster_management import resources 2 | from cardano_node_tests.cluster_management import resources_management 3 | 4 | ALL_POOLS = {"pool1", "pool2", "pool3", "pool4", "pool5"} 5 | 6 | 7 | def test_sanitize_res_name(): 8 | oneof = resources_management.OneOf(ALL_POOLS) 9 | lock_resources = ["$$res", oneof, "res1"] 10 | use_resources = ["res2", oneof, "res$&#@"] 11 | mark = resources.sanitize_res_name( 12 | "res-Foo@Bar@res@Foo@Bar@res@Foo@Bar@res@Foo@Bar@res@Foo@Bar@res@Foo@Bar@res@Foo@Bar@" 13 | ) 14 | lock_resources = [ 15 | resources.sanitize_res_name(r) if isinstance(r, str) else r for r in lock_resources 16 | ] 17 | use_resources = [ 18 | resources.sanitize_res_name(r) if isinstance(r, str) else r for r in use_resources 19 | ] 20 | assert mark == "res-Foo_Bar_res_Foo_" 21 | assert lock_resources == ["_res", oneof, "res1"] 22 | assert use_resources == ["res2", oneof, "res_"] 23 | 24 | 25 | def test_get_unsanitized(): 26 | unsanitized = resources.get_unsanitized(["res1", "res2", "res$3", "res#%4"]) 27 | assert unsanitized == ["res$3", "res#%4"] 28 | -------------------------------------------------------------------------------- /framework_tests/test_subtests.py: -------------------------------------------------------------------------------- 1 | import pytest 2 | import pytest_subtests 3 | 4 | 5 | class TestSubtests: 6 | def test_outcomes( 7 | self, 8 | subtests: pytest_subtests.SubTests, 9 | ): 10 | xfail_msgs = [] 11 | 12 | # In subtest, don't return any other outcome than success or failure. 13 | # Allure doesn't work well with subtests. It will use outcome of the first non-successful 14 | # subtest as the overall test outcome. 15 | # Therefore skipped / xfailed subtests could mask subtest failures. As a workaround, 16 | # record the outcome of the subtest and use it as the outcome of the main test. 17 | def _subtest(num: int) -> None: 18 | if num > 200: 19 | xfail_msgs.append(f"{num} > 200") 20 | 21 | for n in (100, 200, 300, 500): 22 | with subtests.test(msg="check num", num=n): 23 | _subtest(n) 24 | 25 | if xfail_msgs: 26 | pytest.xfail("; ".join(xfail_msgs)) 27 | -------------------------------------------------------------------------------- /garnix.yaml: -------------------------------------------------------------------------------- 1 | builds: 2 | exclude: [] 3 | # turn off garnix 4 | include: [] 5 | -------------------------------------------------------------------------------- /poetry_update_deps.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | abort_install=0 4 | 5 | set -eu 6 | 7 | if [ -n "${IN_NIX_SHELL:-""}" ]; then 8 | echo "This script is not supposed to run inside nix shell." >&2 9 | abort_install=1 10 | fi 11 | if ! command -v poetry >/dev/null 2>&1; then 12 | echo "Poetry is not installed. Please install it first." >&2 13 | abort_install=1 14 | fi 15 | if [ ! -d "cardano_node_tests" ]; then 16 | echo "This script is supposed to run from the root of cardano-node-tests directory." >&2 17 | abort_install=1 18 | fi 19 | if [ "$abort_install" -eq 1 ]; then 20 | exit 1 21 | fi 22 | 23 | poetry lock "$@" 24 | -------------------------------------------------------------------------------- /prepare_test_env.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if ! (return 0 2>/dev/null); then 4 | echo "This script is supposed to be sourced, not executed." >&2 5 | exit 1 6 | fi 7 | 8 | if [ -z "${IN_NIX_SHELL:-""}" ]; then 9 | echo "This script is supposed to be sourced from nix shell." >&2 10 | return 1 11 | fi 12 | 13 | case "${1:-""}" in 14 | "conway") 15 | export CLUSTER_ERA=conway COMMAND_ERA=conway 16 | ;; 17 | *) 18 | echo "Usage: $0 {conway}" 19 | return 1 20 | ;; 21 | esac 22 | 23 | _cur_file="$(readlink -m "${BASH_SOURCE[${#BASH_SOURCE[@]} - 1]}")" 24 | REPODIR="${_cur_file%/*}" 25 | cd "$REPODIR" || return 1 26 | unset _cur_file 27 | 28 | export WORKDIR="$REPODIR/dev_workdir" 29 | 30 | rm -rf "${WORKDIR:?}" 31 | mkdir -p "$WORKDIR" 32 | 33 | # shellcheck disable=SC1091 34 | . "$REPODIR/.github/setup_venv.sh" 35 | 36 | export \ 37 | CARDANO_NODE_SOCKET_PATH="$PWD/dev_workdir/state-cluster0/bft1.socket" \ 38 | TMPDIR="$PWD/dev_workdir/tmp" \ 39 | DEV_CLUSTER_RUNNING=1 \ 40 | CLUSTERS_COUNT=1 \ 41 | FORBID_RESTART=1 \ 42 | NO_ARTIFACTS=1 43 | 44 | _scripts_dest="$WORKDIR/${CLUSTER_ERA}_fast" 45 | if [ ! -d "$_scripts_dest" ]; then 46 | PYTHONPATH=$PYTHONPATH:$PWD cardano_node_tests/prepare_cluster_scripts.py \ 47 | -s "cardano_node_tests/cluster_scripts/${CLUSTER_ERA}_fast" \ 48 | -d "$_scripts_dest" 49 | fi 50 | unset _scripts_dest 51 | 52 | cat > "$WORKDIR/.source" <&2 55 | fi 56 | source "$VIRTUAL_ENV/bin/activate" 57 | PYTHONPATH="$(echo "\$VIRTUAL_ENV"/lib/python3*/site-packages):\$PYTHONPATH" 58 | export PYTHONPATH 59 | export CARDANO_NODE_SOCKET_PATH="$PWD/dev_workdir/state-cluster0/bft1.socket" 60 | export TMPDIR="$PWD/dev_workdir/tmp" 61 | export DEV_CLUSTER_RUNNING=1 62 | export CLUSTERS_COUNT=1 63 | export FORBID_RESTART=1 64 | export NO_ARTIFACTS=1 65 | export CLUSTER_ERA="$CLUSTER_ERA" 66 | export COMMAND_ERA="${COMMAND_ERA:-""}" 67 | EoF 68 | 69 | echo 70 | echo 71 | echo "------------------------" 72 | echo "| Test Env Ready |" 73 | echo "------------------------" 74 | echo 75 | echo "To start local testnet, run:" 76 | echo "$WORKDIR/${CLUSTER_ERA}_fast/start-cluster" 77 | echo 78 | echo "To reuse the test env in another shell, source the env with:" 79 | echo "source $WORKDIR/.source" 80 | echo 81 | -------------------------------------------------------------------------------- /scripts/deploy_doc.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | DOC_SRC="src_docs" 6 | 7 | unset GITHUB_TOKEN 8 | 9 | # check that "$DOC_SRC" dir exists 10 | if [ ! -d "$DOC_SRC" ]; then 11 | echo "The '$DOC_SRC' dir doesn't exist, are you in the right directory?" 12 | exit 1 13 | fi 14 | 15 | # check that virtual env is activated 16 | if [ -z "${VIRTUAL_ENV:-""}" ]; then 17 | echo "A python virtual env is not activated in this shell." >&2 18 | exit 1 19 | fi 20 | 21 | # check that current branch is "master" 22 | cur_branch="$(git rev-parse --abbrev-ref HEAD)" 23 | if [ "$cur_branch" != "master" ]; then 24 | printf "WARNING: You are in '%s' branch instead of 'master'! Press ENTER to contunue or CTRL+C to abort." "$cur_branch" 25 | read -r 26 | fi 27 | 28 | # check that there are no uncommitted changes 29 | if ! git diff-index --quiet HEAD --; then 30 | echo "There are uncommitted changes, aborting." 31 | exit 1 32 | fi 33 | 34 | # build documentation 35 | make build_doc 36 | 37 | # drop changes made automatically by `make build_doc` 38 | if ! git diff-index --quiet HEAD -- "$DOC_SRC"; then 39 | git stash -- "$DOC_SRC" 40 | git stash drop 41 | fi 42 | 43 | # checkout the "github_pages" branch 44 | git checkout github_pages 45 | 46 | # reset the "github_pages" branch 47 | git reset --hard upstream/master 48 | 49 | # copy generated documention to 'docs' dir 50 | rm -rf docs/* 51 | cp -aT "$DOC_SRC"/build/html docs 52 | 53 | # stage changes 54 | git add docs 55 | 56 | # commit changes 57 | git commit -n -m "Documentation update" 58 | 59 | # push to origin/github_pages (upstream/github_pages) 60 | printf "\n-------------------------------------------\n\n" 61 | printf "Push changes manually:\ngit push -f origin github_pages\nor\ngit push -f upstream github_pages\n\n" 62 | printf "Then switch back to '%s' branch:\ngit checkout %s\n" "$cur_branch" "$cur_branch" 63 | -------------------------------------------------------------------------------- /scripts/postgres-start.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env -S nix develop --accept-flake-config .#postgres -i -k PGHOST -k PGPORT -k PGUSER -c bash 2 | # shellcheck shell=bash 3 | 4 | set -Eeuo pipefail 5 | trap 'echo "Error at line $LINENO"' ERR 6 | 7 | POSTGRES_DIR="${1:?"Need path to postgres dir"}" 8 | POSTGRES_DIR="$(readlink -m "$POSTGRES_DIR")" 9 | 10 | # set postgres env variables 11 | export PGHOST="${PGHOST:-localhost}" 12 | export PGPORT="${PGPORT:-5432}" 13 | export PGUSER="${PGUSER:-postgres}" 14 | 15 | # kill running postgres and clear its data 16 | if [ "${2:-""}" = "-k" ]; then 17 | # try to kill whatever is listening on postgres port 18 | listening_pid="$(lsof -i:"$PGPORT" -t | tail -n 1 || echo "")" 19 | if [ -n "$listening_pid" ]; then 20 | kill "$listening_pid" 21 | fi 22 | 23 | rm -rf "$POSTGRES_DIR/data" 24 | rm -f "$POSTGRES_DIR"/.*.lock 25 | fi 26 | 27 | # setup db 28 | if [ ! -e "$POSTGRES_DIR/data" ]; then 29 | mkdir -p "$POSTGRES_DIR/data" 30 | initdb -D "$POSTGRES_DIR/data" --encoding=UTF8 --locale=en_US.UTF-8 -A trust -U "$PGUSER" 31 | fi 32 | 33 | # start postgres 34 | postgres -D "$POSTGRES_DIR/data" -k "$POSTGRES_DIR" > "$POSTGRES_DIR/postgres.log" 2>&1 & 35 | PSQL_PID="$!" 36 | echo "$PSQL_PID" > "$POSTGRES_DIR/postgres.pid" 37 | 38 | sleep 5 39 | cat "$POSTGRES_DIR/postgres.log" 40 | echo 41 | ps -fp "$PSQL_PID" 42 | -------------------------------------------------------------------------------- /scripts/restart_dev_cluster.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | SOCKET_PATH="$(readlink -m "$CARDANO_NODE_SOCKET_PATH")" 6 | STATE_CLUSTER="${SOCKET_PATH%/*}" 7 | 8 | # check if DEV_CLUSTER_RUNNING env variable is set 9 | if [ -z "${DEV_CLUSTER_RUNNING:-}" ]; then 10 | echo "The 'DEV_CLUSTER_RUNNING' is not set. It is needed when running dev cluster, exiting." 11 | exit 1 12 | fi 13 | 14 | # check if "stop-cluster" file exists in STATE_CLUSTER dir 15 | if [ ! -f "${STATE_CLUSTER}/stop-cluster" ]; then 16 | echo "Cannot find '${STATE_CLUSTER}/stop-cluster', exiting." 17 | exit 1 18 | fi 19 | 20 | "$STATE_CLUSTER/stop-cluster" 21 | sleep 2 22 | 23 | "$STATE_CLUSTER/supervisord_start" 24 | sleep 2 25 | 26 | "$STATE_CLUSTER/supervisorctl" start all 27 | sleep 1 28 | 29 | echo 30 | echo "Dev cluster restarted; current status:" 31 | "$STATE_CLUSTER/supervisorctl" status all 32 | -------------------------------------------------------------------------------- /scripts/setup_dev_venv.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Install cardano_node_tests and its dependencies into a virtual environment. 4 | 5 | PYTHON_VERSION="3.11" 6 | 7 | abort_install=0 8 | 9 | set -eu 10 | 11 | if [ -n "${IN_NIX_SHELL:-""}" ]; then 12 | echo "This script is not supposed to run inside nix shell." >&2 13 | abort_install=1 14 | fi 15 | if ! command -v poetry >/dev/null 2>&1; then 16 | echo "Poetry is not installed. Please install it first." >&2 17 | abort_install=1 18 | fi 19 | if [ ! -d "cardano_node_tests" ]; then 20 | echo "This script is supposed to run from the root of cardano-node-tests directory." >&2 21 | abort_install=1 22 | fi 23 | 24 | if [ -n "${VIRTUAL_ENV:-""}" ]; then 25 | if [ "$abort_install" -eq 1 ]; then 26 | exit 1 27 | fi 28 | 29 | echo "A python virtual env is already activated in this shell." 30 | echo "Install into the current virtual env? [y/N]" 31 | read -r answer 32 | if [ "$answer" != "y" ]; then 33 | exit 1 34 | fi 35 | 36 | poetry install --with docs --with dev 37 | exit 0 38 | fi 39 | 40 | # use the same python version as in nix shell 41 | if ! command -v "python$PYTHON_VERSION" >/dev/null 2>&1; then 42 | echo "Python $PYTHON_VERSION is not installed. Please install it first." >&2 43 | abort_install=1 44 | fi 45 | 46 | if [ "$abort_install" -eq 1 ]; then 47 | exit 1 48 | fi 49 | 50 | poetry env use "python$PYTHON_VERSION" 51 | poetry install --with docs --with dev 52 | 53 | # shellcheck disable=SC2016 54 | echo 'Run \`source "$(poetry env info --path)"/bin/activate\` to activate the virtual env.' 55 | -------------------------------------------------------------------------------- /scripts/test_block_production.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Run the block production test on environment where half of the nodes are using the legacy 4 | # topology and the other half are using the P2P topology. 5 | 6 | set -euo pipefail 7 | 8 | TOP_DIR="$(readlink -m "${0%/*}/..")" 9 | 10 | # The database file will be created if missing 11 | if [ -z "${BLOCK_PRODUCTION_DB:-""}" ]; then 12 | # shellcheck disable=SC2016 13 | echo 'Configure path to the database file by setting `BLOCK_PRODUCTION_DB`' >&2 14 | exit 1 15 | fi 16 | BLOCK_PRODUCTION_DB="$(readlink -m "$BLOCK_PRODUCTION_DB")" 17 | export BLOCK_PRODUCTION_DB 18 | 19 | # Node revision to use. If not set, the latest master will be used. 20 | export NODE_REV="${NODE_REV:-""}" 21 | 22 | # Start cluster in Byron era 23 | export CI_BYRON_CLUSTER="${CI_BYRON_CLUSTER:-"true"}" 24 | 25 | # The number of pools to setup 26 | export NUM_POOLS="${NUM_POOLS:-"10"}" 27 | if [ $((NUM_POOLS % 2)) -ne 0 ]; then 28 | echo "NUM_POOLS needs to be even number" >&2 29 | exit 1 30 | fi 31 | 32 | # The number of epochs to produce blocks for 33 | export BLOCK_PRODUCTION_EPOCHS="${BLOCK_PRODUCTION_EPOCHS:-"100"}" 34 | 35 | export MIXED_P2P=1 CLUSTERS_COUNT=1 TEST_THREADS=0 PYTEST_ARGS="-k test_block_production" 36 | 37 | "$TOP_DIR/.github/regression.sh" 38 | -------------------------------------------------------------------------------- /scripts/test_node_ipc_shutdown.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Meant to run on long running testnet such as Preview. 4 | 5 | if [ -z "$CARDANO_NODE_SOCKET_PATH" ]; then 6 | echo "CARDANO_NODE_SOCKET_PATH is not set" >&2 7 | exit 1 8 | fi 9 | 10 | BOOTSRAP_DIR="${CARDANO_NODE_SOCKET_PATH%/*}" 11 | cd "$BOOTSRAP_DIR" || exit 1 12 | 13 | rm -f nodefifo 14 | mkfifo nodefifo 15 | 16 | ( 17 | exec 3 relay1.log 2>&1 19 | ) & 20 | bpid=$! 21 | echo "$bpid" 22 | 23 | exec 4>nodefifo # open fifo for writing 24 | sleep 120 # let node start and run for a while 25 | 26 | exec 4>&- # close the pipe, node should shutdown 27 | echo Node should be shutting down 28 | sleep 20 29 | -------------------------------------------------------------------------------- /scripts/test_node_reconnect.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Run reconnect tests. 4 | # 5 | # You must set either TEST_RECONNECT or TEST_METRICS_RECONNECT to 1 to run. 6 | 7 | set -euo pipefail 8 | 9 | TOP_DIR="$(readlink -m "${0%/*}/..")" 10 | 11 | export \ 12 | CLUSTERS_COUNT=1 \ 13 | TEST_THREADS=0 \ 14 | SCRIPTS_DIRNAME="mainnet_fast" \ 15 | PYTEST_ARGS="-s -k TestNodeReconnect" 16 | 17 | "$TOP_DIR/.github/regression.sh" 18 | -------------------------------------------------------------------------------- /scripts/test_rollbacks.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Run rollback tests. 4 | # 5 | # Can be configured using environment variables: 6 | # NODE_REV - the node revision to use. If not set, the latest master will be used. 7 | # NUM_POOLS - the number of pools to setup. If not set, 10 will be used. 8 | # ROLLBACK_NODES_OFFSET - difference in number of nodes in cluster 1 vs cluster 2. If not set, 1 will be used. 9 | # INTERACTIVE - if set, only the `test_consensus_reached` test will run, and the test will pause 10 | # after each step. 11 | # 12 | # With default settings, there will be 6 block producing nodes in cluster 1 and 4 block producing nodes in cluster 2. 13 | 14 | set -euo pipefail 15 | 16 | TOP_DIR="$(readlink -m "${0%/*}/..")" 17 | 18 | export NUM_POOLS="${NUM_POOLS:-"10"}" CLUSTERS_COUNT=1 TEST_THREADS=0 19 | 20 | if [ -n "${INTERACTIVE:-""}" ]; then 21 | export ROLLBACK_PAUSE=1 SCRIPTS_DIRNAME="mainnet_fast" PYTEST_ARGS="-s -k test_consensus_reached" 22 | "$TOP_DIR/.github/regression.sh" 23 | else 24 | export SCRIPTS_DIRNAME="conway_fast" PYTEST_ARGS="-k test_permanent_fork" 25 | "$TOP_DIR/.github/regression.sh" || exit "$?" 26 | export SCRIPTS_DIRNAME="mainnet_fast" PYTEST_ARGS="-k test_consensus_reached" 27 | "$TOP_DIR/.github/regression.sh" 28 | fi 29 | -------------------------------------------------------------------------------- /src_docs/Makefile: -------------------------------------------------------------------------------- 1 | # Minimal makefile for Sphinx documentation 2 | 3 | SPHINXOPTS ?= 4 | SPHINXBUILD ?= sphinx-build 5 | SPHINXAPIDOC ?= sphinx-apidoc 6 | SOURCEDIR = source 7 | BUILDDIR = build 8 | MODDIR ?= ../cardano_node_tests 9 | 10 | # Put it first so that "make" without argument is like "make help". 11 | help: 12 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 13 | 14 | apidoc: 15 | @$(SPHINXAPIDOC) -f -H "Source Documentation" -o "$(SOURCEDIR)" -d 6 --ext-githubpages "$(MODDIR)" 16 | 17 | clean: 18 | rm -rf "$(BUILDDIR)"/* 19 | 20 | .PHONY: help apidoc clean Makefile 21 | 22 | # Catch-all target: route all unknown targets to Sphinx using the new 23 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 24 | %: Makefile apidoc 25 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 26 | -------------------------------------------------------------------------------- /src_docs/requirements_mapping.json: -------------------------------------------------------------------------------- 1 | { 2 | "chang_us": { 3 | "CIP020": ["intCIP020-01", "intCIP020-02", "intCIP020-03"], 4 | "CIP026": ["intCIP026-01", "intCIP026-02", "intCIP026-03", "intCIP026-04"], 5 | "CIP028": ["CLI013", "CLI014", "CLI015", "CLI016", "CLI017", "CLI018", "CLI019"], 6 | "CIP030": ["intCIP030en", "intCIP030ex"], 7 | "CIP031a": [ 8 | "intCIP031a-01", 9 | "intCIP031a-02", 10 | "intCIP031a-03", 11 | "intCIP031a-04", 12 | "intCIP031a-05", 13 | "intCIP031a-06", 14 | "intCIP031a-07" 15 | ], 16 | "CIP031c": ["intCIP031c-01", "intCIP031c-02"], 17 | "CIP032": ["intCIP032en", "intCIP032ex"], 18 | "CIP034": ["intCIP034en", "intCIP034ex"], 19 | "CIP038": [ 20 | "intCIP038-01", 21 | "intCIP038-02", 22 | "intCIP038-03", 23 | "intCIP038-04", 24 | "intCIP038-05", 25 | "intCIP038-06", 26 | "intCIP038-07" 27 | ], 28 | "CIP043": [ 29 | "intCIP043-01", 30 | "intCIP043-02" 31 | ], 32 | "CIP054": [ 33 | "intCIP054-01", 34 | "intCIP054-02", 35 | "intCIP054-03", 36 | "intCIP054-04", 37 | "intCIP054-05", 38 | "intCIP054-06", 39 | "intCIP054-07" 40 | ], 41 | "CIP061": ["intCIP061-01", "intCIP061-02", "intCIP061-03", "intCIP061-04"], 42 | "CIP062": ["intCIP062-01", "intCIP062-02"], 43 | "CIP064": ["intCIP064-01", "intCIP064-02", "intCIP064-03", "intCIP064-04"], 44 | "CIP069": ["intCIP069en", "intCIP069ex"], 45 | "CIP073": ["intCIP073-01", "intCIP073-02", "intCIP073-03", "intCIP073-04"] 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src_docs/source/CNAME: -------------------------------------------------------------------------------- 1 | tests.cardano.intersectmbo.org 2 | -------------------------------------------------------------------------------- /src_docs/source/_static/css/copyright.css: -------------------------------------------------------------------------------- 1 | /* replace the copyright to eliminate the copyright symbol enforced by the ReadTheDocs theme */ 2 | div[role=contentinfo] { 3 | visibility: hidden; 4 | position: relative; 5 | } 6 | 7 | div[role=contentinfo]:after { 8 | visibility: visible; 9 | position: absolute; 10 | top: 0; 11 | left: 0; 12 | content: "Licensed under a Creative Commons Attribution 4.0 International License."; 13 | } 14 | -------------------------------------------------------------------------------- /src_docs/source/_static/css/override-width.css: -------------------------------------------------------------------------------- 1 | .wy-nav-content { 2 | max-width:960px !important; 3 | } 4 | -------------------------------------------------------------------------------- /src_docs/source/_static/css/tables.css: -------------------------------------------------------------------------------- 1 | /* override table width restrictions */ 2 | .wy-table-responsive table td, .wy-table-responsive table th { 3 | /* !important prevents the common CSS stylesheets from 4 | overriding this as on RTD they are loaded after this stylesheet */ 5 | white-space: normal !important; 6 | } 7 | 8 | .wy-table-responsive { 9 | overflow: visible !important; 10 | } 11 | -------------------------------------------------------------------------------- /src_docs/source/_static/images/Cardano-Crypto-Logo-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IntersectMBO/cardano-node-tests/d66004d326efc160e76c71e99f774b138fc3ec3c/src_docs/source/_static/images/Cardano-Crypto-Logo-128.png -------------------------------------------------------------------------------- /src_docs/source/_static/images/qa_process.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IntersectMBO/cardano-node-tests/d66004d326efc160e76c71e99f774b138fc3ec3c/src_docs/source/_static/images/qa_process.png -------------------------------------------------------------------------------- /src_docs/source/contribute/contributing.rst: -------------------------------------------------------------------------------- 1 | .. mdinclude:: ../../../CONTRIBUTING.md 2 | -------------------------------------------------------------------------------- /src_docs/source/how-tos.rst: -------------------------------------------------------------------------------- 1 | How Tos 2 | ======= 3 | 4 | .. toctree:: 5 | :maxdepth: 1 6 | :titlesonly: 7 | :glob: 8 | 9 | how-tos/* 10 | -------------------------------------------------------------------------------- /src_docs/source/how-tos/350_mir_cert_test_example_manual_steps.rst: -------------------------------------------------------------------------------- 1 | .. mdinclude:: ../../../doc/mir_cert_test_example_manual_steps.md 2 | -------------------------------------------------------------------------------- /src_docs/source/how-tos/380_stake_credential_history_tool.rst: -------------------------------------------------------------------------------- 1 | .. mdinclude:: ../../../doc/stake_credential_history_tool.md 2 | -------------------------------------------------------------------------------- /src_docs/source/how-tos/500_smash_faq.rst: -------------------------------------------------------------------------------- 1 | .. mdinclude:: ../../../doc/smash/smash_faq.md 2 | -------------------------------------------------------------------------------- /src_docs/source/how-tos/520_smash_tests_and_debugging_examples.rst: -------------------------------------------------------------------------------- 1 | .. mdinclude:: ../../../doc/smash/smash_tests_and_debugging_examples.md 2 | -------------------------------------------------------------------------------- /src_docs/source/index.rst: -------------------------------------------------------------------------------- 1 | Welcome to Cardano node tests documentation! 2 | ============================================= 3 | 4 | .. toctree:: 5 | :maxdepth: 4 6 | :caption: Contents: 7 | 8 | readme 9 | test_results 10 | test_plans 11 | process 12 | how-tos 13 | contribute/contributing.rst 14 | modules 15 | 16 | 17 | Indices and tables 18 | ================== 19 | 20 | * :ref:`genindex` 21 | * :ref:`modindex` 22 | * :ref:`search` 23 | -------------------------------------------------------------------------------- /src_docs/source/mocks/cardano-node: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | printf "cardano-node 1.36.0 - linux-x86_64 - ghc-8.10\ngit rev 420c4eb5d6efa4a6bf5fabc23d66080bdaa30353\n" 4 | -------------------------------------------------------------------------------- /src_docs/source/modules.rst: -------------------------------------------------------------------------------- 1 | Source Documentation 2 | ==================== 3 | 4 | .. toctree:: 5 | :maxdepth: 6 6 | 7 | cardano_node_tests 8 | -------------------------------------------------------------------------------- /src_docs/source/process.rst: -------------------------------------------------------------------------------- 1 | Process 2 | ======= 3 | 4 | .. toctree:: 5 | :maxdepth: 1 6 | :titlesonly: 7 | :glob: 8 | 9 | process/* 10 | -------------------------------------------------------------------------------- /src_docs/source/process/100_test_types.rst: -------------------------------------------------------------------------------- 1 | .. mdinclude:: ../../../doc/test_types.md 2 | -------------------------------------------------------------------------------- /src_docs/source/process/200_quality_control_strategy.rst: -------------------------------------------------------------------------------- 1 | .. mdinclude:: ../../../doc/quality_control_strategy.md 2 | -------------------------------------------------------------------------------- /src_docs/source/process/300_uat_strategy.rst: -------------------------------------------------------------------------------- 1 | .. mdinclude:: ../../../doc/uat_strategy.md 2 | -------------------------------------------------------------------------------- /src_docs/source/process/400_plutus.rst: -------------------------------------------------------------------------------- 1 | .. mdinclude:: ../../../doc/plutus.md 2 | -------------------------------------------------------------------------------- /src_docs/source/readme.rst: -------------------------------------------------------------------------------- 1 | .. mdinclude:: ../../README.md 2 | -------------------------------------------------------------------------------- /src_docs/source/test_plans.rst: -------------------------------------------------------------------------------- 1 | Test Plans 2 | ========== 3 | 4 | .. toctree:: 5 | :maxdepth: 1 6 | :titlesonly: 7 | :glob: 8 | 9 | test-plans/* 10 | -------------------------------------------------------------------------------- /src_docs/source/test_results.rst: -------------------------------------------------------------------------------- 1 | Test Results 2 | ============ 3 | 4 | .. toctree:: 5 | :maxdepth: 4 6 | 7 | test_results/nightly_system_tests 8 | test_results/sync_tests 9 | test_results/tag_tests 10 | test_results/chang_user_stories 11 | -------------------------------------------------------------------------------- /src_docs/source/test_results/chang_user_stories.rst: -------------------------------------------------------------------------------- 1 | Chang HF User Stories 2 | ===================== 3 | 4 | .. toctree:: 5 | :maxdepth: 4 6 | 7 | requirements/chang_user_stories_system_tests.rst 8 | requirements/plutusV3_user_stories_system_tests.rst 9 | -------------------------------------------------------------------------------- /src_docs/source/test_results/node/tag_10_2_1.rst: -------------------------------------------------------------------------------- 1 | 10.2.1 2 | ====== 3 | 4 | * Release notes - 5 | 6 | 7 | Regression testing on a local cluster 8 | ------------------------------------- 9 | 10 | .. list-table:: Regression Testsuite 11 | :widths: 64 7 12 | :header-rows: 0 13 | 14 | * - P2P ON - `Conway PV10 `__ 15 | - |:heavy_check_mark:| 16 | 17 | .. list-table:: Other Testing 18 | :widths: 64 7 19 | :header-rows: 0 20 | 21 | * - Upgrade testing (10.1.4 to 10.2.1) 22 | - |:heavy_check_mark:| 23 | * - Rollback testing 24 | - |:heavy_check_mark:| 25 | * - Reconnection testing 26 | - |:heavy_check_mark:| 27 | * - Sanity checks of the submit-api REST service 28 | - |:heavy_check_mark:| 29 | * - P2P Dynamic Block Production testing 30 | - |:heavy_check_mark:| 31 | 32 | 33 | Release testing checklist 34 | ------------------------- 35 | 36 | .. list-table:: 37 | :widths: 64 7 38 | :header-rows: 0 39 | 40 | * - `10.2.1` pushed to `preview` 41 | - |:heavy_check_mark:| 42 | * - Regression testing against `preview` 43 | - |:heavy_check_mark:| 44 | * - `Sync testing ran against Mainnet (Linux) `__ 45 | - |:heavy_check_mark:| 46 | * - DB re-validation testing (ledger snapshots compatibility) 47 | - |:heavy_check_mark:| 48 | * - Backward compatibility testing (Node with version N-1) 49 | - |:heavy_check_mark:| 50 | * - Check build instructions changes 51 | - |:hourglass_flowing_sand:| 52 | 53 | 54 | New functionalities in this tag 55 | ------------------------------- 56 | 57 | 58 | New issues 59 | ---------- 60 | 61 | 62 | Breaking changes 63 | ---------------- 64 | -------------------------------------------------------------------------------- /src_docs/source/test_results/node/tag_10_4_1.rst: -------------------------------------------------------------------------------- 1 | 10.4.1 2 | ====== 3 | 4 | * Release notes - 5 | 6 | 7 | Regression testing on a local cluster 8 | ------------------------------------- 9 | 10 | .. list-table:: Regression Testsuite 11 | :widths: 64 7 12 | :header-rows: 0 13 | 14 | * - default UTxO backend - `Conway PV10 `__ 15 | - |:heavy_check_mark:| 16 | * - LMDB UTxO backend - `Conway PV10 `__ 17 | - |:heavy_check_mark:| 18 | 19 | .. list-table:: Other Testing 20 | :widths: 64 7 21 | :header-rows: 0 22 | 23 | * - Upgrade testing (10.3.1 to 10.4.1) 24 | - |:heavy_check_mark:| 25 | * - Rollback testing 26 | - |:heavy_check_mark:| 27 | * - Reconnection testing 28 | - |:heavy_check_mark:| 29 | * - Sanity checks of the submit-api REST service 30 | - |:heavy_check_mark:| 31 | * - P2P Dynamic Block Production testing 32 | - |:heavy_check_mark:| 33 | * - Shutdown testing (IPC, block synced, slot synced, Ctrl+C) 34 | - |:heavy_check_mark:| 35 | 36 | 37 | Release testing checklist 38 | ------------------------- 39 | 40 | .. list-table:: 41 | :widths: 64 7 42 | :header-rows: 0 43 | 44 | * - `10.4.1` pushed to `preview` 45 | - |:heavy_check_mark:| 46 | * - Regression testing against `preview` 47 | - |:heavy_check_mark:| 48 | * - `Sync testing ran against Mainnet (Linux) `__ 49 | - |:heavy_check_mark:| 50 | * - DB re-validation testing (ledger snapshots compatibility) 51 | - |:heavy_check_mark:| 52 | * - Backward compatibility testing (Node with version N-1) 53 | - |:heavy_check_mark:| 54 | * - Check build instructions changes 55 | - |:heavy_check_mark:| 56 | 57 | 58 | 59 | New functionalities in this tag 60 | ------------------------------- 61 | 62 | 63 | New issues 64 | ---------- 65 | 66 | 67 | Breaking changes 68 | ---------------- 69 | -------------------------------------------------------------------------------- /src_docs/source/test_results/node/utxo_hd_9_1_1.rst: -------------------------------------------------------------------------------- 1 | :orphan: 2 | 3 | UTXO-HD on 9.1.1 4 | ================ 5 | 6 | Regression testing on a local cluster 7 | ------------------------------------- 8 | 9 | .. list-table:: Regression Testsuite 10 | :widths: 64 7 11 | :header-rows: 0 12 | 13 | * - Disk - `Conway 9 `__ 14 | - |:heavy_check_mark:| 15 | * - Disk - `Conway 10 `__ 16 | - |:heavy_check_mark:| 17 | * - Mem - `Conway 9 `__ 18 | - |:heavy_check_mark:| 19 | * - Mem - `Conway 10 `__ 20 | - |:heavy_check_mark:| 21 | 22 | .. list-table:: Other Testing 23 | :widths: 64 7 24 | :header-rows: 0 25 | 26 | * - Rollback testing 27 | - |:heavy_check_mark:| 28 | * - P2P Dynamic Block Production testing 29 | - |:heavy_check_mark:| 30 | * - Upgrade testing (legacy backend upgraded to UTXO-HD disk backend) 31 | - |:heavy_check_mark:| 32 | -------------------------------------------------------------------------------- /src_docs/source/test_results/sync_tests.rst: -------------------------------------------------------------------------------- 1 | Sync Tests 2 | ========== 3 | 4 | The sync tests evaluate the performance of syncing the Cardano mainnet from genesis. These tests focus on: 5 | 6 | - **Sync time** – how long it takes to fully sync a node 7 | - **Sync speed** – the rate at which blockchain data is processed in each epoch and each era 8 | - **Node resource usage** – including CPU and memory utilization 9 | 10 | The source code for these tests is available in the `cardano-sync-tests `__ repository. 11 | 12 | Sync Test Results by Cardano Node Version 13 | ----------------------------------------- 14 | 15 | Below are published results for recent `cardano-node` releases: 16 | 17 | .. raw:: html 18 | 19 | 24 | -------------------------------------------------------------------------------- /src_docs/source/test_results/tag_tests.rst: -------------------------------------------------------------------------------- 1 | Tag Testing 2 | =========== 3 | 4 | .. toctree:: 5 | :maxdepth: 4 6 | 7 | node/tag_10_4_1.rst 8 | node/tag_10_3_1.rst 9 | node/tag_10_2_1.rst 10 | node/tag_10_1_2.rst 11 | node/tag_10_1_1.rst 12 | node/tag_9_0_0.rst 13 | node/tag_8_11_0.rst 14 | node/tag_8_9_3.rst 15 | node/tag_8_9_1.rst 16 | node/tag_8_9_0.rst 17 | node/tag_8_8_0.rst 18 | node/tag_8_7_3.rst 19 | node/tag_8_7_2.rst 20 | node/tag_8_6_0_pre.rst 21 | node/tag_8_1_1.rst 22 | node/tag_8_0_0.rst 23 | node/tag_1_35_7.rst 24 | node/tag_1_35_6.rst 25 | node/tag_1_35_5.rst 26 | node/tag_1_35_4_rc1.rst 27 | node/tag_1_35_3.rst 28 | -------------------------------------------------------------------------------- /testnets_bootstrap_template/README.md: -------------------------------------------------------------------------------- 1 | Testnet Bootstrap 2 | ================= 3 | 4 | Configuration 5 | ------------- 6 | 7 | * Rename the directory to eg. `preview_bootstrap` 8 | * Go to 9 | and download genesis and configuration files 10 | * Replace the empty placeholder files with the downloaded files, so the file names are preserved 11 | * Make sure the `config-relay1.json` points to correct names of the genesis files (the file names differ from the downloaded ones) 12 | 13 | Nix shell 14 | --------- 15 | 16 | The assumption is you are running all the following commands in the DevOps nix-shell. 17 | 18 | Faucet 19 | ------ 20 | 21 | * If you already have an address on the testnet, create a `shelley/faucet.addr` file with the address, 22 | and `shelley/faucet.vkey` and `shelley/faucet.skey` with the corresponding keys 23 | * OR run the `faucet_setup.sh` script. Export `TESTNET_NAME` and optionally `APIKEY` 24 | 25 | Running the node 26 | ---------------- 27 | 28 | * Run the `run_relay1.sh` script 29 | * Wait until the node is synced (check in another terminal window) 30 | 31 | Running the db-sync 32 | -------------------- 33 | 34 | * Set the `CARDANO_NODE_SOCKET_PATH`: `export CARDANO_NODE_SOCKET_PATH=$PWD/relay1.socket` 35 | * When you don't have db and snapshot for the given testnet available, start & setup postgres with clean db 36 | 37 | ```sh 38 | /path/to/cardano-node-tests-repo/scripts/postgres-start.sh ~/tmp/postgres-for-testnet/ -k 39 | ./postgres-setup.sh 40 | ``` 41 | 42 | * When you already have db and snapshot for the given testnet available, start postgres with correct data 43 | 44 | ```sh 45 | /path/to/cardano-node-tests-repo/scripts/postgres-start.sh ~/tmp/postgres-for-testnet/ 46 | ``` 47 | 48 | * Start db-sync ONLY AFTER the node is fully synced: 49 | 50 | ```sh 51 | ./run-cardano-dbsync 52 | ``` 53 | 54 | * Wait until the db-syn is synced 55 | 56 | Running tests 57 | ------------- 58 | 59 | Once the node and optionally db-sync are fully synced, you can stop them and start the tests. 60 | Note that the testing framework will start node and db-sync processes automatically. It will use the synced states of both node and db-sync if available in the bootstrap directory. 61 | 62 | * open another terminal 63 | * cd to `cardano-node-tests` repository 64 | * run the tests 65 | 66 | ```sh 67 | NODE_REV=8.0.0 BOOTSTRAP_DIR=~/path/to/preview_bootstrap ./.github/regression.sh 68 | ``` 69 | -------------------------------------------------------------------------------- /testnets_bootstrap_template/config-relay1.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IntersectMBO/cardano-node-tests/d66004d326efc160e76c71e99f774b138fc3ec3c/testnets_bootstrap_template/config-relay1.json -------------------------------------------------------------------------------- /testnets_bootstrap_template/faucet_setup.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | TESTNET_MAGIC="${TESTNET_MAGIC:-$( /dev/null 17 | echo "Setting up db $DATABASE_NAME" 18 | createdb -T template0 --owner="$PGUSER" --encoding=UTF8 "$DATABASE_NAME" 19 | 20 | echo "${PGHOST}:${PGPORT}:${DATABASE_NAME}:${PGUSER}:secret" > "$PGPASSFILE" 21 | chmod 600 "$PGPASSFILE" 22 | -------------------------------------------------------------------------------- /testnets_bootstrap_template/run-cardano-dbsync: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env nix-shell 2 | #! nix-shell -i bash --pure --keep CARDANO_NODE_SOCKET_PATH --keep PGHOST --keep PGPORT --keep PGUSER --keep PGPASSFILE --keep DBSYNC_REPO -p postgresql 3 | # shellcheck shell=bash 4 | 5 | set -uo pipefail 6 | 7 | SOCKET_PATH="$(readlink -m "$CARDANO_NODE_SOCKET_PATH")" 8 | STATE_CLUSTER="${SOCKET_PATH%/*}" 9 | 10 | export PGPASSFILE="$STATE_CLUSTER/pgpass" 11 | export PGHOST="${PGHOST:-localhost}" 12 | export PGPORT="${PGPORT:-5432}" 13 | export PGUSER="${PGUSER:-postgres}" 14 | 15 | exec "$DBSYNC_REPO/db-sync-node/bin/cardano-db-sync" --config "$STATE_CLUSTER/dbsync-config.yaml" --socket-path "$CARDANO_NODE_SOCKET_PATH" --state-dir "$STATE_CLUSTER/db-sync" --schema-dir "$DBSYNC_REPO/schema" 16 | -------------------------------------------------------------------------------- /testnets_bootstrap_template/run_relay1.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | exec cardano-node run --topology topology-relay1.json --database-path relay1-db/ --socket-path relay1.socket --config config-relay1.json "$@" 4 | -------------------------------------------------------------------------------- /testnets_bootstrap_template/submit-api-config.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IntersectMBO/cardano-node-tests/d66004d326efc160e76c71e99f774b138fc3ec3c/testnets_bootstrap_template/submit-api-config.json -------------------------------------------------------------------------------- /testnets_bootstrap_template/topology-relay1.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IntersectMBO/cardano-node-tests/d66004d326efc160e76c71e99f774b138fc3ec3c/testnets_bootstrap_template/topology-relay1.json --------------------------------------------------------------------------------