Skip to content

Commit a569a59

Browse files
authored
feat: SVM agents - use the transaction submission URL for polling tx status (#5298)
### Description - context: https://discord.com/channels/935678348330434570/1333035743622336614 - uses the RPC URL used for tx submission (if it's possible) to poll tx status. We use a Helius tx submission URL on solana mainnet so this now uses Helius for polling the status as well ### Drive-by changes <!-- Are there any minor or drive-by changes also included? --> ### Related issues <!-- - Fixes #[issue number here] --> ### Backward compatibility <!-- Are these changes backward compatible? Are there any infrastructure implications, e.g. changes that would prohibit deploying older commits using this infra tooling? Yes/No --> ### Testing <!-- What kind of testing have these changes undergone? None/Manual/Unit Tests -->
1 parent 48573cc commit a569a59

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

rust/main/chains/hyperlane-sealevel/src/mailbox.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -490,17 +490,18 @@ impl Mailbox for SealevelMailbox {
490490

491491
let send_instant = std::time::Instant::now();
492492

493+
let rpc = self.tx_submitter.rpc_client().unwrap_or_else(|| self.rpc());
494+
493495
// Wait for the transaction to be confirmed.
494-
self.rpc().wait_for_transaction_confirmation(&tx).await?;
496+
rpc.wait_for_transaction_confirmation(&tx).await?;
495497

496498
// We expect time_to_confirm to fluctuate depending on the commitment level when submitting the
497499
// tx, but still use it as a proxy for tx latency to help debug.
498500
tracing::info!(?tx, ?signature, time_to_confirm=?send_instant.elapsed(), "Sealevel transaction confirmed");
499501

500502
// TODO: not sure if this actually checks if the transaction was executed / reverted?
501503
// Confirm the transaction.
502-
let executed = self
503-
.rpc()
504+
let executed = rpc
504505
.confirm_transaction_with_commitment(&signature, commitment)
505506
.await
506507
.map_err(|err| warn!("Failed to confirm inbox process transaction: {}", err))

rust/main/chains/hyperlane-sealevel/src/tx_submitter.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ pub trait TransactionSubmitter: Send + Sync {
2424
transaction: &Transaction,
2525
skip_preflight: bool,
2626
) -> ChainResult<Signature>;
27+
28+
fn rpc_client(&self) -> Option<&SealevelRpcClient> {
29+
None
30+
}
2731
}
2832

2933
/// A transaction submitter that uses the vanilla RPC to submit transactions.
@@ -60,6 +64,10 @@ impl TransactionSubmitter for RpcTransactionSubmitter {
6064
.send_transaction(transaction, skip_preflight)
6165
.await
6266
}
67+
68+
fn rpc_client(&self) -> Option<&SealevelRpcClient> {
69+
Some(&self.rpc_client)
70+
}
6371
}
6472

6573
/// A transaction submitter that uses the Jito API to submit transactions.

typescript/infra/config/environments/mainnet3/agent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ const hyperlane: RootAgentConfig = {
671671
rpcConsensusType: RpcConsensusType.Fallback,
672672
docker: {
673673
repo,
674-
tag: 'f6b682c-20250124-144126',
674+
tag: 'a54c98e-20250126-113529',
675675
},
676676
blacklist,
677677
gasPaymentEnforcement: gasPaymentEnforcement,

0 commit comments

Comments
 (0)