From e529387f4e34285494a50b22bd9bb93a3f8b3695 Mon Sep 17 00:00:00 2001 From: David Salami <31099392+Wizdave97@users.noreply.github.com> Date: Sat, 15 Jun 2024 12:23:49 +0100 Subject: [PATCH] Tesseract stability improvements (#238) --- Cargo.lock | 44 +++++++++++++++++----------------- Cargo.toml | 8 +++---- tesseract/evm/src/lib.rs | 3 ++- tesseract/messaging/src/lib.rs | 3 ++- tesseract/relayer/Cargo.toml | 2 +- 5 files changed, 31 insertions(+), 29 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5f7fb5b83..afd23a82e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4343,7 +4343,7 @@ dependencies = [ [[package]] name = "ethers" version = "2.0.8" -source = "git+https://github.com/polytope-labs/ethers-rs?rev=a61f4fd78cd9a417c74a1609e5007e17f0f0ebb4#a61f4fd78cd9a417c74a1609e5007e17f0f0ebb4" +source = "git+https://github.com/polytope-labs/ethers-rs?rev=45239225c50247e049892125d281442c084a2a92#45239225c50247e049892125d281442c084a2a92" dependencies = [ "ethers-addressbook", "ethers-contract", @@ -4358,7 +4358,7 @@ dependencies = [ [[package]] name = "ethers-addressbook" version = "2.0.8" -source = "git+https://github.com/polytope-labs/ethers-rs?rev=a61f4fd78cd9a417c74a1609e5007e17f0f0ebb4#a61f4fd78cd9a417c74a1609e5007e17f0f0ebb4" +source = "git+https://github.com/polytope-labs/ethers-rs?rev=45239225c50247e049892125d281442c084a2a92#45239225c50247e049892125d281442c084a2a92" dependencies = [ "ethers-core", "once_cell", @@ -4369,7 +4369,7 @@ dependencies = [ [[package]] name = "ethers-contract" version = "2.0.8" -source = "git+https://github.com/polytope-labs/ethers-rs?rev=a61f4fd78cd9a417c74a1609e5007e17f0f0ebb4#a61f4fd78cd9a417c74a1609e5007e17f0f0ebb4" +source = "git+https://github.com/polytope-labs/ethers-rs?rev=45239225c50247e049892125d281442c084a2a92#45239225c50247e049892125d281442c084a2a92" dependencies = [ "ethers-contract-abigen", "ethers-contract-derive", @@ -4388,7 +4388,7 @@ dependencies = [ [[package]] name = "ethers-contract-abigen" version = "2.0.8" -source = "git+https://github.com/polytope-labs/ethers-rs?rev=a61f4fd78cd9a417c74a1609e5007e17f0f0ebb4#a61f4fd78cd9a417c74a1609e5007e17f0f0ebb4" +source = "git+https://github.com/polytope-labs/ethers-rs?rev=45239225c50247e049892125d281442c084a2a92#45239225c50247e049892125d281442c084a2a92" dependencies = [ "Inflector", "dunce", @@ -4411,7 +4411,7 @@ dependencies = [ [[package]] name = "ethers-contract-derive" version = "2.0.8" -source = "git+https://github.com/polytope-labs/ethers-rs?rev=a61f4fd78cd9a417c74a1609e5007e17f0f0ebb4#a61f4fd78cd9a417c74a1609e5007e17f0f0ebb4" +source = "git+https://github.com/polytope-labs/ethers-rs?rev=45239225c50247e049892125d281442c084a2a92#45239225c50247e049892125d281442c084a2a92" dependencies = [ "Inflector", "ethers-contract-abigen", @@ -4426,7 +4426,7 @@ dependencies = [ [[package]] name = "ethers-core" version = "2.0.8" -source = "git+https://github.com/polytope-labs/ethers-rs?rev=a61f4fd78cd9a417c74a1609e5007e17f0f0ebb4#a61f4fd78cd9a417c74a1609e5007e17f0f0ebb4" +source = "git+https://github.com/polytope-labs/ethers-rs?rev=45239225c50247e049892125d281442c084a2a92#45239225c50247e049892125d281442c084a2a92" dependencies = [ "arrayvec 0.7.4", "bytes", @@ -4455,7 +4455,7 @@ dependencies = [ [[package]] name = "ethers-etherscan" version = "2.0.8" -source = "git+https://github.com/polytope-labs/ethers-rs?rev=a61f4fd78cd9a417c74a1609e5007e17f0f0ebb4#a61f4fd78cd9a417c74a1609e5007e17f0f0ebb4" +source = "git+https://github.com/polytope-labs/ethers-rs?rev=45239225c50247e049892125d281442c084a2a92#45239225c50247e049892125d281442c084a2a92" dependencies = [ "ethers-core", "ethers-solc", @@ -4470,7 +4470,7 @@ dependencies = [ [[package]] name = "ethers-middleware" version = "2.0.8" -source = "git+https://github.com/polytope-labs/ethers-rs?rev=a61f4fd78cd9a417c74a1609e5007e17f0f0ebb4#a61f4fd78cd9a417c74a1609e5007e17f0f0ebb4" +source = "git+https://github.com/polytope-labs/ethers-rs?rev=45239225c50247e049892125d281442c084a2a92#45239225c50247e049892125d281442c084a2a92" dependencies = [ "async-trait", "auto_impl", @@ -4496,7 +4496,7 @@ dependencies = [ [[package]] name = "ethers-providers" version = "2.0.8" -source = "git+https://github.com/polytope-labs/ethers-rs?rev=a61f4fd78cd9a417c74a1609e5007e17f0f0ebb4#a61f4fd78cd9a417c74a1609e5007e17f0f0ebb4" +source = "git+https://github.com/polytope-labs/ethers-rs?rev=45239225c50247e049892125d281442c084a2a92#45239225c50247e049892125d281442c084a2a92" dependencies = [ "anyhow", "async-trait", @@ -4535,7 +4535,7 @@ dependencies = [ [[package]] name = "ethers-signers" version = "2.0.8" -source = "git+https://github.com/polytope-labs/ethers-rs?rev=a61f4fd78cd9a417c74a1609e5007e17f0f0ebb4#a61f4fd78cd9a417c74a1609e5007e17f0f0ebb4" +source = "git+https://github.com/polytope-labs/ethers-rs?rev=45239225c50247e049892125d281442c084a2a92#45239225c50247e049892125d281442c084a2a92" dependencies = [ "async-trait", "coins-bip32", @@ -4553,7 +4553,7 @@ dependencies = [ [[package]] name = "ethers-solc" version = "2.0.8" -source = "git+https://github.com/polytope-labs/ethers-rs?rev=a61f4fd78cd9a417c74a1609e5007e17f0f0ebb4#a61f4fd78cd9a417c74a1609e5007e17f0f0ebb4" +source = "git+https://github.com/polytope-labs/ethers-rs?rev=45239225c50247e049892125d281442c084a2a92#45239225c50247e049892125d281442c084a2a92" dependencies = [ "cfg-if", "dirs", @@ -4986,7 +4986,7 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "forge" version = "0.2.0" -source = "git+https://github.com/polytope-labs/foundry?rev=521813b3ebaf1aa05055d1780b555f9001071514#521813b3ebaf1aa05055d1780b555f9001071514" +source = "git+https://github.com/polytope-labs/foundry?rev=1db7f747d7033a760c747fabbeef706576c88e34#1db7f747d7033a760c747fabbeef706576c88e34" dependencies = [ "comfy-table 6.2.0", "ethers", @@ -5015,7 +5015,7 @@ dependencies = [ [[package]] name = "forge-fmt" version = "0.2.0" -source = "git+https://github.com/polytope-labs/foundry?rev=521813b3ebaf1aa05055d1780b555f9001071514#521813b3ebaf1aa05055d1780b555f9001071514" +source = "git+https://github.com/polytope-labs/foundry?rev=1db7f747d7033a760c747fabbeef706576c88e34#1db7f747d7033a760c747fabbeef706576c88e34" dependencies = [ "ariadne", "ethers-core", @@ -5030,7 +5030,7 @@ dependencies = [ [[package]] name = "forge-testsuite" version = "0.1.0" -source = "git+https://github.com/polytope-labs/forge-testsuite?rev=9a4e82498e60b6c90c09be1685dfc80bca057fc2#9a4e82498e60b6c90c09be1685dfc80bca057fc2" +source = "git+https://github.com/polytope-labs/forge-testsuite?rev=ff9fdc69c0200e3bb471198aa44ba933e043b78d#ff9fdc69c0200e3bb471198aa44ba933e043b78d" dependencies = [ "ethers", "ethers-solc", @@ -5073,7 +5073,7 @@ dependencies = [ [[package]] name = "foundry-abi" version = "0.1.0" -source = "git+https://github.com/polytope-labs/foundry?rev=521813b3ebaf1aa05055d1780b555f9001071514#521813b3ebaf1aa05055d1780b555f9001071514" +source = "git+https://github.com/polytope-labs/foundry?rev=1db7f747d7033a760c747fabbeef706576c88e34#1db7f747d7033a760c747fabbeef706576c88e34" dependencies = [ "ethers-contract", "ethers-contract-abigen", @@ -5087,7 +5087,7 @@ dependencies = [ [[package]] name = "foundry-common" version = "0.1.0" -source = "git+https://github.com/polytope-labs/foundry?rev=521813b3ebaf1aa05055d1780b555f9001071514#521813b3ebaf1aa05055d1780b555f9001071514" +source = "git+https://github.com/polytope-labs/foundry?rev=1db7f747d7033a760c747fabbeef706576c88e34#1db7f747d7033a760c747fabbeef706576c88e34" dependencies = [ "auto_impl", "clap", @@ -5118,7 +5118,7 @@ dependencies = [ [[package]] name = "foundry-config" version = "0.2.0" -source = "git+https://github.com/polytope-labs/foundry?rev=521813b3ebaf1aa05055d1780b555f9001071514#521813b3ebaf1aa05055d1780b555f9001071514" +source = "git+https://github.com/polytope-labs/foundry?rev=1db7f747d7033a760c747fabbeef706576c88e34#1db7f747d7033a760c747fabbeef706576c88e34" dependencies = [ "Inflector", "dirs-next", @@ -5148,7 +5148,7 @@ dependencies = [ [[package]] name = "foundry-evm" version = "0.2.0" -source = "git+https://github.com/polytope-labs/foundry?rev=521813b3ebaf1aa05055d1780b555f9001071514#521813b3ebaf1aa05055d1780b555f9001071514" +source = "git+https://github.com/polytope-labs/foundry?rev=1db7f747d7033a760c747fabbeef706576c88e34#1db7f747d7033a760c747fabbeef706576c88e34" dependencies = [ "auto_impl", "bytes", @@ -5183,7 +5183,7 @@ dependencies = [ [[package]] name = "foundry-macros" version = "0.2.0" -source = "git+https://github.com/polytope-labs/foundry?rev=521813b3ebaf1aa05055d1780b555f9001071514#521813b3ebaf1aa05055d1780b555f9001071514" +source = "git+https://github.com/polytope-labs/foundry?rev=1db7f747d7033a760c747fabbeef706576c88e34#1db7f747d7033a760c747fabbeef706576c88e34" dependencies = [ "ethers-core", "foundry-macros-impl", @@ -5194,7 +5194,7 @@ dependencies = [ [[package]] name = "foundry-macros-impl" version = "0.0.0" -source = "git+https://github.com/polytope-labs/foundry?rev=521813b3ebaf1aa05055d1780b555f9001071514#521813b3ebaf1aa05055d1780b555f9001071514" +source = "git+https://github.com/polytope-labs/foundry?rev=1db7f747d7033a760c747fabbeef706576c88e34#1db7f747d7033a760c747fabbeef706576c88e34" dependencies = [ "proc-macro2", "quote", @@ -5204,7 +5204,7 @@ dependencies = [ [[package]] name = "foundry-utils" version = "0.2.0" -source = "git+https://github.com/polytope-labs/foundry?rev=521813b3ebaf1aa05055d1780b555f9001071514#521813b3ebaf1aa05055d1780b555f9001071514" +source = "git+https://github.com/polytope-labs/foundry?rev=1db7f747d7033a760c747fabbeef706576c88e34#1db7f747d7033a760c747fabbeef706576c88e34" dependencies = [ "dunce", "ethers-addressbook", @@ -20381,7 +20381,7 @@ checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "tesseract" -version = "0.3.3" +version = "0.3.4" dependencies = [ "anyhow", "async-trait", diff --git a/Cargo.toml b/Cargo.toml index 1faa5bcad..8b1249b55 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -304,21 +304,21 @@ features = [ [workspace.dependencies.ethers] git = "https://github.com/polytope-labs/ethers-rs" -rev = "a61f4fd78cd9a417c74a1609e5007e17f0f0ebb4" +rev = "45239225c50247e049892125d281442c084a2a92" features = ["ethers-solc"] default-features = false [workspace.dependencies.ethers-contract-abigen] git = "https://github.com/polytope-labs/ethers-rs" -rev = "a61f4fd78cd9a417c74a1609e5007e17f0f0ebb4" +rev = "45239225c50247e049892125d281442c084a2a92" [workspace.dependencies.forge-testsuite] git = "https://github.com/polytope-labs/forge-testsuite" -rev = "9a4e82498e60b6c90c09be1685dfc80bca057fc2" +rev = "ff9fdc69c0200e3bb471198aa44ba933e043b78d" [workspace.dependencies.foundry-evm] git = "https://github.com/polytope-labs/foundry" -rev = "521813b3ebaf1aa05055d1780b555f9001071514" +rev = "1db7f747d7033a760c747fabbeef706576c88e34" [workspace.dependencies.merkle-mountain-range] package = "ckb-merkle-mountain-range" diff --git a/tesseract/evm/src/lib.rs b/tesseract/evm/src/lib.rs index fae1af1db..25d5aecbb 100644 --- a/tesseract/evm/src/lib.rs +++ b/tesseract/evm/src/lib.rs @@ -22,7 +22,7 @@ use evm_common::presets::{ use ismp_solidity_abi::shared_types::{StateCommitment, StateMachineHeight}; use serde::{Deserialize, Serialize}; use sp_core::{bytes::from_hex, keccak_256, Pair, H160}; -use std::sync::Arc; +use std::{sync::Arc, time::Duration}; use tesseract_primitives::IsmpProvider; pub mod abi; @@ -127,6 +127,7 @@ impl EvmClient { let http_client = Http::new_client_with_chain_middleware( config.rpc_urls.into_iter().map(|url| url.parse()).collect::>()?, + Some(Duration::from_secs(180)), ); let provider = Provider::new(http_client); let client = Arc::new(provider.clone()); diff --git a/tesseract/messaging/src/lib.rs b/tesseract/messaging/src/lib.rs index 73ce3ee2d..b20bcd40d 100644 --- a/tesseract/messaging/src/lib.rs +++ b/tesseract/messaging/src/lib.rs @@ -320,7 +320,8 @@ async fn handle_update( } } }, - Err(err) => tracing::error!("Failed to submit transaction to {state_machine}: {err:?}"), + Err(err) => + tracing::error!("Failed to submit transaction to {}: {err:?}", chain_a.name()), } } diff --git a/tesseract/relayer/Cargo.toml b/tesseract/relayer/Cargo.toml index ee26c110d..aa05657bb 100644 --- a/tesseract/relayer/Cargo.toml +++ b/tesseract/relayer/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tesseract" -version = "0.3.3" +version = "0.3.4" edition = "2021" description = "Chain agnostic relayer implementation for Hyperbridge" authors = ["Polytope Labs "]