From 664c85965cee5fed14c5b42e81ff2ca343184e08 Mon Sep 17 00:00:00 2001 From: Kamil Koczurek Date: Wed, 30 Aug 2023 12:46:09 +0200 Subject: [PATCH] remove rinkeby & zksync --- README.md | 1 - goth/default-assets/docker/docker-compose.yml | 9 --------- goth/default-assets/goth-config-testing.yml | 1 - goth/default-assets/goth-config.yml | 1 - goth/payment_config.py | 20 +++++-------------- test/integration/test_payment_platform.py | 15 +++++--------- .../configuration/test-assets/goth-config.yml | 1 - test/unit/configuration/test_configuration.py | 2 +- .../unit/runner/cli/test_yagna_payment_cmd.py | 10 +++++----- test/unit/runner/container/test_payment.py | 10 +++++----- test/unit/runner/test_shutdown.py | 4 ++-- 11 files changed, 23 insertions(+), 51 deletions(-) diff --git a/README.md b/README.md index 02eb5a38..55be32f9 100644 --- a/README.md +++ b/README.md @@ -122,7 +122,6 @@ This path will depend either on the shell environment or the operating system on │   ├── requestor.log │   ├── router.log │   ├── test.log # debug console logs from this test case only, duplicated in `runner.log` - │   └── zksync.log └── test_e2e_wasi └── ... ``` diff --git a/goth/default-assets/docker/docker-compose.yml b/goth/default-assets/docker/docker-compose.yml index 9c54bcef..a2bff474 100644 --- a/goth/default-assets/docker/docker-compose.yml +++ b/goth/default-assets/docker/docker-compose.yml @@ -28,15 +28,6 @@ services: image: docker.pkg.github.com/golemfactory/gnt2/gnt2-docker-yagna:483c6f241edd ports: - "8545:8545" - - zksync: - image: docker.pkg.github.com/golemfactory/yagna-zksync/yagna-zksync-mock:fddc527d2bf1 - ports: - - "3030:3030" - environment: - - WEB3_PROVIDER_URI=http://ethereum:8545 - depends_on: - - ethereum outbound-test: # A service running a TCP sink, echo and iperf3 servers diff --git a/goth/default-assets/goth-config-testing.yml b/goth/default-assets/goth-config-testing.yml index d64ae1b2..6b49af13 100644 --- a/goth/default-assets/goth-config-testing.yml +++ b/goth/default-assets/goth-config-testing.yml @@ -23,7 +23,6 @@ docker-compose: compose-log-patterns: ethereum: ".*Wallets supplied." - zksync: ".*Running on http://.*:3030/.*" key-dir: "keys" diff --git a/goth/default-assets/goth-config.yml b/goth/default-assets/goth-config.yml index bc42fdd2..4b18f568 100644 --- a/goth/default-assets/goth-config.yml +++ b/goth/default-assets/goth-config.yml @@ -23,7 +23,6 @@ docker-compose: compose-log-patterns: ethereum: ".*Wallets supplied." - zksync: ".*Running on http://.*:3030/.*" key-dir: "keys" diff --git a/goth/payment_config.py b/goth/payment_config.py index e0777d70..36de3073 100644 --- a/goth/payment_config.py +++ b/goth/payment_config.py @@ -10,16 +10,6 @@ REQUIRED_CONFIRMATIONS_COUNT = 0 _payment_config = { - "zksync": { - "env": { - "YA_PAYMENT_NETWORK": "rinkeby", - "ZKSYNC_FAUCET_ADDR": "http://zksync:3030/zk/donatex", - "ZKSYNC_RINKEBY_RPC_ADDRESS": "http://zksync:3030", - }, - "driver": "zksync", - "network": "rinkeby", - "token": "tGLM", - }, "erc20_mainnet": { "env": { "ERC20_MAINNET_REQUIRED_CONFIRMATIONS": REQUIRED_CONFIRMATIONS_COUNT, @@ -33,13 +23,13 @@ }, "erc20": { "env": { - "ERC20_RINKEBY_REQUIRED_CONFIRMATIONS": REQUIRED_CONFIRMATIONS_COUNT, - "RINKEBY_GETH_ADDR": GETH_ADDR, - "RINKEBY_TGLM_CONTRACT_ADDRESS": GLM_CONTRACT_ADDRESS, - "YA_PAYMENT_NETWORK": "rinkeby", + "ERC20_GOERLI_REQUIRED_CONFIRMATIONS": REQUIRED_CONFIRMATIONS_COUNT, + "GOERLI_GETH_ADDR": GETH_ADDR, + "GOERLI_TGLM_CONTRACT_ADDRESS": GLM_CONTRACT_ADDRESS, + "YA_PAYMENT_NETWORK": "goerli", }, "driver": "erc20", - "network": "rinkeby", + "network": "goerli", "token": "tGLM", }, "polygon": { diff --git a/test/integration/test_payment_platform.py b/test/integration/test_payment_platform.py index edec508e..d321202b 100644 --- a/test/integration/test_payment_platform.py +++ b/test/integration/test_payment_platform.py @@ -10,11 +10,6 @@ "POLYGON_GETH_ADDR": "http://ethereum:8545", "POLYGON_GLM_CONTRACT_ADDRESS": "0xFDFEF9D10d929cB3905C71400ce6be1990EA0F34", }, - "zksync": { - "YA_PAYMENT_NETWORK": "rinkeby", - "ZKSYNC_RINKEBY_RPC_ADDRESS": "http://zksync:3030", - "ZKSYNC_FAUCET_ADDR": "http://zksync:3030/zk/donatex", - }, "erc20_mainnet": { "YA_PAYMENT_NETWORK": "mainnet", "MAINNET_GETH_ADDR": "http://ethereum:8545", @@ -22,10 +17,10 @@ "ERC20_MAINNET_REQUIRED_CONFIRMATIONS": 0, }, "erc20": { - "YA_PAYMENT_NETWORK": "rinkeby", - "RINKEBY_GETH_ADDR": "http://ethereum:8545", - "RINKEBY_TGLM_CONTRACT_ADDRESS": "0xFDFEF9D10d929cB3905C71400ce6be1990EA0F34", - "ERC20_RINKEBY_REQUIRED_CONFIRMATIONS": 0, + "YA_PAYMENT_NETWORK": "goerli", + "GOERLI_GETH_ADDR": "http://ethereum:8545", + "GOERLI_TGLM_CONTRACT_ADDRESS": "0xFDFEF9D10d929cB3905C71400ce6be1990EA0F34", + "ERC20_GOERLI_REQUIRED_CONFIRMATIONS": 0, }, } @@ -41,7 +36,7 @@ async def test_default_payment_platform(default_goth_config: Path) -> None: assert env[key] == val -@pytest.mark.parametrize("payment_config", ("zksync", "erc20_mainnet", "erc20", "polygon")) +@pytest.mark.parametrize("payment_config", ("erc20_mainnet", "erc20", "polygon")) @pytest.mark.asyncio async def test_payment_platform_env(default_goth_config: Path, payment_config) -> None: """Test if "payment_config" param in config file works.""" diff --git a/test/unit/configuration/test-assets/goth-config.yml b/test/unit/configuration/test-assets/goth-config.yml index 158a5686..d9ab37bb 100644 --- a/test/unit/configuration/test-assets/goth-config.yml +++ b/test/unit/configuration/test-assets/goth-config.yml @@ -23,7 +23,6 @@ docker-compose: compose-log-patterns: ethereum: ".*Wallets supplied." - zksync: ".*Running on http://.*:3030/.*" key-dir: "keys" diff --git a/test/unit/configuration/test_configuration.py b/test/unit/configuration/test_configuration.py index dd8bf625..56c910ac 100644 --- a/test/unit/configuration/test_configuration.py +++ b/test/unit/configuration/test_configuration.py @@ -22,7 +22,7 @@ def test_parse_default_config(test_config_file: Path): def test_load_yaml_override_existing(test_config_file: Path): """Test overriding an existing field in a YAML config file.""" - test_key = "zksync" + test_key = "erc20" test_value = ".*I am overridden!.*" overrides = [ (f"docker-compose.compose-log-patterns.{test_key}", test_value), diff --git a/test/unit/runner/cli/test_yagna_payment_cmd.py b/test/unit/runner/cli/test_yagna_payment_cmd.py index 354508f5..8ad21c10 100644 --- a/test/unit/runner/cli/test_yagna_payment_cmd.py +++ b/test/unit/runner/cli/test_yagna_payment_cmd.py @@ -8,7 +8,7 @@ def test_payment_init(yagna_container): yagna = Cli(yagna_container).yagna - yagna.payment_init("zksync") + yagna.payment_init("erc20") def test_payment_init_provider_mode(yagna_container): @@ -16,7 +16,7 @@ def test_payment_init_provider_mode(yagna_container): yagna = Cli(yagna_container).yagna - yagna.payment_init("zksync", receiver_mode=True) + yagna.payment_init("erc20", receiver_mode=True) def test_payment_init_requestor_mode(yagna_container): @@ -24,7 +24,7 @@ def test_payment_init_requestor_mode(yagna_container): yagna = Cli(yagna_container).yagna - yagna.payment_init("zksync", sender_mode=True) + yagna.payment_init("erc20", sender_mode=True) def test_payment_status(yagna_container): @@ -32,7 +32,7 @@ def test_payment_status(yagna_container): yagna = Cli(yagna_container).yagna - status = yagna.payment_status("zksync") + status = yagna.payment_status("erc20") assert status @@ -41,5 +41,5 @@ def test_payment_status_with_address(yagna_container): yagna = Cli(yagna_container).yagna - status = yagna.payment_status("zksync") + status = yagna.payment_status("erc20") assert status diff --git a/test/unit/runner/container/test_payment.py b/test/unit/runner/container/test_payment.py index 7844c80a..b1ef090a 100644 --- a/test/unit/runner/container/test_payment.py +++ b/test/unit/runner/container/test_payment.py @@ -16,7 +16,7 @@ def payment_id_pool() -> PaymentIdPool: return PaymentIdPool() -@pytest.mark.parametrize("payment_config_name", ("erc20", "zksync")) +@pytest.mark.parametrize("payment_config_name", ("erc20")) def test_get_id(payment_id_pool, payment_config_name): """Test if pre-funded payment accounts are generated correctly.""" receive = False @@ -36,7 +36,7 @@ def test_get_id(payment_id_pool, payment_config_name): assert account.send == send -@pytest.mark.parametrize("payment_config_name", ("erc20", "zksync")) +@pytest.mark.parametrize("payment_config_name", ("erc20")) def test_get_id_with_address(payment_id_pool, payment_config_name): """Test if pre-funded payment accounts can be found by address.""" receive = False @@ -62,7 +62,7 @@ def test_get_id_with_address(payment_id_pool, payment_config_name): assert account.send == send -@pytest.mark.parametrize("payment_config_name", ("erc20", "zksync")) +@pytest.mark.parametrize("payment_config_name", ("erc20")) def test_get_id_with_address_removes_from_pool(payment_id_pool, payment_config_name): """Test if found pre-funded payment accounts is removed from pool.""" @@ -85,7 +85,7 @@ def test_get_id_with_address_removes_from_pool(payment_id_pool, payment_config_n def test_key_pool_depleted(payment_id_pool): """Test if the proper exception is raised when we run out of pre-funded keys.""" - any_payment_config = get_payment_config("zksync") + any_payment_config = get_payment_config("erc20") with pytest.raises(KeyPoolDepletedError): while True: payment_id_pool.get_id(any_payment_config) @@ -94,7 +94,7 @@ def test_key_pool_depleted(payment_id_pool): def test_key_not_found(payment_id_pool): """Test if the proper exception is raised when no pre-funded key with given address.""" - any_payment_config = get_payment_config("zksync") + any_payment_config = get_payment_config("erc20") address_not_in_pool = "0000000000000000000000000000000000000000" with pytest.raises(KeyNotFoundError): payment_id_pool.get_id( diff --git a/test/unit/runner/test_shutdown.py b/test/unit/runner/test_shutdown.py index 73505a4e..41f29655 100644 --- a/test/unit/runner/test_shutdown.py +++ b/test/unit/runner/test_shutdown.py @@ -36,7 +36,7 @@ def apply_global_monkeypatches(monkeypatch): YagnaContainerConfig( name="requestor", probe_type=Probe, - payment_config=get_payment_config("zksync"), + payment_config=get_payment_config("erc20"), volumes={}, environment={}, payment_id=mock.MagicMock(), @@ -44,7 +44,7 @@ def apply_global_monkeypatches(monkeypatch): YagnaContainerConfig( name="provider", probe_type=Probe, - payment_config=get_payment_config("zksync"), + payment_config=get_payment_config("erc20"), volumes={}, environment={}, privileged_mode=False,