From ba2ac2479a8625a6b441cf06cff9c73c5d703a60 Mon Sep 17 00:00:00 2001 From: Daniel Savu <23065004+daniel-savu@users.noreply.github.com> Date: Fri, 10 Jan 2025 10:56:34 +0000 Subject: [PATCH] fix: svm gas price multipliers, relayer image (#5140) ### Description ### Drive-by changes ### Related issues ### Backward compatibility ### Testing --- .../chains/hyperlane-sealevel/src/rpc/client.rs | 17 ++++++++++++++--- .../infra/config/environments/mainnet3/agent.ts | 4 ++-- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/rust/main/chains/hyperlane-sealevel/src/rpc/client.rs b/rust/main/chains/hyperlane-sealevel/src/rpc/client.rs index 22b44497c8..b1ae47de11 100644 --- a/rust/main/chains/hyperlane-sealevel/src/rpc/client.rs +++ b/rust/main/chains/hyperlane-sealevel/src/rpc/client.rs @@ -33,6 +33,12 @@ use crate::{ tx_submitter::TransactionSubmitter, }; +const COMPUTE_UNIT_MULTIPLIER_NUMERATOR: u32 = 11; +const COMPUTE_UNIT_MULTIPLIER_DENOMINATOR: u32 = 10; + +const PRIORITY_FEE_MULTIPLIER_NUMERATOR: u64 = 125; +const PRIORITY_FEE_MULTIPLIER_DENOMINATOR: u64 = 100; + pub struct SealevelTxCostEstimate { compute_units: u32, compute_unit_price_micro_lamports: u64, @@ -389,11 +395,16 @@ impl SealevelRpcClient { )); } - // Bump the compute units by 10% to ensure we have enough, but cap it at the max. - let simulation_compute_units = - Self::MAX_COMPUTE_UNITS.min((simulation_compute_units * 11) / 10); + // Bump the compute units to be conservative + let simulation_compute_units = Self::MAX_COMPUTE_UNITS.min( + (simulation_compute_units * COMPUTE_UNIT_MULTIPLIER_NUMERATOR) + / COMPUTE_UNIT_MULTIPLIER_DENOMINATOR, + ); let priority_fee = priority_fee_oracle.get_priority_fee(&simulation_tx).await?; + // Bump the priority fee to be conservative + let priority_fee = (priority_fee * PRIORITY_FEE_MULTIPLIER_NUMERATOR) + / PRIORITY_FEE_MULTIPLIER_DENOMINATOR; Ok(SealevelTxCostEstimate { compute_units: simulation_compute_units, diff --git a/typescript/infra/config/environments/mainnet3/agent.ts b/typescript/infra/config/environments/mainnet3/agent.ts index 29db8dcb68..cb3ef7eb59 100644 --- a/typescript/infra/config/environments/mainnet3/agent.ts +++ b/typescript/infra/config/environments/mainnet3/agent.ts @@ -630,7 +630,7 @@ const hyperlane: RootAgentConfig = { rpcConsensusType: RpcConsensusType.Fallback, docker: { repo, - tag: '286b4de-20250108-194715', + tag: 'df9c1ed-20250109-151923', }, blacklist, gasPaymentEnforcement: gasPaymentEnforcement, @@ -665,7 +665,7 @@ const releaseCandidate: RootAgentConfig = { rpcConsensusType: RpcConsensusType.Fallback, docker: { repo, - tag: '234704d-20241226-192528', + tag: 'df9c1ed-20250109-151923', }, blacklist, // We're temporarily (ab)using the RC relayer as a way to increase