From f592acce0caf28ca6e8d01df4b7b919429336913 Mon Sep 17 00:00:00 2001 From: Danil Nemirovsky Date: Wed, 22 Jan 2025 16:54:44 +0000 Subject: [PATCH 1/2] feat: Upgrade relayer to 09e1d5b-20250121-214732 version (#5248) ### Description Upgrade relayer to 09e1d5b-20250121-214732 version ### Related issues - Contributes into https://github.com/hyperlane-xyz/hyperlane-monorepo/issues/5098 ### Backward compatibility Yes ### Testing E2E tests in CI --------- Co-authored-by: Danil Nemirovsky <4614623+ameten@users.noreply.github.com> --- typescript/infra/config/environments/mainnet3/agent.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/typescript/infra/config/environments/mainnet3/agent.ts b/typescript/infra/config/environments/mainnet3/agent.ts index be7f84bd09..c98fd6bc4f 100644 --- a/typescript/infra/config/environments/mainnet3/agent.ts +++ b/typescript/infra/config/environments/mainnet3/agent.ts @@ -658,7 +658,7 @@ const hyperlane: RootAgentConfig = { rpcConsensusType: RpcConsensusType.Fallback, docker: { repo, - tag: '62702d3-20250121-002648', + tag: '09e1d5b-20250121-214732', }, blacklist, gasPaymentEnforcement: gasPaymentEnforcement, @@ -693,7 +693,7 @@ const releaseCandidate: RootAgentConfig = { rpcConsensusType: RpcConsensusType.Fallback, docker: { repo, - tag: '7546c01-20250120-171540', + tag: '09e1d5b-20250121-214732', }, blacklist, // We're temporarily (ab)using the RC relayer as a way to increase @@ -727,7 +727,7 @@ const neutron: RootAgentConfig = { rpcConsensusType: RpcConsensusType.Fallback, docker: { repo, - tag: '234704d-20241226-192528', + tag: '09e1d5b-20250121-214732', }, blacklist, gasPaymentEnforcement, From 6c631d8bad8c8811657a29dac71eb1143fb91490 Mon Sep 17 00:00:00 2001 From: Danil Nemirovsky Date: Wed, 22 Jan 2025 17:35:12 +0000 Subject: [PATCH 2/2] fix: Add indices to Scraper database so that queries are quicker (#5039) ### Description Add indices to Scraper database so that queries are quicker. Scraper with SeaORM version 1.1.1 (currently reverted) reported that some queries are running slow. These indices will improve it. ### Related issues - https://github.com/hyperlane-xyz/hyperlane-monorepo/issues/4793 ### Backward compatibility Yes ### Testing Tested queries with indices on a separate database where full production database backup was restored --------- Co-authored-by: Danil Nemirovsky <4614623+ameten@users.noreply.github.com> --- .../m20230309_000003_create_table_cursor.rs | 13 ++++++++-- ...9_000004_create_table_delivered_message.rs | 23 +++++++++++++++++ ...0230309_000004_create_table_gas_payment.rs | 25 ++++++++++++++++--- 3 files changed, 56 insertions(+), 5 deletions(-) diff --git a/rust/main/agents/scraper/migration/src/m20230309_000003_create_table_cursor.rs b/rust/main/agents/scraper/migration/src/m20230309_000003_create_table_cursor.rs index dd8c1d2e96..f3fd3c331b 100644 --- a/rust/main/agents/scraper/migration/src/m20230309_000003_create_table_cursor.rs +++ b/rust/main/agents/scraper/migration/src/m20230309_000003_create_table_cursor.rs @@ -36,7 +36,6 @@ impl MigrationTrait for Migration { .to_owned(), ) .await?; - manager .create_index( Index::create() @@ -47,7 +46,17 @@ impl MigrationTrait for Migration { .to_owned(), ) .await?; - + manager + .create_index( + Index::create() + .table(Cursor::Table) + .name("cursor_domain_height_idx") + .col(Cursor::Domain) + .col(Cursor::Height) + .index_type(IndexType::BTree) + .to_owned(), + ) + .await?; Ok(()) } diff --git a/rust/main/agents/scraper/migration/src/m20230309_000004_create_table_delivered_message.rs b/rust/main/agents/scraper/migration/src/m20230309_000004_create_table_delivered_message.rs index 45cb71ec47..e30663fb10 100644 --- a/rust/main/agents/scraper/migration/src/m20230309_000004_create_table_delivered_message.rs +++ b/rust/main/agents/scraper/migration/src/m20230309_000004_create_table_delivered_message.rs @@ -61,6 +61,29 @@ impl MigrationTrait for Migration { .to_owned(), ) .await?; + manager + .create_index( + Index::create() + .table(DeliveredMessage::Table) + .name("delivered_message_domain_destination_mailbox_idx") + .col(DeliveredMessage::Domain) + .col(DeliveredMessage::DestinationMailbox) + .index_type(IndexType::BTree) + .to_owned(), + ) + .await?; + manager + .create_index( + Index::create() + .table(DeliveredMessage::Table) + .name("delivered_message_domain_destination_mailbox_sequence_idx") + .col(DeliveredMessage::Domain) + .col(DeliveredMessage::DestinationMailbox) + .col(DeliveredMessage::Sequence) + .index_type(IndexType::BTree) + .to_owned(), + ) + .await?; manager .create_index( Index::create() diff --git a/rust/main/agents/scraper/migration/src/m20230309_000004_create_table_gas_payment.rs b/rust/main/agents/scraper/migration/src/m20230309_000004_create_table_gas_payment.rs index 9285c83468..8bafbbdb05 100644 --- a/rust/main/agents/scraper/migration/src/m20230309_000004_create_table_gas_payment.rs +++ b/rust/main/agents/scraper/migration/src/m20230309_000004_create_table_gas_payment.rs @@ -86,7 +86,28 @@ impl MigrationTrait for Migration { .to_owned(), ) .await?; - + manager + .create_index( + Index::create() + .table(GasPayment::Table) + .name("gas_payment_domain_id_idx") + .col(GasPayment::Domain) + .col(GasPayment::Id) + .index_type(IndexType::BTree) + .to_owned(), + ) + .await?; + manager + .create_index( + Index::create() + .table(GasPayment::Table) + .name("gas_payment_origin_id_idx") + .col(GasPayment::Origin) + .col(GasPayment::Id) + .index_type(IndexType::BTree) + .to_owned(), + ) + .await?; manager .create_index( Index::create() @@ -99,7 +120,6 @@ impl MigrationTrait for Migration { .to_owned(), ) .await?; - manager .get_connection() .execute_unprepared(&format!( @@ -124,7 +144,6 @@ impl MigrationTrait for Migration { tgp_gas_amount = TotalGasPayment::TotalGasAmount.to_string(), )) .await?; - Ok(()) }