Skip to content

Commit

Permalink
(func-test): Fix some func tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Bibek Pandey committed Feb 24, 2025
1 parent 40f8dbc commit 7bf93c2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 15 deletions.
8 changes: 4 additions & 4 deletions functional-tests/envs/testenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')}"

Expand Down
15 changes: 5 additions & 10 deletions functional-tests/factory/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion functional-tests/tests/el_block_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 7bf93c2

Please sign in to comment.