diff --git a/Cargo.lock b/Cargo.lock index 289ce5a9..7d63b4da 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2804,25 +2804,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "h2" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f44da3a8150a6703ed5d34e164b875fd14c2cdab9af1252a9a1020bde2bdc54" -dependencies = [ - "atomic-waker", - "bytes", - "fnv", - "futures-core", - "futures-sink", - "http 1.4.0", - "indexmap 2.13.0", - "slab", - "tokio", - "tokio-util", - "tracing", -] - [[package]] name = "half" version = "2.7.1" @@ -3003,7 +2984,7 @@ dependencies = [ "futures-channel", "futures-core", "futures-util", - "h2 0.3.27", + "h2", "http 0.2.12", "http-body 0.4.6", "httparse", @@ -3027,7 +3008,6 @@ dependencies = [ "bytes", "futures-channel", "futures-core", - "h2 0.4.13", "http 1.4.0", "http-body 1.0.1", "httparse", @@ -3105,11 +3085,9 @@ dependencies = [ "percent-encoding", "pin-project-lite", "socket2 0.6.2", - "system-configuration 0.7.0", "tokio", "tower-service", "tracing", - "windows-registry", ] [[package]] @@ -3733,11 +3711,10 @@ dependencies = [ [[package]] name = "mpp" -version = "0.5.0" -source = "git+https://github.com/tempoxyz/mpp-rs.git?branch=main#97bebefe1f5e7a72142be12496606c3d0e2aeedb" +version = "0.7.0" +source = "git+https://github.com/tempoxyz/mpp-rs.git?branch=main#04353f380be7a7810db5b3e6c0aa49dbfdb1984d" dependencies = [ "alloy", - "alloy-signer-local", "async-stream", "base64 0.22.1", "futures-core", @@ -3745,7 +3722,6 @@ dependencies = [ "hmac", "rand 0.9.2", "reqwest 0.12.28", - "revm-database-interface 9.0.0", "serde", "serde_json", "serde_json_canonicalizer", @@ -4830,7 +4806,7 @@ dependencies = [ "encoding_rs", "futures-core", "futures-util", - "h2 0.3.27", + "h2", "http 0.2.12", "http-body 0.4.6", "hyper 0.14.32", @@ -4848,7 +4824,7 @@ dependencies = [ "serde_json", "serde_urlencoded", "sync_wrapper 0.1.2", - "system-configuration 0.5.1", + "system-configuration", "tokio", "tokio-rustls 0.24.1", "tokio-util", @@ -4869,10 +4845,8 @@ checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147" dependencies = [ "base64 0.22.1", "bytes", - "encoding_rs", "futures-core", "futures-util", - "h2 0.4.13", "http 1.4.0", "http-body 1.0.1", "http-body-util", @@ -4882,7 +4856,6 @@ dependencies = [ "hyper-util", "js-sys", "log", - "mime", "mime_guess", "native-tls", "percent-encoding", @@ -5107,9 +5080,9 @@ dependencies = [ "op-alloy-consensus", "quanta", "reth-codecs", - "revm-bytecode 9.0.0", + "revm-bytecode", "revm-primitives", - "revm-state 10.0.0", + "revm-state", "secp256k1 0.30.0", "serde", "serde_with", @@ -5211,8 +5184,8 @@ dependencies = [ "reth-primitives-traits", "reth-prune-types", "reth-static-file-types", - "revm-database-interface 10.0.0", - "revm-state 10.0.0", + "revm-database-interface", + "revm-state", "thiserror 2.0.18", ] @@ -5251,29 +5224,17 @@ version = "36.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b0abc15d09cd211e9e73410ada10134069c794d4bcdb787dfc16a1bf0939849c" dependencies = [ - "revm-bytecode 9.0.0", + "revm-bytecode", "revm-context", "revm-context-interface", "revm-database", - "revm-database-interface 10.0.0", + "revm-database-interface", "revm-handler", "revm-inspector", "revm-interpreter", "revm-precompile", "revm-primitives", - "revm-state 10.0.0", -] - -[[package]] -name = "revm-bytecode" -version = "8.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74d1e5c1eaa44d39d537f668bc5c3409dc01e5c8be954da6c83370bbdf006457" -dependencies = [ - "bitvec", - "phf", - "revm-primitives", - "serde", + "revm-state", ] [[package]] @@ -5297,11 +5258,11 @@ dependencies = [ "bitvec", "cfg-if", "derive-where", - "revm-bytecode 9.0.0", + "revm-bytecode", "revm-context-interface", - "revm-database-interface 10.0.0", + "revm-database-interface", "revm-primitives", - "revm-state 10.0.0", + "revm-state", "serde", ] @@ -5315,9 +5276,9 @@ dependencies = [ "alloy-eip7702", "auto_impl", "either", - "revm-database-interface 10.0.0", + "revm-database-interface", "revm-primitives", - "revm-state 10.0.0", + "revm-state", "serde", ] @@ -5328,25 +5289,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c0a7d6da41061f2c50f99a2632571026b23684b5449ff319914151f4449b6c8" dependencies = [ "alloy-eips", - "revm-bytecode 9.0.0", - "revm-database-interface 10.0.0", - "revm-primitives", - "revm-state 10.0.0", - "serde", -] - -[[package]] -name = "revm-database-interface" -version = "9.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7bf93ac5b91347c057610c0d96e923db8c62807e03f036762d03e981feddc1d" -dependencies = [ - "auto_impl", - "either", + "revm-bytecode", + "revm-database-interface", "revm-primitives", - "revm-state 9.0.0", + "revm-state", "serde", - "thiserror 2.0.18", ] [[package]] @@ -5358,7 +5305,7 @@ dependencies = [ "auto_impl", "either", "revm-primitives", - "revm-state 10.0.0", + "revm-state", "serde", "thiserror 2.0.18", ] @@ -5371,14 +5318,14 @@ checksum = "9f1eed729ca9b228ae98688f352235871e9b8be3d568d488e4070f64c56e9d3d" dependencies = [ "auto_impl", "derive-where", - "revm-bytecode 9.0.0", + "revm-bytecode", "revm-context", "revm-context-interface", - "revm-database-interface 10.0.0", + "revm-database-interface", "revm-interpreter", "revm-precompile", "revm-primitives", - "revm-state 10.0.0", + "revm-state", "serde", ] @@ -5391,11 +5338,11 @@ dependencies = [ "auto_impl", "either", "revm-context", - "revm-database-interface 10.0.0", + "revm-database-interface", "revm-handler", "revm-interpreter", "revm-primitives", - "revm-state 10.0.0", + "revm-state", "serde", "serde_json", ] @@ -5406,10 +5353,10 @@ version = "34.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf22f80612bb8f58fd1f578750281f2afadb6c93835b14ae6a4d6b75ca26f445" dependencies = [ - "revm-bytecode 9.0.0", + "revm-bytecode", "revm-context-interface", "revm-primitives", - "revm-state 10.0.0", + "revm-state", "serde", ] @@ -5448,19 +5395,6 @@ dependencies = [ "serde", ] -[[package]] -name = "revm-state" -version = "9.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "311720d4f0f239b041375e7ddafdbd20032a33b7bae718562ea188e188ed9fd3" -dependencies = [ - "alloy-eip7928", - "bitflags 2.11.0", - "revm-bytecode 8.0.0", - "revm-primitives", - "serde", -] - [[package]] name = "revm-state" version = "10.0.0" @@ -5469,7 +5403,7 @@ checksum = "d29404707763da607e5d6e4771cb203998c28159279c2f64cc32de08d2814651" dependencies = [ "alloy-eip7928", "bitflags 2.11.0", - "revm-bytecode 9.0.0", + "revm-bytecode", "revm-primitives", "serde", ] @@ -6424,18 +6358,7 @@ checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" dependencies = [ "bitflags 1.3.2", "core-foundation 0.9.4", - "system-configuration-sys 0.5.0", -] - -[[package]] -name = "system-configuration" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a13f3d0daba03132c0aa9767f98351b3488edc2c100cda2d2ec2b04f3d8d3c8b" -dependencies = [ - "bitflags 2.11.0", - "core-foundation 0.9.4", - "system-configuration-sys 0.6.0", + "system-configuration-sys", ] [[package]] @@ -6448,16 +6371,6 @@ dependencies = [ "libc", ] -[[package]] -name = "system-configuration-sys" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" -dependencies = [ - "core-foundation-sys", - "libc", -] - [[package]] name = "tap" version = "1.0.1" @@ -6525,6 +6438,7 @@ dependencies = [ "serial_test", "sha2", "tempfile", + "tempo-alloy", "tempo-primitives", "thiserror 2.0.18", "time", @@ -7614,17 +7528,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" -[[package]] -name = "windows-registry" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02752bf7fbdcce7f2a27a742f798510f3e5ad88dbe84871e5168e2120c3d5720" -dependencies = [ - "windows-link", - "windows-result", - "windows-strings", -] - [[package]] name = "windows-result" version = "0.4.1" diff --git a/Cargo.toml b/Cargo.toml index ac3ea536..0c361f8d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -47,6 +47,7 @@ serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" sha2 = "0.10" tempfile = "3.27" +tempo-alloy = "1.4" tempo-primitives = { git = "https://github.com/tempoxyz/tempo.git", features = ["serde"] } thiserror = "2.0" time = "0.3" diff --git a/crates/tempo-common/Cargo.toml b/crates/tempo-common/Cargo.toml index 881f67f8..e825ceb6 100644 --- a/crates/tempo-common/Cargo.toml +++ b/crates/tempo-common/Cargo.toml @@ -30,6 +30,7 @@ serde.workspace = true serde_json.workspace = true sha2.workspace = true tempfile.workspace = true +tempo-alloy.workspace = true tempo-primitives.workspace = true thiserror.workspace = true time.workspace = true diff --git a/crates/tempo-common/src/payment/session/tx.rs b/crates/tempo-common/src/payment/session/tx.rs index a9d75fc7..bdfc3199 100644 --- a/crates/tempo-common/src/payment/session/tx.rs +++ b/crates/tempo-common/src/payment/session/tx.rs @@ -10,6 +10,7 @@ use alloy::{ sol, sol_types::SolCall, }; +use tempo_alloy::rpc::TempoTransactionRequest; use tempo_primitives::transaction::Call; use mpp::client::tempo::{charge::tx_builder, signing}; @@ -104,20 +105,26 @@ pub async fn resolve_and_sign_tx_with_fee_payer( // Hold the provisioning-retry signer if we need to rebuild. let provisioning_signer; - let gas_result = tx_builder::estimate_gas( - provider, - from, - chain_id, - nonce, - effective_fee_token, - &calls, - MAX_FEE_PER_GAS, - MAX_PRIORITY_FEE_PER_GAS, - key_auth, - EXPIRING_NONCE_KEY, - valid_before, - ) - .await; + let build_gas_req = |key_auth: Option<&tempo_primitives::transaction::SignedKeyAuthorization>| { + let mut req = TempoTransactionRequest { + calls: calls.clone(), + key_authorization: key_auth.cloned(), + ..Default::default() + } + .with_fee_token(effective_fee_token) + .with_nonce_key(EXPIRING_NONCE_KEY); + if let Some(vb) = valid_before { + req = req.with_valid_before(vb); + } + req.inner.from = Some(from); + req.inner.chain_id = Some(chain_id); + req.inner.nonce = Some(nonce); + req.inner.max_fee_per_gas = Some(MAX_FEE_PER_GAS); + req.inner.max_priority_fee_per_gas = Some(MAX_PRIORITY_FEE_PER_GAS); + req + }; + + let gas_result = tx_builder::estimate_gas(provider, build_gas_req(key_auth)).await; let gas_limit = match gas_result { Ok(gas) => gas, @@ -132,24 +139,12 @@ pub async fn resolve_and_sign_tx_with_fee_payer( })?; effective_wallet = &provisioning_signer; key_auth = effective_wallet.signing_mode.key_authorization(); - tx_builder::estimate_gas( - provider, - from, - chain_id, - nonce, - effective_fee_token, - &calls, - MAX_FEE_PER_GAS, - MAX_PRIORITY_FEE_PER_GAS, - key_auth, - EXPIRING_NONCE_KEY, - valid_before, - ) - .await - .map_err(|_| KeyError::SigningOperationSource { - operation: "estimate gas", - source: Box::new(original), - })? + tx_builder::estimate_gas(provider, build_gas_req(key_auth)) + .await + .map_err(|_| KeyError::SigningOperationSource { + operation: "estimate gas", + source: Box::new(original), + })? } Err(e) => { return Err(KeyError::SigningOperationSource { diff --git a/crates/tempo-request/src/http/client.rs b/crates/tempo-request/src/http/client.rs index 7c355032..d9da8cc8 100644 --- a/crates/tempo-request/src/http/client.rs +++ b/crates/tempo-request/src/http/client.rs @@ -152,8 +152,6 @@ impl HttpClient { if plan.http1_only { builder = builder.http1_only(); - } else if plan.http2 { - builder = builder.http2_adaptive_window(true); } if !plan.headers.is_empty() {