diff --git a/cluster_config/cfgsync-2node1024.yaml b/cluster_config/cfgsync-2node1024.yaml new file mode 100644 index 0000000..64b1df0 --- /dev/null +++ b/cluster_config/cfgsync-2node1024.yaml @@ -0,0 +1,31 @@ +port: 4400 +n_hosts: 2 +timeout: 30 + +# ConsensusConfig related parameters +security_param: 10 +active_slot_coeff: 0.9 + +# DaConfig related parameters +subnetwork_size: 1024 +dispersal_factor: 2 +num_samples: 1 +num_subnets: 2 +old_blobs_check_interval_secs: 5 +blobs_validity_duration_secs: 60 +global_params_path: "/kzgrs_test_params" + +# Tracing +tracing_settings: + logger: Stdout + tracing: !Otlp + endpoint: http://tempo:4317/ + sample_ratio: 0.5 + service_name: node + filter: !EnvFilter + filters: + nomos: debug + metrics: !Otlp + endpoint: http://prometheus:9090/api/v1/otlp/v1/metrics + host_identifier: node + level: INFO \ No newline at end of file diff --git a/cluster_config/cfgsync-2node.yaml b/cluster_config/cfgsync-2node2.yaml similarity index 100% rename from cluster_config/cfgsync-2node.yaml rename to cluster_config/cfgsync-2node2.yaml diff --git a/cluster_config/cfgsync-4node.yaml b/cluster_config/cfgsync-4node2.yaml similarity index 100% rename from cluster_config/cfgsync-4node.yaml rename to cluster_config/cfgsync-4node2.yaml diff --git a/src/steps/common.py b/src/steps/common.py index 4a2c810..a2f74f4 100644 --- a/src/steps/common.py +++ b/src/steps/common.py @@ -11,10 +11,10 @@ from src.node.nomos_node import NomosNode logger = get_custom_logger(__name__) -def prepare_cluster_config(node_count): +def prepare_cluster_config(node_count, subnetwork_size=2): cwd = os.getcwd() config_dir = "cluster_config" - src = f"{cwd}/{config_dir}/cfgsync-{node_count}node.yaml" + src = f"{cwd}/{config_dir}/cfgsync-{node_count}node{subnetwork_size}.yaml" dst = f"{cwd}/{config_dir}/cfgsync.yaml" shutil.copyfile(src, dst) @@ -38,7 +38,13 @@ class StepsCommon: @pytest.fixture(scope="function") def setup_2_node_cluster(self, request): logger.debug(f"Running fixture setup: {inspect.currentframe().f_code.co_name}") - prepare_cluster_config(2) + + if hasattr(request, "param"): + subnet_size = request.param + else: + subnet_size = 2 + + prepare_cluster_config(2, subnet_size) self.node1 = NomosNode(CFGSYNC, "cfgsync") self.node2 = NomosNode(NOMOS, "nomos_node_0") self.node3 = NomosNode(NOMOS_EXECUTOR, "nomos_node_1") diff --git a/tests/networking_privacy/__init__.py b/tests/networking_privacy/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/networking_privacy/test_networking_privacy.py b/tests/networking_privacy/test_networking_privacy.py new file mode 100644 index 0000000..aab916e --- /dev/null +++ b/tests/networking_privacy/test_networking_privacy.py @@ -0,0 +1,14 @@ +import pytest + +from src.libs.common import delay, to_app_id, to_index +from src.steps.da import StepsDataAvailability +from src.test_data import DATA_TO_DISPERSE + + +class TestNetworkingPrivacy(StepsDataAvailability): + main_nodes = [] + + @pytest.mark.parametrize("setup_2_node_cluster", [1024], indirect=True) + def test_consumed_bandwidth_dispersal(self, setup_2_node_cluster): + delay(5) + self.disperse_data(DATA_TO_DISPERSE[1], to_app_id(1), to_index(0))