Skip to content

Commit

Permalink
Merge branch 'hyperlane-xyz:main' into mg/ignore-chain-checking-depen…
Browse files Browse the repository at this point in the history
…ding-operator-chain
  • Loading branch information
maximegris authored Dec 19, 2024
2 parents 18ee2b5 + 0e83758 commit 59c76a4
Show file tree
Hide file tree
Showing 214 changed files with 7,766 additions and 1,823 deletions.
8 changes: 8 additions & 0 deletions .changeset/big-squids-serve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@hyperlane-xyz/helloworld': patch
'@hyperlane-xyz/widgets': patch
'@hyperlane-xyz/cli': patch
'@hyperlane-xyz/sdk': patch
---

Bump registry version to v6.3.0.
5 changes: 5 additions & 0 deletions .changeset/chilly-balloons-rule.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@hyperlane-xyz/utils': minor
---

Added `isPrivateKeyEvm` function for validating EVM private keys
9 changes: 9 additions & 0 deletions .changeset/dull-pianos-kiss.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@hyperlane-xyz/helloworld': minor
'@hyperlane-xyz/widgets': minor
'@hyperlane-xyz/infra': minor
'@hyperlane-xyz/cli': minor
'@hyperlane-xyz/sdk': minor
---

Add FeeHook and Swell to pz and ez eth config generator. Bump up Registry 6.6.0
5 changes: 5 additions & 0 deletions .changeset/empty-lemons-explode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@hyperlane-xyz/cli': minor
---

Add support for deploying Hooks using a HookConfig within a WarpConfig
5 changes: 5 additions & 0 deletions .changeset/five-bats-attend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@hyperlane-xyz/cli': patch
---

fix: balance check skip confirmation
6 changes: 6 additions & 0 deletions .changeset/fresh-fishes-bake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@hyperlane-xyz/sdk': major
---

Rename TokenConfig related types and utilities for clarity. E.g. `CollateralConfig` to `CollateralTokenConfig`.
Export more config types and zod schemas
5 changes: 5 additions & 0 deletions .changeset/hot-spies-share.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@hyperlane-xyz/cli': minor
---

fix signer strategy init for broken cli commands
5 changes: 5 additions & 0 deletions .changeset/long-llamas-fly.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hyperlane-xyz/cli": patch
---

Suppress help on CLI failures
6 changes: 6 additions & 0 deletions .changeset/lovely-planes-end.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@hyperlane-xyz/cli': minor
'@hyperlane-xyz/sdk': minor
---

Allow self-relaying of all messages if there are multiple in a given dispatch transaction.
5 changes: 5 additions & 0 deletions .changeset/many-clouds-bow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@hyperlane-xyz/sdk': minor
---

Call google storage API directly and remove @google-cloud/storage dependency from the SDK.
5 changes: 5 additions & 0 deletions .changeset/neat-apples-marry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@hyperlane-xyz/infra': minor
---

added ubtc route extension config + usdc from appchain to base
5 changes: 5 additions & 0 deletions .changeset/new-seas-ring.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@hyperlane-xyz/sdk': minor
---

Deploy to new chains: arthera, aurora, conflux, conwai, corn, evmos, form, ink, rivalz, soneium, sonic, telos.
5 changes: 5 additions & 0 deletions .changeset/nine-eyes-smile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@hyperlane-xyz/core': minor
---

Made releaseValueToRecipient internal
5 changes: 5 additions & 0 deletions .changeset/pink-sloths-turn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@hyperlane-xyz/widgets': patch
---

Hide outline in button and text input components
5 changes: 5 additions & 0 deletions .changeset/polite-bulldogs-sit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hyperlane-xyz/cli": patch
---

Fix strategy flag propagation
5 changes: 5 additions & 0 deletions .changeset/smooth-rocks-hammer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@hyperlane-xyz/sdk': patch
---

Update default validator sets for alephzeroevmmainnet, appchain, lisk, lumiaprism, swell, treasure, vana, zklink.
5 changes: 5 additions & 0 deletions .changeset/spicy-gifts-hear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@hyperlane-xyz/cli': minor
---

Added strategy management CLI commands and MultiProtocolSigner implementation for flexible cross-chain signer configuration and management
5 changes: 5 additions & 0 deletions .changeset/ten-spiders-trade.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@hyperlane-xyz/cli': patch
---

Added ZKSync signer support using zksync-ethers package
2 changes: 1 addition & 1 deletion .registryrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
c7891cdf0fc6a1541c41e19251611c9152ee8bf9
32b4ab3b3df2bedd0d905c6745bcf1c673a60a01
21 changes: 11 additions & 10 deletions rust/main/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions rust/main/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ sha256 = "1.1.4"
sha3 = "0.10"
solana-account-decoder = "=1.14.13"
solana-client = "=1.14.13"
solana-program = "=1.14.13"
solana-sdk = "=1.14.13"
solana-transaction-status = "=1.14.13"
static_assertions = "1.1"
Expand Down Expand Up @@ -197,27 +198,27 @@ overflow-checks = true
[workspace.dependencies.ethers]
features = []
git = "https://github.com/hyperlane-xyz/ethers-rs"
tag = "2024-12-03-3"
tag = "2024-12-16"

[workspace.dependencies.ethers-contract]
features = ["legacy"]
git = "https://github.com/hyperlane-xyz/ethers-rs"
tag = "2024-12-03-3"
tag = "2024-12-16"

[workspace.dependencies.ethers-core]
features = []
git = "https://github.com/hyperlane-xyz/ethers-rs"
tag = "2024-12-03-3"
tag = "2024-12-16"

[workspace.dependencies.ethers-providers]
features = []
git = "https://github.com/hyperlane-xyz/ethers-rs"
tag = "2024-12-03-3"
tag = "2024-12-16"

[workspace.dependencies.ethers-signers]
features = ["aws"]
git = "https://github.com/hyperlane-xyz/ethers-rs"
tag = "2024-12-03-3"
tag = "2024-12-16"

[patch.crates-io.curve25519-dalek]
branch = "v3.2.2-relax-zeroize"
Expand Down
15 changes: 9 additions & 6 deletions rust/main/agents/relayer/src/msg/op_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,8 @@ impl OpQueue {
/// it's very likely that its status has just changed, so this forces the caller to consider the new status
#[instrument(skip(self), ret, fields(queue_label=%self.queue_metrics_label), level = "trace")]
pub async fn push(&self, mut op: QueueOperation, new_status: Option<PendingOperationStatus>) {
op.set_status_and_update_metrics(
new_status,
Arc::new(self.get_operation_metric(op.as_ref())),
);
let new_metric = Arc::new(self.get_new_operation_metric(op.as_ref(), new_status.clone()));
op.set_status_and_update_metrics(new_status, new_metric);

self.queue.lock().await.push(Reverse(op));
}
Expand Down Expand Up @@ -99,12 +97,17 @@ impl OpQueue {
}

/// Get the metric associated with this operation
fn get_operation_metric(&self, operation: &dyn PendingOperation) -> IntGauge {
fn get_new_operation_metric(
&self,
operation: &dyn PendingOperation,
new_status: Option<PendingOperationStatus>,
) -> IntGauge {
let (destination, app_context) = operation.get_operation_labels();
let new_metric_status = new_status.unwrap_or(operation.status());
self.metrics.with_label_values(&[
&destination,
&self.queue_metrics_label,
&operation.status().to_string(),
&new_metric_status.to_string(),
&app_context,
])
}
Expand Down
19 changes: 12 additions & 7 deletions rust/main/agents/relayer/src/msg/processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,24 +86,29 @@ impl ForwardBackwardIterator {
loop {
let high_nonce_message_status = self.high_nonce_iter.try_get_next_nonce(metrics)?;
let low_nonce_message_status = self.low_nonce_iter.try_get_next_nonce(metrics)?;
// Always prioritize the high nonce message

match (high_nonce_message_status, low_nonce_message_status) {
// Keep iterating if only processed messages are found
// Always prioritize advancing the the high nonce iterator, as
// we have a preference for higher nonces
(MessageStatus::Processed, _) => {
self.high_nonce_iter.iterate();
}
(_, MessageStatus::Processed) => {
self.low_nonce_iter.iterate();
}
// Otherwise return - either a processable message or nothing to process
(MessageStatus::Processable(high_nonce_message), _) => {
self.high_nonce_iter.iterate();
return Ok(Some(high_nonce_message));
}

// Low nonce messages are only processed if the high nonce iterator
// can't make any progress
(_, MessageStatus::Processed) => {
self.low_nonce_iter.iterate();
}
(_, MessageStatus::Processable(low_nonce_message)) => {
self.low_nonce_iter.iterate();
return Ok(Some(low_nonce_message));
}

// If both iterators give us unindexed messages, there are no messages at the moment
(MessageStatus::Unindexed, MessageStatus::Unindexed) => return Ok(None),
}
// This loop may iterate through millions of processed messages, blocking the runtime.
Expand Down Expand Up @@ -157,7 +162,7 @@ impl DirectionalNonceIterator {
}

fn try_get_next_nonce(
&mut self,
&self,
metrics: &MessageProcessorMetrics,
) -> Result<MessageStatus<HyperlaneMessage>> {
if let Some(message) = self.indexed_message_with_nonce()? {
Expand Down
24 changes: 15 additions & 9 deletions rust/main/agents/relayer/src/server/message_retry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,11 @@ mod tests {
let (addr, mut rx) = setup_test_server();

let client = reqwest::Client::new();
let mut message = HyperlaneMessage::default();
// Use a random destination domain
message.destination = 42;
let message = HyperlaneMessage {
// Use a random destination domain
destination: 42,
..Default::default()
};
let pending_operation = MockPendingOperation::with_message_data(message.clone());
let matching_list_body = json!([
{
Expand Down Expand Up @@ -127,9 +129,11 @@ mod tests {
let (addr, mut rx) = setup_test_server();

let client = reqwest::Client::new();
let mut message = HyperlaneMessage::default();
// Use a random origin domain
message.origin = 42;
let message = HyperlaneMessage {
// Use a random origin domain
origin: 42,
..Default::default()
};
let pending_operation = MockPendingOperation::with_message_data(message.clone());
let matching_list_body = json!([
{
Expand Down Expand Up @@ -216,9 +220,11 @@ mod tests {
let (addr, mut rx) = setup_test_server();

let client = reqwest::Client::new();
let mut message = HyperlaneMessage::default();
// Use a random origin domain
message.origin = 42;
let message = HyperlaneMessage {
// Use a random origin domain
origin: 42,
..Default::default()
};
let pending_operation = MockPendingOperation::with_message_data(message.clone());
let matching_list_body = json!([
{
Expand Down
Loading

0 comments on commit 59c76a4

Please sign in to comment.