From 7bf93c258a8ef690d8562f9ad9192e355bf65a88 Mon Sep 17 00:00:00 2001 From: Bibek Pandey Date: Mon, 24 Feb 2025 14:05:12 +0545 Subject: [PATCH] (func-test): Fix some func tests --- functional-tests/envs/testenv.py | 8 ++++---- functional-tests/factory/factory.py | 15 +++++---------- functional-tests/tests/el_block_generation.py | 2 +- 3 files changed, 10 insertions(+), 15 deletions(-) diff --git a/functional-tests/envs/testenv.py b/functional-tests/envs/testenv.py index 6872742b4..d9ebf55ba 100644 --- a/functional-tests/envs/testenv.py +++ b/functional-tests/envs/testenv.py @@ -351,10 +351,10 @@ def init(self, ctx: flexitest.EnvContext) -> flexitest.LiveEnv: time.sleep(BLOCK_GENERATION_INTERVAL_SECS * 10) fullnode_reth_port = fullnode_reth.get_prop("rpc_port") - fullnode_reth_config = { - "reth_socket": f"localhost:{fullnode_reth_port}", - "reth_secret_path": reth_secret_path, - } + fullnode_reth_config = RethELConfig( + rpc_url=f"localhost:{fullnode_reth_port}", + secret=reth_secret_path, + ) sequencer_rpc = f"ws://localhost:{sequencer.get_prop('rpc_port')}" diff --git a/functional-tests/factory/factory.py b/functional-tests/factory/factory.py index 9a775716e..e2c600e96 100644 --- a/functional-tests/factory/factory.py +++ b/functional-tests/factory/factory.py @@ -210,13 +210,9 @@ def create_fullnode( "--rollup-params", rollup_params_file, "--rpc-host", rpc_host, "--rpc-port", str(rpc_port), - - "--sequencer", ] # fmt: on - cmd.extend(["--rollup-params", rollup_params_file]) - rpc_url = f"ws://localhost:{rpc_port}" props = { "id": idx, @@ -335,12 +331,17 @@ def create_prover_client( rpc_port = self.next_port() rpc_url = f"ws://localhost:{rpc_port}" + rollup_params_file = os.path.join(datadir, "rollup_params.json") + with open(rollup_params_file, "w") as f: + f.write(rollup_params) + # fmt: off cmd = [ "strata-prover-client", "--rpc-port", str(rpc_port), "--sequencer-rpc", sequencer_url, "--reth-rpc", reth_url, + "--rollup-params", rollup_params_file, "--bitcoind-url", bitcoind_config.rpc_url, "--bitcoind-user", bitcoind_config.rpc_user, "--bitcoind-password", bitcoind_config.rpc_password, @@ -351,12 +352,6 @@ def create_prover_client( ] # fmt: on - rollup_params_file = os.path.join(datadir, "rollup_params.json") - with open(rollup_params_file, "w") as f: - f.write(rollup_params) - - cmd.extend(["--rollup-params", rollup_params_file]) - props = {"rpc_port": rpc_port} svc = flexitest.service.ProcService(props, cmd, stdout=logfile) diff --git a/functional-tests/tests/el_block_generation.py b/functional-tests/tests/el_block_generation.py index 1f7541948..e019f4881 100644 --- a/functional-tests/tests/el_block_generation.py +++ b/functional-tests/tests/el_block_generation.py @@ -10,7 +10,7 @@ @flexitest.register class ElBlockGenerationTest(testenv.StrataTester): def __init__(self, ctx: flexitest.InitContext): - ctx.set_env(testenv.BasicEnvConfig(1000)) + ctx.set_env(testenv.BasicEnvConfig(101)) def main(self, ctx: flexitest.RunContext): seqrpc = ctx.get_service("sequencer").create_rpc()