mirror of
https://github.com/logos-blockchain/logos-blockchain-e2e-tests.git
synced 2026-01-06 23:23:07 +00:00
test: disperse to nodes member of many subnets
This commit is contained in:
parent
c56f25b697
commit
e83e0b0b23
31
cluster_config/cfgsync-2node1024.yaml
Normal file
31
cluster_config/cfgsync-2node1024.yaml
Normal file
@ -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
|
||||||
@ -11,10 +11,10 @@ from src.node.nomos_node import NomosNode
|
|||||||
logger = get_custom_logger(__name__)
|
logger = get_custom_logger(__name__)
|
||||||
|
|
||||||
|
|
||||||
def prepare_cluster_config(node_count):
|
def prepare_cluster_config(node_count, subnetwork_size=2):
|
||||||
cwd = os.getcwd()
|
cwd = os.getcwd()
|
||||||
config_dir = "cluster_config"
|
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"
|
dst = f"{cwd}/{config_dir}/cfgsync.yaml"
|
||||||
shutil.copyfile(src, dst)
|
shutil.copyfile(src, dst)
|
||||||
|
|
||||||
@ -38,7 +38,13 @@ class StepsCommon:
|
|||||||
@pytest.fixture(scope="function")
|
@pytest.fixture(scope="function")
|
||||||
def setup_2_node_cluster(self, request):
|
def setup_2_node_cluster(self, request):
|
||||||
logger.debug(f"Running fixture setup: {inspect.currentframe().f_code.co_name}")
|
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.node1 = NomosNode(CFGSYNC, "cfgsync")
|
||||||
self.node2 = NomosNode(NOMOS, "nomos_node_0")
|
self.node2 = NomosNode(NOMOS, "nomos_node_0")
|
||||||
self.node3 = NomosNode(NOMOS_EXECUTOR, "nomos_node_1")
|
self.node3 = NomosNode(NOMOS_EXECUTOR, "nomos_node_1")
|
||||||
|
|||||||
0
tests/networking_privacy/__init__.py
Normal file
0
tests/networking_privacy/__init__.py
Normal file
14
tests/networking_privacy/test_networking_privacy.py
Normal file
14
tests/networking_privacy/test_networking_privacy.py
Normal file
@ -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))
|
||||||
Loading…
x
Reference in New Issue
Block a user