From 69dfbfcb11ca0e2a2b44cc24380859207ae6dd9f Mon Sep 17 00:00:00 2001 From: Roman Date: Tue, 15 Apr 2025 15:46:51 +0800 Subject: [PATCH 01/11] fix: add new API endpoints --- src/api_clients/rest.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/api_clients/rest.py b/src/api_clients/rest.py index c231def..63e6347 100644 --- a/src/api_clients/rest.py +++ b/src/api_clients/rest.py @@ -70,6 +70,14 @@ class REST(BaseClient): response = self.rest_call("get", "da/blacklisted-peers") return response.json() + def da_balancer_stats(self): + response = self.rest_call("get", "da/balancer-stats") + return response.json() + + def da_monitor_stats(self): + response = self.rest_call("get", "da/monitor-stats") + return response.json() + def network_info(self): response = self.rest_call("get", "network/info") return response.json() From 8f8580ca8a8eaa7984e12f01ac9cc3fa44a140d6 Mon Sep 17 00:00:00 2001 From: Roman Date: Tue, 22 Apr 2025 13:37:03 +0800 Subject: [PATCH 02/11] test: add publish share --- src/node/nomos_node.py | 3 +++ src/steps/da.py | 45 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) diff --git a/src/node/nomos_node.py b/src/node/nomos_node.py index d3f72ea..9a60558 100644 --- a/src/node/nomos_node.py +++ b/src/node/nomos_node.py @@ -166,3 +166,6 @@ class NomosNode: def send_get_cryptarchia_headers_request(self, data): return self._api.cryptarchia_headers(data) + + def send_add_share_request(self, data): + return self._api.da_add_share(data) diff --git a/src/steps/da.py b/src/steps/da.py index fbf457a..3c1760a 100644 --- a/src/steps/da.py +++ b/src/steps/da.py @@ -44,6 +44,31 @@ def response_contains_data(response): return False +def transform_da_share_to_share(da_share): + share = {} + light_share = { + "share_idx": da_share["share_idx"], + "column": da_share["column"], + "column_commitment": da_share["column_commitment"], + "aggregated_column_proof": da_share["aggregated_column_proof"], + "rows_proofs": da_share["rows_proofs"], + } + + shares_commitments = { + "aggregated_column_commitment": da_share["aggregated_column_commitment"], + "rows_commitments": da_share["rows_commitments"], + } + + share["light_share"] = light_share + share["shares_commitments"] = shares_commitments + + return share + + +def prepare_add_share_request(da_share): + return transform_da_share_to_share(da_share) + + class StepsDataAvailability(StepsCommon): def find_executor_node(self): executor = {} @@ -126,3 +151,23 @@ class StepsDataAvailability(StepsCommon): return response return get_commitments() + + @allure.step + def add_publish_share(self, node, da_share, **kwargs): + + timeout_duration = kwargs.get("timeout_duration", 65) + interval = kwargs.get("interval", 0.1) + + data = prepare_add_share_request(da_share) + + @retry(stop=stop_after_delay(timeout_duration), wait=wait_fixed(interval), reraise=True) + def add_share(): + try: + response = node.send_add_share_request(data) + except Exception as ex: + logger.error(f"Exception while adding share: {ex}") + raise + + return response + + return add_share() From 8f1535270b4130d7bf3a5a63fe8ab953f170d865 Mon Sep 17 00:00:00 2001 From: Roman Date: Tue, 22 Apr 2025 14:00:13 +0800 Subject: [PATCH 03/11] test: print da_shares only --- .../test_interaction_data_flow.py | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 tests/protocol_compatibility/test_interaction_data_flow.py diff --git a/tests/protocol_compatibility/test_interaction_data_flow.py b/tests/protocol_compatibility/test_interaction_data_flow.py new file mode 100644 index 0000000..1ae1327 --- /dev/null +++ b/tests/protocol_compatibility/test_interaction_data_flow.py @@ -0,0 +1,28 @@ +import pytest + +from src.libs.common import to_app_id, to_index, delay +from src.libs.custom_logger import get_custom_logger +from src.steps.consensus import StepsConsensus +from src.steps.da import StepsDataAvailability +from src.steps.storage import StepsStorage +from src.test_data import DATA_TO_DISPERSE + +logger = get_custom_logger(__name__) + + +def extract_da_shares(index_shares): + return [share for _, shares in index_shares for share in shares if shares] + + +class TestInteractionDataFlow(StepsDataAvailability, StepsConsensus, StepsStorage): + main_nodes = [] + + @pytest.mark.usefixtures("setup_2_node_cluster") + def test_da_dispersal_integration(self): + + self.disperse_data(DATA_TO_DISPERSE[3], to_app_id(1), to_index(0)) + delay(5) + index_shares = self.get_data_range(self.node2, to_app_id(1), to_index(0), to_index(5)) + da_shares = extract_da_shares(index_shares) + + logger.debug(f"da_shares: {da_shares}") From a82e65a2c95e8c7987f1b81d9a86fc95585529c9 Mon Sep 17 00:00:00 2001 From: Roman Date: Tue, 22 Apr 2025 15:53:33 +0800 Subject: [PATCH 04/11] test: publish share --- tests/protocol_compatibility/test_interaction_data_flow.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/protocol_compatibility/test_interaction_data_flow.py b/tests/protocol_compatibility/test_interaction_data_flow.py index 1ae1327..a8b982a 100644 --- a/tests/protocol_compatibility/test_interaction_data_flow.py +++ b/tests/protocol_compatibility/test_interaction_data_flow.py @@ -26,3 +26,6 @@ class TestInteractionDataFlow(StepsDataAvailability, StepsConsensus, StepsStorag da_shares = extract_da_shares(index_shares) logger.debug(f"da_shares: {da_shares}") + logger.debug(f"{len(da_shares)} da_shares extracted") + + self.add_publish_share(self.node2, da_shares[0]) From a2290858220207add0a2bccd12e1e2a03e5208ec Mon Sep 17 00:00:00 2001 From: Roman Date: Wed, 23 Apr 2025 13:37:51 +0800 Subject: [PATCH 05/11] fix: send modified da_share instead of share --- src/env_vars.py | 2 +- src/steps/da.py | 24 ++---------------------- 2 files changed, 3 insertions(+), 23 deletions(-) diff --git a/src/env_vars.py b/src/env_vars.py index 8f1b14d..18a6f28 100644 --- a/src/env_vars.py +++ b/src/env_vars.py @@ -15,7 +15,7 @@ def get_env_var(var_name, default=None): # Configuration constants. Need to be upercase to appear in reports -DEFAULT_NOMOS_IMAGE = "ghcr.io/logos-co/nomos:testnet" +DEFAULT_NOMOS_IMAGE = "nomos:testnet" NOMOS_IMAGE = get_env_var("NOMOS_IMAGE", DEFAULT_NOMOS_IMAGE) DEFAULT_PROXY_IMAGE = "bitnami/configurable-http-proxy:latest" diff --git a/src/steps/da.py b/src/steps/da.py index 3c1760a..9f3740e 100644 --- a/src/steps/da.py +++ b/src/steps/da.py @@ -44,29 +44,9 @@ def response_contains_data(response): return False -def transform_da_share_to_share(da_share): - share = {} - light_share = { - "share_idx": da_share["share_idx"], - "column": da_share["column"], - "column_commitment": da_share["column_commitment"], - "aggregated_column_proof": da_share["aggregated_column_proof"], - "rows_proofs": da_share["rows_proofs"], - } - - shares_commitments = { - "aggregated_column_commitment": da_share["aggregated_column_commitment"], - "rows_commitments": da_share["rows_commitments"], - } - - share["light_share"] = light_share - share["shares_commitments"] = shares_commitments - - return share - - def prepare_add_share_request(da_share): - return transform_da_share_to_share(da_share) + da_share["share_idx"] = 137 + return da_share class StepsDataAvailability(StepsCommon): From 92bad26f33692cdff3dc784e318e51b44114286b Mon Sep 17 00:00:00 2001 From: Roman Date: Wed, 23 Apr 2025 14:07:17 +0800 Subject: [PATCH 06/11] fix: finish test da_dispersal_integration --- src/steps/da.py | 9 +-------- .../test_interaction_data_flow.py | 13 ++++++++++--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/steps/da.py b/src/steps/da.py index 9f3740e..a6d4e8a 100644 --- a/src/steps/da.py +++ b/src/steps/da.py @@ -44,11 +44,6 @@ def response_contains_data(response): return False -def prepare_add_share_request(da_share): - da_share["share_idx"] = 137 - return da_share - - class StepsDataAvailability(StepsCommon): def find_executor_node(self): executor = {} @@ -138,12 +133,10 @@ class StepsDataAvailability(StepsCommon): timeout_duration = kwargs.get("timeout_duration", 65) interval = kwargs.get("interval", 0.1) - data = prepare_add_share_request(da_share) - @retry(stop=stop_after_delay(timeout_duration), wait=wait_fixed(interval), reraise=True) def add_share(): try: - response = node.send_add_share_request(data) + response = node.send_add_share_request(da_share) except Exception as ex: logger.error(f"Exception while adding share: {ex}") raise diff --git a/tests/protocol_compatibility/test_interaction_data_flow.py b/tests/protocol_compatibility/test_interaction_data_flow.py index a8b982a..55a85fe 100644 --- a/tests/protocol_compatibility/test_interaction_data_flow.py +++ b/tests/protocol_compatibility/test_interaction_data_flow.py @@ -25,7 +25,14 @@ class TestInteractionDataFlow(StepsDataAvailability, StepsConsensus, StepsStorag index_shares = self.get_data_range(self.node2, to_app_id(1), to_index(0), to_index(5)) da_shares = extract_da_shares(index_shares) - logger.debug(f"da_shares: {da_shares}") - logger.debug(f"{len(da_shares)} da_shares extracted") + modified_da_share = da_shares[0] + modified_da_share["share_idx"] = 7 - self.add_publish_share(self.node2, da_shares[0]) + self.add_publish_share(self.node2, modified_da_share) + + index_shares = self.get_data_range(self.node2, to_app_id(1), to_index(0), to_index(8)) + da_shares = extract_da_shares(index_shares) + + delay(5) + + assert len(da_shares) < 3, "Modified da_share should not get published" From 63ae6416633e3bea69e23231b37676ab1f79b34e Mon Sep 17 00:00:00 2001 From: Roman Date: Wed, 23 Apr 2025 16:10:51 +0800 Subject: [PATCH 07/11] fix: add additional assert to count correct shares --- tests/protocol_compatibility/test_interaction_data_flow.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/protocol_compatibility/test_interaction_data_flow.py b/tests/protocol_compatibility/test_interaction_data_flow.py index 55a85fe..a537a94 100644 --- a/tests/protocol_compatibility/test_interaction_data_flow.py +++ b/tests/protocol_compatibility/test_interaction_data_flow.py @@ -25,6 +25,8 @@ class TestInteractionDataFlow(StepsDataAvailability, StepsConsensus, StepsStorag index_shares = self.get_data_range(self.node2, to_app_id(1), to_index(0), to_index(5)) da_shares = extract_da_shares(index_shares) + assert len(da_shares) == 2, "Two da_shares are expected" + modified_da_share = da_shares[0] modified_da_share["share_idx"] = 7 From c04448b3d85dd24d2f85b37b4274e4d857651470 Mon Sep 17 00:00:00 2001 From: Roman Date: Thu, 24 Apr 2025 14:50:10 +0800 Subject: [PATCH 08/11] test: test_da_mempool_interaction --- src/node/nomos_node.py | 3 ++ src/steps/mempool.py | 34 +++++++++++++++++++ .../test_interaction_data_flow.py | 17 ++++++++-- 3 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 src/steps/mempool.py diff --git a/src/node/nomos_node.py b/src/node/nomos_node.py index 9a60558..3a5519d 100644 --- a/src/node/nomos_node.py +++ b/src/node/nomos_node.py @@ -169,3 +169,6 @@ class NomosNode: def send_add_share_request(self, data): return self._api.da_add_share(data) + + def send_add_blob_info_request(self, data): + return self._api.mempool_add_blobinfo(data) diff --git a/src/steps/mempool.py b/src/steps/mempool.py new file mode 100644 index 0000000..09c6a25 --- /dev/null +++ b/src/steps/mempool.py @@ -0,0 +1,34 @@ +import allure +from tenacity import retry, stop_after_delay, wait_fixed + +from src.libs.custom_logger import get_custom_logger +from src.steps.common import StepsCommon + +logger = get_custom_logger(__name__) + + +def prepare_add_blob_info_request(blob_id, app_id, index): + blob_info = {"id": blob_id, "metadata": {"app_id": app_id, "index": index}} + return blob_info + + +class StepsMempool(StepsCommon): + @allure.step + def add_dispersed_blob_info(self, node, blob_id, app_id, index, **kwargs): + + timeout_duration = kwargs.get("timeout_duration", 65) + interval = kwargs.get("interval", 0.1) + + data = prepare_add_blob_info_request(blob_id, app_id, index) + + @retry(stop=stop_after_delay(timeout_duration), wait=wait_fixed(interval), reraise=True) + def add_blob_info(): + try: + response = node.send_add_blob_info_request(data) + except Exception as ex: + logger.error(f"Exception while adding blob info to mempool: {ex}") + raise + + return response + + return add_blob_info() diff --git a/tests/protocol_compatibility/test_interaction_data_flow.py b/tests/protocol_compatibility/test_interaction_data_flow.py index a537a94..b065645 100644 --- a/tests/protocol_compatibility/test_interaction_data_flow.py +++ b/tests/protocol_compatibility/test_interaction_data_flow.py @@ -1,9 +1,10 @@ import pytest -from src.libs.common import to_app_id, to_index, delay +from src.libs.common import to_app_id, to_index, delay, to_blob_id from src.libs.custom_logger import get_custom_logger from src.steps.consensus import StepsConsensus from src.steps.da import StepsDataAvailability +from src.steps.mempool import StepsMempool from src.steps.storage import StepsStorage from src.test_data import DATA_TO_DISPERSE @@ -14,7 +15,7 @@ def extract_da_shares(index_shares): return [share for _, shares in index_shares for share in shares if shares] -class TestInteractionDataFlow(StepsDataAvailability, StepsConsensus, StepsStorage): +class TestInteractionDataFlow(StepsDataAvailability, StepsMempool): main_nodes = [] @pytest.mark.usefixtures("setup_2_node_cluster") @@ -38,3 +39,15 @@ class TestInteractionDataFlow(StepsDataAvailability, StepsConsensus, StepsStorag delay(5) assert len(da_shares) < 3, "Modified da_share should not get published" + + @pytest.mark.usefixtures("setup_2_node_cluster") + def test_da_mempool_interaction(self): + self.disperse_data(DATA_TO_DISPERSE[3], to_app_id(1), to_index(0)) + self.add_dispersed_blob_info(self.node2, to_blob_id(10), to_app_id(1), to_index(0)) + + delay(5) + + index_shares = self.get_data_range(self.node2, to_app_id(1), to_index(0), to_index(5)) + da_shares = extract_da_shares(index_shares) + + assert len(da_shares) == 2, "Dispersal unaffected by additional blob info added to mempool" From 006d091253fcc0109a5a8d5b495f3262d627af15 Mon Sep 17 00:00:00 2001 From: Roman Date: Thu, 24 Apr 2025 15:08:06 +0800 Subject: [PATCH 09/11] fix: assert message --- tests/protocol_compatibility/test_interaction_data_flow.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/protocol_compatibility/test_interaction_data_flow.py b/tests/protocol_compatibility/test_interaction_data_flow.py index b065645..904e17c 100644 --- a/tests/protocol_compatibility/test_interaction_data_flow.py +++ b/tests/protocol_compatibility/test_interaction_data_flow.py @@ -50,4 +50,4 @@ class TestInteractionDataFlow(StepsDataAvailability, StepsMempool): index_shares = self.get_data_range(self.node2, to_app_id(1), to_index(0), to_index(5)) da_shares = extract_da_shares(index_shares) - assert len(da_shares) == 2, "Dispersal unaffected by additional blob info added to mempool" + assert len(da_shares) == 2, "Dispersal should not be affected by additional blob info added to mempool" From e2def60741f8d995378a441f8bcd8880bb7aa27f Mon Sep 17 00:00:00 2001 From: Roman Date: Thu, 24 Apr 2025 16:03:18 +0800 Subject: [PATCH 10/11] fix: introduce CONSENSUS_SLOT_TIME for delay --- src/env_vars.py | 1 + src/steps/common.py | 6 +++--- tests/data_integrity/test_data_integrity.py | 7 ++++--- tests/dos_robustness/test_high_load_dos.py | 3 ++- tests/dos_robustness/test_large_volume.py | 3 ++- .../protocol_compatibility/test_api_compatibility.py | 5 +++-- .../test_interaction_data_flow.py | 11 ++++++----- 7 files changed, 21 insertions(+), 15 deletions(-) diff --git a/src/env_vars.py b/src/env_vars.py index 18a6f28..9e7220e 100644 --- a/src/env_vars.py +++ b/src/env_vars.py @@ -41,3 +41,4 @@ GATEWAY = get_env_var("GATEWAY", "172.19.0.1") RUNNING_IN_CI = get_env_var("CI") API_REQUEST_TIMEOUT = get_env_var("API_REQUEST_TIMEOUT", 20) CHECK_LOG_ERRORS = get_env_var("CHECK_LOG_ERRORS", False) +CONSENSUS_SLOT_TIME = get_env_var("CONSENSUS_SLOT_TIME", 5) diff --git a/src/steps/common.py b/src/steps/common.py index d110e12..d7ba494 100644 --- a/src/steps/common.py +++ b/src/steps/common.py @@ -4,7 +4,7 @@ import os import pytest from src.client.proxy_client import ProxyClient -from src.env_vars import CFGSYNC, NOMOS, NOMOS_EXECUTOR +from src.env_vars import CFGSYNC, NOMOS, NOMOS_EXECUTOR, CONSENSUS_SLOT_TIME from src.libs.common import delay from src.libs.custom_logger import get_custom_logger from src.node.nomos_node import NomosNode @@ -72,7 +72,7 @@ class StepsCommon: logger.error(f"REST service did not become ready in time: {ex}") raise - delay(5) + delay(CONSENSUS_SLOT_TIME) @pytest.fixture(scope="function") def setup_4_node_cluster(self, request): @@ -97,7 +97,7 @@ class StepsCommon: logger.error(f"REST service did not become ready in time: {ex}") raise - delay(5) + delay(CONSENSUS_SLOT_TIME) @pytest.fixture(scope="function") def setup_proxy_clients(self, request): diff --git a/tests/data_integrity/test_data_integrity.py b/tests/data_integrity/test_data_integrity.py index 0644660..ebc8797 100644 --- a/tests/data_integrity/test_data_integrity.py +++ b/tests/data_integrity/test_data_integrity.py @@ -2,6 +2,7 @@ import json import pytest from src.client.nomos_cli import NomosCli +from src.env_vars import CONSENSUS_SLOT_TIME from src.libs.common import delay, to_app_id, to_index from src.libs.custom_logger import get_custom_logger from src.steps.da import StepsDataAvailability @@ -16,7 +17,7 @@ class TestDataIntegrity(StepsDataAvailability): @pytest.mark.usefixtures("setup_4_node_cluster") def test_da_identify_retrieve_missing_columns(self): self.disperse_data(DATA_TO_DISPERSE[1], to_app_id(1), to_index(0)) - delay(5) + delay(CONSENSUS_SLOT_TIME) test_results = [] # Iterate through standard nodes 1-3 to get blob data for 1/2 columns for node in self.main_nodes[1:4]: @@ -39,7 +40,7 @@ class TestDataIntegrity(StepsDataAvailability): self.main_nodes[1].stop() self.disperse_data(DATA_TO_DISPERSE[1], to_app_id(1), to_index(0)) - delay(5) + delay(CONSENSUS_SLOT_TIME) test_results = [] # Iterate through standard nodes 2-3 to get blob data for 1/2 columns for node in self.main_nodes[2:4]: @@ -58,7 +59,7 @@ class TestDataIntegrity(StepsDataAvailability): @pytest.mark.usefixtures("setup_2_node_cluster") def test_da_sampling_determines_data_presence(self): self.disperse_data(DATA_TO_DISPERSE[1], to_app_id(1), to_index(0)) - delay(5) + delay(CONSENSUS_SLOT_TIME) rcv_data = self.get_data_range(self.node2, to_app_id(1), to_index(0), to_index(5)) rcv_data_json = json.dumps(rcv_data) diff --git a/tests/dos_robustness/test_high_load_dos.py b/tests/dos_robustness/test_high_load_dos.py index 4da8f89..e304dae 100644 --- a/tests/dos_robustness/test_high_load_dos.py +++ b/tests/dos_robustness/test_high_load_dos.py @@ -3,6 +3,7 @@ import time import pytest +from src.env_vars import CONSENSUS_SLOT_TIME from src.libs.common import to_app_id, to_index, delay from src.steps.da import StepsDataAvailability, logger from src.test_data import DATA_TO_DISPERSE @@ -44,7 +45,7 @@ class TestHighLoadDos(StepsDataAvailability): response = self.disperse_data(DATA_TO_DISPERSE[7], to_app_id(1), to_index(0)) assert response.status_code == 200, "Initial dispersal was not successful" - delay(5) + delay(CONSENSUS_SLOT_TIME) start_time = time.time() while time.time() - start_time < timeout: diff --git a/tests/dos_robustness/test_large_volume.py b/tests/dos_robustness/test_large_volume.py index 6493f64..47d83f6 100644 --- a/tests/dos_robustness/test_large_volume.py +++ b/tests/dos_robustness/test_large_volume.py @@ -1,5 +1,6 @@ import pytest +from src.env_vars import CONSENSUS_SLOT_TIME from src.libs.common import delay, generate_text_data, to_app_id, to_index from src.libs.custom_logger import get_custom_logger from src.steps.da import StepsDataAvailability @@ -29,7 +30,7 @@ class TestLargeVolume(StepsDataAvailability): assert response.status_code == 200 - delay(5) + delay(CONSENSUS_SLOT_TIME) self.get_data_range(self.node2, to_app_id(1), to_index(0), to_index(5), timeout_duration=20, interval=1) @pytest.mark.usefixtures("setup_2_node_cluster") diff --git a/tests/protocol_compatibility/test_api_compatibility.py b/tests/protocol_compatibility/test_api_compatibility.py index bc05181..2235a2d 100644 --- a/tests/protocol_compatibility/test_api_compatibility.py +++ b/tests/protocol_compatibility/test_api_compatibility.py @@ -1,5 +1,6 @@ import pytest +from src.env_vars import CONSENSUS_SLOT_TIME from src.libs.common import to_app_id, to_index, delay from src.libs.custom_logger import get_custom_logger from src.steps.consensus import StepsConsensus @@ -47,7 +48,7 @@ class TestApiCompatibility(StepsDataAvailability, StepsConsensus, StepsStorage): @pytest.mark.usefixtures("setup_2_node_cluster") def test_da_consensus_compatibility(self): self.disperse_data(DATA_TO_DISPERSE[2], to_app_id(1), to_index(0)) - delay(5) + delay(CONSENSUS_SLOT_TIME) index_shares = self.get_data_range(self.node2, to_app_id(1), to_index(0), to_index(5)) column_commitments, rows_commitments = extract_commitments(index_shares) @@ -75,7 +76,7 @@ class TestApiCompatibility(StepsDataAvailability, StepsConsensus, StepsStorage): @pytest.mark.usefixtures("setup_4_node_cluster") def test_da_cross_nodes_consensus_compatibility(self): self.disperse_data(DATA_TO_DISPERSE[2], to_app_id(1), to_index(0)) - delay(5) + delay(CONSENSUS_SLOT_TIME) index_shares = self.get_data_range(self.node2, to_app_id(1), to_index(0), to_index(5)) column_commitments, rows_commitments = extract_commitments(index_shares) diff --git a/tests/protocol_compatibility/test_interaction_data_flow.py b/tests/protocol_compatibility/test_interaction_data_flow.py index 904e17c..32dd772 100644 --- a/tests/protocol_compatibility/test_interaction_data_flow.py +++ b/tests/protocol_compatibility/test_interaction_data_flow.py @@ -1,5 +1,6 @@ import pytest +from src.env_vars import CONSENSUS_SLOT_TIME from src.libs.common import to_app_id, to_index, delay, to_blob_id from src.libs.custom_logger import get_custom_logger from src.steps.consensus import StepsConsensus @@ -22,7 +23,7 @@ class TestInteractionDataFlow(StepsDataAvailability, StepsMempool): def test_da_dispersal_integration(self): self.disperse_data(DATA_TO_DISPERSE[3], to_app_id(1), to_index(0)) - delay(5) + delay(CONSENSUS_SLOT_TIME) index_shares = self.get_data_range(self.node2, to_app_id(1), to_index(0), to_index(5)) da_shares = extract_da_shares(index_shares) @@ -33,19 +34,19 @@ class TestInteractionDataFlow(StepsDataAvailability, StepsMempool): self.add_publish_share(self.node2, modified_da_share) + delay(CONSENSUS_SLOT_TIME) + index_shares = self.get_data_range(self.node2, to_app_id(1), to_index(0), to_index(8)) da_shares = extract_da_shares(index_shares) - delay(5) - assert len(da_shares) < 3, "Modified da_share should not get published" @pytest.mark.usefixtures("setup_2_node_cluster") def test_da_mempool_interaction(self): - self.disperse_data(DATA_TO_DISPERSE[3], to_app_id(1), to_index(0)) + self.disperse_data(DATA_TO_DISPERSE[4], to_app_id(1), to_index(0)) self.add_dispersed_blob_info(self.node2, to_blob_id(10), to_app_id(1), to_index(0)) - delay(5) + delay(CONSENSUS_SLOT_TIME) index_shares = self.get_data_range(self.node2, to_app_id(1), to_index(0), to_index(5)) da_shares = extract_da_shares(index_shares) From 14343ee3f88cfa9be1a05ce980971ba7e098ccfa Mon Sep 17 00:00:00 2001 From: Roman Date: Fri, 25 Apr 2025 13:53:36 +0800 Subject: [PATCH 11/11] fix: DEFAULT_NOMOS_IMAGE back to public value --- src/env_vars.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/env_vars.py b/src/env_vars.py index 9e7220e..0bcc5c8 100644 --- a/src/env_vars.py +++ b/src/env_vars.py @@ -15,7 +15,7 @@ def get_env_var(var_name, default=None): # Configuration constants. Need to be upercase to appear in reports -DEFAULT_NOMOS_IMAGE = "nomos:testnet" +DEFAULT_NOMOS_IMAGE = "ghcr.io/logos-co/nomos:testnet" NOMOS_IMAGE = get_env_var("NOMOS_IMAGE", DEFAULT_NOMOS_IMAGE) DEFAULT_PROXY_IMAGE = "bitnami/configurable-http-proxy:latest"