Skip to content

Commit

Permalink
Revert "Revert "Update partner-chain-smart-contracts to v7.0.1""
Browse files Browse the repository at this point in the history
This reverts commit c361481.
  • Loading branch information
ladamesny committed Dec 12, 2024
1 parent 71c0c0c commit fb252f8
Show file tree
Hide file tree
Showing 9 changed files with 435 additions and 45 deletions.
6 changes: 1 addition & 5 deletions E2E-tests/config/api_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,8 @@ class StackApiConfig:

@dataclass
class ApiConfig:
chain_id: int = MISSING
genesis_committee_hash_utxo: str = MISSING
governance_authority: str = MISSING
genesis_utxo: str = MISSING
atms_kind: str = MISSING
threshold_numerator: int = MISSING
threshold_denominator: int = MISSING
committee_epoch_slippage: int = MISSING
committee_participation_tolerance: float = MISSING
max_validators: int = MISSING
Expand Down
5 changes: 1 addition & 4 deletions E2E-tests/config/config.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{
"chain_id": 0,
"atms_kind": "plain-ecdsa-secp256k1",
"threshold_numerator": 2,
"threshold_denominator": 3,
"committee_epoch_slippage": 0,
"committee_participation_tolerance": 0.18,
"max_validators": 32,
Expand Down Expand Up @@ -33,4 +30,4 @@
},
"block_encoding_suffix_grandpa": "5906",
"block_encoding_suffix_aura": "0905"
}
}
6 changes: 2 additions & 4 deletions E2E-tests/config/substrate/staging_nodes.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{
"chain_id": 1,
"deployment_mc_epoch": 777,
"genesis_committee_hash_utxo": "4e65eddc6132c1b9891d43f9d67a4a0a7b6e614b648f59dc97538f3f23eb96bf#1",
"governance_authority": "0x1f0977bc0f57c67ca6d77296c1b575fe05a6dc2c5fa38056ba63c50c",
"genesis_utxo": "de7b8efb08243b770be30cfa22a9ed64317c50052bb4394392960ddcc9810048#1",
"deployment_version": "v1.4.0",
"test_environment": "staging",
"nodes_config": {
Expand Down Expand Up @@ -153,4 +151,4 @@
"trustless_candidates_number": 4
}
}
}
}
4 changes: 2 additions & 2 deletions E2E-tests/config/substrate/staging_stack.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
"ssh": "${stack_config[ssh]}"
},
"sidechain_main_cli": {
"cli": "/tools/partner-chains-smart-contracts-6.2.2/pc-contracts-cli",
"cli": "/tools/partner-chains-smart-contracts-7.0.1/pc-contracts-cli",
"ssh": "${stack_config[ssh]}"
},
"generate_signatures_cli": {
"cli": "/tools/v1.3.0-rc1/partner-chains-node",
"cli": "/tools/partner-chains-node",
"ssh": "${stack_config[ssh]}"
},
"bech32": {
Expand Down
11 changes: 4 additions & 7 deletions E2E-tests/docs/run-tests-on-new-env.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* [partner-chains-node](https://github.com/input-output-hk/partner-chains) and [pc-contracts-cli](https://github.com/input-output-hk/partner-chains-smart-contracts) (running locally OR on the remote tools host)
* cardano-cli (from a local cardano-node OR on the remote tools host)

**NOTE:**
**NOTE:**

- `<env>` is a placeholder for a your environment name
- `<node>` is a placeholder for partner chain node name
Expand Down Expand Up @@ -38,11 +38,9 @@ Add payment signing key of the governance authority as `init.skey` to `secrets/<

#### `<env>_nodes.json` structure:

- `chain_id` - partner chain id from `sidechain_getParams()`
- `deployment_mc_epoch` - mainchain epoch when partner chain was deployed
- `initial_pc_epoch` - first partner chain epoch number
- `governance_authority` - governance authority key from `sidechain_getParams()`
- `genesis_committee_hash_utxo` - genesis committee utxo from `sidechain_getParams()`
- `genesis_utxo` - genesis utxo from `sidechain_getParams()`
- `deployment_version` - release version of partner chains
- `test_environment` - name of your environment
- `nodes_config` - list of node configurations for partner chain
Expand Down Expand Up @@ -89,8 +87,7 @@ E.g. for Cardano Preview it will be:
```
{
"deployment_mc_epoch": <INT>,
"genesis_committee_hash_utxo": <STRING>,
"governance_authority": <STRING>,
"genesis_utxo": <STRING>,
"committee_participation_tolerance": <INT>,
"main_chain": {
"network": <STRING>,
Expand Down Expand Up @@ -243,4 +240,4 @@ where:
* `-m` - pytest markers to filter tests for execution
* `-vv` - pytest parameter to show duration of tests
* `-s` - pytest parameter to show test output to console
* `-rP` - pytest parameter to show skipped tests
* `-rP` - pytest parameter to show skipped tests
24 changes: 4 additions & 20 deletions E2E-tests/src/sidechain_main_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,7 @@ def get_signatures(
):
get_signatures_cmd = (
f"{self.generate_signatures_cli} registration-signatures "
f"--chain-id {self.config.chain_id} "
f"--genesis-committee-utxo {self.config.genesis_committee_hash_utxo} "
f"--threshold-numerator {self.config.threshold_numerator} "
f"--threshold-denominator {self.config.threshold_denominator} "
f"--governance-authority {self.config.governance_authority} "
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}"
Expand Down Expand Up @@ -110,11 +106,7 @@ def register_candidate(self, signatures: RegistrationSignatures, payment_key, sp
register_cmd = (
f"{self.cli} register "
f"--payment-signing-key-file {payment_key} "
f"--sidechain-id {self.config.chain_id} "
f"--genesis-committee-hash-utxo {self.config.genesis_committee_hash_utxo} "
f"--governance-authority {self.config.governance_authority} "
f"--threshold-numerator {self.config.threshold_numerator} "
f"--threshold-denominator {self.config.threshold_denominator} "
f"--genesis-utxo {self.config.genesis_utxo} "
"--ada-based-staking "
f"--spo-public-key {spo_public_key} "
f"--sidechain-public-keys {signatures.sidechain_public_keys} "
Expand All @@ -141,11 +133,7 @@ def deregister_candidate(self, payment_key, spo_public_key):
deregister_cmd = (
f"{self.cli} deregister "
f"--payment-signing-key-file {payment_key} "
f"--sidechain-id {self.config.chain_id} "
f"--genesis-committee-hash-utxo {self.config.genesis_committee_hash_utxo} "
f"--governance-authority {self.config.governance_authority} "
f"--threshold-numerator {self.config.threshold_numerator} "
f"--threshold-denominator {self.config.threshold_denominator} "
f"--genesis-utxo {self.config.genesis_utxo} "
"--ada-based-staking "
f"--spo-public-key {spo_public_key} "
f"--ogmios-host {self.config.stack_config.ogmios_host} "
Expand All @@ -172,11 +160,7 @@ def update_permissioned_candidates(self, governance_key, add_candidates_list, re
update_candidates_cmd = (
f"{self.cli} update-permissioned-candidates "
f"--payment-signing-key-file {governance_key} "
f"--threshold-numerator {self.config.threshold_numerator} "
f"--threshold-denominator {self.config.threshold_denominator} "
f"--genesis-committee-hash-utxo {self.config.genesis_committee_hash_utxo} "
f"--sidechain-id {self.config.chain_id} "
f"--governance-authority {self.config.governance_authority} "
f"--genesis-utxo {self.config.genesis_utxo} "
f"--ogmios-host {self.config.stack_config.ogmios_host} "
f"--ogmios-port {self.config.stack_config.ogmios_port} "
f"--kupo-host {self.config.stack_config.kupo_host} "
Expand Down
4 changes: 1 addition & 3 deletions E2E-tests/tests/test_smoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,4 @@ def test_get_params(self, api: BlockchainApi, config: ApiConfig):
* check that the return data is equal to the config values
"""
params = api.get_params()
assert params["chainId"] == config.chain_id, "Chain ID mismatch"
assert params["genesisCommitteeUtxo"] == config.genesis_committee_hash_utxo, "Genesis committee hash mismatch"
assert params["governanceAuthority"] == config.governance_authority, "Governance authority mismatch"
assert params["genesis_utxo"] == config.genesis_utxo, "Genesis UTXO mismatch"
28 changes: 28 additions & 0 deletions dev/local-environment/.env.bak
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
POSTGRES_PORT=5432
POSTGRES_PASSWORD=postgres
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.8.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/v6.2.2/pc-contracts-cli-v6.2.2.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
Loading

0 comments on commit fb252f8

Please sign in to comment.