diff --git a/E2E-tests/config/substrate/ci_stack.json b/E2E-tests/config/substrate/ci_stack.json index 779224368..dbe5b338a 100644 --- a/E2E-tests/config/substrate/ci_stack.json +++ b/E2E-tests/config/substrate/ci_stack.json @@ -17,7 +17,7 @@ "cli": "export CARDANO_NODE_SOCKET_PATH=/ipc/node.socket && /tools/cardano-cli", "ssh": "${stack_config[ssh]}" }, - "sidechain_main_cli": { + "pc_contracts_cli": { "cli": "/tools/partner-chains-smart-contracts-6.1.0/sidechain-cli", "ssh": "${stack_config[ssh]}" }, diff --git a/E2E-tests/config/substrate/devnet_stack.json b/E2E-tests/config/substrate/devnet_stack.json index 3838ddad0..6f3670562 100644 --- a/E2E-tests/config/substrate/devnet_stack.json +++ b/E2E-tests/config/substrate/devnet_stack.json @@ -17,7 +17,7 @@ "cli": "export CARDANO_NODE_SOCKET_PATH=/ipc/node.socket && /tools/cardano-cli", "ssh": "${stack_config[ssh]}" }, - "sidechain_main_cli": { + "pc_contracts_cli": { "cli": "/tools/partner-chains-smart-contracts-7.0.1/pc-contracts-cli", "ssh": "${stack_config[ssh]}" }, diff --git a/E2E-tests/config/substrate/local_stack.json b/E2E-tests/config/substrate/local_stack.json index 3e64c6206..14f2c2b4c 100644 --- a/E2E-tests/config/substrate/local_stack.json +++ b/E2E-tests/config/substrate/local_stack.json @@ -10,7 +10,7 @@ "cli": "cardano-cli", "shell": "docker exec cardano-node-1 bash -c" }, - "sidechain_main_cli": { + "pc_contracts_cli": { "cli": "./pc-contracts-cli", "shell": "docker exec pc-contracts-cli bash -c" }, diff --git a/E2E-tests/config/substrate/staging_stack.json b/E2E-tests/config/substrate/staging_stack.json index 827355b23..a374f04f6 100644 --- a/E2E-tests/config/substrate/staging_stack.json +++ b/E2E-tests/config/substrate/staging_stack.json @@ -17,7 +17,7 @@ "cli": "export CARDANO_NODE_SOCKET_PATH=/ipc/node.socket && /tools/cardano-cli", "ssh": "${stack_config[ssh]}" }, - "sidechain_main_cli": { + "pc_contracts_cli": { "cli": "/tools/partner-chains-smart-contracts-7.0.1/pc-contracts-cli", "ssh": "${stack_config[ssh]}" }, diff --git a/E2E-tests/docs/configure-stack.md b/E2E-tests/docs/configure-stack.md index a7044ef11..ecabcb22d 100644 --- a/E2E-tests/docs/configure-stack.md +++ b/E2E-tests/docs/configure-stack.md @@ -14,7 +14,7 @@ As a user, you can choose where to place those services and binaries: on the tes In case of the test runner machine (and local execution), you will need to update the binaries path in `stack_config.tools` for `-stack.json` file in the `config//` folder: - `cardano_cli` -- `sidechain_main_cli` +- `pc_contracts_cli` - `generate_signatures_cli` ## Set up stack on remote host @@ -30,7 +30,7 @@ To configure the stack, you will need to do the following: 3. Set `stack_config.ssh.host_keys_path` to the file added at step 3 4. Set `stack_config.ssh.private_key_path` to the file added at step 4 6. Set `tools.cardano_cli.cli` to the path to the cardano-cli binary. Do not forget about exposing CARDANO_NODE_SOCKET_PATH. E.g. `export CARDANO_NODE_SOCKET_PATH=/ipc/node.socket && /cardano-cli` -7. Set `tools.sidechain_main_cli` to the path to the `partner-chains-smart-contracts` binary +7. Set `tools.pc_contracts_cli` to the path to the `partner-chains-smart-contracts` binary 8. Set `tools.generate_signatures_cli` to the path to the `partner-chains-node` binary ### `-stack.json` template: @@ -52,7 +52,7 @@ To configure the stack, you will need to do the following: "cli": , "ssh": "${stack_config[ssh]}" }, - "sidechain_main_cli": { + "pc_contracts_cli": { "cli": , "ssh": "${stack_config[ssh]}" }, diff --git a/E2E-tests/docs/run-tests-on-new-env.md b/E2E-tests/docs/run-tests-on-new-env.md index ae2d57c5c..5a0876574 100644 --- a/E2E-tests/docs/run-tests-on-new-env.md +++ b/E2E-tests/docs/run-tests-on-new-env.md @@ -175,8 +175,8 @@ E.g. for Cardano Preview it will be: "cardano_cli": { "cli": , // path to cardano-cli binary }, - "sidechain_main_cli": { - "cli": // path to sidechain-main-cli binary + "pc_contracts_cli": { + "cli": // path to pc-contracts-cli binary }, "generate_signatures_cli": { "cli": // path to partner-chains-node binary diff --git a/E2E-tests/src/sidechain_main_cli.py b/E2E-tests/src/pc_contracts_cli.py similarity index 93% rename from E2E-tests/src/sidechain_main_cli.py rename to E2E-tests/src/pc_contracts_cli.py index 2335be26b..a8ee9c9a4 100644 --- a/E2E-tests/src/sidechain_main_cli.py +++ b/E2E-tests/src/pc_contracts_cli.py @@ -5,8 +5,8 @@ import logging as logger -class SidechainMainCliException(Exception): - def __init__(self, message="Sidechain Main CLI error occurred", status_code=None): +class PCContractsCliException(Exception): + def __init__(self, message="PC Contracts CLI error occurred", status_code=None): self.message = message self.status_code = status_code super().__init__(self.message) @@ -31,18 +31,17 @@ def __init__( self.sidechain_signature = sidechain_signature -class SidechainMainCli: +class PCContractsCli: def __init__(self, config: ApiConfig, cardano_cli: CardanoCli): - sidechain_main_cli_config = config.stack_config.tools["sidechain_main_cli"] - self.cli = sidechain_main_cli_config.cli - self.generate_signatures_cli = config.stack_config.tools["generate_signatures_cli"].cli + pc_contracts_cli_config = config.stack_config.tools["pc_contracts_cli"] + self.cli = pc_contracts_cli_config.cli self.cardano_cli = cardano_cli self.config = config - self.run_command = RunnerFactory.get_runner(sidechain_main_cli_config.ssh, sidechain_main_cli_config.shell) + self.run_command = RunnerFactory.get_runner(pc_contracts_cli_config.ssh, pc_contracts_cli_config.shell) def get_signatures( self, - sidechain_registration_utxo, + partner_chain_registration_utxo, spo_signing_key, sidechain_signing_key, aura_verification_key, @@ -53,7 +52,7 @@ def get_signatures( f"--genesis-utxo {self.config.genesis_utxo} " f"--mainchain-signing-key {spo_signing_key} " f"--sidechain-signing-key {sidechain_signing_key} " - f"--registration-utxo {sidechain_registration_utxo}" + f"--registration-utxo {partner_chain_registration_utxo}" ) result = self.run_command.run(get_signatures_cmd) @@ -250,7 +249,7 @@ def update_permissioned_candidates(self, governance_key, add_candidates_list, re def handle_response(self, result): if result.stderr and not result.stdout: logger.error(f"Error during command: {result.stderr}") - raise SidechainMainCliException(result.stderr) + raise PCContractsCliException(result.stderr) try: json_part = self._get_json_string(result.stdout) @@ -258,7 +257,7 @@ def handle_response(self, result): return response except json.JSONDecodeError: logger.error(f"Could not parse response of command: {result}") - raise SidechainMainCliException(result.stdout) + raise PCContractsCliException(result.stdout) def _get_json_string(self, s): start = s.find('{') diff --git a/E2E-tests/src/substrate_api.py b/E2E-tests/src/substrate_api.py index 2d98c3964..9bce5ac0f 100644 --- a/E2E-tests/src/substrate_api.py +++ b/E2E-tests/src/substrate_api.py @@ -13,7 +13,7 @@ import logging as logger from .run_command import RunnerFactory from .cardano_cli import CardanoCli -from .sidechain_main_cli import SidechainMainCli +from .pc_contracts_cli import PCContractsCli from .partner_chain_rpc import PartnerChainRpc, PartnerChainRpcResponse, PartnerChainRpcException, DParam import string import time @@ -65,7 +65,7 @@ def __init__(self, config: ApiConfig, secrets, db_sync: Session): self._substrate = None self.run_command = RunnerFactory.get_runner(config.stack_config.ssh, config.stack_config.tools_shell) self.cardano_cli = CardanoCli(config.main_chain, config.stack_config.tools["cardano_cli"]) - self.sidechain_main_cli = SidechainMainCli(config, self.cardano_cli) + self.pc_contracts_cli = PCContractsCli(config, self.cardano_cli) self.partner_chain_rpc = PartnerChainRpc(config.nodes_config.node.rpc_url) self.partner_chain_epoch_calculator = PartnerChainEpochCalculator(config) self.compact_encoder = RuntimeConfiguration().create_scale_object('Compact') @@ -309,7 +309,7 @@ def register_candidate(self, candidate_name): registration_utxo = next(filter(lambda utxo: utxos_json[utxo]["value"]["lovelace"] > 2500000, utxos_json), None) assert registration_utxo is not None, "ERROR: Could not find a well funded utxo for registration" - signatures = self.sidechain_main_cli.get_signatures( + signatures = self.pc_contracts_cli.get_signatures( registration_utxo, self._read_cardano_key_file(keys_files.spo_signing_key), self._read_json_file(keys_files.partner_chain_signing_key)['skey'], @@ -317,7 +317,7 @@ def register_candidate(self, candidate_name): self.config.nodes_config.nodes[candidate_name].grandpa_public_key, ) - txId, next_status_epoch = self.sidechain_main_cli.register_candidate( + txId, next_status_epoch = self.pc_contracts_cli.register_candidate( signatures, keys_files.cardano_payment_key, self._read_cardano_key_file(keys_files.spo_public_key), @@ -335,7 +335,7 @@ def register_candidate(self, candidate_name): def deregister_candidate(self, candidate_name): keys_files = self.config.nodes_config.nodes[candidate_name].keys_files - txId, next_status_epoch = self.sidechain_main_cli.deregister_candidate( + txId, next_status_epoch = self.pc_contracts_cli.deregister_candidate( keys_files.cardano_payment_key, self._read_cardano_key_file(keys_files.spo_public_key), ) @@ -376,7 +376,7 @@ def burn_tokens(self, recipient, amount, payment_key): return self.burn_tokens_for_hex_address(recipient_hex, amount, payment_key) def burn_tokens_for_hex_address(self, recipient_hex, amount, payment_key): - txHash = self.sidechain_main_cli.burn_tokens(recipient_hex, amount, payment_key) + txHash = self.pc_contracts_cli.burn_tokens(recipient_hex, amount, payment_key) if txHash: tx_block_no = self.get_mc_block_no_by_tx_hash(txHash) mc_stable_block = tx_block_no + self.config.main_chain.security_param @@ -451,7 +451,7 @@ def get_epoch_signatures(self, epoch) -> PartnerChainRpcResponse: return response def claim_tokens(self, mc_private_key_file, combined_proof, distributed_set_utxo=None) -> bool: - return self.sidechain_main_cli.claim_tokens( + return self.pc_contracts_cli.claim_tokens( mc_private_key_file, combined_proof, distributed_set_utxo=distributed_set_utxo ) @@ -603,7 +603,7 @@ def check_epoch_signatures_uploaded(self, pc_epoch=None): def add_permissioned_candidate(self, candidate_name: str): candidate = PermissionedCandidate(self.config.nodes_config.nodes[candidate_name]) - txId, next_status_epoch = self.sidechain_main_cli.update_permissioned_candidates( + txId, next_status_epoch = self.pc_contracts_cli.update_permissioned_candidates( self.config.nodes_config.governance_authority.mainchain_key, [candidate], [] ) @@ -618,7 +618,7 @@ def add_permissioned_candidate(self, candidate_name: str): def remove_permissioned_candidate(self, candidate_name: str): candidate = PermissionedCandidate(self.config.nodes_config.nodes[candidate_name]) - txId, next_status_epoch = self.sidechain_main_cli.update_permissioned_candidates( + txId, next_status_epoch = self.pc_contracts_cli.update_permissioned_candidates( self.config.nodes_config.governance_authority.mainchain_key, [], [candidate] ) diff --git a/E2E-tests/tests/active_flow/test_active_flow.py b/E2E-tests/tests/active_flow/test_active_flow.py index 585020b10..18c96098e 100644 --- a/E2E-tests/tests/active_flow/test_active_flow.py +++ b/E2E-tests/tests/active_flow/test_active_flow.py @@ -4,7 +4,7 @@ from src.db.models import OutgoingTx from sqlalchemy.orm import Session from pytest import mark, raises -from src.sidechain_main_cli import SidechainMainCliException +from src.pc_contracts_cli import PCContractsCliException @mark.skip_blockchain("pc_evm", reason="not implemented yet") @@ -127,7 +127,7 @@ def test_claim_transactions( """Test that the user can claim tokens after committee handover * wait until the next committee handover for a partner chain epoch - * claim tokens by executing claimTokens() from sidechain-main-cli + * claim tokens by executing claimTokens() from pc-contracts-cli """ for db_tx in unclaimed_outgoing_txs: logging.info(f"Checking if committee handover happened for epoch {db_tx.available_on_pc_epoch}") @@ -342,7 +342,7 @@ def test_claim_transaction_signed_by_another_recipient_should_fail( logging.info(f"Checking if committee handover happened for epoch {db_tx.available_on_pc_epoch}") wait_until(api.check_epoch_signatures_uploaded, db_tx.available_on_pc_epoch, timeout=config.timeouts.claim_cmd) logging.info(f"Handover for pc epoch {db_tx.available_on_pc_epoch} has happened") - with raises(SidechainMainCliException) as excinfo: + with raises(PCContractsCliException) as excinfo: api.claim_tokens(config.nodes_config.random_mc_account.mainchain_key, db_tx.combined_proof) assert "ERROR-FUEL-MINTING-POLICY-04" in excinfo.value.message @@ -368,7 +368,7 @@ def test_claim_transaction_with_invalid_key_should_fail( logging.info(f"Checking if committee handover happened for epoch {db_tx.available_on_pc_epoch}") wait_until(api.check_epoch_signatures_uploaded, db_tx.available_on_pc_epoch, timeout=config.timeouts.claim_cmd) logging.info(f"Handover for pc epoch {db_tx.available_on_pc_epoch} has happened") - with raises(SidechainMainCliException) as excinfo: + with raises(PCContractsCliException) as excinfo: api.claim_tokens(config.nodes_config.invalid_mc_skey.mainchain_key, db_tx.combined_proof) assert "Error while decoding key" in excinfo.value.message @@ -384,7 +384,7 @@ def test_claim_on_already_claimed_transaction_should_fail( * claiming tokens for that transaction again should fail """ logging.info(f"Claiming tx that should fail: {latest_claimed_outgoing_tx}") - with raises(SidechainMainCliException) as excinfo: + with raises(PCContractsCliException) as excinfo: api.claim_tokens( config.nodes_config.active_transfer_account.mainchain_key, latest_claimed_outgoing_tx.combined_proof, diff --git a/E2E-tests/tests/committee/test_permissioned_registrations.py b/E2E-tests/tests/committee/test_permissioned_registrations.py index 8f8be6a9b..c022b6de7 100644 --- a/E2E-tests/tests/committee/test_permissioned_registrations.py +++ b/E2E-tests/tests/committee/test_permissioned_registrations.py @@ -3,7 +3,7 @@ from src.blockchain_api import BlockchainApi from src.db.models import PermissionedCandidates from sqlalchemy.orm import Session -from src.sidechain_main_cli import SidechainMainCliException +from src.pc_contracts_cli import PCContractsCliException from pytest import mark @@ -24,7 +24,7 @@ def test_add_permissioned_candidate(permissioned_candidate: PermissionedCandidat logging.info(f"Adding permissioned candidate {permissioned_candidate.name}") try: result, next_status_epoch = api.add_permissioned_candidate(permissioned_candidate.name) - except SidechainMainCliException as e: + except PCContractsCliException as e: if 'InvalidCLIParams "New candidates list is the same as the currently stored list."' in str(e): pytest.skip("Skipping test because the candidate is already in the list") else: diff --git a/E2E-tests/tests/passive_flow/test_passive_flow.py b/E2E-tests/tests/passive_flow/test_passive_flow.py index b40c1b022..2f221c8b3 100644 --- a/E2E-tests/tests/passive_flow/test_passive_flow.py +++ b/E2E-tests/tests/passive_flow/test_passive_flow.py @@ -6,7 +6,7 @@ from sqlalchemy import Sequence from pytest import mark import pytest -from src.sidechain_main_cli import SidechainMainCliException +from src.pc_contracts_cli import PCContractsCliException def get_burn_tx_from_rpc(api: BlockchainApi, tx_hash): @@ -115,7 +115,7 @@ def test_burn_more_than_balance_should_fail(api: BlockchainApi, config: ApiConfi burning_key = config.nodes_config.passive_transfer_account.mainchain_key pc_addr = config.nodes_config.negative_test_transfer_account.partner_chain_address - with pytest.raises(SidechainMainCliException) as excinfo: + with pytest.raises(PCContractsCliException) as excinfo: api.burn_tokens(pc_addr, amount, burning_key) assert "BalanceInsufficientError" in excinfo.value.message @@ -133,7 +133,7 @@ def test_burn_negative_balance_should_fail(api: BlockchainApi, config: ApiConfig burning_key = config.nodes_config.passive_transfer_account.mainchain_key pc_addr = config.nodes_config.negative_test_transfer_account.partner_chain_address - with pytest.raises(SidechainMainCliException) as excinfo: + with pytest.raises(PCContractsCliException) as excinfo: api.burn_tokens(pc_addr, amount, burning_key) assert "ExUnitsEvaluationFailed" in excinfo.value.message @@ -150,7 +150,7 @@ def test_burn_with_invalid_key_should_fail(api: BlockchainApi, config: ApiConfig burning_key = config.nodes_config.invalid_mc_skey.mainchain_key pc_addr = config.nodes_config.negative_test_transfer_account.partner_chain_address - with pytest.raises(SidechainMainCliException) as excinfo: + with pytest.raises(PCContractsCliException) as excinfo: api.burn_tokens(pc_addr, amount, burning_key) assert "Error while decoding key" in excinfo.value.message diff --git a/dev/local-environment/.env.bak b/dev/local-environment/.env.bak new file mode 100644 index 000000000..6ab6448db --- /dev/null +++ b/dev/local-environment/.env.bak @@ -0,0 +1,28 @@ +POSTGRES_PORT=5432 +POSTGRES_PASSWORD=azMpOp4mTqhlKDmgCVQr +OGMIOS_PORT=1337 +KUPO_PORT=1442 +CPU_PARTNER_CHAINS_NODE=0.000 +MEM_PARTNER_CHAINS_NODE=1000G +CPU_CARDANO=0.000 +MEM_CARDANO=1000G +CPU_POSTGRES=0.000 +MEM_POSTGRES=1000G +CPU_DBSYNC=0.000 +MEM_DBSYNC=1000G +CPU_OGMIOS=0.000 +MEM_OGMIOS=1000G +CPU_KUPO=0.000 +MEM_KUPO=1000G +ARTIFACT_OVERRIDE=no +CARDANO_IMAGE=ghcr.io/intersectmbo/cardano-node:10.1.2 +DBSYNC_IMAGE=ghcr.io/intersectmbo/cardano-db-sync:13.5.0.2 +KUPO_IMAGE=cardanosolutions/kupo:v2.9.0 +OGMIOS_IMAGE=cardanosolutions/ogmios:v6.9.0 +POSTGRES_IMAGE=postgres:15.3 +SIDECHAIN_MAIN_CLI_IMAGE=node:22-bookworm +TESTS_IMAGE=python:3.10-slim +PARTNER_CHAINS_NODE_IMAGE=ghcr.io/input-output-hk/partner-chains/partner-chains-node:v1.3.0 +PC_CONTRACTS_CLI_ZIP_URL=https://github.com/input-output-hk/partner-chains-smart-contracts/releases/download/v7.0.1/pc-contracts-cli-v7.0.1.zip +PARTNER_CHAINS_NODE_URL=https://github.com/input-output-hk/partner-chains/releases/download/v1.3.0/partner-chains-node-v1.3.0-x86_64-linux +PARTNER_CHAINS_CLI_URL=https://github.com/input-output-hk/partner-chains/releases/download/v1.3.0/partner-chains-cli-v1.3.0-x86_64-linux diff --git a/dev/local-environment/docker-compose.yml.bak b/dev/local-environment/docker-compose.yml.bak new file mode 100644 index 000000000..52e59e937 --- /dev/null +++ b/dev/local-environment/docker-compose.yml.bak @@ -0,0 +1,369 @@ +services: + + cardano-node-1: + container_name: cardano-node-1 + image: ${CARDANO_IMAGE} + platform: linux/amd64 + volumes: + - cardano-node-1-data:/data + - shared-volume:/shared + - ./configurations/busybox:/busybox + - ./configurations/pc-contracts-cli:/pc-contracts-cli + - ./configurations/cardano/cardano-node-1/entrypoint.sh:/entrypoint.sh + - ./configurations/cardano/cardano-node-1/topology-pool1.json:/shared/node-1-topology.json + - ./configurations/cardano/cardano-node-1/keys/cold.vkey:/keys/cold.vkey + - ./configurations/cardano/cardano-node-1/keys/kes.skey:/keys/kes.skey + - ./configurations/cardano/cardano-node-1/keys/vrf.skey:/keys/vrf.skey + - ./configurations/cardano/cardano-node-1/keys/funded_address.skey:/keys/funded_address.skey + - ./configurations/cardano/cardano-node-1/keys/funded_address.vkey:/keys/funded_address.vkey + - ./configurations/cardano/cardano-node-1/keys/op.cert:/keys/node.cert + - ./configurations/cardano/cardano-node-1/config-pool1.json:/shared/node-1-config.json.base + - ./configurations/cardano/cardano-node-2/config-pool2.json:/shared/node-2-config.json.base + - ./configurations/cardano/cardano-node-3/config-pool3.json:/shared/node-3-config.json.base + - ./configurations/db-sync/config.json:/shared/db-sync-config.json.base + - ./configurations/genesis/byron/genesis.json:/shared/byron/genesis.json.base + - ./configurations/genesis/shelley/genesis.json:/shared/shelley/genesis.json.base + - ./configurations/genesis/shelley/genesis.alonzo.json:/shared/shelley/genesis.alonzo.json.base + - ./configurations/genesis/shelley/genesis-utxo.addr:/shared/shelley/genesis-utxo.addr + - ./configurations/genesis/shelley/genesis-utxo.skey:/shared/shelley/genesis-utxo.skey + - ./configurations/genesis/shelley/genesis-utxo.vkey:/shared/shelley/genesis-utxo.vkey + - ./configurations/genesis/conway/genesis.conway.json:/shared/conway/genesis.conway.json.base + environment: + - CARDANO_NODE_SOCKET_PATH=/data/node.socket + entrypoint: ["/bin/bash", "/entrypoint.sh"] + ports: + - "32000:32000" + + cardano-node-2: + container_name: cardano-node-2 + image: ${CARDANO_IMAGE} + platform: linux/amd64 + volumes: + - cardano-node-2-data:/data + - shared-volume:/shared + - ./configurations/busybox:/busybox + - ./configurations/cardano/cardano-node-2/entrypoint.sh:/entrypoint.sh + - ./configurations/cardano/cardano-node-2/topology-pool2.json:/shared/node-2-topology.json + - ./configurations/cardano/cardano-node-2/keys/cold.vkey:/keys/cold.vkey + - ./configurations/cardano/cardano-node-2/keys/kes.skey:/keys/kes.skey + - ./configurations/cardano/cardano-node-2/keys/vrf.skey:/keys/vrf.skey + - ./configurations/cardano/cardano-node-2/keys/op.cert:/keys/node.cert + environment: + - CARDANO_NODE_SOCKET_PATH=/data/node.socket + entrypoint: ["/bin/bash", "/entrypoint.sh"] + ports: + - "32005:32005" + + cardano-node-3: + container_name: cardano-node-3 + image: ${CARDANO_IMAGE} + platform: linux/amd64 + volumes: + - cardano-node-3-data:/data + - shared-volume:/shared + - ./configurations/busybox:/busybox + - ./configurations/cardano/cardano-node-3/entrypoint.sh:/entrypoint.sh + - ./configurations/cardano/cardano-node-3/topology-pool3.json:/shared/node-3-topology.json + - ./configurations/cardano/cardano-node-3/keys/cold.vkey:/keys/cold.vkey + - ./configurations/cardano/cardano-node-3/keys/kes.skey:/keys/kes.skey + - ./configurations/cardano/cardano-node-3/keys/vrf.skey:/keys/vrf.skey + - ./configurations/cardano/cardano-node-3/keys/op.cert:/keys/node.cert + environment: + - CARDANO_NODE_SOCKET_PATH=/data/node.socket + entrypoint: ["/bin/bash", "/entrypoint.sh"] + ports: + - "32010:32010" + + ogmios: + container_name: ogmios + image: ${OGMIOS_IMAGE} + platform: linux/amd64 + entrypoint: ["/bin/sh", "/entrypoint.sh"] + environment: + - DATA_DIR=/data + - OGMIOS_PORT=${OGMIOS_PORT} + volumes: + - shared-volume:/shared + - ogmios-data:/data + - cardano-node-1-data:/node-ipc + - ./configurations/ogmios/entrypoint.sh:/entrypoint.sh + - ./configurations/busybox:/busybox + ports: + - "${OGMIOS_PORT}:${OGMIOS_PORT}" + healthcheck: + disable: true + deploy: + resources: + limits: + cpus: ${CPU_OGMIOS:-} + memory: ${MEM_OGMIOS:-} + + kupo: + container_name: kupo + image: ${KUPO_IMAGE} + platform: linux/amd64 + entrypoint: ["/bin/sh", "/entrypoint.sh"] + volumes: + - shared-volume:/shared + - cardano-node-1-data:/node-ipc + - kupo-workdir:/kupo-workdir + - ./configurations/kupo/entrypoint.sh:/entrypoint.sh + - ./configurations/busybox:/busybox + ports: + - "${KUPO_PORT}:1442" + healthcheck: + disable: true + deploy: + resources: + limits: + cpus: ${CPU_KUPO:-} + memory: ${MEM_KUPO:-} + + db-sync: + container_name: db-sync + image: ${DBSYNC_IMAGE} + platform: linux/amd64 + volumes: + - shared-volume:/shared + - db-sync-state-dir:/var/lib + - cardano-node-1-data:/node-ipc + - ./configurations/busybox:/busybox + - ./configurations/db-sync/entrypoint.sh:/entrypoint.sh + entrypoint: ["/bin/bash", "/entrypoint.sh"] + command: > + --config /shared/db-sync-config.json + --socket-path /node-ipc/node.socket + environment: + - POSTGRES_HOST=postgres + - POSTGRES_USER=postgres + - POSTGRES_DB=cexplorer + - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} + - POSTGRES_PORT=${POSTGRES_PORT} + restart: always + deploy: + resources: + limits: + cpus: ${CPU_DBSYNC:-} + memory: ${MEM_DBSYNC:-} + + postgres: + container_name: postgres + image: ${POSTGRES_IMAGE} + platform: linux/amd64 + command: postgres -c maintenance_work_mem=256MB -p ${POSTGRES_PORT} + environment: + - POSTGRES_USER=postgres + - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} + - PGDATA=/pgdata + - POSTGRES_MULTIPLE_DATABASES=cexplorer,qa_demo + ports: + - "${POSTGRES_PORT}:${POSTGRES_PORT}" + volumes: + - ./configurations/postgres/entrypoint.sh:/usr/local/bin/custom-entrypoint.sh + - ./configurations/postgres/init.sh:/docker-entrypoint-initdb.d/init.sh + deploy: + resources: + limits: + cpus: ${CPU_POSTGRES:-} + memory: ${MEM_POSTGRES:-} + + partner-chains-node-1: + container_name: partner-chains-node-1 + image: ${PARTNER_CHAINS_NODE_IMAGE} + platform: linux/amd64 + volumes: + - shared-volume:/shared + - partner-chains-node-1-data:/data + - ./configurations/partner-chains-nodes/partner-chains-node-1/entrypoint.sh:/entrypoint.sh + environment: + DB_SYNC_POSTGRES_CONNECTION_STRING: "postgres://postgres:${POSTGRES_PASSWORD}@postgres:${POSTGRES_PORT}/cexplorer" + SIDECHAIN_BLOCK_BENEFICIARY: "0000000000000000000000000000000000000000000000000000000000000001" + GENESIS_UTXO: "781cb948a37c7c38b43872af9b1e22135a94826eafd3740260a6db0a303885d8#0" + CARDANO_SECURITY_PARAMETER: "5" + CARDANO_ACTIVE_SLOTS_COEFF: "0.4" + MC__FIRST_EPOCH_NUMBER: "0" + MC__FIRST_SLOT_NUMBER: "0" + MC__EPOCH_DURATION_MILLIS: "120000" + BLOCK_STABILITY_MARGIN: "0" + MINIMUM_MC_EPOCH: "0" + entrypoint: ["/bin/bash", "/entrypoint.sh"] + ports: + - "30333:30333" + - "9933:9933" + - "9615:9615" + restart: always + deploy: + resources: + limits: + cpus: ${CPU_PARTNER_CHAINS_NODE:-} + memory: ${MEM_PARTNER_CHAINS_NODE:-} + + partner-chains-node-2: + container_name: partner-chains-node-2 + image: ${PARTNER_CHAINS_NODE_IMAGE} + platform: linux/amd64 + volumes: + - partner-chains-node-2-data:/data + - shared-volume:/shared + - ./configurations/partner-chains-nodes/partner-chains-node-2/entrypoint.sh:/entrypoint.sh + environment: + DB_SYNC_POSTGRES_CONNECTION_STRING: "postgres://postgres:${POSTGRES_PASSWORD}@postgres:${POSTGRES_PORT}/cexplorer" + SIDECHAIN_BLOCK_BENEFICIARY: "0000000000000000000000000000000000000000000000000000000000000002" + GENESIS_UTXO: "781cb948a37c7c38b43872af9b1e22135a94826eafd3740260a6db0a303885d8#0" + CARDANO_SECURITY_PARAMETER: "5" + CARDANO_ACTIVE_SLOTS_COEFF: "0.4" + MC__FIRST_EPOCH_NUMBER: "0" + MC__FIRST_SLOT_NUMBER: "0" + MC__EPOCH_DURATION_MILLIS: "120000" + BLOCK_STABILITY_MARGIN: "0" + MINIMUM_MC_EPOCH: "0" + entrypoint: ["/bin/bash", "/entrypoint.sh"] + ports: + - "30334:30334" + - "9934:9934" + - "9616:9616" + restart: always + deploy: + resources: + limits: + cpus: ${CPU_PARTNER_CHAINS_NODE:-} + memory: ${MEM_PARTNER_CHAINS_NODE:-} + + partner-chains-node-3: + container_name: partner-chains-node-3 + image: ${PARTNER_CHAINS_NODE_IMAGE} + platform: linux/amd64 + volumes: + - partner-chains-node-3-data:/data + - shared-volume:/shared + - ./configurations/partner-chains-nodes/partner-chains-node-3/entrypoint.sh:/entrypoint.sh + environment: + DB_SYNC_POSTGRES_CONNECTION_STRING: "postgres://postgres:${POSTGRES_PASSWORD}@postgres:${POSTGRES_PORT}/cexplorer" + SIDECHAIN_BLOCK_BENEFICIARY: "0000000000000000000000000000000000000000000000000000000000000003" + GENESIS_UTXO: "781cb948a37c7c38b43872af9b1e22135a94826eafd3740260a6db0a303885d8#0" + CARDANO_SECURITY_PARAMETER: "5" + CARDANO_ACTIVE_SLOTS_COEFF: "0.4" + MC__FIRST_EPOCH_NUMBER: "0" + MC__FIRST_SLOT_NUMBER: "0" + MC__EPOCH_DURATION_MILLIS: "120000" + BLOCK_STABILITY_MARGIN: "0" + MINIMUM_MC_EPOCH: "0" + entrypoint: ["/bin/bash", "/entrypoint.sh"] + ports: + - "30335:30335" + - "9935:9935" + - "9617:9617" + restart: always + deploy: + resources: + limits: + cpus: ${CPU_PARTNER_CHAINS_NODE:-} + memory: ${MEM_PARTNER_CHAINS_NODE:-} + + partner-chains-node-4: + container_name: partner-chains-node-4 + image: ${PARTNER_CHAINS_NODE_IMAGE} + platform: linux/amd64 + volumes: + - partner-chains-node-4-data:/data + - shared-volume:/shared + - ./configurations/partner-chains-nodes/partner-chains-node-4/entrypoint.sh:/entrypoint.sh + - ./configurations/partner-chains-nodes/partner-chains-node-4/keystore:/keystore + - ./configurations/partner-chains-nodes/partner-chains-node-4/network:/network + environment: + DB_SYNC_POSTGRES_CONNECTION_STRING: "postgres://postgres:${POSTGRES_PASSWORD}@postgres:${POSTGRES_PORT}/cexplorer" + SIDECHAIN_BLOCK_BENEFICIARY: "0000000000000000000000000000000000000000000000000000000000000004" + GENESIS_UTXO: "781cb948a37c7c38b43872af9b1e22135a94826eafd3740260a6db0a303885d8#0" + CARDANO_SECURITY_PARAMETER: "5" + CARDANO_ACTIVE_SLOTS_COEFF: "0.4" + MC__FIRST_EPOCH_NUMBER: "0" + MC__FIRST_SLOT_NUMBER: "0" + MC__EPOCH_DURATION_MILLIS: "120000" + BLOCK_STABILITY_MARGIN: "0" + MINIMUM_MC_EPOCH: "0" + entrypoint: ["/bin/bash", "/entrypoint.sh"] + ports: + - "30336:30336" + - "9936:9936" + - "9618:9618" + restart: always + deploy: + resources: + limits: + cpus: ${CPU_PARTNER_CHAINS_NODE:-} + memory: ${MEM_PARTNER_CHAINS_NODE:-} + + partner-chains-node-5: + container_name: partner-chains-node-5 + image: ${PARTNER_CHAINS_NODE_IMAGE} + platform: linux/amd64 + volumes: + - partner-chains-node-5-data:/data + - shared-volume:/shared + - ./configurations/partner-chains-nodes/partner-chains-node-5/entrypoint.sh:/entrypoint.sh + - ./configurations/partner-chains-nodes/partner-chains-node-5/keystore:/keystore + - ./configurations/partner-chains-nodes/partner-chains-node-5/network:/network + environment: + DB_SYNC_POSTGRES_CONNECTION_STRING: "postgres://postgres:${POSTGRES_PASSWORD}@postgres:${POSTGRES_PORT}/cexplorer" + SIDECHAIN_BLOCK_BENEFICIARY: "0000000000000000000000000000000000000000000000000000000000000005" + GENESIS_UTXO: "781cb948a37c7c38b43872af9b1e22135a94826eafd3740260a6db0a303885d8#0" + CARDANO_SECURITY_PARAMETER: "5" + CARDANO_ACTIVE_SLOTS_COEFF: "0.4" + MC__FIRST_EPOCH_NUMBER: "0" + MC__FIRST_SLOT_NUMBER: "0" + MC__EPOCH_DURATION_MILLIS: "120000" + BLOCK_STABILITY_MARGIN: "0" + MINIMUM_MC_EPOCH: "0" + entrypoint: ["/bin/bash", "/entrypoint.sh"] + ports: + - "30337:30337" + - "9937:9937" + - "9619:9619" + restart: always + deploy: + resources: + limits: + cpus: ${CPU_PARTNER_CHAINS_NODE:-} + memory: ${MEM_PARTNER_CHAINS_NODE:-} + + pc-contracts-cli: + container_name: pc-contracts-cli + image: ${SIDECHAIN_MAIN_CLI_IMAGE} + platform: linux/amd64 + volumes: + - shared-volume:/shared + - cardano-node-1-data:/data + - ./configurations/genesis/shelley/genesis-utxo.skey:/shared/shelley/genesis-utxo.skey + - ./configurations/cardano/cardano-node-1/keys/funded_address.skey:/keys/funded_address.skey + - ./configurations/cardano/cardano-node-1/keys/funded_address.vkey:/keys/funded_address.vkey + - ./configurations/cardano/cardano-node-1/keys/owner-stake.skey:/keys/owner-stake.skey + - ./configurations/pc-contracts-cli/entrypoint.sh:/entrypoint.sh + - ./configurations/pc-contracts-cli/overrides:/overrides/ + - ./configurations/partner-chains-nodes/:/partner-chains-nodes/ + environment: + - CARDANO_NODE_SOCKET_PATH=/data/node.socket + - GENESIS_UTXO=781cb948a37c7c38b43872af9b1e22135a94826eafd3740260a6db0a303885d8#0 + - GOVERNANCE_AUTHORITY=e8c300330fe315531ca89d4a2e7d0c80211bc70b473b1ed4979dff2b + - COMMITTEE_CANDIDATE_ADDRESS=addr_test1wprv57gwyty4v6xa9dju0ezudwqxekwdjdkjg2ytpkye9xcf8lw2p + - KUPO_PORT=${KUPO_PORT} + - OGMIOS_PORT=${OGMIOS_PORT} + - ARTIFACT_OVERRIDE=${ARTIFACT_OVERRIDE} + - PC_CONTRACTS_CLI_ZIP_URL=${PC_CONTRACTS_CLI_ZIP_URL} + - PARTNER_CHAINS_NODE_URL=${PARTNER_CHAINS_NODE_URL} + - PARTNER_CHAINS_CLI_URL=${PARTNER_CHAINS_CLI_URL} + entrypoint: ["/bin/bash", "/entrypoint.sh"] + +volumes: + cardano-node-1-data: {} + cardano-node-2-data: {} + cardano-node-3-data: {} + shared-volume: {} + db-sync-state-dir: {} + partner-chains-node-1-data: {} + partner-chains-node-2-data: {} + partner-chains-node-3-data: {} + partner-chains-node-4-data: {} + partner-chains-node-5-data: {} + ogmios-data: {} + ipc: {} + kupo-workdir: {} diff --git a/dev/local-environment/modules/pc-contracts-cli.txt b/dev/local-environment/modules/pc-contracts-cli.txt index cd53c469e..088ba7d8f 100644 --- a/dev/local-environment/modules/pc-contracts-cli.txt +++ b/dev/local-environment/modules/pc-contracts-cli.txt @@ -1,7 +1,7 @@ pc-contracts-cli: container_name: pc-contracts-cli - image: ${SIDECHAIN_MAIN_CLI_IMAGE} + image: ${PC_CONTRACTS_CLI_IMAGE} platform: linux/amd64 volumes: - shared-volume:/shared diff --git a/dev/local-environment/setup.sh b/dev/local-environment/setup.sh index 5c652664d..69f5848ed 100755 --- a/dev/local-environment/setup.sh +++ b/dev/local-environment/setup.sh @@ -6,7 +6,7 @@ DBSYNC_IMAGE="ghcr.io/intersectmbo/cardano-db-sync:13.5.0.2" KUPO_IMAGE="cardanosolutions/kupo:v2.9.0" OGMIOS_IMAGE="cardanosolutions/ogmios:v6.9.0" POSTGRES_IMAGE="postgres:15.3" -SIDECHAIN_MAIN_CLI_IMAGE="node:22-bookworm" +PC_CONTRACTS_CLI_IMAGE="node:22-bookworm" TESTS_IMAGE="python:3.10-slim" PC_CONTRACTS_CLI_ZIP_URL="https://github.com/input-output-hk/partner-chains-smart-contracts/releases/download/v7.0.1/pc-contracts-cli-v7.0.1.zip" PARTNER_CHAINS_NODE_URL="https://github.com/input-output-hk/partner-chains/releases/download/v1.3.0/partner-chains-node-v1.3.0-x86_64-linux" @@ -367,7 +367,7 @@ DBSYNC_IMAGE=$DBSYNC_IMAGE KUPO_IMAGE=$KUPO_IMAGE OGMIOS_IMAGE=$OGMIOS_IMAGE POSTGRES_IMAGE=$POSTGRES_IMAGE -SIDECHAIN_MAIN_CLI_IMAGE=$SIDECHAIN_MAIN_CLI_IMAGE +PC_CONTRACTS_CLI_IMAGE=$PC_CONTRACTS_CLI_IMAGE TESTS_IMAGE=$TESTS_IMAGE PARTNER_CHAINS_NODE_IMAGE=${node_image:-$PARTNER_CHAINS_NODE_IMAGE} PC_CONTRACTS_CLI_ZIP_URL=$PC_CONTRACTS_CLI_ZIP_URL