Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: integration test for Linea #37

Merged
merged 1 commit into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
RPC_1=
RPC_10=
RPC_59144=

# environment variables for prover network
SP1_PROVER=network
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,15 @@ jobs:

- name: "Set up test fixture"
run: |
git clone https://github.com/succinctlabs/rsp-tests --branch 2024-08-26 --depth 1 ../rsp-tests
git clone https://github.com/succinctlabs/rsp-tests --branch 2024-08-31 --depth 1 ../rsp-tests
cd ../rsp-tests/
docker compose up -d

- name: "Use local test fixture"
run: |
echo "RPC_1=http://localhost:9545/main/evm/1" >> $GITHUB_ENV
echo "RPC_10=http://localhost:9545/main/evm/10" >> $GITHUB_ENV
echo "RPC_59144=http://localhost:9545/main/evm/59144" >> $GITHUB_ENV

- name: "Run tests"
run: |
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ End-to-end integration tests are available. To run these tests, utilize the `.en
```bash
export RPC_1="YOUR_ETHEREUM_MAINNET_RPC_URL"
export RPC_10="YOUR_OP_MAINNET_RPC_URL"
export RPC_59144="YOUR_LINEA_MAINNET_RPC_URL"
```

Note that these JSON-RPC nodes must fulfill the [RPC node requirement](#rpc-node-requirement).
Expand Down
9 changes: 7 additions & 2 deletions crates/executor/host/tests/integration.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use alloy_provider::ReqwestProvider;
use rsp_client_executor::{
io::ClientExecutorInput, ChainVariant, ClientExecutor, EthereumVariant, OptimismVariant,
Variant,
io::ClientExecutorInput, ChainVariant, ClientExecutor, EthereumVariant, LineaVariant,
OptimismVariant, Variant,
};
use rsp_host_executor::HostExecutor;
use tracing_subscriber::{
Expand All @@ -19,6 +19,11 @@ async fn test_e2e_optimism() {
run_e2e::<OptimismVariant>(ChainVariant::Optimism, "RPC_10", 122853660).await;
}

#[tokio::test(flavor = "multi_thread")]
async fn test_e2e_linea() {
run_e2e::<LineaVariant>(ChainVariant::Linea, "RPC_59144", 5600000).await;
}

async fn run_e2e<V>(variant: ChainVariant, env_var_key: &str, block_number: u64)
where
V: Variant,
Expand Down