From bab2989fb4cc2e2b9b7aa853d209eac7e5197497 Mon Sep 17 00:00:00 2001 From: Jonathan Cubides Date: Thu, 2 Jul 2026 12:51:53 -0500 Subject: [PATCH] test(bindings): raise anvil fork startup timeout to 120s The bindings tests fork a node per chain. The protocol adapter constructor calls into the risc0 verifier router and the execute test sends a real transaction, so a forked node is required here and cannot be swapped for a plain HTTP provider. Anvil only reports ready once it has fetched fork state from the RPC; over a slow or rate-limited RPC that exceeds anvil's 10s startup default and the test panics with `Timeout`, and it worsens as chains are added. Raise the startup timeout to 120s. --- bindings/tests/contract.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bindings/tests/contract.rs b/bindings/tests/contract.rs index 1d5dcd6d..617a6685 100644 --- a/bindings/tests/contract.rs +++ b/bindings/tests/contract.rs @@ -88,8 +88,13 @@ async fn pa_instance( ) -> protocol_adapter::ProtocolAdapter::ProtocolAdapterInstance { let rpc_url = alchemy_url(chain).expect("Couldn't get RPC URL for chain"); + // These tests need a forked node (the protocol adapter constructor calls into + // the risc0 verifier router, and `execute` sends a real transaction). Forking + // waits for anvil to fetch fork state from the RPC before it reports ready, so + // raise the startup timeout well above anvil's 10s default to avoid `Timeout` + // panics on slow RPCs or as more chains are added. let provider = ProviderBuilder::new() - .connect_anvil_with_wallet_and_config(|a| a.fork(rpc_url)) + .connect_anvil_with_wallet_and_config(|a| a.fork(rpc_url).timeout(120_000)) .expect("Couldn't create anvil provider"); protocol_adapter(&provider.erased()) .await