Skip to content

Commit 88f8ce9

Browse files
committed
Merge remote-tracking branch 'origin/main' into pbio/sdk-subpaths-and-utils-logging
2 parents 3862aac + 78199f4 commit 88f8ce9

158 files changed

Lines changed: 7750 additions & 1084 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.changeset/ten-apes-smash.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@hyperlane-xyz/sdk': patch
3+
---
4+
5+
Added narrow runtime provider-builder exports for Tron and EVM-like consumers.

.github/workflows/claude-code-review.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ on:
1313
types: [created]
1414

1515
env:
16-
CLAUDE_OPUS_MODEL: claude-opus-4-6
17-
CLAUDE_SONNET_MODEL: claude-sonnet-4-5
16+
CLAUDE_OPUS_MODEL: claude-opus-4-7
17+
CLAUDE_SONNET_MODEL: claude-sonnet-4-6
1818

1919
concurrency:
2020
group: claude-review-${{ github.event.pull_request.number || github.event.issue.number }}

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,9 +321,9 @@ jobs:
321321
webhook: ${{ secrets.SLACK_INCIDENTS_WEBHOOK }}
322322
webhook-type: incoming-webhook
323323
payload: |
324-
text: ":red-siren: NPM package publish failed — see workflow run for details"
324+
text: ":alert: NPM package publish failed — see workflow run for details"
325325
blocks:
326326
- type: "section"
327327
text:
328328
type: "mrkdwn"
329-
text: ":red-siren: *NPM package publish failed*\n<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View workflow run #${{ github.run_number }}>"
329+
text: ":alert: *NPM package publish failed*\n<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View workflow run #${{ github.run_number }}>"

.github/workflows/test-cli-e2e.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ jobs:
4444
test:
4545
- core-deploy
4646
- warp-deploy-1
47+
- warp-deploy-predicate
4748
- warp-apply-simple-updates
49+
- warp-apply-predicate-updates
4850
- warp-check-1
4951
- warp-send
5052
steps:
@@ -90,6 +92,7 @@ jobs:
9092
- warp-apply-hook-updates
9193
- warp-apply-ism-updates
9294
- warp-apply-ownership-updates
95+
- warp-apply-predicate-updates
9396
- warp-apply-rebalancing-config
9497
- warp-apply-simple-updates
9598
- warp-apply-submitters
@@ -102,6 +105,7 @@ jobs:
102105
- warp-bridge-2
103106
- warp-deploy-1
104107
- warp-deploy-2
108+
- warp-deploy-predicate
105109
- warp-deploy-remote-routers
106110
# check
107111
- warp-check-1
@@ -115,6 +119,7 @@ jobs:
115119
- warp-read
116120
- warp-rebalancer
117121
- warp-send
122+
- warp-send-predicate
118123
# xerc20
119124
- xerc20
120125
steps:

.husky/pre-commit

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,21 @@ if [ "$GITHUB_ACTIONS" != "true" ]; then
1818
echo "Please remove any secrets, credentials, or sensitive information before committing."
1919
exit 1
2020
fi
21+
22+
# Broad private key check on staged diff. May produce false positives — set SKIP_KEY_CHECK=1 to bypass if intentional.
23+
if [ "$SKIP_KEY_CHECK" != "1" ]; then
24+
STAGED_DIFF=$(git diff --cached | awk '/^\+\+\+ b\// { file=substr($0,7) } /^\+[^+]/ { print file ":" $0 }')
25+
EVM_MATCHES=$(echo "$STAGED_DIFF" | grep -E '\b(0x)?[0-9a-fA-F]{64}\b' || true)
26+
BASE58_MATCHES=$(echo "$STAGED_DIFF" | grep -E '\b[1-9A-HJ-NP-Za-km-z]{87,88}\b' || true)
27+
CLI_MATCHES=$(echo "$STAGED_DIFF" | grep -E '\[(\s*[0-9]{1,3}\s*,\s*){63}[0-9]{1,3}\s*\]' || true)
28+
ALL_MATCHES=$(printf '%s\n%s\n%s' "$EVM_MATCHES" "$BASE58_MATCHES" "$CLI_MATCHES" | sed '/^$/d')
29+
if [ -n "$ALL_MATCHES" ]; then
30+
echo "⚠️ Possible private key detected in staged changes."
31+
echo "$ALL_MATCHES"
32+
echo " If this is a non-sensitive value (e.g. tx hash), re-run with: SKIP_KEY_CHECK=1 git commit"
33+
exit 1
34+
fi
35+
fi
2136
fi
2237

2338
pnpm lint-staged --concurrent false

.registryrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
a0953ebb7ba67657cb61816d416a8d6780dae9a6
1+
1b6c789d66582d0a33e7880a45aa9f418d1502f5

rust/main/agents/relayer/src/msg/metadata/base_builder.rs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use hyperlane_base::{
1919
use hyperlane_core::{
2020
accumulator::merkle::Proof, AggregationIsm, CcipReadIsm, Checkpoint, HyperlaneDomain,
2121
HyperlaneMessage, InterchainSecurityModule, ModuleType, MultisigIsm, RoutingIsm,
22-
ValidatorAnnounce, H160, H256,
22+
ValidatorAnnounce, H160, H256, H512,
2323
};
2424

2525
use crate::msg::metadata::base_builder::validator_announced_storages::fetch_storage_locations_helper;
@@ -85,6 +85,10 @@ pub trait BuildsBaseMetadata: Send + Sync + Debug {
8585
async fn highest_known_leaf_index(&self) -> Option<u32>;
8686
async fn get_merkle_leaf_id_by_message_id(&self, message_id: H256)
8787
-> eyre::Result<Option<u32>>;
88+
async fn retrieve_origin_tx_hash_by_message_id(
89+
&self,
90+
message_id: H256,
91+
) -> eyre::Result<Option<H512>>;
8892
async fn build_ism(&self, address: H256) -> eyre::Result<Box<dyn InterchainSecurityModule>>;
8993
async fn build_routing_ism(&self, address: H256) -> eyre::Result<Box<dyn RoutingIsm>>;
9094
async fn build_multisig_ism(&self, address: H256) -> eyre::Result<Box<dyn MultisigIsm>>;
@@ -172,6 +176,15 @@ impl BuildsBaseMetadata for BaseMetadataBuilder {
172176
Ok(merkle_leaf)
173177
}
174178

179+
async fn retrieve_origin_tx_hash_by_message_id(
180+
&self,
181+
message_id: H256,
182+
) -> eyre::Result<Option<H512>> {
183+
Ok(self
184+
.db
185+
.retrieve_dispatched_tx_hash_by_message_id(&message_id)?)
186+
}
187+
175188
async fn build_ism(&self, address: H256) -> eyre::Result<Box<dyn InterchainSecurityModule>> {
176189
self.destination_chain_setup
177190
.build_ism(address, &self.metrics)

rust/main/agents/relayer/src/msg/metadata/ccip_read/mod.rs

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ use sha3::{digest::Update, Digest, Keccak256};
1515
use tracing::{info, instrument, warn};
1616

1717
use hyperlane_core::{
18-
utils::bytes_to_hex, CcipReadIsm, HyperlaneMessage, HyperlaneSignerExt, Metadata, ModuleType,
19-
RawHyperlaneMessage, Signable, H160, H256,
18+
h512_to_bytes, utils::bytes_to_hex, CcipReadIsm, HyperlaneMessage, HyperlaneSignerExt,
19+
Metadata, ModuleType, RawHyperlaneMessage, Signable, H160, H256,
2020
};
2121
use hyperlane_ethereum::{OffchainLookup, Signers};
2222

@@ -37,6 +37,7 @@ struct OffchainLookupRequestBody {
3737
pub data: String,
3838
pub sender: String,
3939
pub signature: Option<String>,
40+
pub origin_tx_hash: Option<String>,
4041
}
4142

4243
#[derive(Serialize, Deserialize)]
@@ -223,6 +224,24 @@ async fn metadata_build(
223224
.call_get_offchain_verify_info(ism, message)
224225
.await?;
225226

227+
let origin_tx_hash = ism_builder
228+
.base
229+
.base_builder()
230+
.retrieve_origin_tx_hash_by_message_id(message.id())
231+
.await
232+
.map_err(|err| {
233+
warn!(error = %err, "Error retrieving origin tx hash for message {:?}", message.id());
234+
})
235+
.ok()
236+
.flatten()
237+
.map(|h| bytes_to_hex(&h512_to_bytes(&h)));
238+
tracing::debug!(
239+
message_id = ?message.id(),
240+
origin_tx_hash = ?origin_tx_hash,
241+
found_in_db = origin_tx_hash.is_some(),
242+
"Origin tx hash lookup result",
243+
);
244+
226245
let ccip_url_regex = create_ccip_url_regex();
227246

228247
for url in info.urls.iter() {
@@ -232,7 +251,7 @@ async fn metadata_build(
232251
}
233252

234253
// if we fail, we want to try the other urls
235-
match fetch_offchain_data(ism_builder, &info, url).await {
254+
match fetch_offchain_data(ism_builder, &info, url, origin_tx_hash.clone()).await {
236255
Ok(data) => return Ok(data),
237256
Err(err) => {
238257
tracing::warn!(?ism_address, url, ?err, "Failed to fetch offchain data");
@@ -250,6 +269,7 @@ async fn fetch_offchain_data(
250269
ism_builder: &CcipReadIsmMetadataBuilder,
251270
info: &OffchainLookup,
252271
url: &str,
272+
origin_tx_hash: Option<String>,
253273
) -> Result<Metadata, MetadataBuildError> {
254274
// Compute relayer authentication signature via EIP-191
255275
let maybe_signature_hex = if let Some(signer) = ism_builder.base.base_builder().get_signer() {
@@ -271,7 +291,13 @@ async fn fetch_offchain_data(
271291
sender: sender_as_bytes,
272292
data: data_as_bytes,
273293
signature: maybe_signature_hex,
294+
origin_tx_hash,
274295
};
296+
tracing::debug!(
297+
url = interpolated_url,
298+
?body,
299+
"Sending POST request to offchain lookup server"
300+
);
275301
Client::new()
276302
.request(Method::POST, interpolated_url)
277303
.header(CONTENT_TYPE, "application/json")
@@ -301,6 +327,10 @@ async fn fetch_offchain_data(
301327
let error_msg = format!("Failed to read offchain lookup server response: ({err})");
302328
MetadataBuildError::FailedToBuild(error_msg)
303329
})?;
330+
tracing::debug!(
331+
response = response_body,
332+
"Received response from offchain lookup server"
333+
);
304334
let json: OffchainResponse = serde_json::from_str(&response_body).map_err(|err| {
305335
let error_msg = format!(
306336
"Failed to parse offchain lookup server json response: ({err}) ({response_body})"

rust/main/agents/relayer/src/test_utils/mock_base_builder.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use hyperlane_base::{
1010
};
1111
use hyperlane_core::{
1212
accumulator::merkle::Proof, AggregationIsm, CcipReadIsm, Checkpoint, HyperlaneDomain,
13-
HyperlaneMessage, InterchainSecurityModule, Mailbox, MultisigIsm, RoutingIsm, H256,
13+
HyperlaneMessage, InterchainSecurityModule, Mailbox, MultisigIsm, RoutingIsm, H256, H512,
1414
};
1515
use hyperlane_ethereum::Signers;
1616
use hyperlane_test::mocks::MockMailboxContract;
@@ -191,6 +191,12 @@ impl BuildsBaseMetadata for MockBaseMetadataBuilder {
191191
.pop_front()
192192
.expect("No mock get_merkle_leaf_id_by_message_id response set")
193193
}
194+
async fn retrieve_origin_tx_hash_by_message_id(
195+
&self,
196+
_message_id: H256,
197+
) -> eyre::Result<Option<H512>> {
198+
Ok(None)
199+
}
194200
async fn build_ism(&self, address: H256) -> eyre::Result<Box<dyn InterchainSecurityModule>> {
195201
self.responses
196202
.build_ism

rust/main/app-contexts/mainnet_config.json

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42215,6 +42215,136 @@
4221542215
}
4221642216
]
4221742217
},
42218+
{
42219+
"name": "USDT/oft",
42220+
"matchingList": [
42221+
{
42222+
"originDomain": 42161,
42223+
"senderAddress": [
42224+
"0x000000000000000000000000e4c1a1e54c232454311cf68610c3885fdd991c0e"
42225+
],
42226+
"destinationDomain": 1,
42227+
"recipientAddress": [
42228+
"0x0000000000000000000000007bb4fe8f406fb7b22487fa2e3bcbcb6a38cf29e6"
42229+
]
42230+
},
42231+
{
42232+
"originDomain": 42161,
42233+
"senderAddress": [
42234+
"0x000000000000000000000000e4c1a1e54c232454311cf68610c3885fdd991c0e"
42235+
],
42236+
"destinationDomain": 9745,
42237+
"recipientAddress": [
42238+
"0x00000000000000000000000093bffa2231fba5029997603fb68d9ac08024baa2"
42239+
]
42240+
},
42241+
{
42242+
"originDomain": 1,
42243+
"senderAddress": [
42244+
"0x0000000000000000000000007bb4fe8f406fb7b22487fa2e3bcbcb6a38cf29e6"
42245+
],
42246+
"destinationDomain": 42161,
42247+
"recipientAddress": [
42248+
"0x000000000000000000000000e4c1a1e54c232454311cf68610c3885fdd991c0e"
42249+
]
42250+
},
42251+
{
42252+
"originDomain": 1,
42253+
"senderAddress": [
42254+
"0x0000000000000000000000007bb4fe8f406fb7b22487fa2e3bcbcb6a38cf29e6"
42255+
],
42256+
"destinationDomain": 9745,
42257+
"recipientAddress": [
42258+
"0x00000000000000000000000093bffa2231fba5029997603fb68d9ac08024baa2"
42259+
]
42260+
},
42261+
{
42262+
"originDomain": 9745,
42263+
"senderAddress": [
42264+
"0x00000000000000000000000093bffa2231fba5029997603fb68d9ac08024baa2"
42265+
],
42266+
"destinationDomain": 42161,
42267+
"recipientAddress": [
42268+
"0x000000000000000000000000e4c1a1e54c232454311cf68610c3885fdd991c0e"
42269+
]
42270+
},
42271+
{
42272+
"originDomain": 9745,
42273+
"senderAddress": [
42274+
"0x00000000000000000000000093bffa2231fba5029997603fb68d9ac08024baa2"
42275+
],
42276+
"destinationDomain": 1,
42277+
"recipientAddress": [
42278+
"0x0000000000000000000000007bb4fe8f406fb7b22487fa2e3bcbcb6a38cf29e6"
42279+
]
42280+
}
42281+
]
42282+
},
42283+
{
42284+
"name": "USDT/oft-legacy",
42285+
"matchingList": [
42286+
{
42287+
"originDomain": 42161,
42288+
"senderAddress": [
42289+
"0x0000000000000000000000009323793fb9a071ce5fe839079925c0e39f37170f"
42290+
],
42291+
"destinationDomain": 1,
42292+
"recipientAddress": [
42293+
"0x000000000000000000000000c0da8ef1225145e0b720d8a33471fa6360b7e73b"
42294+
]
42295+
},
42296+
{
42297+
"originDomain": 42161,
42298+
"senderAddress": [
42299+
"0x0000000000000000000000009323793fb9a071ce5fe839079925c0e39f37170f"
42300+
],
42301+
"destinationDomain": 728126428,
42302+
"recipientAddress": [
42303+
"0x00000000000000000000000043bb7c9c64a05af94d67b52883a60756950058d7"
42304+
]
42305+
},
42306+
{
42307+
"originDomain": 1,
42308+
"senderAddress": [
42309+
"0x000000000000000000000000c0da8ef1225145e0b720d8a33471fa6360b7e73b"
42310+
],
42311+
"destinationDomain": 42161,
42312+
"recipientAddress": [
42313+
"0x0000000000000000000000009323793fb9a071ce5fe839079925c0e39f37170f"
42314+
]
42315+
},
42316+
{
42317+
"originDomain": 1,
42318+
"senderAddress": [
42319+
"0x000000000000000000000000c0da8ef1225145e0b720d8a33471fa6360b7e73b"
42320+
],
42321+
"destinationDomain": 728126428,
42322+
"recipientAddress": [
42323+
"0x00000000000000000000000043bb7c9c64a05af94d67b52883a60756950058d7"
42324+
]
42325+
},
42326+
{
42327+
"originDomain": 728126428,
42328+
"senderAddress": [
42329+
"0x00000000000000000000000043bb7c9c64a05af94d67b52883a60756950058d7"
42330+
],
42331+
"destinationDomain": 42161,
42332+
"recipientAddress": [
42333+
"0x0000000000000000000000009323793fb9a071ce5fe839079925c0e39f37170f"
42334+
]
42335+
},
42336+
{
42337+
"originDomain": 728126428,
42338+
"senderAddress": [
42339+
"0x00000000000000000000000043bb7c9c64a05af94d67b52883a60756950058d7"
42340+
],
42341+
"destinationDomain": 1,
42342+
"recipientAddress": [
42343+
"0x000000000000000000000000c0da8ef1225145e0b720d8a33471fa6360b7e73b"
42344+
]
42345+
}
42346+
]
42347+
},
4221842348
{
4221942349
"name": "RISE/bsc-ethereum",
4222042350
"matchingList": [

0 commit comments

Comments
 (0)