diff --git a/.github/workflows/gas-bench.yml b/.github/workflows/gas-bench.yml index 67a6f127..a14bf25c 100644 --- a/.github/workflows/gas-bench.yml +++ b/.github/workflows/gas-bench.yml @@ -31,6 +31,9 @@ jobs: with: key: "gas-bench" + - name: install cargo-stylus + run: cargo install cargo-stylus@0.5.1 + - name: install solc run: | curl -LO https://github.com/ethereum/solidity/releases/download/v0.8.24/solc-static-linux diff --git a/Cargo.lock b/Cargo.lock index 591250ee..a756c697 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -822,6 +822,7 @@ dependencies = [ "alloy-primitives", "e2e", "eyre", + "futures", "keccak-const", "koba", "openzeppelin-stylus", diff --git a/Cargo.toml b/Cargo.toml index 94431294..ed00cd54 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -89,6 +89,7 @@ rand = "0.8.5" regex = "1.10.4" tiny-keccak = { version = "2.0.2", features = ["keccak"] } tokio = { version = "1.12.0", features = ["full"] } +futures = "0.3.30" # procedural macros syn = { version = "2.0.58", features = ["full"] } diff --git a/benches/Cargo.toml b/benches/Cargo.toml index f16effd4..5cb17d8e 100644 --- a/benches/Cargo.toml +++ b/benches/Cargo.toml @@ -11,6 +11,7 @@ openzeppelin-stylus.workspace = true alloy-primitives = { workspace = true, features = ["tiny-keccak"] } alloy.workspace = true tokio.workspace = true +futures.workspace = true eyre.workspace = true koba.workspace = true e2e.workspace = true diff --git a/benches/src/access_control.rs b/benches/src/access_control.rs index 7c9b7978..12ccfaa8 100644 --- a/benches/src/access_control.rs +++ b/benches/src/access_control.rs @@ -8,7 +8,10 @@ use alloy::{ }; use e2e::{receipt, Account}; -use crate::report::Report; +use crate::{ + report::{ContractReport, FunctionReport}, + CacheOpt, +}; sol!( #[sol(rpc)] @@ -33,7 +36,22 @@ const ROLE: [u8; 32] = const NEW_ADMIN_ROLE: [u8; 32] = hex!("879ce0d4bfd332649ca3552efe772a38d64a315eb70ab69689fd309c735946b5"); -pub async fn bench() -> eyre::Result { +pub async fn bench() -> eyre::Result { + let receipts = run_with(CacheOpt::None).await?; + let report = receipts + .into_iter() + .try_fold(ContractReport::new("AccessControl"), ContractReport::add)?; + + let cached_receipts = run_with(CacheOpt::Bid(0)).await?; + let report = cached_receipts + .into_iter() + .try_fold(report, ContractReport::add_cached)?; + + Ok(report) +} +pub async fn run_with( + cache_opt: CacheOpt, +) -> eyre::Result> { let alice = Account::new().await?; let alice_addr = alice.address(); let alice_wallet = ProviderBuilder::new() @@ -50,7 +68,8 @@ pub async fn bench() -> eyre::Result { .wallet(EthereumWallet::from(bob.signer.clone())) .on_http(bob.url().parse()?); - let contract_addr = deploy(&alice).await; + let contract_addr = deploy(&alice, cache_opt).await?; + let contract = AccessControl::new(contract_addr, &alice_wallet); let contract_bob = AccessControl::new(contract_addr, &bob_wallet); @@ -66,14 +85,17 @@ pub async fn bench() -> eyre::Result { (setRoleAdminCall::SIGNATURE, receipt!(contract.setRoleAdmin(ROLE.into(), NEW_ADMIN_ROLE.into()))?), ]; - let report = receipts + receipts .into_iter() - .try_fold(Report::new("AccessControl"), Report::add)?; - Ok(report) + .map(FunctionReport::new) + .collect::>>() } -async fn deploy(account: &Account) -> Address { +async fn deploy( + account: &Account, + cache_opt: CacheOpt, +) -> eyre::Result
{ let args = AccessControl::constructorCall {}; let args = alloy::hex::encode(args.abi_encode()); - crate::deploy(account, "access-control", Some(args)).await + crate::deploy(account, "access-control", Some(args), cache_opt).await } diff --git a/benches/src/erc20.rs b/benches/src/erc20.rs index 22f2aff0..bcf63435 100644 --- a/benches/src/erc20.rs +++ b/benches/src/erc20.rs @@ -9,7 +9,10 @@ use alloy::{ use alloy_primitives::U256; use e2e::{receipt, Account}; -use crate::report::Report; +use crate::{ + report::{ContractReport, FunctionReport}, + CacheOpt, +}; sol!( #[sol(rpc)] @@ -39,7 +42,23 @@ const TOKEN_NAME: &str = "Test Token"; const TOKEN_SYMBOL: &str = "TTK"; const CAP: U256 = uint!(1_000_000_U256); -pub async fn bench() -> eyre::Result { +pub async fn bench() -> eyre::Result { + let reports = run_with(CacheOpt::None).await?; + let report = reports + .into_iter() + .try_fold(ContractReport::new("Erc20"), ContractReport::add)?; + + let cached_reports = run_with(CacheOpt::Bid(0)).await?; + let report = cached_reports + .into_iter() + .try_fold(report, ContractReport::add_cached)?; + + Ok(report) +} + +pub async fn run_with( + cache_opt: CacheOpt, +) -> eyre::Result> { let alice = Account::new().await?; let alice_addr = alice.address(); let alice_wallet = ProviderBuilder::new() @@ -56,7 +75,8 @@ pub async fn bench() -> eyre::Result { .wallet(EthereumWallet::from(bob.signer.clone())) .on_http(bob.url().parse()?); - let contract_addr = deploy(&alice).await; + let contract_addr = deploy(&alice, cache_opt).await?; + let contract = Erc20::new(contract_addr, &alice_wallet); let contract_bob = Erc20::new(contract_addr, &bob_wallet); @@ -79,17 +99,21 @@ pub async fn bench() -> eyre::Result { (transferFromCall::SIGNATURE, receipt!(contract_bob.transferFrom(alice_addr, bob_addr, uint!(4_U256)))?), ]; - let report = - receipts.into_iter().try_fold(Report::new("Erc20"), Report::add)?; - Ok(report) + receipts + .into_iter() + .map(FunctionReport::new) + .collect::>>() } -async fn deploy(account: &Account) -> Address { +async fn deploy( + account: &Account, + cache_opt: CacheOpt, +) -> eyre::Result
{ let args = Erc20Example::constructorCall { name_: TOKEN_NAME.to_owned(), symbol_: TOKEN_SYMBOL.to_owned(), cap_: CAP, }; let args = alloy::hex::encode(args.abi_encode()); - crate::deploy(account, "erc20", Some(args)).await + crate::deploy(account, "erc20", Some(args), cache_opt).await } diff --git a/benches/src/erc721.rs b/benches/src/erc721.rs index b5dc4bb2..b00729a1 100644 --- a/benches/src/erc721.rs +++ b/benches/src/erc721.rs @@ -8,7 +8,10 @@ use alloy::{ }; use e2e::{receipt, Account}; -use crate::report::Report; +use crate::{ + report::{ContractReport, FunctionReport}, + CacheOpt, +}; sol!( #[sol(rpc)] @@ -29,7 +32,23 @@ sol!( sol!("../examples/erc721/src/constructor.sol"); -pub async fn bench() -> eyre::Result { +pub async fn bench() -> eyre::Result { + let reports = run_with(CacheOpt::None).await?; + let report = reports + .into_iter() + .try_fold(ContractReport::new("Erc721"), ContractReport::add)?; + + let cached_reports = run_with(CacheOpt::Bid(0)).await?; + let report = cached_reports + .into_iter() + .try_fold(report, ContractReport::add_cached)?; + + Ok(report) +} + +pub async fn run_with( + cache_opt: CacheOpt, +) -> eyre::Result> { let alice = Account::new().await?; let alice_addr = alice.address(); let alice_wallet = ProviderBuilder::new() @@ -41,7 +60,8 @@ pub async fn bench() -> eyre::Result { let bob = Account::new().await?; let bob_addr = bob.address(); - let contract_addr = deploy(&alice).await; + let contract_addr = deploy(&alice, cache_opt).await?; + let contract = Erc721::new(contract_addr, &alice_wallet); let token_1 = uint!(1_U256); @@ -70,13 +90,17 @@ pub async fn bench() -> eyre::Result { (burnCall::SIGNATURE, receipt!(contract.burn(token_1))?), ]; - let report = - receipts.into_iter().try_fold(Report::new("Erc721"), Report::add)?; - Ok(report) + receipts + .into_iter() + .map(FunctionReport::new) + .collect::>>() } -async fn deploy(account: &Account) -> Address { +async fn deploy( + account: &Account, + cache_opt: CacheOpt, +) -> eyre::Result
{ let args = Erc721Example::constructorCall {}; let args = alloy::hex::encode(args.abi_encode()); - crate::deploy(account, "erc721", Some(args)).await + crate::deploy(account, "erc721", Some(args), cache_opt).await } diff --git a/benches/src/lib.rs b/benches/src/lib.rs index 85a37ca0..c884bcdb 100644 --- a/benches/src/lib.rs +++ b/benches/src/lib.rs @@ -1,3 +1,5 @@ +use std::process::Command; + use alloy::{ primitives::Address, rpc::types::{ @@ -7,6 +9,7 @@ use alloy::{ }; use alloy_primitives::U128; use e2e::{Account, ReceiptExt}; +use eyre::WrapErr; use koba::config::{Deploy, Generate, PrivateKey}; use serde::Deserialize; @@ -16,8 +19,6 @@ pub mod erc721; pub mod merkle_proofs; pub mod report; -const RPC_URL: &str = "http://localhost:8547"; - #[derive(Debug, Deserialize)] struct ArbOtherFields { #[serde(rename = "gasUsedForL1")] @@ -27,23 +28,24 @@ struct ArbOtherFields { l1_block_number: String, } +/// Cache options for the contract. +/// `Bid(0)` will likely cache the contract on the nitro test node. +pub enum CacheOpt { + None, + Bid(u32), +} + type ArbTxReceipt = WithOtherFields>>; -fn get_l2_gas_used(receipt: &ArbTxReceipt) -> eyre::Result { - let l2_gas = receipt.gas_used; - let arb_fields: ArbOtherFields = receipt.other.deserialize_as()?; - let l1_gas = arb_fields.gas_used_for_l1.to::(); - Ok(l2_gas - l1_gas) -} - async fn deploy( account: &Account, contract_name: &str, args: Option, -) -> Address { + cache_opt: CacheOpt, +) -> eyre::Result
{ let manifest_dir = - std::env::current_dir().expect("should get current dir from env"); + std::env::current_dir().context("should get current dir from env")?; let wasm_path = manifest_dir .join("target") @@ -53,7 +55,7 @@ async fn deploy( let sol_path = args.as_ref().map(|_| { manifest_dir .join("examples") - .join(format!("{}", contract_name)) + .join(contract_name) .join("src") .join("constructor.sol") }); @@ -72,14 +74,46 @@ async fn deploy( keystore_path: None, keystore_password_path: None, }, - endpoint: RPC_URL.to_owned(), + endpoint: env("RPC_URL")?, deploy_only: false, quiet: true, }; - koba::deploy(&config) + let address = koba::deploy(&config) .await .expect("should deploy contract") - .address() - .expect("should return contract address") + .address()?; + + if let CacheOpt::Bid(bid) = cache_opt { + cache_contract(account, address, bid)?; + } + + Ok(address) +} + +/// Try to cache a contract on the stylus network. +/// Already cached contracts won't be cached, and this function will not return +/// an error. +/// Output will be forwarded to the child process. +fn cache_contract( + account: &Account, + contract_addr: Address, + bid: u32, +) -> eyre::Result<()> { + // We don't need a status code. + // Since it is not zero when the contract is already cached. + let _ = Command::new("cargo") + .args(["stylus", "cache", "bid"]) + .args(["-e", &env("RPC_URL")?]) + .args(["--private-key", &format!("0x{}", account.pk())]) + .arg(contract_addr.to_string()) + .arg(bid.to_string()) + .status() + .context("failed to execute `cargo stylus cache bid` command")?; + Ok(()) +} + +/// Load the `name` environment variable. +fn env(name: &str) -> eyre::Result { + std::env::var(name).wrap_err(format!("failed to load {name}")) } diff --git a/benches/src/main.rs b/benches/src/main.rs index cd4e0e38..52278d77 100644 --- a/benches/src/main.rs +++ b/benches/src/main.rs @@ -1,18 +1,21 @@ -use benches::{access_control, erc20, erc721, merkle_proofs, report::Reports}; +use benches::{ + access_control, erc20, erc721, merkle_proofs, report::BenchmarkReport, +}; +use futures::FutureExt; #[tokio::main] async fn main() -> eyre::Result<()> { - let reports = tokio::join!( - access_control::bench(), - erc20::bench(), - erc721::bench(), - merkle_proofs::bench() - ); - - let reports = [reports.0?, reports.1?, reports.2?, reports.3?]; - let report = - reports.into_iter().fold(Reports::default(), Reports::merge_with); + let report = futures::future::try_join_all([ + access_control::bench().boxed(), + erc20::bench().boxed(), + erc721::bench().boxed(), + merkle_proofs::bench().boxed(), + ]) + .await? + .into_iter() + .fold(BenchmarkReport::default(), BenchmarkReport::merge_with); + println!(); println!("{report}"); Ok(()) diff --git a/benches/src/merkle_proofs.rs b/benches/src/merkle_proofs.rs index 92a7d55e..fd986520 100644 --- a/benches/src/merkle_proofs.rs +++ b/benches/src/merkle_proofs.rs @@ -8,7 +8,10 @@ use alloy::{ }; use e2e::{receipt, Account}; -use crate::report::Report; +use crate::{ + report::{ContractReport, FunctionReport}, + CacheOpt, +}; sol!( #[sol(rpc)] @@ -57,7 +60,23 @@ const PROOF: [[u8; 32]; 16] = bytes_array! { "fd47b6c292f51911e8dfdc3e4f8bd127773b17f25b7a554beaa8741e99c41208", }; -pub async fn bench() -> eyre::Result { +pub async fn bench() -> eyre::Result { + let reports = run_with(CacheOpt::None).await?; + let report = reports + .into_iter() + .try_fold(ContractReport::new("MerkleProofs"), ContractReport::add)?; + + let cached_reports = run_with(CacheOpt::Bid(0)).await?; + let report = cached_reports + .into_iter() + .try_fold(report, ContractReport::add_cached)?; + + Ok(report) +} + +pub async fn run_with( + cache_opt: CacheOpt, +) -> eyre::Result> { let alice = Account::new().await?; let alice_wallet = ProviderBuilder::new() .network::() @@ -65,7 +84,8 @@ pub async fn bench() -> eyre::Result { .wallet(EthereumWallet::from(alice.signer.clone())) .on_http(alice.url().parse()?); - let contract_addr = deploy(&alice).await; + let contract_addr = deploy(&alice, cache_opt).await?; + let contract = Verifier::new(contract_addr, &alice_wallet); let proof = PROOF.map(|h| h.into()).to_vec(); @@ -75,12 +95,15 @@ pub async fn bench() -> eyre::Result { receipt!(contract.verify(proof, ROOT.into(), LEAF.into()))?, )]; - let report = receipts + receipts .into_iter() - .try_fold(Report::new("MerkleProofs"), Report::add)?; - Ok(report) + .map(FunctionReport::new) + .collect::>>() } -async fn deploy(account: &Account) -> Address { - crate::deploy(account, "merkle-proofs", None).await +async fn deploy( + account: &Account, + cache_opt: CacheOpt, +) -> eyre::Result
{ + crate::deploy(account, "merkle-proofs", None, cache_opt).await } diff --git a/benches/src/report.rs b/benches/src/report.rs index 3a1184b2..49b5fe70 100644 --- a/benches/src/report.rs +++ b/benches/src/report.rs @@ -1,64 +1,157 @@ -use std::fmt::Display; +use std::{collections::HashMap, fmt::Display}; -use crate::{get_l2_gas_used, ArbTxReceipt}; +use crate::{ArbOtherFields, ArbTxReceipt}; const SEPARATOR: &str = "::"; #[derive(Debug)] -pub struct Report { +pub struct FunctionReport { + sig: String, + gas: u128, +} + +impl FunctionReport { + pub(crate) fn new(receipt: (&str, ArbTxReceipt)) -> eyre::Result { + Ok(FunctionReport { + sig: receipt.0.to_owned(), + gas: get_l2_gas_used(&receipt.1)?, + }) + } +} + +#[derive(Debug)] +pub struct ContractReport { contract: String, - fns: Vec<(String, u128)>, + functions: Vec, + functions_cached: Vec, } -impl Report { +impl ContractReport { pub fn new(contract: &str) -> Self { - Report { contract: contract.to_owned(), fns: vec![] } + ContractReport { + contract: contract.to_owned(), + functions: vec![], + functions_cached: vec![], + } + } + + pub fn add(mut self, fn_report: FunctionReport) -> eyre::Result { + self.functions.push(fn_report); + Ok(self) } - pub fn add(mut self, receipt: (&str, ArbTxReceipt)) -> eyre::Result { - let gas = get_l2_gas_used(&receipt.1)?; - self.fns.push((receipt.0.to_owned(), gas)); + pub fn add_cached( + mut self, + fn_report: FunctionReport, + ) -> eyre::Result { + self.functions_cached.push(fn_report); Ok(self) } - fn get_longest_signature(&self) -> usize { + fn signature_max_len(&self) -> usize { let prefix_len = self.contract.len() + SEPARATOR.len(); - self.fns + self.functions + .iter() + .map(|FunctionReport { sig: name, .. }| prefix_len + name.len()) + .max() + .unwrap_or_default() + } + + fn gas_max_len(&self) -> usize { + self.functions + .iter() + .map(|FunctionReport { gas, .. }| gas.to_string().len()) + .max() + .unwrap_or_default() + } + + fn gas_cached_max_len(&self) -> usize { + self.functions_cached .iter() - .map(|(sig, _)| prefix_len + sig.len()) + .map(|FunctionReport { gas, .. }| gas.to_string().len()) .max() .unwrap_or_default() } } #[derive(Debug, Default)] -pub struct Reports(Vec); +pub struct BenchmarkReport(Vec); -impl Reports { - pub fn merge_with(mut self, report: Report) -> Self { +impl BenchmarkReport { + pub fn merge_with(mut self, report: ContractReport) -> Self { self.0.push(report); self } -} -impl Display for Reports { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - let reports = &self.0; - let width = reports + pub fn column_width( + &self, + column_value: impl FnMut(&ContractReport) -> usize, + header: &str, + ) -> usize { + self.0 .iter() - .map(Report::get_longest_signature) + .map(column_value) + .chain(std::iter::once(header.len())) .max() - .unwrap_or_default(); + .unwrap_or_default() + } +} + +impl Display for BenchmarkReport { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + const HEADER_SIG: &str = "Contract::function"; + const HEADER_GAS_CACHED: &str = "Cached"; + const HEADER_GAS: &str = "Not Cached"; + + // Calculating the width of table columns. + let width1 = + self.column_width(ContractReport::signature_max_len, HEADER_SIG); + let width2 = self.column_width( + ContractReport::gas_cached_max_len, + HEADER_GAS_CACHED, + ); + let width3 = self.column_width(ContractReport::gas_max_len, HEADER_GAS); - for report in reports { + // Print headers for the table columns. + writeln!( + f, + "| {HEADER_SIG:width2$} | {HEADER_GAS:>width3$} |" + )?; + writeln!( + f, + "| {:->width1$} | {:->width2$} | {:->width3$} |", + "", "", "" + )?; + + // Merging a non-cached gas report with a cached one. + for report in &self.0 { let prefix = format!("{}{SEPARATOR}", report.contract); + let gas: HashMap<_, _> = report + .functions + .iter() + .map(|func| (&*func.sig, func.gas)) + .collect(); + + for report_cached in &report.functions_cached { + let sig = &*report_cached.sig; + let gas_cached = &report_cached.gas; + let gas = gas[sig]; - for (sig, gas) in &report.fns { - let signature = format!("{prefix}{sig}"); - writeln!(f, "{signature:10}")?; + let full_sig = format!("{prefix}{sig}"); + writeln!( + f, + "| {full_sig:width2$} | {gas:>width3$} |" + )?; } } Ok(()) } } + +fn get_l2_gas_used(receipt: &ArbTxReceipt) -> eyre::Result { + let l2_gas = receipt.gas_used; + let arb_fields: ArbOtherFields = receipt.other.deserialize_as()?; + let l1_gas = arb_fields.gas_used_for_l1.to::(); + Ok(l2_gas - l1_gas) +} diff --git a/lib/e2e/src/account.rs b/lib/e2e/src/account.rs index 5e0e9559..83d4cd26 100644 --- a/lib/e2e/src/account.rs +++ b/lib/e2e/src/account.rs @@ -13,6 +13,8 @@ use crate::{ system::{fund_account, Wallet, RPC_URL_ENV_VAR_NAME}, }; +const DEFAULT_FUNDING_ETH: u32 = 100; + /// Type that corresponds to a test account. #[derive(Clone, Debug)] pub struct Account { @@ -23,7 +25,7 @@ pub struct Account { } impl Account { - /// Create a new account. + /// Create a new account with a default funding of [`DEFAULT_FUNDING_ETH`]. /// /// # Errors /// @@ -103,7 +105,7 @@ impl AccountFactory { let signer = PrivateKeySigner::random(); let addr = signer.address(); - fund_account(addr, "100")?; + fund_account(addr, DEFAULT_FUNDING_ETH)?; let rpc_url = std::env::var(RPC_URL_ENV_VAR_NAME) .expect("failed to load RPC_URL var from env") diff --git a/lib/e2e/src/system.rs b/lib/e2e/src/system.rs index aef9ac3e..5d90cd8b 100644 --- a/lib/e2e/src/system.rs +++ b/lib/e2e/src/system.rs @@ -61,7 +61,7 @@ pub fn provider() -> Provider { } /// Send `amount` eth to `address` in the nitro-tesnode. -pub fn fund_account(address: Address, amount: &str) -> eyre::Result<()> { +pub fn fund_account(address: Address, amount: u32) -> eyre::Result<()> { let node_script = get_node_path()?.join("test-node.bash"); if !node_script.exists() { bail!("Test nitro node wasn't setup properly. Try to setup it first with `./scripts/nitro-testnode.sh -i -d`") @@ -73,7 +73,7 @@ pub fn fund_account(address: Address, amount: &str) -> eyre::Result<()> { .arg("--to") .arg(format!("address_{address}")) .arg("--ethamount") - .arg(amount) + .arg(amount.to_string()) .output()?; if !output.status.success() { diff --git a/scripts/bench.sh b/scripts/bench.sh index 8878daec..1801d6c3 100755 --- a/scripts/bench.sh +++ b/scripts/bench.sh @@ -5,9 +5,16 @@ MYDIR=$(realpath "$(dirname "$0")") cd "$MYDIR" cd .. -NIGHTLY_TOOLCHAIN=${NIGHTLY_TOOLCHAIN:-nightly} +NIGHTLY_TOOLCHAIN=${NIGHTLY_TOOLCHAIN:-nightly-2024-01-01} cargo +"$NIGHTLY_TOOLCHAIN" build --release --target wasm32-unknown-unknown -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort export RPC_URL=http://localhost:8547 -cargo run --release -p benches + +# No need to compile benchmarks with `--release` +# since this only runs the benchmarking code and the contracts have already been compiled with `--release` +cargo run -p benches + +echo "NOTE: To measure non cached contract's gas usage correctly, + benchmarks should run on a clean instance of the nitro test node." +echo echo "Finished running benches!" diff --git a/scripts/nitro-testnode.sh b/scripts/nitro-testnode.sh index 815323c2..4e807379 100755 --- a/scripts/nitro-testnode.sh +++ b/scripts/nitro-testnode.sh @@ -18,7 +18,14 @@ do shift ;; -q|--quit) - docker container stop $(docker container ls -q --filter name=nitro-testnode) + NITRO_CONTAINERS=$(docker container ls -q --filter name=nitro-testnode) + + if [ -z "$NITRO_CONTAINERS" ]; then + echo "No nitro-testnode containers running" + else + docker container stop $NITRO_CONTAINERS || exit + fi + exit 0 ;; *) @@ -43,8 +50,8 @@ then git clone --recurse-submodules https://github.com/OffchainLabs/nitro-testnode.git cd ./nitro-testnode || exit - # `release` branch. - git checkout 8cb6b84e31909157d431e7e4af9fb83799443e00 || exit + git pull origin release --recurse-submodules + git checkout d4244cd5c2cb56ca3d11c23478ef9642f8ebf472 || exit ./test-node.bash --no-run --init || exit fi